Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


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

...

  1. Check out $TIS-DEVOPS
  2. Create a new directory under docker/stacks/:stack_name
  3. Add a docker-compose.yml in that new directory. If your application needs environment variables then use an

    env_file

    environment section, i.e.  

    env_file:
    - ./:stack_name.env

    Code Block
    environment:
      DATABASE_HOST: "{{ database['host'] }}"
  4. Create new playbook under ansible/ directory that matches your service name

  5. Add the hosts to the Ansible inventory file for platforms you are targettingtargeting.
  6. Create a Jinja template under ansible/roles/docker_compose/templates/:stack_name.env.j2

  7. Commit and push your changes to Github.

  8. Create a deploy job in Jenkins by copying the 'revalidation-dev-deploy' job and changing the export STACK=revalidation to match your stack name.

Cleaning up Docker Hosts

There are two steps required to clean up a host;

  1. Stop all running containers;

    Code Block
    $ docker stop $(docker ps -q)
  2. Remove all docker-compose files for the existing stacks; 

    Code Block
    $ sudo rm -rf /data/docker/stacks