The Promotion Pyramid Prod
Build/Deploy time
Pre-Prod
Staging
Integr. tests Dev Integration tests Development builds
Amount of builds
Amount of binaries
Slide 13
Pipeline: quality gates and visibility If quality requirments are hit
CI SERVER
1
If quality requirments are hit
2
Integration
If quality requirments are hit
3
System Testing
4
Staging
Production
*
@jbaruch
#DockerChicago
Letâs docker build in every env!
@jbaruch
#DockerChicago
http://jfrog.com/shownotes
Slide 17
Slide 18
Thatâs why. FROM ubuntu
Latest version
RUN apt-get install -y software-properties-common python RUN apt-get install -y nodejs RUN mkdir /var/www Latest version ADD app.js /var/www/app.js
Latest version Latest version
CMD [â/usr/bin/nodeâ, â/var/www/app.jsâ] @jbaruch
#DockerChicago
http://jfrog.com/shownotes
Slide 19
Thatâs why. FROM ubuntu:19.04
Better now?
RUN apt-get install -y software-properties-common python RUN apt-get install -y nodejs RUN mkdir /var/www ADD app.js /var/www/app.js CMD [â/usr/bin/nodeâ, â/var/www/app.jsâ] @jbaruch
#DockerChicago
http://jfrog.com/shownotes
Slide 20
Thatâs why. FROM ubuntu:4033353383af19ec179c01dda7f355a246c6adcafaf93c8f98 And now? RUN apt-get install -y software-properties-common python RUN apt-get install -y nodejs RUN mkdir /var/www ADD app.js /var/www/app.js CMD [â/usr/bin/nodeâ, â/var/www/app.jsâ] @jbaruch
#DockerChicago
http://jfrog.com/shownotes
Slide 21
Thatâs why. FROM ubuntu:4033353383af19ec179c01dda7f355a246c6adcafaf93c8f98 RUN apt-get install -y software-properties-common python RUN apt-get install -y nodejs RUN mkdir /var/www What about those? ADD app.js /var/www/app.js CMD [â/usr/bin/nodeâ, â/var/www/app.jsâ] @jbaruch
#DockerChicago
http://jfrog.com/shownotes
Slide 22
Thatâs why. FROM ubuntu:4033353383af19ec179c01dda7f355a246c6adcafaf93c8f98 RUN mvn clean install
What about this?
CMD âjava âjar Main.classâ @jbaruch
#DockerChicago
http://jfrog.com/shownotes
Slide 23
Thatâs why. FROM ubuntu:4033353383af19ec179c01dda7f355a246c6adcafaf93c8f98 RUN download_random_sh*t_from_the_internet.sh
And how about this?
CMD [â/usr/bin/nodeâ, â/var/www/app.jsâ] @jbaruch
#DockerChicago
http://jfrog.com/shownotes
Slide 24
Thatâs why you donât trust Docker
@jbaruch
#DockerChicago
http://jfrog.com/shownotes
Slide 25
Slide 26
Slide 27
Whatâs up with the gates?!
@jbaruch
#DockerChicago
http://jfrog.com/shownotes
Slide 28
Slide 29
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!!! @jbaruch
#DockerChicago
http://jfrog.com/shownotes
Slide 30
Letâs build Rock-solid pipeline!
Slide 31
How do I separate dev from prod?!
@jbaruch
#DockerChicago
http://jfrog.com/shownotes
Separate registries per environment If quality requirments are hit
CI SERVER
1
If quality requirments are hit
2
Integration
If quality requirments are hit
3
System Testing
4
Staging
Production
*
@jbaruch
#DockerChicago
The Anatomy of Docker Tag
@jbaruch
#DockerChicago
http://jfrog.com/shownotes
Slide 40
Wait a second, how can I have more than one registry per host now?!
@jbaruch
#DockerChicago
http://jfrog.com/shownotes
Slide 41
How can we support this?
https://host:8081/registry/docker-dev/busybox https://host:8081/registry/docker-qa/busybox https://host:8081/registry/docker-staging/busybox https://host:8081/registry/docker-prod/busybox
@jbaruch
#DockerChicago
http://jfrog.com/shownotes
Slide 42
âONE REGISTRY PER HOST OUGHT TO BE ENOUGH FOR ANYBODY.â
Virtual hosts/ports to the rescue docker tag host:port/busybox
Registry host
Tag name
https://host:port/v2/busybox https://host:8081/registry/docker-dev/busybox
Context name
Registry name
Tag name
Slide 45
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
#DockerChicago
http://jfrog.com/shownotes
Slide 46
But then you realize⊠Wait a second, now I need to pull, retag and push for every step?!
@jbaruch
#DockerChicago
http://jfrog.com/shownotes
dev cluster
test cluster
staging cluster
prod cluster @jbaruch
#DockerChicago
http://jfrog.com/shownotes
Slide 49
Slide 50
Repository (docker): Top level directory in a registry
Repository (the rest of the world): A registry
@jbaruch
#DockerChicago
http://jfrog.com/shownotes
Slide 51
Win-win-win
Single point of access to multiple registries when needed - Completely isolated environments - Immediate and free promotions
Simplicity of latest - Always know what it really means - As long as you promoted immutable artifact @jbaruch
#DockerChicago
http://jfrog.com/shownotes