Skip to end of metadata
Go to start of metadata

Why Continuous Delivery?

The "holy grail" of continous delivery is to balance the effort in productivity and quality to ensure that all efforts in software development is headed in the right direction.

Continuous Delivery: "[...] keep producing valuable software in short cycles and ensure that the software can be reliably released at any time"

Why pull instead of push?

Push strategy is problematic in regards to security and complexity in large systems. Also pull scales better, since it is not reliant on a single push-node. Using push strategy will limit you in practise to continous deployment and hide the extra effort you need to enable continous production.

Why Docker?

Docker: Ease of deployment and consistency.

What?

The application is considered the main deployment unit.
The Docker image is an approach to server/machine provisioning.

A single Docker image is feasible for all environments as long as there is little variation between environments. Variation must be parametrized and this quickly becomes cumbersome.

Multiple Docker images makes sense when the differences are difficult to mange with a few environment variables. It might be useful to use provisioning tools to support building the different images.

Single Docker image strategy

  • Same Docker image used in all environments.
  • Use Data Volume Container to override configuration and store state. Image must work both with and without Data volume container.
  • Docker hub builds Docker image automatically.
    • Automated Build only on monitored Github folder changes not supported.
    • Workaround test environments: Upgrade Docker image automatically, but only every 12-24 hours.
    • Workaorund prod environments: Manual upgrade of Docker image using automated script (check_and_update_docker_image.sh).
  • Cron job on Docker host to upgrade Docker image if changed every x hours.
  • If username and password is required to download the application, the Docker image must be private as well, because the script to download application must be included in the image.

Automatic Docker image upgrade using crontab and bash script

See https://github.com/Cantara/devops/tree/master/pull_deploy/linux

  • Jenkins Github plugin for webhooks, so we get much faster time to deploy, about 2 minutes.
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.