Introduc)on*to*Docker* Docker’Management:’ fig, … · Introduc)on*to*Docker*...
Transcript of Introduc)on*to*Docker* Docker’Management:’ fig, … · Introduc)on*to*Docker*...
![Page 1: Introduc)on*to*Docker* Docker’Management:’ fig, … · Introduc)on*to*Docker* Docker’Management:’ fig, OpenStack’ Florian*Dudouet,*Researcher,*ICCLab*](https://reader031.fdocuments.us/reader031/viewer/2022022012/5b165db67f8b9a4a6d8b873a/html5/thumbnails/1.jpg)
Introduc)on to Docker Docker Management:
fig, OpenStack
Florian Dudouet, Researcher, ICCLab
![Page 2: Introduc)on*to*Docker* Docker’Management:’ fig, … · Introduc)on*to*Docker* Docker’Management:’ fig, OpenStack’ Florian*Dudouet,*Researcher,*ICCLab*](https://reader031.fdocuments.us/reader031/viewer/2022022012/5b165db67f8b9a4a6d8b873a/html5/thumbnails/2.jpg)
• Fast, isolated development environments using Docker: h>p://orchardup.github.io/fig/
• Can also be used to run environments in produc)on
• Useful to automa)cally deploy environment using mul)ple containers, with on-‐demand scaling
Fig as a Container Orchestrator
Docker Meetup Bern 2
![Page 3: Introduc)on*to*Docker* Docker’Management:’ fig, … · Introduc)on*to*Docker* Docker’Management:’ fig, OpenStack’ Florian*Dudouet,*Researcher,*ICCLab*](https://reader031.fdocuments.us/reader031/viewer/2022022012/5b165db67f8b9a4a6d8b873a/html5/thumbnails/3.jpg)
• Usage: – If you need to build an image with your code/config/etc.
– Write a fig.yml describing links between your containers
– Run the environment
• Fig-‐managed apps have their own lifecycle – Build, Run, Scale, Stop
• Build and Run grouped in Up
Using Fig
Docker Meetup Bern 3
![Page 4: Introduc)on*to*Docker* Docker’Management:’ fig, … · Introduc)on*to*Docker* Docker’Management:’ fig, OpenStack’ Florian*Dudouet,*Researcher,*ICCLab*](https://reader031.fdocuments.us/reader031/viewer/2022022012/5b165db67f8b9a4a6d8b873a/html5/thumbnails/4.jpg)
• Sample wordpress applica)on – Two containers automa)cally linked
Fig Demo
Docker Meetup Bern 4
![Page 5: Introduc)on*to*Docker* Docker’Management:’ fig, … · Introduc)on*to*Docker* Docker’Management:’ fig, OpenStack’ Florian*Dudouet,*Researcher,*ICCLab*](https://reader031.fdocuments.us/reader031/viewer/2022022012/5b165db67f8b9a4a6d8b873a/html5/thumbnails/5.jpg)
• Automa)cally managed Load-‐balanced applica)on using HAProxy and Serf – HAProxy is a Load Balancer – Serf is a decentralized solu)on for cluster membership, failure detec)on and orchestra)on
• Fig allows the duplica)on of containers from an app (scaling)
• Serf can automate the addi)ons of new containers to the LB configura)on
• Lifecycle: fig up (ini)al), fig scale web==5
Use-‐Case: Load-‐Balanced environment with Fig
Docker Meetup Bern 5
![Page 6: Introduc)on*to*Docker* Docker’Management:’ fig, … · Introduc)on*to*Docker* Docker’Management:’ fig, OpenStack’ Florian*Dudouet,*Researcher,*ICCLab*](https://reader031.fdocuments.us/reader031/viewer/2022022012/5b165db67f8b9a4a6d8b873a/html5/thumbnails/6.jpg)
• Goal: Integrate Docker in a VM-‐oriented IaaS framework: OpenStack
OpenStack
Docker Meetup Bern 6
![Page 7: Introduc)on*to*Docker* Docker’Management:’ fig, … · Introduc)on*to*Docker* Docker’Management:’ fig, OpenStack’ Florian*Dudouet,*Researcher,*ICCLab*](https://reader031.fdocuments.us/reader031/viewer/2022022012/5b165db67f8b9a4a6d8b873a/html5/thumbnails/7.jpg)
OpenStack components
Docker Meetup Bern 7
![Page 8: Introduc)on*to*Docker* Docker’Management:’ fig, … · Introduc)on*to*Docker* Docker’Management:’ fig, OpenStack’ Florian*Dudouet,*Researcher,*ICCLab*](https://reader031.fdocuments.us/reader031/viewer/2022022012/5b165db67f8b9a4a6d8b873a/html5/thumbnails/8.jpg)
– Nova as a compute controller supports Docker as a new hypervisor since the Havana release • Deploy Containers instead of VM with the same API
Docker from OpenStack Havana
Docker Meetup Bern 8
![Page 9: Introduc)on*to*Docker* Docker’Management:’ fig, … · Introduc)on*to*Docker* Docker’Management:’ fig, OpenStack’ Florian*Dudouet,*Researcher,*ICCLab*](https://reader031.fdocuments.us/reader031/viewer/2022022012/5b165db67f8b9a4a6d8b873a/html5/thumbnails/9.jpg)
• Enables control of Docker via OpenStack: – Nova API – Horizon UI
• Supports: launch, terminate, reboot, snapshot, glance, neutron (new)
• Not supported yet: Cinder volumes, suspend/resume, pause/unpause, Live-‐migra)on
Docker Nova
Docker Meetup Bern 9
![Page 10: Introduc)on*to*Docker* Docker’Management:’ fig, … · Introduc)on*to*Docker* Docker’Management:’ fig, OpenStack’ Florian*Dudouet,*Researcher,*ICCLab*](https://reader031.fdocuments.us/reader031/viewer/2022022012/5b165db67f8b9a4a6d8b873a/html5/thumbnails/10.jpg)
• docker-‐registry is a proxy
• users can upload through docker-‐registry or to glance
directly
• docker pulls images through the docker-‐registry proxy
Docker Nova Image management
docker
docker
user
docker
Docker Meetup Bern 10
![Page 11: Introduc)on*to*Docker* Docker’Management:’ fig, … · Introduc)on*to*Docker* Docker’Management:’ fig, OpenStack’ Florian*Dudouet,*Researcher,*ICCLab*](https://reader031.fdocuments.us/reader031/viewer/2022022012/5b165db67f8b9a4a6d8b873a/html5/thumbnails/11.jpg)
• Link container networks • Pass environment variables • Specify working directories • Create docker-‐volumes • Share docker-‐volumes between containers • Arbitrary commands
Features missing from Nova
Docker Meetup Bern 11
![Page 12: Introduc)on*to*Docker* Docker’Management:’ fig, … · Introduc)on*to*Docker* Docker’Management:’ fig, OpenStack’ Florian*Dudouet,*Researcher,*ICCLab*](https://reader031.fdocuments.us/reader031/viewer/2022022012/5b165db67f8b9a4a6d8b873a/html5/thumbnails/12.jpg)
• Since OpenStack Summit of Late 2013, Docker also supports to Heat as another interac)on method with OpenStack.
• From the Icehouse release, a docker plugin is available for Heat and integrated into the core Heat release
• The nova hypervisor plugin for Docker has been moved to stackforge.
Docker from OpenStack Icehouse
Docker Meetup Bern 12
![Page 13: Introduc)on*to*Docker* Docker’Management:’ fig, … · Introduc)on*to*Docker* Docker’Management:’ fig, OpenStack’ Florian*Dudouet,*Researcher,*ICCLab*](https://reader031.fdocuments.us/reader031/viewer/2022022012/5b165db67f8b9a4a6d8b873a/html5/thumbnails/13.jpg)
• Heat can now talk directly to Docker
Docker Heat Architecture
Docker Meetup Bern 13
![Page 14: Introduc)on*to*Docker* Docker’Management:’ fig, … · Introduc)on*to*Docker* Docker’Management:’ fig, OpenStack’ Florian*Dudouet,*Researcher,*ICCLab*](https://reader031.fdocuments.us/reader031/viewer/2022022012/5b165db67f8b9a4a6d8b873a/html5/thumbnails/14.jpg)
heat_template_version: 2013-‐05-‐23 descrip)on: Single compute instance running cirros in a Docker container. resources: my_instance: type: OS::Nova::Server proper)es: key_name: dudo image: ubuntu-‐trusty flavor: m1.small user_data: #include h?ps://get.docker.io my_docker_container: type: DockerInc::Docker::Container proper)es: docker_endpoint: { get_a>r: [my_instance, first_address] } image: cirros
Heat Template
Docker Meetup Bern 14
![Page 15: Introduc)on*to*Docker* Docker’Management:’ fig, … · Introduc)on*to*Docker* Docker’Management:’ fig, OpenStack’ Florian*Dudouet,*Researcher,*ICCLab*](https://reader031.fdocuments.us/reader031/viewer/2022022012/5b165db67f8b9a4a6d8b873a/html5/thumbnails/15.jpg)
Nova driver Heat plugin
Integra)on with other services Closer to the Docker Workflow
Nova features (quota, auth) Hybrid-‐cloud compa)ble
Integrated scheduling Microservices-‐friendly
Heat or Nova plugins?
• Different approaches – One does not replace the other though the officially integrated plugin is now Heat-‐only
Docker Meetup Bern 15
![Page 16: Introduc)on*to*Docker* Docker’Management:’ fig, … · Introduc)on*to*Docker* Docker’Management:’ fig, OpenStack’ Florian*Dudouet,*Researcher,*ICCLab*](https://reader031.fdocuments.us/reader031/viewer/2022022012/5b165db67f8b9a4a6d8b873a/html5/thumbnails/16.jpg)
• Docker Website • Orchard Fig Website • Docker and OpenStack • Performance of Docker vs KVM in OpenStack • Docker Presenta)on by Docker Inc.
References
Docker Meetup Bern 16