Build & Config

Customizing service life-cycle management

Orchestration engine

Cloud 66 provides an orchestration engine to roll out Docker images to your servers and initialize containers from them. This includes:

  • Bringing up containers
  • Monitoring
  • Scaling
  • Port forwarding
  • Load balancing
  • Health checks
  • Graceful draining and shutdown of workers
  • Traffic switching
  • Deployment rollbacks (version control)

Orchestration engine by version

In the case of Cloud 66 Container Service V2 this engine is Kubernetes. In the case of Version 1 it is Cloud 66's own engine.

Deploying your application

The above can be summarized as the life-cycle management of your containers, which occurs with each new deployment of your application. This is what happens when you redeploy your application:

  1. Your latest code is pulled from Git and new images are built
  2. These images are rolled out to your server(s)
  3. Containers are initialized from these images, with all relevant environment variables and internal networking made available to them.
  4. If and when your health checks are successful, your old containers are gracefully drained and traffic is switched to the new containers (on the specified port(s)).

Configuration

Below are all the directives you can set in your service configuration (service.yml) to customize your container life-cycle management.

(Read our guide to using service.yml for more help on customizing your service configuration.)

Health

Pre-start command

This is a command that executes immediately after a container is created.

Pre-stop command

This is a command that executes immediately before a container is terminated.

Pre-start signal

Pre-stop sequence

Requires

Restart on deploy

A boolean value to indicate whether the containers of this service should be restarted during deployment (set to true by default). For example:

services:
    [service_name]:
        restart_on_deploy: false

Stop grace

Sets the duration between the Docker TERM and KILL signals when Docker stop is run and a container is stopped. For example:

services:
    [service_name]:
        stop_grace: 30
Previous
Service configuration options