Links

Ansible

Ansible is used to automate much of the portal infrastructure management. The full list of supported actions, playbooks, and initial setup can be found in ansible-playbooks repo README.
Ansible is run locally or on a dedicated deploy machine. Ansible runs in a docker container and targets the server that you are setting a portal up on.
Since ansible runs in a docker container, you will need docker installed on your local or deploy machine.
The ansible-playbook repo is where all the commands live with explanations in the README. The README has setup instructions, please read them carefully.
The README will point you to a second ansible repo, ansible-private, which you will also need. This ansible-private repo also has a README with setup instructions for you to follow.
NOTE: You do not need to install anything on your server during the prerequisites. Any install instructions in the prerequisites are for installing items on your local machine in order to manage your remote server.

Docker

Ansible is set up to run in docker. Please ensure you have docker installed https://docs.docker.com/get-docker/

Ansible Playbooks

The first ansible repo that we want to clone is the ansible-playbooks repo.
# SSH
git clone [email protected]:SkynetLabs/ansible-playbooks.git
# HTTPS
git clone https://github.com/SkynetLabs/ansible-playbooks.git
NOTE: These docs were generated to support v2.x.y of the ansible-playbooks repo.

Ansible Private

The second ansible repo we want to clone is the ansible-private repo.
The ansible-private repo contains private information about your portal and server. Skynet Labs has their own ansible-private repo which is hidden, so the link above is for a sample repo. Please follow the link to the repo and use the steps in the repo to clone the repo.
You're two ansible repos should be in the directory like so:
parent-dir/
ansible-playbooks/
ansible-private/
NOTE: These docs were generated to support v1.x.y of the ansible-private-sample repo.

hosts.ini

Your hosts.ini file is an inventory file for your ansible hosts. This is where you will store information about the servers that make up your portal.
This file is located at ansible-private/inventory/hosts.ini
The tl;dr of the hosts.ini file is that you can define host groups, and in these groups, you can define hosts and variables.
Let's take the following minimalistic hosts.ini file:
# Here we are defining child groups of the global ansible
# group webportals
#
# webportals_prod is now a sub group of webportals
[webportals:children]
webportals_prod
# Here we are defining variables that belong to the scope of the
# global ansible group webportals.
#
# portal_domain and secrets_storage are globally scoped variables
# and apply to all webportal groups, but can also be overriden
# in any of the subgroups.
[webportals:vars]
portal_domain=mydomain.com
secrets_storage=plaintext
# Here we are defining hosts that belong to the webportals_prod group
#
# sev1 is the ansible host name for the server accessible at mydomain.com.
# the portal_modules is a host specific variable for sev1
[webportals_prod]
sev1 ansible_host=mydomain.com portal_modules=abs
# Here we are defining variables that belong to the scope of the
# webportals_prod group
#
# portal_cluster_id is a variable that only applies to the webportals_prod
# scope.
[webportals_prod:vars]
portal_cluster_id=prod
NOTE: Don't copy the above and overwrite your hosts.ini file. This is an example for informational purposes. The default hosts.ini file in ansible-private has additional defaults set.