Home
Add Document
Sign In
Create An Account
Viewer
Transcript
RANCHER & CONTINUOUS DELIVERY DockerGrunn #6 Johan van der Geest Edwin Harmsma
INTERESTING DEVELOPMENTS
+
DOCKER & DOCKER COMPOSE
IT RUNS FINE ON A SINGLE MACHINE…
BUT WHAT ABOUT MORE THAN ONE WHALE?
DOCKER CLUSTERING
Swarm
Kubernetes
Cattle
Mesos
Marathon
RANCHER FEATURES
Authentication Environments Audit trails
Service catalog
(Auto)scaling
Storage pools Distributed storage (Convoy)
RANCHER SERVER & AGENTS
Docker host
rancher/agent
rancher/agent
myapp/frontend
mongodb
Docker host
Docker host
rancher/agent
rancher/agent
myapp/backend
myapp/frontend
myapp/backend
Docker host
Docker host
External
rancher/agent
Docker host
Internal
rancher/server
CONTINUOUS DELIVERY & RANCHER
CONTINUOUS DELIVERY Build artifact centrally available
DEVELOP
CODE COMMIT
BUILD COMPONENT
UNIT TEST
Bleeding edge Choose moment system available and version
INTEGRATE
ACCEPTANCE
PRODUCTION
AUTOMATE
CONTINUOUS DELIVERY STACK
Build orchestration and execution
Version and release management
Build task environment
Packaging develop and production environment
Auto-deployment to separated development and production environment
compile in runner
push image to registry
4
pull image from registry
7
2
trigger compose runner hello_server
5
3
hello_compose
build docker image 1 git push to develop
rancher-compose up
6
git merge and tag release
manual upgrade
production
develop
GIT BRANCHES, TAGS AND DOCKER TAGS
image:1.1
image:1.0
image:latest
1.0
master
1.1
C2
C1
C2
C3
image:master
develop feature01
Cw
Cx
Ca
Cb
Cy
Cz
Cc
image:feature01
image:develop
SOURCE COMPILE JOB
Source-compile Container-build-publish Deploy
cargo-build: stage: source-compile Docker image used to setup build environment image: hub.servicelab.org/rust/rustup script: Command executed - cargo build --release --target x86_64-unknown-linux-musl inside container artifacts: paths: Preserve compiled - target/x86_64-unknown-linux-musl/release/hello_server binary after build tags: Select appropriate runner that can run Docker containers - docker cache: key: cargo-cache paths: Shared cache between all builds of this project - .cargo - target/
BUILD AND PUBLISH CONTAINER JOB build-and-publish-to-docker: stage: container-build-publish script: - > docker build --build-arg CI_BUILD_ID=${CI_BUILD_ID} --build-arg CI_BUILD_GIT_REV=${CI_BUILD_REF} --pull --no-cache -t ${IMAGE_NAME} . - docker images ${IMAGE_NAME} - docker push ${IMAGE_NAME} - docker rmi ${IMAGE_NAME} tags: - shell
Source-compile Container-build-publish Deploy
AUTO DEPLOY TO RANCHER
Source-compile Container-build-publish
image: monostream/rancher-compose
Deploy
before_script: - source rancher.env upgrade-service: script: - > rancher-compose -p hello-develop -f rancher-compose.develop.yml up -d --confirm-upgrade --force-upgrade --pull --upgrade ${service}
Trigger parameter passed by hello_server or hello_client projects
THANKS FOR YOUR ATTENTION
tno.nl/careers
BACKUP SLIDES
~2 Mb
JOBS AND STAGES ~600 Mb DEVELOP develop branch
DEV Compile
Docker Build + Push
Rancher Auto Upgrade
Production Compile
Versioned docker Build + Push
Manual Rancher Upgrade
SOURCE COMPILE
CONTAINER BUILD
DEPLOY
PRODUCTION Tag @ master branch
IMAGE SIZE: COMPILE VS DEPLOY CONTAINER
REPOSITORY hub.servicelab.org/docker-demo/hello_server hub.servicelab.org/rust/rustup debian
TAG latest latest latest
IMAGE ID deb921e8a18e 0920bbe2377d bb5d89f9b6cb
CREATED 28 hours ago 5 days ago 3 weeks ago
SIZE 2.089 MB 576.3 MB 125.1 MB
PRODUCTION RELEASE: image:latest
Source-compile Container-build-publish Deploy
production-release: stage: deploy script: - git branch --contains=`git show-ref --tags -s ${CI_BUILD_TAG}` master - docker pull ${IMAGE_NAME} - docker tag ${IMAGE_NAME} ${REGISTRY_URL}/hello_server:latest - docker push ${REGISTRY_URL}/hello_server:latest - docker rmi ${REGISTRY_URL}/hello_server:latest tags: - shell only: - /^([0-9]+\.)+([0-9]+)$/ except: - branches
20160513-Docker Meetup-uploaded.pdf
Whoops! There was a problem loading more pages. 20160513-
Docker
Meetup-
uploaded.
pdf
. 20160513-
Docker
Meetup-uploaded.
pdf
. Open. Extract. Open with.
Download PDF
2MB Sizes
1 Downloads
171 Views
Report
Recommend Documents
No documents
×
Report 20160513-Docker Meetup-uploaded.pdf
Your name
Email
Reason
-Select Reason-
Pornographic
Defamatory
Illegal/Unlawful
Spam
Other Terms Of Service Violation
File a copyright complaint
Description
×
Sign In
Email
Password
Remember Password
Forgot Password?
Sign In