SlideShare uma empresa Scribd logo
1 de 18
Baixar para ler offline
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 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
Source: http://www.slideshare.net/BodenRussell/realizing-linux-containerslxc
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)!
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, 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...
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
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!
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!)
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.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/
Live Example
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
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
Live Example
Read This!
• http://www.slideshare.net/BodenRussell/realizing-linux-containerslxc
• http://www.slideshare.net/dotCloud/why-docker

Mais conteúdo relacionado

Destaque

Containerized Cloud Computing - Redhat
Containerized Cloud Computing - RedhatContainerized Cloud Computing - Redhat
Containerized Cloud Computing - RedhatAmazon Web Services
 
RHEL/Fedora + Docker (and SELinux)
RHEL/Fedora + Docker (and SELinux)RHEL/Fedora + Docker (and SELinux)
RHEL/Fedora + Docker (and SELinux)Maciej Lasyk
 
Introduction to Atomic: Tailoring a Trusted OS for Containers
Introduction to Atomic: Tailoring a Trusted OS for ContainersIntroduction to Atomic: Tailoring a Trusted OS for Containers
Introduction to Atomic: Tailoring a Trusted OS for ContainersJoe Brockmeier
 
Docker introduction
Docker introductionDocker introduction
Docker introductiondotCloud
 

Destaque (6)

Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Containerized Cloud Computing - Redhat
Containerized Cloud Computing - RedhatContainerized Cloud Computing - Redhat
Containerized Cloud Computing - Redhat
 
AWS Black Belt Techシリーズ AWS IAM
AWS Black Belt Techシリーズ  AWS IAMAWS Black Belt Techシリーズ  AWS IAM
AWS Black Belt Techシリーズ AWS IAM
 
RHEL/Fedora + Docker (and SELinux)
RHEL/Fedora + Docker (and SELinux)RHEL/Fedora + Docker (and SELinux)
RHEL/Fedora + Docker (and SELinux)
 
Introduction to Atomic: Tailoring a Trusted OS for Containers
Introduction to Atomic: Tailoring a Trusted OS for ContainersIntroduction to Atomic: Tailoring a Trusted OS for Containers
Introduction to Atomic: Tailoring a Trusted OS for Containers
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 

Último

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Último (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

Containerizing Your Development Infrastructure

  • 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
  • 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)!
  • 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. 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. 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. 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. Live Example • DB Administration Tool? • <google, google> • Yeah let’s take MongoDB Express
  • 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/
  • 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. 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