Patterns and antipatterns in Docker image lifecycle as was presented at Oracle Code SF 2017
-
Upload
baruch-sadogursky -
Category
Technology
-
view
184 -
download
1
Transcript of Patterns and antipatterns in Docker image lifecycle as was presented at Oracle Code SF 2017
Poll Time!üHeard about DockerüCan do the tutorialüPoCing, playing etc.üProduction, baby!
@JBARUCH #ORACLECODE HTTP://JFROG.COM/SHOWNOTES
The Promotion Pyramid
Developmentbuilds
Dev Integrationtests
Integr.tests
StagingPre-ProdProd
Amountofbuilds
Build/Dep
loytim
e
Amountofbinaries
Pipeline: Quality Gates and Visibility
Source:AgileALM,MichaelHüttermann,ManningPublicationsCo.
@JBARUCH #ORACLECODE HTTP://JFROG.COM/SHOWNOTES
Traditional Server Pattern
http://martinfowler.com/bliki/ImmutableServer.html
@JBARUCH #ORACLECODE HTTP://JFROG.COM/SHOWNOTES
Immutable Server Pattern
http://martinfowler.com/bliki/ImmutableServer.html
@JBARUCH #ORACLECODE HTTP://JFROG.COM/SHOWNOTES
What’s up with the gates?!
- QA shouldn’t test dev images- non-tested images shouldn't be
staged- non-staged, non-tested or dev
images shouldn’t end up in production!!!
How can we support this?
https://host:8081/artifactory/docker-dev/busybox
https://host:8081/artifactory/docker-staging/busybox
https://host:8081/artifactory/docker-qa/busybox
https://host:8081/artifactory/docker-prod/busybox
@JBARUCH #ORACLECODE HTTP://JFROG.COM/SHOWNOTES
Virtual hosts/ports to the rescue
https://host:8081/artifactory/docker-dev/busybox
Contextname
VirtualrepositorynameTagname
https://host:port/v2/busybox
server {listen 5001;
server_name 192.168.99.100;if ($http_x_forwarded_proto = '') {
set $http_x_forwarded_proto $scheme;}rewrite ^/(v1|v2)/(.*) /artifactory/api/docker/docker-dev/$1/$2;…}
}
@JBARUCH #ORACLECODE HTTP://JFROG.COM/SHOWNOTES
Framework build
- Verified base image- Add system dependencies
from artifactory- JDK- Tomcat- Own it!
Minimal Framework build DockerfileFROM centos:7MAINTAINER [email protected]
@jbaruch #devnexus http://jfrog.com/shownotes
Application build DockerfileFROM yourorg-docker.jfrog.io/yourorg/framework:latestMAINTAINER [email protected]
ADD https://yourorg.jfrog.io/yourorg/java-release-local/…/app-[RELEASE].war /opt/jboss/wildfly/standalone/deployments/app.war
Application build DockerfileFROM yourorg-docker.jfrog.io/yourorg/framework:latestMAINTAINER [email protected]
ADD https://yourorg.jfrog.io/yourorg/java-release-local/…/app-[RELEASE].war /opt/jboss/wildfly/standalone/deployments/app.war
Application build DockerfileFROM yourorg-docker.jfrog.io/yourorg/framework:latestMAINTAINER [email protected]
ADD https://yourorg.jfrog.io/yourorg/java-release-local/…/app-[RELEASE].war /opt/jboss/wildfly/standalone/deployments/app.war
HIGH QUALITY(software and information) SPEED LOW COST
(automation)
Fast releases > Modular > Automation
Conclusions: Release Fast or Die!