3. • DevOps Engineer @anynines
• Used to work with Java (monoliths)
• Got to know Node.js and Microservices
• Learned about CloudFoundry
• Can I push my Container to CF ?
• I want to take you on a journey of me asking myself if docker and diego/CloudFoundry are good friends
• First of all let me tell you a little bit about me and why I want to take you on that journey
* Lets answer some question first
* 3 Advantages
Works on my machine -> works on every other machine
New Devs -> increase productivity, no complicated setup
Other machines -> test machine, staging -> supports continuous integration/deployment
Even on production -> remember 12Factors dev/prod parity ?! there you have it !
I will mention the other 2 Advantages later on
Auto Healing
Marketplace for backing services (PCF from scratch, OS CF + anynines)
Why can we even use docker in diego ?
Garden Linux supports mounting Docker images as root file system for container it constructs
Therefore Garden Linux uses the same libraries that power docker
* Warden Linux couldn't do that
therefore I want to show you a litte micro service architecture I implemented
at the beginning I wanted to play around with seneca
importing movies from a movie database in my own db
Register with email address to recommender -> sends recommendation (random movie) every day 1
Second advantage of docker: docker pull mongo
* But i decided to dockerize the micro services because of the advantages I talked before (other dev can start easily, can deploy everywhere)
env file
third advantage of docker
this was the state of my micro service landscape as I joined anynines
I wanted to deploy the landscape on Cloud Foundry -> Changes regarding 12Factor (basically get stuff out of VCAP_SERVICES Env variables)
Switch for local & cloud profile
Nothing changes for running it with docker, because development profile is default
2. Kästchen
For production you would probably use a service discovery/registry like consul/eureka
Why do I need docker anymore ?
Lets try to deploy to deploy it and see what i get
* Note: only images from accessible docker registry are supported as far as I know, so u have to register and upload your image
man muss build pack weglassen
dont have to deploy it to CF or start every service separately in order to test new changes
-> local development/testing
-> new Devs -> it will run
because there are 3 Micros
-> thats not really awesome
* Both Technologies support it
It can be improved if mainfest files support docker-images, but still
I can’t think of any advantage of deploying docker images