Skip to content

Installation

Dag Sonstebo edited this page Sep 5, 2016 · 12 revisions

This guide will split the installation of Trillian into two parts:

  • The requirements for the parent CloudStack environment in which the nested environments are built and how this is installed and configured.
  • The installation of the Ansible plays/roles which build the nested CloudStack instances.

Parent CloudStack installation steps

  1. Build your parent CloudStack infrastructure as per standard CloudStack installation procedures. There are no CloudStack version requirements, however the backend hypervisor has to be VMware ESXi.
  2. Configure a NFS linux server with a shared NFS root folder - this allows Trillian to simply create subfolders within this root folder for the purpose of providing primary and secondary storage to nested CloudStack instances. The NFS server can be shared with the parent CloudStack instance if required.
  3. Create two shared networks in the parent CloudStack infrastructure:
  • Shared management network: this must be accessible from all hosts in the parent environment, i.e. it must either be on the same VLAN and IP range as the parent CloudStack management servers and hypervisors, or L3 routable.
  • Nested trunked network: this must be configured with VLAN 4095 to allow the nested CloudStack environments to define their own VLAN ranges and ensure these propagate between hypervisors in the parent environment. Obviously top-of-rack switches will also need to be configured to allow this traffic to pass.
  1. Build and configure your Trillian Ansible host and environments MySQL database server (can be the same).

Installation of the Trillian Ansible playbooks and roles

Ansible host

  1. Build a CentOS7 VM attached to the parent CloudStack management network. Other OS'es can be used but CentOS makes Python 2.7 handling easier. The standard CentOS core install has all pre-requisites.
  2. Create your Trillian root folder.
  3. Install git, clone the Trillian Github repository and run the Ansible install script:
> yum install git -y
> git clone https://github.com/shapeblue/Trillian
> sh ./Trillian/utils/install_ansible.sh
  1. The "install_ansible.sh" script will install Ansible as well the python CS library required for the Ansible CloudStack modules.

Environments DB host

  1. Either build another DB host or utilise the Ansible host.
  2. Configured IPtables / firewalld to allow MySQL traffic on TCP/3306.
  3. Install MySQL or MariaDB and configure:
> yum install mariadb-server -y
> systemctl enable mariadb
> systemctl start mariadb
> /usr/bin/mysql_secure_installation
  1. Copy the /Ansible/DBscript/trillianenvs.sql file from the Trillian Ansible host (alternatively clone the repo again as described above).
  2. Import the environments DB:
> mysql -u root -p < trillianenvs.sql
  1. If required create a new MySQL user with read and write access to the TrillianEnvs database.

Ansible NFS host

Ansible has been written to use a simple linux based NFS server to provide primary and secondary storage to nested cloud instances. Rather than creating individual NFS shares for each nested cloud the Trillian NFS server is simply configured with a root file share, which is shared out to all IP ranges utilized in the nested management networks. Trillian simply creates subfolders specifically for each nested cloud infrastructure on demand. Trillian does have a built in safety mechanism to prevent folders being created if they already exist, and to prevent the wrong primary / secondary NFS shares being deleted when a nested cloud is decommissioned.

To build and install the Trillian NFS host:

  1. Build a NFS host using the linux OS of your choice.
  2. Configure NFS.
  3. Create a root NFS file share and share this out to all IP addresses in the nested cloud management IP ranges.

Next - configuration >