SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Technical University/Symposia materials may not be reproduced in whole or in part without the prior written permission of IBM.
9.0
César Diniz Maciel
Executive IT Specialist
IBM Corporate Strategy
cmaciel@us.ibm.com
pCV4103 - Docker, lxc, lxd and friends
Session objectives
After this session, you will be able to:
• Understand about containers and how they are useful for
deploying applications;
• Learn how to install Docker on Power Systems and how to
deploy containers;
• Learn basic Docker management commands, how to create
images and how to move containers across systems;
Agenda
●
What are containers?
●
Why containers?
●
Differences between containers and virtual machines
●
Docker on Power Systems
– Installing Docker
– Creating base image
– Deploying containers
●
Comparing Docker to AIX Workload Partitions
●
Managing containers
© Copyright IBM Corporation 2015
4
What are Containers?
● Two new features enabled containers
● Cgroups and Name spaces
●
Different name space for process
●
Own process space
●
Can run stuff as root (Chroot)
● Concept from Plan9 (1992)
● Done with setns and unshare system call
● Share the same kernel
● No device emulation
● A name space is completely separated
● Full network stack on the new name space
● Own routes
● Own Firewall rules
● Name resolution mechanism
● Mount, PIDs, IPCs,
Server
Host OS
Linux Container + Docker Engine
Middleware YMiddleware X
App
A
App
A
App
A1
App
A1
App
B
App
B
App
B1
Container
What is Docker?
●
Operating system-based virtualization
– Aimed at quick and efficient deployment of applications
in a virtualized container environment.
●
From http://docker.com
– Docker is an open platform for developers and
sysadmins to build, ship, and run distributed
applications.
It runs as an isolated process in
userspace on the host operating
system, sharing the kernel with
other containers. Thus, it enjoys
the resource isolation and
allocation benefits of VMs but is
much more portable and efficient.
© Copyright IBM Corporation 2015
Why Docker
●
Fast to deploy
●
Lightweigth
●
Almost no performance impact for applications
●
Very efficient use of resources
●
Ability to pack applications, configuration files, pre-
requisites, etc in a docker image for easy distribution
and deployment.
●
Ability to run different Linux versions and flavors in the
same host system.
© Copyright IBM Corporation 2015
Differences between Docker and virtual machines
●
Docker is an OS-based virtualization
– Same concept as Virtualbox, Vmware Workstation, AIX
WPAR, Solaris Containers, BSD Jails...
●
Kernel is shared among all containers
●
Every container runs the same kernel version
●
Kernel parameters are the same for all containers, as well
as network and I/O
●
No strong isolation between containers – processes are
isolated from each other, but all containers run under the
same OS instance
© Copyright IBM Corporation 2015
●
Portability
●
If it works locally, it will work on the server, with
exactly the same behavior, regardless of
versions, distro, dependencies
●
Quick boot
●
Faster provisioning
●
Can fit far more containers than VMs into a host
●
Simplified security
●
Only need to fix things on the hosts
●
Lower Costs
●
Fewer operating systems to manage
●
Easy OS patching
●
Greater application mobility
●
Starting/Stoping a container is a about process
management
Benefits of containers
Manual VM Docker
Provision
TimeDays
Minutes
Seconds / ms
● LXC is supported on all IBM Distros available
● Docker on POWER is no different than Docker on x86 platforms from a usability perspective
● Docker is only supported in Ubuntu 15.04 and Fedora 23 at the moment.
● Experimental at RHEL and SUSE
● LXD is only available in Ubuntu 15.04
● http://images.linuxcontainers.org contains ppc64el images
● There is a growing ecosystem of dockerized applications for POWER
● System Z also supports it
– https://www.ibm.com/developerworks/linux/linux390/docker.html
IBM POWER containers support
Installing Docker on Power Systems (after April 2015)
●
Docker now officially supported on
Ubuntu Vivid Vervet (15.04)
– Install the docker package
●
apt-get install docker.io
●
Now part of the Ubuntu distribution and maintained by Canonical.
© Copyright IBM Corporation 2015
Using Docker
●
Docker users can install images from Docker Hub, a
public repositores for Docker images
– However, it is x86-oriented. That means that by default,
docker pulls a x86 image from the server.
– Multiarch support for Docker Hub is being worked
- Meanwhile, non-x86 images have distinct names to identify them,
such as 'fedora22_ppc64le'
●
Docker on POWER users can create their own images,
and then can share them by running a private Docker
Hub
●
Most enterprises will probably have their own images in
a private repository for security.
© Copyright IBM Corporation 2015
●
LXC is the base, distro independent, container infrastructure.
●
Created in IBM/LTC in 2009
●
LXD is a controller over LXD allowing new features over LXC
●
File-system snapshot
●
Migration
●
Docker is an application delivery that uses containers
technologies
●
Focused on images
●
AnotherUnionFs (AUFS)
●
Was based on LXC in the beginning, now has it own
technology called libcontainer
●
Focused on a few, hopefully 1, process
What is difference between Docker, LXC and
LXD?
LXC, LXD and Docker usage
Similar to AIX System WPAR Similar to AIX Application WPAR
Creating a Docker image
●
Simple ways to create images are:
– Debian Bootstrap (debootstrap)
– Ubuntu Core
●
Cloning a system into an image is also possible
– Allows for migration from virtual machines to containers
– Environment can be customized (i.e. applications installed, etc)
before generating the image for container deployment.
© Copyright IBM Corporation 2015
Creating a Docker image using debootstrap
●
From Build and use Docker on the IBM POWER Linux platform
document at IBM developerworks:
●
$ sudo apt-get install -y debootstrap
●
$ curl -o debootstrap.sh 
https://raw.githubusercontent.com/docker/docker/master/contrib/mk
image/debootstrap
●
$ chmod 755 debootstrap.sh
●
$ sudo ./debootstrap.sh ubuntu --components=main,universe trusty
●
$ sudo tar -C ubuntu -c . | docker import - ubuntu:14.04
●
$ docker tag ubuntu:14.04 ubuntu:trusty
●
$ docker tag ubuntu:14.04 ubuntu:latest
●
$ sudo rm -fr ubuntu
© Copyright IBM Corporation 2015
Creating a Docker image using Ubuntu Core
●
From Ubuntu Core on Docker for POWER
●
Download Ubuntu Core
– Example for 14.04 version:
– wget
http://cdimage.ubuntu.com/ubuntu-core/trusty/daily/current/trusty-core-ppc64el.tar.gz
●
Import the files into docker
– cat trusty-core-ppc64el.tar.gz | docker import - ubuntucore
3ad6c6616b921b10a414238a226fb39eef85d8249ac7d767e84e275aaf90ab65
●
Verify that the image was created:
– docker images
●
Assure that your image is running fine:
– docker run ubuntucore ls
© Copyright IBM Corporation 2015
Creating a Docker image using an installed system
●
Creat a tar file with the filesystem structure
– Useful to exclude /tmp, /proc, /sys and other
filesystems not needed in the image
– Example: tar cvf /tmp/ubuntu.tar ­­exclude='sys' ­­exclude='tmp' 
­­exclude='proc' *
●
Import the files into docker
– cat ubuntu.tar | docker import ­ ubuntuinstall       
3dcc622c3ef8922cceef85d8249ac7d767e84e275aaf90ab65
●
Verify that the image was created:
– docker images
●
Assure that your image is running fine:
– docker run ubuntuinstall ls
© Copyright IBM Corporation 2015
Comparing Docker to AIX Workload Partitions
●
Similar concept of OS-based virtualization
●
AIX allows for multiple OS versions to coexist
– Host partition must be on AIX 7
– Hosted WPARS can be AIX 5.2, 5.3 or 7
●
Docker allows for multiple OS versions
– Host partition does not have to be at latest level
– Can host OS versions that are higher or lower
– All run same kernel version, since it is shared by all containers, so
while the OS version may change, the kernel does not
© Copyright IBM Corporation 2015
Comparing Docker to AIX Workload Partitions
●
AIX WPARs are always persistent. Docker containers are not
– You have to explicitly save the container in order to save
changes made while running
– Application data normally resides on data volumes, that are
filesystems mounted by Docker, and these are persistent –
therefore application data is always saved to disk and does not
require the commit operation on the container.
●
Each AIX WPAR is a separate image. Docker can instantiate
multiple containers from the same image
– Easier to deploy and maintain a pool of similar environments
– Docker automatically assigns a new IP for each instance
© Copyright IBM Corporation 2015
Using Docker Containers
●
docker images
●
docker ps -a
●
docker run <container>
●
docker run -i -t <container> /bin/bash
●
docker rm <container>
●
docker rmi <image>
●
docker commit <container_id> <some_name>
© Copyright IBM Corporation 2015
Docker demo on Power Systems
●
As root, do:
●
docker -v
●
docker images
●
docker ps -a
●
cat /etc/lsb-release
●
docker run vividcore cat /etc/lsb-release
●
docker run ubuntu cat /etc/lsb-release
© Copyright IBM Corporation 2015
© Copyright IBM Corporation 2015
© Copyright IBM Corporation 2015
© Copyright IBM Corporation 2015
Example of running Apache on Docker
●
Based on customization script called Dockerfile
●
Dockerfile specifies image to base installation, adds extra
packages, copy files and configures applications
●
Container started with port forwarding
© Copyright IBM Corporation 2015
Dockerfile
FROM ubuntu
MAINTAINER Breno Leitao
RUN apt-get update && apt-get install -y php5 libapache2-mod-php5 php5-mysql
php5-cli
&& apt-get clean && rm -rf /var/lib/apt/lists/*
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_PID_FILE /var/run/apache2/apache2.pid
ENV APACHE_RUN_DIR /var/run/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
EXPOSE 80
CMD ["/usr/sbin/apache2", "-D", "FOREGROUND"]
Instruction set: https://docs.docker.com/reference/builder/
Example of running Apache on Docker
●
docker run -p 8080:80 -d apache
– Starts the container in detached mode, and redirects container
port 8080 to host partition port 80
●
Since it is running detached, control the container using
docker commands (e.g. docker start, docker stop).
© Copyright IBM Corporation 2015
Moving a container to other system
●
docker save apache > apache.tar
– copy apache.tar to other system
●
docker load < apache.tar
●
docker run ­p 8080:80 ­d apache
© Copyright IBM Corporation 2015
Managing containers
●
Many tools for managing docker containers
●
Tools are platform agnostic – they talk to the
docker daemon, so from the tool perspective it
does not matter the platform
●
Docker containers from multiple
systems/architectures can be managed by the
same tool
© Copyright IBM Corporation 2015
Managing containers
© Copyright IBM Corporation 2015
Shipyard is an
open source
GUI for
managing and
deploying
Docker
containers
Managing containers
© Copyright IBM Corporation 2015
Conclusion
●
Containers offer a flexible way of deploying applications
with minimum effort.
●
System resources can be used efficiently, and
migration/deployment of new environments is quick and
easy.
●
Docker integration with cloud management tools such
as Openstack provides rapid instance deployment, and
multi-platform container management.
●
Docker for Power Systems allow all these benefits to
be used on a high performance and high reliability
platform.
© Copyright IBM Corporation 2015
© Copyright IBM Corporation
2015
Continue growing your IBM skills
ibm.com/training provides a
comprehensive portfolio of skills and career
accelerators that are designed to meet all
your training needs.
• Training in cities local to you - where and
when you need it, and in the format you want
– Use IBM Training Search to locate public training classes
near to you with our five Global Training Providers
– Private training is also available with our Global Training Providers
• Demanding a high standard of quality –
view the paths to success
– Browse Training Paths and Certifications to find the
course that is right for you
• If you can’t find the training that is right for you with our
Global Training Providers, we can help.
– Contact IBM Training at dpmc@us.ibm.com
34
Global Skills Initiative

Weitere ähnliche Inhalte

Was ist angesagt?

Dell VMware Virtual SAN Ready Nodes
Dell VMware Virtual SAN Ready NodesDell VMware Virtual SAN Ready Nodes
Dell VMware Virtual SAN Ready Nodes
Andrew McDaniel
 
Post-Install_Actions_and_Considerations_for_Oracle_WebLogic_Server_Patch_Set_...
Post-Install_Actions_and_Considerations_for_Oracle_WebLogic_Server_Patch_Set_...Post-Install_Actions_and_Considerations_for_Oracle_WebLogic_Server_Patch_Set_...
Post-Install_Actions_and_Considerations_for_Oracle_WebLogic_Server_Patch_Set_...
Ivan Hui
 

Was ist angesagt? (20)

Virtualization Architecture & KVM
Virtualization Architecture & KVMVirtualization Architecture & KVM
Virtualization Architecture & KVM
 
Ibm web sphere application server interview questions
Ibm web sphere application server interview questionsIbm web sphere application server interview questions
Ibm web sphere application server interview questions
 
Containers technologies
Containers technologiesContainers technologies
Containers technologies
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Dell VMware Virtual SAN Ready Nodes
Dell VMware Virtual SAN Ready NodesDell VMware Virtual SAN Ready Nodes
Dell VMware Virtual SAN Ready Nodes
 
Unikernels, Multikernels, Virtual Machine-based Kernels
Unikernels, Multikernels, Virtual Machine-based KernelsUnikernels, Multikernels, Virtual Machine-based Kernels
Unikernels, Multikernels, Virtual Machine-based Kernels
 
Post-Install_Actions_and_Considerations_for_Oracle_WebLogic_Server_Patch_Set_...
Post-Install_Actions_and_Considerations_for_Oracle_WebLogic_Server_Patch_Set_...Post-Install_Actions_and_Considerations_for_Oracle_WebLogic_Server_Patch_Set_...
Post-Install_Actions_and_Considerations_for_Oracle_WebLogic_Server_Patch_Set_...
 
Hybrid cloud overview and VCF on VxRAIL
Hybrid cloud overview and VCF on VxRAILHybrid cloud overview and VCF on VxRAIL
Hybrid cloud overview and VCF on VxRAIL
 
Virtualization and cloud computing
Virtualization and cloud computingVirtualization and cloud computing
Virtualization and cloud computing
 
Websphere Application Server V8.5
Websphere Application Server V8.5Websphere Application Server V8.5
Websphere Application Server V8.5
 
Docker Container Introduction
Docker Container IntroductionDocker Container Introduction
Docker Container Introduction
 
What’s New in VMware vSphere 7?
What’s New in VMware vSphere 7?What’s New in VMware vSphere 7?
What’s New in VMware vSphere 7?
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Azure virtual network
Azure virtual networkAzure virtual network
Azure virtual network
 
Docker in real life
Docker in real lifeDocker in real life
Docker in real life
 
Docker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and ContainersDocker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and Containers
 
Kubernetes Architecture and Introduction
Kubernetes Architecture and IntroductionKubernetes Architecture and Introduction
Kubernetes Architecture and Introduction
 
Cloud ppt
Cloud pptCloud ppt
Cloud ppt
 
Vmware vSphere Api Best Practices
Vmware vSphere Api Best PracticesVmware vSphere Api Best Practices
Vmware vSphere Api Best Practices
 

Ähnlich wie Docker on Power Systems

Ähnlich wie Docker on Power Systems (20)

docker
dockerdocker
docker
 
Docker up and Running For Web Developers
Docker up and Running For Web DevelopersDocker up and Running For Web Developers
Docker up and Running For Web Developers
 
Docker Up and Running for Web Developers
Docker Up and Running for Web DevelopersDocker Up and Running for Web Developers
Docker Up and Running for Web Developers
 
Docker+java
Docker+javaDocker+java
Docker+java
 
Docker primer and tips
Docker primer and tipsDocker primer and tips
Docker primer and tips
 
Introduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxDataIntroduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxData
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with Docker
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with Docker
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101
 
Introduction to Docker - IndiaOpsUG
Introduction to Docker - IndiaOpsUGIntroduction to Docker - IndiaOpsUG
Introduction to Docker - IndiaOpsUG
 
IBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and DockerIBM WebSphere Application Server traditional and Docker
IBM WebSphere Application Server traditional and Docker
 
WebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and DockerWebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and Docker
 
Docker for developers
Docker for developersDocker for developers
Docker for developers
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
 
Docker presentation
Docker presentationDocker presentation
Docker presentation
 
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and JenkinsExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
 
An Introduction To Docker
An Introduction To DockerAn Introduction To Docker
An Introduction To Docker
 
Docker
DockerDocker
Docker
 
Using Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and JenkinsUsing Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and Jenkins
 
Docker for .NET Developers
Docker for .NET DevelopersDocker for .NET Developers
Docker for .NET Developers
 

Kürzlich hochgeladen

call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Monica Sydney
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Monica Sydney
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
F
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Monica Sydney
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
ydyuyu
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
ydyuyu
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Monica Sydney
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
pxcywzqs
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
 

Kürzlich hochgeladen (20)

20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsMira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsCall girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girls
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 

Docker on Power Systems

  • 1. Technical University/Symposia materials may not be reproduced in whole or in part without the prior written permission of IBM. 9.0 César Diniz Maciel Executive IT Specialist IBM Corporate Strategy cmaciel@us.ibm.com pCV4103 - Docker, lxc, lxd and friends
  • 2. Session objectives After this session, you will be able to: • Understand about containers and how they are useful for deploying applications; • Learn how to install Docker on Power Systems and how to deploy containers; • Learn basic Docker management commands, how to create images and how to move containers across systems;
  • 3. Agenda ● What are containers? ● Why containers? ● Differences between containers and virtual machines ● Docker on Power Systems – Installing Docker – Creating base image – Deploying containers ● Comparing Docker to AIX Workload Partitions ● Managing containers © Copyright IBM Corporation 2015
  • 4. 4
  • 5. What are Containers? ● Two new features enabled containers ● Cgroups and Name spaces ● Different name space for process ● Own process space ● Can run stuff as root (Chroot) ● Concept from Plan9 (1992) ● Done with setns and unshare system call ● Share the same kernel ● No device emulation ● A name space is completely separated ● Full network stack on the new name space ● Own routes ● Own Firewall rules ● Name resolution mechanism ● Mount, PIDs, IPCs, Server Host OS Linux Container + Docker Engine Middleware YMiddleware X App A App A App A1 App A1 App B App B App B1 Container
  • 6. What is Docker? ● Operating system-based virtualization – Aimed at quick and efficient deployment of applications in a virtualized container environment. ● From http://docker.com – Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications. It runs as an isolated process in userspace on the host operating system, sharing the kernel with other containers. Thus, it enjoys the resource isolation and allocation benefits of VMs but is much more portable and efficient. © Copyright IBM Corporation 2015
  • 7. Why Docker ● Fast to deploy ● Lightweigth ● Almost no performance impact for applications ● Very efficient use of resources ● Ability to pack applications, configuration files, pre- requisites, etc in a docker image for easy distribution and deployment. ● Ability to run different Linux versions and flavors in the same host system. © Copyright IBM Corporation 2015
  • 8. Differences between Docker and virtual machines ● Docker is an OS-based virtualization – Same concept as Virtualbox, Vmware Workstation, AIX WPAR, Solaris Containers, BSD Jails... ● Kernel is shared among all containers ● Every container runs the same kernel version ● Kernel parameters are the same for all containers, as well as network and I/O ● No strong isolation between containers – processes are isolated from each other, but all containers run under the same OS instance © Copyright IBM Corporation 2015
  • 9. ● Portability ● If it works locally, it will work on the server, with exactly the same behavior, regardless of versions, distro, dependencies ● Quick boot ● Faster provisioning ● Can fit far more containers than VMs into a host ● Simplified security ● Only need to fix things on the hosts ● Lower Costs ● Fewer operating systems to manage ● Easy OS patching ● Greater application mobility ● Starting/Stoping a container is a about process management Benefits of containers Manual VM Docker Provision TimeDays Minutes Seconds / ms
  • 10. ● LXC is supported on all IBM Distros available ● Docker on POWER is no different than Docker on x86 platforms from a usability perspective ● Docker is only supported in Ubuntu 15.04 and Fedora 23 at the moment. ● Experimental at RHEL and SUSE ● LXD is only available in Ubuntu 15.04 ● http://images.linuxcontainers.org contains ppc64el images ● There is a growing ecosystem of dockerized applications for POWER ● System Z also supports it – https://www.ibm.com/developerworks/linux/linux390/docker.html IBM POWER containers support
  • 11. Installing Docker on Power Systems (after April 2015) ● Docker now officially supported on Ubuntu Vivid Vervet (15.04) – Install the docker package ● apt-get install docker.io ● Now part of the Ubuntu distribution and maintained by Canonical. © Copyright IBM Corporation 2015
  • 12. Using Docker ● Docker users can install images from Docker Hub, a public repositores for Docker images – However, it is x86-oriented. That means that by default, docker pulls a x86 image from the server. – Multiarch support for Docker Hub is being worked - Meanwhile, non-x86 images have distinct names to identify them, such as 'fedora22_ppc64le' ● Docker on POWER users can create their own images, and then can share them by running a private Docker Hub ● Most enterprises will probably have their own images in a private repository for security. © Copyright IBM Corporation 2015
  • 13. ● LXC is the base, distro independent, container infrastructure. ● Created in IBM/LTC in 2009 ● LXD is a controller over LXD allowing new features over LXC ● File-system snapshot ● Migration ● Docker is an application delivery that uses containers technologies ● Focused on images ● AnotherUnionFs (AUFS) ● Was based on LXC in the beginning, now has it own technology called libcontainer ● Focused on a few, hopefully 1, process What is difference between Docker, LXC and LXD?
  • 14. LXC, LXD and Docker usage Similar to AIX System WPAR Similar to AIX Application WPAR
  • 15. Creating a Docker image ● Simple ways to create images are: – Debian Bootstrap (debootstrap) – Ubuntu Core ● Cloning a system into an image is also possible – Allows for migration from virtual machines to containers – Environment can be customized (i.e. applications installed, etc) before generating the image for container deployment. © Copyright IBM Corporation 2015
  • 16. Creating a Docker image using debootstrap ● From Build and use Docker on the IBM POWER Linux platform document at IBM developerworks: ● $ sudo apt-get install -y debootstrap ● $ curl -o debootstrap.sh https://raw.githubusercontent.com/docker/docker/master/contrib/mk image/debootstrap ● $ chmod 755 debootstrap.sh ● $ sudo ./debootstrap.sh ubuntu --components=main,universe trusty ● $ sudo tar -C ubuntu -c . | docker import - ubuntu:14.04 ● $ docker tag ubuntu:14.04 ubuntu:trusty ● $ docker tag ubuntu:14.04 ubuntu:latest ● $ sudo rm -fr ubuntu © Copyright IBM Corporation 2015
  • 17. Creating a Docker image using Ubuntu Core ● From Ubuntu Core on Docker for POWER ● Download Ubuntu Core – Example for 14.04 version: – wget http://cdimage.ubuntu.com/ubuntu-core/trusty/daily/current/trusty-core-ppc64el.tar.gz ● Import the files into docker – cat trusty-core-ppc64el.tar.gz | docker import - ubuntucore 3ad6c6616b921b10a414238a226fb39eef85d8249ac7d767e84e275aaf90ab65 ● Verify that the image was created: – docker images ● Assure that your image is running fine: – docker run ubuntucore ls © Copyright IBM Corporation 2015
  • 18. Creating a Docker image using an installed system ● Creat a tar file with the filesystem structure – Useful to exclude /tmp, /proc, /sys and other filesystems not needed in the image – Example: tar cvf /tmp/ubuntu.tar ­­exclude='sys' ­­exclude='tmp'  ­­exclude='proc' * ● Import the files into docker – cat ubuntu.tar | docker import ­ ubuntuinstall        3dcc622c3ef8922cceef85d8249ac7d767e84e275aaf90ab65 ● Verify that the image was created: – docker images ● Assure that your image is running fine: – docker run ubuntuinstall ls © Copyright IBM Corporation 2015
  • 19. Comparing Docker to AIX Workload Partitions ● Similar concept of OS-based virtualization ● AIX allows for multiple OS versions to coexist – Host partition must be on AIX 7 – Hosted WPARS can be AIX 5.2, 5.3 or 7 ● Docker allows for multiple OS versions – Host partition does not have to be at latest level – Can host OS versions that are higher or lower – All run same kernel version, since it is shared by all containers, so while the OS version may change, the kernel does not © Copyright IBM Corporation 2015
  • 20. Comparing Docker to AIX Workload Partitions ● AIX WPARs are always persistent. Docker containers are not – You have to explicitly save the container in order to save changes made while running – Application data normally resides on data volumes, that are filesystems mounted by Docker, and these are persistent – therefore application data is always saved to disk and does not require the commit operation on the container. ● Each AIX WPAR is a separate image. Docker can instantiate multiple containers from the same image – Easier to deploy and maintain a pool of similar environments – Docker automatically assigns a new IP for each instance © Copyright IBM Corporation 2015
  • 21. Using Docker Containers ● docker images ● docker ps -a ● docker run <container> ● docker run -i -t <container> /bin/bash ● docker rm <container> ● docker rmi <image> ● docker commit <container_id> <some_name> © Copyright IBM Corporation 2015
  • 22. Docker demo on Power Systems ● As root, do: ● docker -v ● docker images ● docker ps -a ● cat /etc/lsb-release ● docker run vividcore cat /etc/lsb-release ● docker run ubuntu cat /etc/lsb-release © Copyright IBM Corporation 2015
  • 23. © Copyright IBM Corporation 2015
  • 24. © Copyright IBM Corporation 2015
  • 25. © Copyright IBM Corporation 2015
  • 26. Example of running Apache on Docker ● Based on customization script called Dockerfile ● Dockerfile specifies image to base installation, adds extra packages, copy files and configures applications ● Container started with port forwarding © Copyright IBM Corporation 2015
  • 27. Dockerfile FROM ubuntu MAINTAINER Breno Leitao RUN apt-get update && apt-get install -y php5 libapache2-mod-php5 php5-mysql php5-cli && apt-get clean && rm -rf /var/lib/apt/lists/* ENV APACHE_RUN_USER www-data ENV APACHE_RUN_GROUP www-data ENV APACHE_LOG_DIR /var/log/apache2 ENV APACHE_PID_FILE /var/run/apache2/apache2.pid ENV APACHE_RUN_DIR /var/run/apache2 ENV APACHE_LOCK_DIR /var/lock/apache2 EXPOSE 80 CMD ["/usr/sbin/apache2", "-D", "FOREGROUND"] Instruction set: https://docs.docker.com/reference/builder/
  • 28. Example of running Apache on Docker ● docker run -p 8080:80 -d apache – Starts the container in detached mode, and redirects container port 8080 to host partition port 80 ● Since it is running detached, control the container using docker commands (e.g. docker start, docker stop). © Copyright IBM Corporation 2015
  • 29. Moving a container to other system ● docker save apache > apache.tar – copy apache.tar to other system ● docker load < apache.tar ● docker run ­p 8080:80 ­d apache © Copyright IBM Corporation 2015
  • 30. Managing containers ● Many tools for managing docker containers ● Tools are platform agnostic – they talk to the docker daemon, so from the tool perspective it does not matter the platform ● Docker containers from multiple systems/architectures can be managed by the same tool © Copyright IBM Corporation 2015
  • 31. Managing containers © Copyright IBM Corporation 2015 Shipyard is an open source GUI for managing and deploying Docker containers
  • 32. Managing containers © Copyright IBM Corporation 2015
  • 33. Conclusion ● Containers offer a flexible way of deploying applications with minimum effort. ● System resources can be used efficiently, and migration/deployment of new environments is quick and easy. ● Docker integration with cloud management tools such as Openstack provides rapid instance deployment, and multi-platform container management. ● Docker for Power Systems allow all these benefits to be used on a high performance and high reliability platform. © Copyright IBM Corporation 2015
  • 34. © Copyright IBM Corporation 2015 Continue growing your IBM skills ibm.com/training provides a comprehensive portfolio of skills and career accelerators that are designed to meet all your training needs. • Training in cities local to you - where and when you need it, and in the format you want – Use IBM Training Search to locate public training classes near to you with our five Global Training Providers – Private training is also available with our Global Training Providers • Demanding a high standard of quality – view the paths to success – Browse Training Paths and Certifications to find the course that is right for you • If you can’t find the training that is right for you with our Global Training Providers, we can help. – Contact IBM Training at dpmc@us.ibm.com 34 Global Skills Initiative

Hinweis der Redaktion

  1. © Copyright IBM Corporation 2014 &amp;lt;number&amp;gt;
  2. © Copyright IBM Corporation 2014 &amp;lt;number&amp;gt; Notes: Instructor notes: Purpose — List the unit objectives Details — Additional information — Transition statement —
  3. &amp;lt;number&amp;gt;
  4. &amp;lt;number&amp;gt;
  5. &amp;lt;number&amp;gt;
  6. &amp;lt;number&amp;gt;
  7. &amp;lt;number&amp;gt;
  8. &amp;lt;number&amp;gt;
  9. &amp;lt;number&amp;gt;
  10. &amp;lt;number&amp;gt;
  11. &amp;lt;number&amp;gt;
  12. &amp;lt;number&amp;gt;
  13. &amp;lt;number&amp;gt;
  14. &amp;lt;number&amp;gt;
  15. &amp;lt;number&amp;gt;
  16. &amp;lt;number&amp;gt;
  17. &amp;lt;number&amp;gt;
  18. &amp;lt;number&amp;gt;
  19. &amp;lt;number&amp;gt;
  20. &amp;lt;number&amp;gt;
  21. &amp;lt;number&amp;gt;
  22. &amp;lt;number&amp;gt;
  23. &amp;lt;number&amp;gt;
  24. &amp;lt;number&amp;gt;
  25. &amp;lt;number&amp;gt;
  26. &amp;lt;number&amp;gt;