Info |
---|
WIP: This will be improved upon to be platform-aware but the devops jobs will be automatically updated when that happens |
Table of Contents |
---|
Installation
Ansible is a Python application so it can be installed using Pip or Homebrew. To use Pip;
Code Block |
---|
$ sudo pip install ansible |
Once it has installed it should be possible to run the following command from $TIS-DEVOPS
Code Block |
---|
$ ansible jenkins -i ansible/inventory/build -m ping
10.1.0.4 | SUCCESS => {
"changed": false,
"ping": "pong"
} |
Creating a new stack
- Check out $TIS-DEVOPS
- Create a new directory under docker/stacks/:stack_name
- Add a docker-compose.yml in that new directory. If your application needs environment variables then use an env_file section, i.e.
env_file:
- ./:stack_name.env Create new playbook under ansible/ directory that matches your service name
- Add the hosts to the Ansible inventory file for platforms you are targetting.
Create a Jinja template under ansible/roles/docker_compose/templates/:stack_name.env.j2
- Commit and push your changes to Github.
- Create a deploy job in Jenkins by copying the 'revalidation-dev-deploy' job and changing the export STACK=revalidation to match your stack name.