Continuous Deployment with Docker: Slides

Publish date: 2024-03-08

 

@sublimino

 Delivery Engineer

News UK, Visa, British Gas

www.binarysludge.com

codes


Containment

data

efficacy

   
 

Principles

pick any two

more Principles

Continuous delivery/deployment

BRING PAIN FORWARD 

deliver continuously

developer Workflow

On green deploy

Implementation

Task runner

Unified task interface

Abstracts docker, fleet and test commands
$ gulp <tab> browserify fleet:restart test:functional build fleet:start test:functional:remote build-properties help test:functional:watch build:watch less test:integration default lint test:integration:remote docker:build livereload test:integration:watch ...

dev to docker

testing, testing

Test setup script

          

fig.yml

fig on a build server


export SCRIPT_COMMAND="$NOHUP_COMMAND script --quiet --command" 

funky cross platform fixes required

export TARGET_FIG_FILE=${TARGET_FIG_FILE:-fig-test.yml} export PROJECT_NAME=$(basename "$(pwd)" | sed 's/[^a-z]//g'); export FIG_COMMAND="fig --file=${TARGET_FIG_FILE} --project-name ${PROJECT_NAME}"; ... figUp() { $SCRIPT_COMMAND $FIG_COMMAND up } ...

gnu gnu gnu

This is the price paid for cross platform compatibility

# linux defaults export BASE64_COMMAND="base64 -w 0" export NOHUP_COMMAND="nohup" export SCRIPT_COMMAND="$NOHUP_COMMAND script --quiet --command" # osx overrides [[ $(uname) = 'Darwin' ]] && { darwinScript() { $NOHUP_COMMAND script -q typescript $(echo $1 \ | sed -e 's/$^"//g' -e 's/"$//g') } SCRIPT_COMMAND="darwinScript" BASE64_COMMAND="base64" [[ $(command -v reattach-to-user-namespace) ]] && { NOHUP_COMMAND="reattach-to-user-namespace nohup" } }

back to test Setup script

docker image tests

          

Promotion

Deployment

In conclusion

fin

@sublimino

www.binarysludge.com 

ncG1vNJzZmirY2KytnnWnqqtZWFjrq6t2ailmq%2BjY7CwuY6boKeZoq7ArcHDoJxnm5%2BifIS7za2gp62fqsCFsc%2BlprKllaPBmLXToXuom5uav3C1zZ2csWaYqbqt