O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.
Containerizing your
development infrastructure
Andreas Katzig,
Chimera Entertainment
Virtualisation as you may know it
• Type 1 Hypervisor: VMWare ESXi, Xen Project
• Native / Full Virtualisation / Baremetal...
Source: http://www.slideshare.net/BodenRussell/realizing-linux-containerslxc
Container vs. Virtualisation
• Containers
• Operating-system-level virtualization
• is a server virtualization method wher...
Containers? Docker!!
Docker!
Source: http://www.slideshare.net/BodenRussell/realizing-linux-containerslxc
Why Docker?
• Open Source!
• -> Low(er) total cost of ownership!
• Lightweight, Stable, proven
• Google, Amazon, Ebay, Rac...
Docker
• Alternatives:
• Rocket (rkt)
• From the CoreOS project
• Accompanying Technologies / 3rd Party Apps
• Official Ma...
Live Example
• WE NEED A NEW DEV SETUP!
FAST!
• We need a web server!
• We need a database and a management UI!
• Also we ...
Live Example
• Web server: Apache!
•
Dynamic PL: PHP!
• Database: Ah, let’s take Mongo!
• Data? Yeah sure! Let’s put them
...
Live Example
• DB Administration Tool?
• <google, google>
• Yeah let’s take MongoDB Express
Live Example
• Let’s see if DockerHub has
something appropriate…
• Apache & PHP: tutum/apache-php
• https://registry.hub.d...
Live Example
Container Workflows
• Create your own images
• → Dockerfile
• Manually or auto-generated
• Can’t handle variables unfortun...
Live Example
• Now get these images down and those containers running!
• The order of starting containers is important!
• ...
Live Example
Read This!
• http://www.slideshare.net/BodenRussell/realizing-linux-containerslxc
• http://www.slideshare.net/dotCloud/why...
Terminou este documento.
Transfira e leia offline.
Próximos SlideShares
Respawn 2015: Chimera Entertainment - A decade of game development
Avançar
Próximos SlideShares
Respawn 2015: Chimera Entertainment - A decade of game development
Avançar
Transfira para ler offline e ver em ecrã inteiro.

Compartilhar

Containerizing Your Development Infrastructure

Baixar para ler offline

How to and why it is a general good idea to containerize your development infrastructure.

