Install Carbonio Using Ansible

Install Carbonio Using Ansible#

Prepare Inventory#

The forked repository contains file inventoryname, which you need to copy to the data directory, giving it a meaningful name (especially in the case you manage multiple, separate infrastructures)

$ cd carbonio-install-ansible/
$ cp inventoryname ../data/carbonio_inventory

The carbonio_inventory file contains various sections, one for each of the available Roles. You need to edit the file and provide the FQDN of the Node on which the role will be installed. Suppose that you install on 5 nodes, whose FQDNs are srv1.example.com to srv5.example.com, an excerpt of the file might look like:

[postgresServers]
srv1.example.com

[masterDirectoryServers]
srv1.example.com

[dbsConnectorServers]
srv1.example.com

If you do not want to install a Role, simply leave the corresponding section empty.

For some of the Roles you need to provide some additional value for a proper configuration. Currently, these sections are

  • the Proxy Role:

    [proxyServers:vars]
    #webmailHostname=webmailPublicHostname
    

    This is the FQDN of the domain, for example mail.example.com, so:

    [proxyServers:vars]
    webmailHostname=mail.example.com
    
  • The Carbonio VideoServer, if installed:

    [videoServers]
    #hostname public_ip_address=x.y.z.t
    

    In this case, supposing that the Role is installed on srv5.example.com and the public IP address of the Carbonio VideoServer is 172.16.12.5, this entry should look like:

    [videoServers]
    srv5.example.com public_ip_address=172.16.12.5
    

    Note

    172.16.12.5 is a private IP, remember to replace it with an actual public IP!

In order to run the script, from the carbonio-ansible/carbonio-install-ansible directory, execute the command

$ ansible-playbook -u root -i ../../data/carbonio_inventory carbonio-install.yml

Make sure to replace carbonio_inventory with the proper name of the inventory you want to install.

The playbook will execute all the tasks necessary and print the result on the screen. When finished, a summary of the results is displayed. Moreover, the passwords created during the installation are saved in the carbonio-ansible/data directory, along with the carbonio_inventory file, so you have them always at your disposal when you need them, for example during upgrades or routine tasks. To protect them, make sure:

  • to allow only trusted persons the access to the directory

  • to make a backup of the directory

Failed inventory installation

If for any reason the installation fails, you can check the log file (to set it up, see Section Configure Ansible) to see what happened, fix it, then execute again the inventory. Ansible will recognise the steps already successfully carried out and run only those that failed.

Closing Remarks#

Once the script has successfully completed, you can immediately access your new Carbonio installation and execute the first necessary tasks, see Section Access to the Web Interface. You can then proceed to carry out further administration tasks, see Post-Install. In particular, if you plan to migrate to Carbonio, refer to section Migration to Carbonio.