cetic.alfresco
Ansible Role: Alfresco
This Ansible role installs Alfresco Community on RHEL/CentOS 7 using Ansible.
The purpose of this role is to simplify the process of adding Alfresco to your playbooks.
Currently, the role supports installing Alfresco versions 4.2 and 5.2.
Requirements
You can use these Ansible roles to set up a MySQL or PostgreSQL database:
- https://github.com/geerlingguy/ansible-role-mysql
- https://github.com/geerlingguy/ansible-role-postgresql
Role Variables for Alfresco 4.2
Here are the available variables with their default values (listed in defaults/main.yml
):
tomcat
tomcat_version
: '8.5.31'tomcat_port
: '8080'tomcat_port_ajp
: '8009'tomcat_port_https
: '8443'tomcat_port_shutdown
: '8005'tomcat_group
: 'alfresco'tomcat_user
: 'alfresco'tomcat_user_home
: '/opt/alfresco/tomcat'
You can modify the Tomcat-related variables here.
tools
imagemagick_version
: '6.5.4.7'
You can adjust the version of ImageMagick here.
alfresco
You can set Alfresco-related variables here.
alfresco_build
: '00012'alfresco_version
: '4.2.f'alfresco_version_url
: '{{alfresco_version}}'alfresco_archive_folder
: ''alfresco_user
: 'alfresco'alfresco_group
: 'alfresco'java_opts
: '-Xms512m -Xmx1024m -Xss768k -XX:NewSize=256m -server'
These are the user and group settings for running Alfresco.
alfresco_user_home
: '/opt/alfresco'alfresco_data_home
: '/opt/alfresco'alfresco_uid
: '501'
These paths point to where Alfresco will be installed.
alfresco_log_home
: '/var/log/alfresco'
This is where Alfresco's log files will be stored.
alfresco db
alfresco_db_host
: '127.0.0.1'alfresco_ip
: 'localhost'alfresco_db_name
: 'alfresco'alfresco_db_user
: 'alfresco'alfresco_db_password
: 'alfresco'alfresco_db_ip
: 'localhost'alfresco_db_driver
: 'com.mysql.jdbc.Driver'alfresco_default_database_url
: 'jdbc:mysql://{{ alfresco_db_ip }}/alfresco?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false'
These variables are for configuring the database used by Alfresco. You'll need to create a user/password and a database.
mysql-java-connector
setup_mysql_java_connector
: truemysql_connector_version
: '5.1.35'
If you're using a MySQL database, make sure to set setup_mysql_java_connector
to true to install the MySQL connector for Java.
solr alfresco
setup_solr
: trueip_solr
: 'localhost'solr_port
: '8080'solr_version_url
: 'alfresco-community-solr-{{alfresco_version}}'solr_version
: solrsolr_war
: apache-solr-1.4.1.war
Set setup_solr
to true to install Solr alongside Alfresco.
geerlingguy java
java_home
: '/lib/jvm/jre-1.8.0-openjdk'
Role Variables for Alfresco 5.2
List of variables for Alfresco 5.2:
alfresco
Make these changes for Alfresco 5.2.
alfresco_build
: '00028'alfresco_version
: '201707'alfresco_version_url
: 'distribution-201707'alfresco_archive_folder
: '/alfresco-community-distribution-201707'alfresco_user
: 'alfresco'alfresco_group
: 'alfresco'alfresco_user_home
: '/opt/alfresco'alfresco_data_home
: '/opt/alfresco'alfresco_uid
: '501'alfresco_log_home
: '/var/log/alfresco'
solr alfresco
setup_solr
: trueip_solr
: 'localhost'solr_port
: '8080'solr_version_url
: 'alfresco-solr4-5.2.g'solr_version
: solr4solr_war
: solr4.war
Share Alfresco Service
setup_shared_alfresco
: true
Role Variables for Plugin Blob Storage Azure
For more information, refer to https://github.com/EisenVault/ev-alfresco-azure-adapter.
setup_azure_blob_storage
: trueazure_ssh_key
: #yourkeyazure_container_name
: #yourcontainernameazure_storage_account
: #yourstorageaccount
Dependencies
- geerlingguy.java
- cetic.tomcat
Example Playbook
- hosts: alfresco
become: true
vars:
tomcat_group: 'alfresco'
tomcat_user: 'alfresco'
tomcat_user_home: '/opt/alfresco/tomcat'
mysql_databases:
- name: alfresco
mysql_users:
- name: alfresco
password: alfresco
priv: "alfresco.*:ALL"
roles:
- role: geerlingguy.java
- role: geerlingguy.mysql
- role: cetic.tomcat
- role: cetic.alfresco
Tests
Testing Locally with Vagrant
You can test this Ansible role using vagrant
. Check the Vagrantfile for details.
Testing with Travis
Refer to the playbook used for testing in Travis CI (tests/test.yml).
Future Improvements
- Offer more updated or alternative versions of Alfresco and Solr
- Support for additional operating systems
Feel free to contribute!
License
Gnu General Public License 3.0
Credits
This repository started as a fork from https://github.com/libersoft/ansible-alfresco
ansible-galaxy install cetic.alfresco