Containerizing Your Development Infrastructure

  1. 1. Containerizing your development infrastructure Andreas Katzig, Chimera Entertainment
  2. 2. Virtualisation as you may know it • Type 1 Hypervisor: VMWare ESXi, Xen Project • Native / Full Virtualisation / Baremetal Hypervisor • Make it possible to run many instances of an operating system or indeed different operating systems in parallel on a single machine • Type 2 Hypervisor: VirtualBox, QEmu, Parallels • Needs an underlaying operating system to run, then also allows for running different operating systems in parallel. • HVM (Hardware Virtual Machine) and • HVM Pros: • Simulates a complete hardware environment. • Guest server executes in complete isolation. • Each guest server can run on its own OS -- can run Linux and Windows. • More stability. • HVM Cons: • Slower overall server performance because of the hardware overhead. • PV (Paravirtual Machine) • PV Pros: • Lower virtualization overhead. • Stability and performance is close to the real servers and hardware virtualization. • PV Cons: • Supports only Linux. • Poor portability and compatibility. • More difficult to implement. • OS options can not be changed during the installation. • Can not compile and install a custom kernel. • Both the host and guest kernel must be patched. Source: https://support.cloud.engineyard.com/hc/en-us/articles/205407968-HVM-vs-PV
  3. 3. Source: http://www.slideshare.net/BodenRussell/realizing-linux-containerslxc
  4. 4. Container vs. Virtualisation • Containers • Operating-system-level virtualization • is a server virtualization method where the kernel of an operating system allows for multiple isolated user space instances, instead of just one • Other names: Virtualization Engines (VE), Virtual Private Servers (VPS), Jails (on BSD) • Can be seen as an advanced implementation of the standard chroot mechanism • Chroot is an operation that changes the apparent root directory for the current running process and their children. A program that is run in such a modified environment cannot access files and commands outside that environmental directory tree. This modified environment is called a chroot jail. • Containers can be called “VM’s without the hypervisor” • Containers virtualize (Linux) Operating Systems! • Containers virtualize Applications (running on the according virtualized Operating Systems)!
  5. 5. Containers? Docker!!
  6. 6. Docker!
  7. 7. Source: http://www.slideshare.net/BodenRussell/realizing-linux-containerslxc
  8. 8. Why Docker? • Open Source! • -> Low(er) total cost of ownership! • Lightweight, Stable, proven • Google, Amazon, Ebay, Rackspace, just to name a few, are using it productively • Deployable / Build once, run anywhere / Configure once, run anything • Huge eco system of tools around it • Improves Development Agility • Testing, Deployment...
  9. 9. Docker • Alternatives: • Rocket (rkt) • From the CoreOS project • Accompanying Technologies / 3rd Party Apps • Official Management Tools: Docker Hub, Fleet, Swarm, Copmpose, Machine etc • Maestro • CoreOS • OpenStack • Panamax • Shipyard • ... • Ansible
  10. 10. Live Example • WE NEED A NEW DEV SETUP! FAST! • We need a web server! • We need a database and a management UI! • Also we need data! • Quick!
  11. 11. Live Example • Web server: Apache! • Dynamic PL: PHP! • Database: Ah, let’s take Mongo! • Data? Yeah sure! Let’s put them in a data container (best practice!)
  12. 12. Live Example • DB Administration Tool? • <google, google> • Yeah let’s take MongoDB Express
  13. 13. Live Example • Let’s see if DockerHub has something appropriate… • Apache & PHP: tutum/apache-php • https://registry.hub.docker.com/u/tutum/apache-php/ • MongoDB: mongo • https://registry.hub.docker.com/_/mongo/ • Data Container • With rsync access, please • Yeah: https://registry.hub.docker.com/u/nabeken/docker-volume-container-rsync/ • Ok, needed modifications: https://registry.hub.docker.com/u/chimeradev/docker-webroot-volume-rsync/
  14. 14. Live Example
  15. 15. Container Workflows • Create your own images • → Dockerfile • Manually or auto-generated • Can’t handle variables unfortunately • Use images created by other users • → DockerHub Source: https://support.cloud.engineyard.com/hc/en-us/articles/205407968-HVM-vs-PV FROM ubuntu:14.04 MAINTAINER Andreas Katzig <akatzig@chimera-entertainment.de> ENV HOME /opt/mongooseim ENV MONGOOSEIM_VERSION 1.5 ENV DEBIAN_FRONTEND noninteractive # add packages RUN apt-get install wget -y RUN wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb RUN dpkg -i erlang-solutions_1.0_all.deb RUN wget http://packages.erlang-solutions.com/debian/erlang_solutions.asc RUN apt-key add erlang_solutions.asc RUN apt-get -q update RUN apt-get install mongooseim -y ADD templates/ /templates/ EXPOSE 80 5222 5280 5269 # Make shell scripts executable RUN chmod 755 /templates/*.sh CMD cd /usr/lib/mongooseim/etc/ && /templates/setup_configs.sh && /templates/start_mongooseim.sh Dockerfile
  16. 16. Live Example • Now get these images down and those containers running! • The order of starting containers is important! • 1.) docker run -d --name webadmin-data -p 10873:873 -e ALLOW='62.245.239.122/32' -e OWNER='www-data' -e GROUP='www-data' chimeradev/docker-webroot-volume-rsync • 2.) docker run -d --name webadmin-mongodb -p 27017:27017 --volumes-from webadmin-data mongo --smallfiles • 3.) docker run -d --name mongo-express -p 8081:8081 --link nex-webadmin-mongodb:mongo knickers/mongo-express • 4.) docker run -d --name webadmin --volumes-from webadmin-data --link webadmin-mongodb:mongo -p 81:80 asteris/apache-php-mongo
  17. 17. Live Example
  18. 18. Read This! • http://www.slideshare.net/BodenRussell/realizing-linux-containerslxc • http://www.slideshare.net/dotCloud/why-docker
  • lucgagnon

    Mar. 23, 2017

How to and why it is a general good idea to containerize your development infrastructure.

Vistos

Vistos totais

264

No Slideshare

0

De incorporações

0

Número de incorporações

2

Ações

Baixados

3

Compartilhados

0

Comentários

0

Curtir

1

×