Use Cases for Docker in Enterprise Linux Environment CloudOpen North America, 2014 Linda Wang Sr. Software Engineering Manager Red Hat, Inc. 1
2
Containerize! 3
Use Cases for Docker in the Enterprise Linux Environment What s Docker? Based on Lightweight Virtualized Technologies Linux Containers: cgroups, namespaces, SELinux Provides a new Format to deliver bits 4 Provide Minimal Footprint Fast Deployment Can be Used on Various Market Segment
Use Cases for Docker in the Enterprise Linux Environment What s Lightweight virtualization? Lightweight Virtualized vs. Fully Virtualized vs. Townhouses Apartment 5
Use Cases for Docker in the Enterprise Linux Environment What s Lightweight Virtualization? Lightweight Virtualized vs. Fully Virtualized vs. Kernel Shared Own Kernel on Hypervisor KVM or Xen Containers 6
Use Cases for Docker in the Enterprise Linux Environment 7 What s a Linux Container? A Lightweight Virtualized Technologies Control Groups Resource Management Namespace Process Isolation SELinux, grsecurity Security SystemD/Kubernete Management tool
Use Cases for Docker in the Enterprise Linux Environment What s a Linux Container? Control Groups Resource Management Memory Network Block IO CPU Cgroups Cgroups Linux Kernel Hardware 8
Control Groups Resource Management 9
Namespace - Process Isolation
Use Cases for Docker in the Enterprise Linux Environment What s a Linux Container? Namespaces User Space Virtualized Process mgt Virtualized devices Virtualized User ID Host Kernel 11 Virtualized FS interface Virtualized FS interface Application A.. Application B.. Application C.....
Use Cases for Docker in the Enterprise Linux Environment What s a Linux Container? Namespaces application point of view User Space Pid 1.. /dev/tty /dev/eth0.. /etc /var /tmp Application A.. Application B.. Application A.. Application C.. Application B..... Application C..... Uid 500.. Host Kernel 12
Use Cases for Docker in the Enterprise Linux Environment What s a Linux Container? Namespaces host point of view User Space Pid 3852.. /dev/pty12 /dev/eth1.. Uid 5600.. Host Kernel 13 /etc/conta/etc /var/conta/var /tmp/conta/ tmp.. Application A.. Application B.. Application A.. C.. Application Application B..... Application C.....
Use Cases for Docker in the Enterprise Linux Environment What s a Linux Container Namespaces and SELinux User Space Uid 5600.. Host Kernel 14 /etc/conta/etc /var/conta/var Pid 3852.. /dev/pty12 /dev/eth1.. /var.. /tmp /tmp/conta/ tmp.. Application A.. Application B.. Application A.. C.. Application Application B..... Application C..... Uid500 Pid 1 SELinux
Use Cases for Docker in the Enterprise Linux Environment What s a Linux Container? Namespaces, SELinux User Space /etc/conta/etc /var/conta/var Pid 3852.. Legend /var.. /tmp /tmp/conta/ tmp.. Application A.. Application B.. Application A.. C.. Application Application B..... Application C..... Uid 500 Pid 1 SELinux /dev/pty12 /dev/eth1.. Uid 5600.. Process ID Namespace Device Namespace User Namespace Host Kernel 15 Mount Namespace
Use Cases for Docker in the Enterprise Linux Environment What s a Linux Container? Linux Containers: Cgroups, Namespaces, SELinux User Space Legend U id Pid 1 5 SELinux0 0 UID 5600 /dev/pty12 PID 5362 /dev/eth1.. CPU#1, 8G Host Kernel 8 CPUS, 32G system 16 App. F..... /etc/conta/etc /var/conta/var CPU#0,2, 16G /var.. Pid 3852.. UID 5600 Application Application D..A..... Application B.. Application C..... /tmp Uid 5600.. /dev/pty12 /dev/eth1.. /etc/conta/etc /var/conta/var SELinux Uid 500 /var.. /tmp /tmp/conta/ tmp.. PID 5362 Pid 3852.. Pid 1 /tmp/conta/ tmp.. Application A.. Application B.. Application C..... CGroups#1 CGroups#2 CPU#3 4G CGroups#3
Use Cases for Docker in the Enterprise Linux Environment What s Docker? Based on Lightweight Virtualized Technologies Linux Containers: cgroups, namespaces, SELinux Provides a new Format to deliver bits 17 Provide Minimal Footprint Fast Deployment Can be Used on Various Market Segment
Use Cases for Docker in the Enterprise Linux Environment What s Docker? Provides a new Format to deliver bits Traditional Way.. 18
Use Cases for Docker in the Enterprise Linux Environment What s Docker? Provides a new Format to deliver bits Container Format 19
Use Cases for Docker in the Enterprise Linux Environment What s Docker? Provides a new Format to deliver bits base Docker Image Format 20
Use Cases for Docker in the Enterprise Linux Environment What s Docker? Provides a new Format to deliver bits 1 1 1 21 2 2
Use Cases for Docker in the Enterprise Linux Environment What s Docker? Provides image base format to deliver bits 1 1 2 1 1 22 3 2 3
Use Cases for Docker in the Enterprise Linux Environment What s Docker? Based on Lightweight Virtualized Technologies Linux Containers: cgroups, namespaces, SELinux Provides a new Format to deliver bits 23 Provide Minimal Footprint Fast Deployment Can be Used on Variety of Market Segment
Use Cases for Docker in the Enterprise Linux Environment What s Docker? 24 Provides a new Format to deliver bits
Use Cases for Docker in the Enterprise Linux Environment What s Docker? Based on Lightweight Virtualized Technologies Provide Minimal Footprint Fast Deployment 25 Simplified application delivery Light weight Application Isolation Integrated application delivery using Image-based solution Provides application mobility Provides minimal footprint as needed
Use Cases for Docker in the Enterprise Linux Environment What s Docker? Based on Lightweight Virtualized Technologies Linux Containers: cgroups, namespaces, SELinux Provides a new Format to deliver bits 26 Provide Small Footprint Fast Deployment Can be Used on Various Market Segment
Use Cases Applications 27
Use Cases in Enterprise Linux Environment Docker acts as the interfaces to Linux containers Becomes a new application delivery platform 28 Deploy new applications based on flexibility that Docker container provides Also can be used by traditional enterprise users
Use Cases in Enterprise Linux Environment Traditional Use Cases Use it to management system resources Provide application isolation (prevent runaway apps, etc..) For long running applications that have static setup and user environment Benefit from less impact on upgrade management and less overhead Running multiple Linux applications on single Linux host Instead, run inside docker container Applications that run inside of full OS virtualized environment; but in simplified form, can be migrated to Docker environment 29
Use Cases in Enterprise Linux Environment New Application Delivery Use Cases 30 Focus on fast deployment Focus on use cases that mitigate impacts by server updates Mixed environment use cases Stack-able environment use cases
Use Cases in Enterprise Linux Environment Identical Containers Non-identical Containers Host System Image-based Containers Image-based Containers Operating System RHEL 6 RHEL 7 RHSCL Fedora
Use Cases in Enterprise Linux Environment Mixed Environment Use Cases Mitigate impacts by server updates Running newer applications on older hosts User Space /usr/bin Ruby 1.8.7 Java 1.6.0_3 Python 2.6.6 Gcc Gcc Java_ 1.8 Perl 6.2 /opt Ruby 2.0 PHP Bash 4.3 Ruby 2.0 Java_ 1.8 Docker Perl 5.10.1 PHP Host Kernel 32 Bash 4.3 Perl 6.2 Bash 4.1.2
Use Cases in Enterprise Linux Environment Mixed Environment Use Cases Mitigate impacts by server updates Running newer applications on older hosts User Space... /usr/bin/ruby_1.8.7 /bin/bash_4.3 /usr/bin/ruby 2.0 /usr/bin/java_1.8 /usr/bin/perl_6.2 Docker /usr/bin/python_2.6.6 /usr/bin/perl_5.10.1 /usr/bin/gcc_4.6.6 /bin/bash_4.1.2 Docker /usr/bin/java_1.6.0 /opt/usr/bin/ruby_2.0 /opt/usr/bin/java_1.8 /opt/usr/bin/perl_6.2 /opt/bin/bash_4.3... Docker Host Kernel 33
Use Cases in Enterprise Linux Environment Stack-able Environment Use Cases Uses existing fully virtualized environment and setup Running newer applications on old virt hosts App A App B App C Runtime A Runtime B Runtime C Docker Containers Docker Containers App A App B App C Runtime A Runtime B Runtime C Docker Containers Docker Containers Container Host OS & Central Shared Services Container Host OS & Central Shared Services Kernel & Virt Drivers Hypervisor Host OS Kernel & HW Drivers Kernel & HW Drivers Hardware 34 Hardware
Use Cases Enterprise Usage 35
Use Cases in Enterprise Linux Environment Enterprise Environment - Full Stack Integration Docker Registry - Image manager and database RHEL Atomic Host Deploy and management container 36 Kubernetes - Container orchestration and management (Google, Red Hat, IBM...) Openstack - Cloud infrastructure
Use Cases in Enterprise Linux Environment Market Segment Early Adopter Existing in-house application migration PaaS Platform Ease of deployment and Integration Main Stream Cloud infrastructure integration For in-house software development For system integraters whom hosts different development environment 37
Use Cases in Enterprise Linux Environment Early Adopters and Main Stream Use Cases For in-house software development For systems integrator whom hosts different development environment Ruby Factory java IT Outsource IT HR Internal App Devel Finance A HR Perl Finance Manufacturing 38 A B Legal B Scenario A Company C: Company B: Company A: Scenario B Bash
Use Cases in Enterprise Linux Environment Early Adopter For in-house software development and/or deployment To satisfy SLA requirements quickly Company A: IT HR Internal App Devel Finance Company A: IT Internal App Devel Paas On premise Ruby Ruby Factory Ruby Ruby java java java Scenario A 39 java
Use Cases in Enterprise Linux Environment Early Adopters For in-house software development and/or deployment To satisfy SLA requirements quickly Company A: IT HR Internal App Devel Finance Company A: IT Internal App Devel Ruby Paas On premise Factory Ruby Ruby Factory java java Scenario A 40 java Ruby java Procurement
Use Cases in Enterprise Linux Environment Main Stream For in-house software development and/or deployment To satisfy SLA requirements quickly PaaS Cloud Company A: IT HR Internal App Finance Devel Ruby Factory java Company A: IT Internal App Devel Ruby Ruby Scenario A 41 java Ruby java java
Use Cases in Enterprise Linux Environment Early Adopters For external software development, and integration plus deployment For systems integrator whom hosts different application environment Company B: Company C: IT Outsource HR Company C: Perl Perl Finance Manufacturing A Legal B A Bas h A Bash B B Scenario B 42 Paas On premise
Use Cases in Enterprise Linux Environment Main Stream For external software development, and integration plus deployment For systems integrator whom hosts different application environment Company B: Company C: Company C: IT Outsource Paas Cloud HR Perl Perl Finance Manufacturing A Legal B A Bas h A Bash B B Scenario B 43
Use Cases in Enterprise Linux Environment Key Takeaways Application resource management and isolation mechanism in a light-weight multi-tenancy environment Agile application packaging w/ Docker image-based containers Provide flexibility on environment footprint 44 Mixed and/or Stack-able Environment Fast deployment for traditional application's environment Compatible with existing full virt environment - run docker inside virtualized environment
Use Cases in Enterprise Linux Environment References 45 Docker docker.io or https://www.docker.com/tryit/ Performance Blog on Docker Jeremy Eder https://developerblog.redhat.com/2014/08/19/performanceanalysis-docker-red-hat-enterprise-linux-7/ RHEL Blog - http://rhelblog.redhat.com/ Project Atomic - http://www.projectatomic.io/ https://github.com/googlecloudplatform/kubernetes
Questions? 46