项目作者: cetic

项目描述 :
Ansible Role - Alfresco
高级语言: Shell
项目地址: git://github.com/cetic/ansible-role-alfresco.git
创建时间: 2018-03-06T16:12:21Z
项目社区:https://github.com/cetic/ansible-role-alfresco

开源协议:GNU General Public License v3.0

下载


Ansible Role: Alfresco

Build Status
Ansible Galaxy

Installs Alfresco Community on RHEL/CentOS 7 with ansible.

The goal is to provide a standalone alfresco role that can be added into your playbooks.

The ansible role allows you to install, for the moment, the version 4.2 or 5.2 of Alfresco.

Requirements

You can use these ansible roles to set up a mysql or a postgresql database:

Role Variables for Alfresco 4.2

Available variables are listed below, along with default values (see defaults/main.yml):

tomcat

  1. tomcat_version: '8.5.31'
  2. tomcat_port: '8080'
  3. tomcat_port_ajp: '8009'
  4. tomcat_port_https: '8443'
  5. tomcat_port_shutdown: '8005'
  6. tomcat_group: 'alfresco'
  7. tomcat_user: 'alfresco'
  8. tomcat_user_home: '/opt/alfresco/tomcat'

You can set variables related to tomcat here.

tools

  1. imagemagick_version: '6.5.4.7'

You can set the version of imagemagick by passing it in here.

alfresco

You can set variables related to alfresco here.

  1. alfresco_build: '00012'
  2. alfresco_version: '4.2.f'
  3. alfresco_version_url: '{{alfresco_version}}'
  4. alfresco_archive_folder: ''
  5. alfresco_user: 'alfresco'
  6. alfresco_group: 'alfresco'
  7. java_opts: '-Xms512m -Xmx1024m -Xss768k -XX:NewSize=256m -server'

The user and group under which Alfresco will run.

  1. alfresco_user_home: '/opt/alfresco'
  2. alfresco_data_home: '/opt/alfresco'
  3. alfresco_uid: '501'

The directories where Alfresco will be installed.

  1. alfresco_log_home: '/var/log/alfresco'

The directory for the logs of Alfresco.

alfresco db

  1. alfresco_db_host: '127.0.0.1'
  2. alfresco_ip: 'localhost'
  3. alfresco_db_name: 'alfresco'
  4. alfresco_db_user: 'alfresco'
  5. alfresco_db_password: 'alfresco'
  6. alfresco_db_ip: 'localhost'
  7. alfresco_db_driver: 'com.mysql.jdbc.Driver'
  8. alfresco_default_database_url: 'jdbc:mysql://{{ alfresco_db_ip }}/alfresco?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false'

You can set variables related to the installed database. It needs to create a user/password and a database.

mysql-java-connector

setup_mysql_java_connector: true
mysql_connector_version: ‘5.1.35’

In the case where you use a mysql database, you need to install the mysql connector for java by passing setup_mysql_java_connector to true.

solr alfresco

  1. setup_solr: true
  2. ip_solr: 'localhost'
  3. solr_port: '8080'
  4. solr_version_url: 'alfresco-community-solr-{{alfresco_version}}'
  5. solr_version: solr
  6. solr_war: apache-solr-1.4.1.war

To install Solr with Alfresco, set ‘setup_solr’ to true.

geerlingguy java

  1. java_home: '/lib/jvm/jre-1.8.0-openjdk'

Role Variables for Alfresco 5.2

Available variables for Alfresco 5.2 are listed below:

alfresco

You can set these variables to have an Alfresco 5.2.

  1. alfresco_build: '00028'
  2. alfresco_version: '201707'
  3. alfresco_version_url: 'distribution-201707'
  4. alfresco_archive_folder: '/alfresco-community-distribution-201707'
  5. alfresco_user: 'alfresco'
  6. alfresco_group: 'alfresco'
  7. alfresco_user_home: '/opt/alfresco'
  8. alfresco_data_home: '/opt/alfresco'
  9. alfresco_uid: '501'
  10. alfresco_log_home: '/var/log/alfresco'

solr alfresco

  1. setup_solr: true
  2. ip_solr: 'localhost'
  3. solr_port: '8080'
  4. solr_version_url: alfresco-solr4-5.2.g
  5. solr_version: solr4
  6. solr_war: solr4.war

Share Alfresco Service

  1. setup_shared_alfresco: true

Role Variables for Plugin Blob Storage Azure

See https://github.com/EisenVault/ev-alfresco-azure-adapter for more informations.

  1. setup_azure_blob_storage: true
  2. azure_ssh_key: #yourkey
  3. azure_container_name: #yourcontainername
  4. azure_storage_account: #yourstorageaccount

Dependencies

  • geerlingguy.java
  • cetic.tomcat

Example Playbook

  1. - hosts: alfresco
  2. become: true
  3. vars:
  4. tomcat_group: 'alfresco'
  5. tomcat_user: 'alfresco'
  6. tomcat_user_home: '/opt/alfresco/tomcat'
  7. mysql_databases:
  8. - name: alfresco
  9. mysql_users:
  10. - name: alfresco
  11. password: alfresco
  12. priv: "alfresco.*:ALL"
  13. roles:
  14. - role: geerlingguy.java
  15. - role: geerlingguy.mysql
  16. - role: cetic.tomcat
  17. - role: cetic.alfresco

Tests

testing locally with Vagrant

You can test this ansible role by using vagrant. See the Vagrantfile.

testing with Travis

See the playbook used for Travis CI tests (tests/test.yml).

Future improvements

  • Provide more recent/different versions of Alfresco & Solr
  • More OS plateforms support

Feel free to contribute.

License

Gnu General Public License 3.0

Credits

This repository was initially a fork from https://github.com/libersoft/ansible-alfresco