Operations grimoire/Add a service to Docker PaaS: Difference between revisions

From Nasqueron Agora
(Created page with "== Procedure == To add a service to the Docker PaaS, follow the following steps: === Docker container === * Prepare a Docker image if none is suitable * Deploy dependencies...")
 
No edit summary
Line 22: Line 22:


Replace equatower by the server to target.
Replace equatower by the server to target.
=== Kernel ===
Kernel for the Docker Engine is configured through sysctl and tuned in {{Ops file|roles/paas-docker/kernel}}.


== Cheat sheet ==
== Cheat sheet ==

Revision as of 18:05, 11 November 2018

Procedure

To add a service to the Docker PaaS, follow the following steps:

Docker container

  • Prepare a Docker image if none is suitable
  • Deploy dependencies services like databases
  • When you need to interact from the command line with the container, prepare a wrapper script
  • Configure the service in rOPS: pillar/paas/docker.sls
  • Create a new service sls file in rOPS: roles/paas-docker/containers. The name must match the service name in the pillar.

nginx

If you need a nginx configuration, add it (again using service name) in rOPS: roles/­paa­s-d­ock­er/­ngi­nx/­fil­es/­vhosts.

If you don't need to configure anything, just add this in your file: {% include 'roles/paas-docker/nginx/files/vhosts/_default.conf' %}

To deploy your change, use one of the following:

  • salt equatower state_sls roles/paas-docker/nginx/config
  • salt equatower state.sls_id /etc/nginx/vhosts/phabricator/devcentral.conf roles/paas-docker/nginx/config if you need to pinpoint only your change

Replace equatower by the server to target.

Kernel

Kernel for the Docker Engine is configured through sysctl and tuned in rOPS: roles/paas-docker/kernel.

Cheat sheet

A cheat sheet is available at https://www.cheatography.com/dereckson/cheat-sheets/docker-paas/ with the following content: