SlideShare une entreprise Scribd logo
1  sur  59
Télécharger pour lire hors ligne
Saudi HPC 2016 Tutorials
@WALIDSHAARI
21st April 2016
§ KACST to giving us this opportunity
§ Docker Inc. For allowing us use some of their graphics from docker slideshare
§ Christian Qnib @CQnib for the valuable HPC insights, and slide ideas for
CNAME
§ All for attending
§ vim/Emacs
§ Linux
§ Git
§ vagrant
§ Windows
§ Development/Operations/other
§ Devops
§ Configuration management tool
§ Containers
§ Schedulers
§ Containers management tools, or distributions
§ Cluster management tools
0.0.3 March
2013
1.0 June
2014
1.1 July
2014
1.2 August
2014
1.3 October
2014
1.4
December
2014
1.5
February
2015
1.6 April
2015
1.7 June
2015
1.8 August
2015
1.9
November
2015
1.10
Feburary
2016
1.11 April
2016
Linux features?
Name spaces?
cgroups?
Lxc?
Union file systems
Configuration management ?
Virtualization technology?
npm
jar
Packaging ?
rpm
deb
tar.gz
Virtual/environment management ?
Manual
configuration
Traditional VMs
Less Portable
Minimal overhead
Most Portable
Lots of overhead
Configuration
Management tools
Containers
Docker
Intel Clear
Containers
§ There are other containers
§ Shifter
§ Didn’t like it,it made wrong assumptions about containers, and meant for CRAY, it
exploits the current Docker registry system to build its own chrooted squashefs
containers in loopback devices, does not have the full Docker advantages.
§ Singularity
§ Rocket
§ Back to the Linux/Unix philosophy,developed by CoreOS team
§ Intel clear containers
§ One possible solution to Container security
Container encapsulate an application completely with all of its
software dependencies into a standardized unit for software
portable across different platforms*.
https://www.docker.com/what-docker
Bin/Libs
APP C
Docker Engine
Docker capable OS
Bin/Libs
App B
Bin/Libs
APP A
Bin/Libs
Database
Docker Engine
Docker capable OS
Bin/Libs
Load
balancer
Bin/Libs
Web ServerWeb Server
Bin/Libs
• Open Source Devops platform
• empowers developer to build and package services and
applications
• ship containerized applications as independent building unit
“Lego”
• Enables continuous delivery, and deployment
• Portability, reproducibility
• Behaves the same way in production, or other env.
• Run standalone or distributed
§ Docker Core Components:
§ Engine : Portable (light/heavy) weight run time, and packaging tool
§ Registry : Central repos to manage sharing of packaged Docker images, and
enabled (build, ship, release, run) workflows ( the default registry Docker
HUB)
§ Containers Eco System
§ Modular
§ Check Schedulers
§ Compliant
§ OCI
§ Holistic
§ End to end workflows
§ cgroups by Google
§ namespace by IBM
§ selinux by NSA
§ iptables
§ Docker in March 2013 was a lightweight runtime and robust tooling to build and
ship the encapsulated operating environment to run virtual containers on Linux for
your distributed applications.
§ Image:
The basis of a Docker container
§ Docker Container:
The standard unit in which the application service resides
"running image instance"
§ Docker Engine:
Runs on Linux, Creates,ships and runs Docker containers deployable on physical or virtual host
locally,in a datacenter or cloud service provider
§ Docker Machine:
Docker Machine is a tool that lets you install Docker Engine on virtual hosts,and manage the
hosts with docker- machine commands.You can use Machine to create Docker hosts on your
local Mac or Windows box, on your company network,in your data center,or on cloud providers
like AWS or Digital Ocean.
§ Docker Registry:
On-premises registry for image storing and collaboration
Containers
• Packages up software binaries and dependencies "minimal"
• Isolates software from each other
• Container is a standard format
• Easily portable across environment
• Allows ecosystem to develop around its standard Container
§ Deploy faster, and more often
§ Shorter time between deploys
§ Resource usage improved too (2x-10x)
§ Portability Freedom:
Move containers around
(laptop to workstation, laptop to servers, colo-to-cloud, cloud-to-cloud, cloud-to-colo, ...)
Network Storage I/OMemoryCPU
CGROUP 1
CGROUP 2
CGROUP 3
CGROUP 4
CGROUP 5
CGROUP 6 CGROUP 8
CGROUP 9
CGROUP 7
- Other subsystems:
• DEVICE
• HUGETLB
• CPUSET
https://github.com/yadutaf/ctop
Host
Isolation is achieved via Linux kernel namespaces
Container 3
pbs_serve
r
pbs_sched
sshd
Container 2
mpi_task(s)
pbs_mom
sshd
Container 1
mpi_task(s)
pbs_mom
sshd
Mount IPC UTSNetworkPID USER
Container have several name spaces
Host
Container 2
mpi_task(s)
pbs_mom
sshd
Container 1
mpi_task(s)
pbs_mom
sshd
Mount IPC UTSNetworkPID
Container 3
pbs_serve
r
pbs_sched
sshd
USER
Network namespace can be shared between one or more container
Host
Container 2
mpi_task(s)
pbs_mom
sshd
Container 1
mpi_task(s)
pbs_mom
sshd
Mount IPC UTSNetworkPID
Container 3
pbs_serve
r
pbs_sched
sshd
USER
https://docs.docker.com/
1- Go to https://docs.docker.com/windows/
2- then start installation https://docs.docker.com/windows/step_one/
3- Ensure git bash terminal is installed
4- invoke a git bash terminal
5- verify the docker-machine
1- Initialize the Docker machine environment
2-Verify the Docker-machine
docker-machine ls
docker-machine env default
3-You might need to create a virtual default machine
You might need to create a virtual default machine
docker-machine create --driver virtual box default
eval `docker-machine env default`
docker run hello-world
docker search hello-world
docker search –s 20 alpine
curl -s -S 'https://registry.hub.docker.com/v2/repositories/library/alpine/tags/' | jq '."results"[]["name"]' |sort
docker pull docker.io/seqvence/static-site
docker pull mhart/alpine-node
docker pull python:2.7-alpine
docker pull manomarks/worker
docker pull redis:alpine
docker pull postgres:9.4
docker history syed/linpack
$docker pull alpine:2.6
$docker images
https://medium.com/@mccode/the-misunderstood-docker-tag-latest-af3babfd6375#.2rn04fqc9
$docker run alpine:latest cat /etc/alpine-release
$docker run alpine:2.6 cat /etc/alpine-release
$docker run alpine:2.6 uptime
$docker run alpine:latest uptime
$docker history alpine:latest
$docker history alpine:2.6
$docker history syed/linpack
docker images
docker ps -a
-I interactive
-t
for i in {1..10}; do docker run alpine uptime;done
docker ps -a
man docker-rm
docker ps –a
docker rm container [container...]
Or:
docker rm `docker ps --all -q`
What if you want to remove:
volumes associated with the container?
Links associated with the container?
Running container(s)?
docker stats
docker ps -a
[walid@silverII ~] $ docker run seqvence/static-site
How to pass a signal to Kill?
docker run --name static-site -e AUTHOR="Walid Shaari"-d -P seqvence/static-site
§ From the docker-machine
§ $ docker-machine ip default
docker run --name static-site-2 -e AUTHOR="Your Name" -d -p 8888:80 seqvence/static-site
§ Base
§ Child
§ Official
§ User
§ https://github.com/docker/docker-birthday-3
§ In your homedir
§ git clone https://github.com/docker/docker-birthday-3
§ cd docker-birthday-3/example-voting-app/
§ Follow https://github.com/docker/docker-birthday-3 instruction for compose, and swarm
§ Check example enteries
§ https://blog.docker.com/2016/04/docker-birthday-app-challenge-winners/
https://github.com/yadutaf/infilter
To share the host network, PID, and IPC namespaces with the
container,
run the following command:
$ docker run -it --net=host --pid=host --ipc=host alpine sh
• There is more
• Schedulers
• Nomad
• Kubernetes
• Mesos
• Storage engines
• ZFS
• BTRFS
• CEPH
• Network overlays
• And definitely there is more to be awesome!

Contenu connexe

Tendances

Docker - The Linux Container
Docker - The Linux ContainerDocker - The Linux Container
Docker - The Linux Container
Balaji Rajan
 
OpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQOpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQ
dotCloud
 

Tendances (20)

Architecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based Deployments
 
Docker, the Future of DevOps
Docker, the Future of DevOpsDocker, the Future of DevOps
Docker, the Future of DevOps
 
Docker - introduction
Docker - introductionDocker - introduction
Docker - introduction
 
Docker - The Linux Container
Docker - The Linux ContainerDocker - The Linux Container
Docker - The Linux Container
 
Dockerizing stashboard - Docker meetup at Twilio
Dockerizing stashboard - Docker meetup at TwilioDockerizing stashboard - Docker meetup at Twilio
Dockerizing stashboard - Docker meetup at Twilio
 
Docker worshop @Twitter - How to use your own private registry
Docker worshop @Twitter - How to use your own private registryDocker worshop @Twitter - How to use your own private registry
Docker worshop @Twitter - How to use your own private registry
 
Why Docker? Dayton PHP, April 2017
Why Docker? Dayton PHP, April 2017Why Docker? Dayton PHP, April 2017
Why Docker? Dayton PHP, April 2017
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned
 
Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?Wordcamp Bratislava 2017 - Docker! Why?
Wordcamp Bratislava 2017 - Docker! Why?
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 
Docker from A to Z, including Swarm and OCCS
Docker from A to Z, including Swarm and OCCSDocker from A to Z, including Swarm and OCCS
Docker from A to Z, including Swarm and OCCS
 
Docker
DockerDocker
Docker
 
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker EcosystemDocker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
 
Docker presentation | Paris Docker Meetup
Docker presentation | Paris Docker MeetupDocker presentation | Paris Docker Meetup
Docker presentation | Paris Docker Meetup
 
HP Advanced Technology Group: Docker and Ansible
HP Advanced Technology Group: Docker and AnsibleHP Advanced Technology Group: Docker and Ansible
HP Advanced Technology Group: Docker and Ansible
 
Shipping Applications to Production in Containers with Docker
Shipping Applications to Production in Containers with DockerShipping Applications to Production in Containers with Docker
Shipping Applications to Production in Containers with Docker
 
From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...
 
OpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQOpenStack - Docker - Rackspace HQ
OpenStack - Docker - Rackspace HQ
 
Dockerize the World - presentation from Hradec Kralove
Dockerize the World - presentation from Hradec KraloveDockerize the World - presentation from Hradec Kralove
Dockerize the World - presentation from Hradec Kralove
 
Intro- Docker Native for OSX and Windows
Intro- Docker Native for OSX and WindowsIntro- Docker Native for OSX and Windows
Intro- Docker Native for OSX and Windows
 

En vedette

The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...
The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...
The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...
Daniel Krook
 

En vedette (11)

Containers Through the Ages - SysEleven
Containers Through the Ages - SysElevenContainers Through the Ages - SysEleven
Containers Through the Ages - SysEleven
 
Container port forecasts
Container port forecastsContainer port forecasts
Container port forecasts
 
Understanding container security
Understanding container securityUnderstanding container security
Understanding container security
 
Containers technologies
Containers technologiesContainers technologies
Containers technologies
 
Chw00t: Breaking unices’ chroot solutions
Chw00t: Breaking unices’ chroot solutionsChw00t: Breaking unices’ chroot solutions
Chw00t: Breaking unices’ chroot solutions
 
Lessons learned in reaching multi-host container networking
Lessons learned in reaching multi-host container networkingLessons learned in reaching multi-host container networking
Lessons learned in reaching multi-host container networking
 
Container orchestration
Container orchestrationContainer orchestration
Container orchestration
 
Containers - Portable, repeatable user-oriented application delivery. Build, ...
Containers - Portable, repeatable user-oriented application delivery. Build, ...Containers - Portable, repeatable user-oriented application delivery. Build, ...
Containers - Portable, repeatable user-oriented application delivery. Build, ...
 
The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...
The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...
The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...
 
M.E.L.I.G. Unikernel and Serverless
M.E.L.I.G. Unikernel and ServerlessM.E.L.I.G. Unikernel and Serverless
M.E.L.I.G. Unikernel and Serverless
 
Docker For Dummies
Docker For DummiesDocker For Dummies
Docker For Dummies
 

Similaire à Docker 101 @KACST Saudi HPC 2016

PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize Django
Hannes Hapke
 

Similaire à Docker 101 @KACST Saudi HPC 2016 (20)

Docker Dhahran Nov 2016 meetup
Docker Dhahran Nov 2016 meetupDocker Dhahran Nov 2016 meetup
Docker Dhahran Nov 2016 meetup
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
 
Docker fundamentals
Docker fundamentalsDocker fundamentals
Docker fundamentals
 
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
 
Docker linuxday 2015
Docker linuxday 2015Docker linuxday 2015
Docker linuxday 2015
 
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on AzureDocker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
 
PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize Django
 
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
 
How Reconnix Is Using Docker
How Reconnix Is Using DockerHow Reconnix Is Using Docker
How Reconnix Is Using Docker
 
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
 
Docker for PHP Developers - Jetbrains
Docker for PHP Developers - JetbrainsDocker for PHP Developers - Jetbrains
Docker for PHP Developers - Jetbrains
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for Development
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 application
 
Docker+java
Docker+javaDocker+java
Docker+java
 
Develop with linux containers and docker
Develop with linux containers and dockerDevelop with linux containers and docker
Develop with linux containers and docker
 
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker and Microservice
Docker and MicroserviceDocker and Microservice
Docker and Microservice
 
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
 

Plus de Walid Shaari

Network Automation Journey, A systems engineer NetOps perspective
Network Automation Journey, A systems engineer NetOps perspectiveNetwork Automation Journey, A systems engineer NetOps perspective
Network Automation Journey, A systems engineer NetOps perspective
Walid Shaari
 

Plus de Walid Shaari (14)

Towards-cloud-native-HPC.pdf
Towards-cloud-native-HPC.pdfTowards-cloud-native-HPC.pdf
Towards-cloud-native-HPC.pdf
 
Aws ug dxb 2021 container series iv
Aws ug dxb 2021 container series  ivAws ug dxb 2021 container series  iv
Aws ug dxb 2021 container series iv
 
Open hybrid cloud
Open hybrid cloudOpen hybrid cloud
Open hybrid cloud
 
Okd wg kubecon marathon azure & vsphere
Okd wg kubecon marathon azure & vsphereOkd wg kubecon marathon azure & vsphere
Okd wg kubecon marathon azure & vsphere
 
K8s architecture meetup2- k8saraby
K8s architecture  meetup2- k8sarabyK8s architecture  meetup2- k8saraby
K8s architecture meetup2- k8saraby
 
Pydata 2020 containers meetup
Pydata  2020 containers meetup Pydata  2020 containers meetup
Pydata 2020 containers meetup
 
Dammam aws user group meetup
Dammam aws user group meetupDammam aws user group meetup
Dammam aws user group meetup
 
Bahrain ch9 introduction to docker 5th birthday
Bahrain ch9 introduction to docker 5th birthday Bahrain ch9 introduction to docker 5th birthday
Bahrain ch9 introduction to docker 5th birthday
 
IAU workshop 2018 day one
IAU workshop 2018 day oneIAU workshop 2018 day one
IAU workshop 2018 day one
 
Containers - Portable, repeatable user-oriented application delivery. Build, ...
Containers - Portable, repeatable user-oriented application delivery. Build, ...Containers - Portable, repeatable user-oriented application delivery. Build, ...
Containers - Portable, repeatable user-oriented application delivery. Build, ...
 
Network Automation Journey, A systems engineer NetOps perspective
Network Automation Journey, A systems engineer NetOps perspectiveNetwork Automation Journey, A systems engineer NetOps perspective
Network Automation Journey, A systems engineer NetOps perspective
 
Kick starting Network Automation
Kick starting Network AutomationKick starting Network Automation
Kick starting Network Automation
 
Docker Dhahran November 2017 meetup
Docker Dhahran November 2017 meetupDocker Dhahran November 2017 meetup
Docker Dhahran November 2017 meetup
 
What HPC can learn from DevOps?
What HPC can learn from DevOps?What HPC can learn from DevOps?
What HPC can learn from DevOps?
 

Dernier

Dernier (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

Docker 101 @KACST Saudi HPC 2016

  • 1. Saudi HPC 2016 Tutorials @WALIDSHAARI 21st April 2016
  • 2. § KACST to giving us this opportunity § Docker Inc. For allowing us use some of their graphics from docker slideshare § Christian Qnib @CQnib for the valuable HPC insights, and slide ideas for CNAME § All for attending
  • 3. § vim/Emacs § Linux § Git § vagrant § Windows § Development/Operations/other § Devops § Configuration management tool § Containers § Schedulers § Containers management tools, or distributions § Cluster management tools
  • 4. 0.0.3 March 2013 1.0 June 2014 1.1 July 2014 1.2 August 2014 1.3 October 2014 1.4 December 2014 1.5 February 2015 1.6 April 2015 1.7 June 2015 1.8 August 2015 1.9 November 2015 1.10 Feburary 2016 1.11 April 2016
  • 5.
  • 6. Linux features? Name spaces? cgroups? Lxc? Union file systems Configuration management ? Virtualization technology? npm jar Packaging ? rpm deb tar.gz Virtual/environment management ?
  • 7. Manual configuration Traditional VMs Less Portable Minimal overhead Most Portable Lots of overhead Configuration Management tools Containers Docker Intel Clear Containers
  • 8.
  • 9. § There are other containers § Shifter § Didn’t like it,it made wrong assumptions about containers, and meant for CRAY, it exploits the current Docker registry system to build its own chrooted squashefs containers in loopback devices, does not have the full Docker advantages. § Singularity § Rocket § Back to the Linux/Unix philosophy,developed by CoreOS team § Intel clear containers § One possible solution to Container security
  • 10.
  • 11. Container encapsulate an application completely with all of its software dependencies into a standardized unit for software portable across different platforms*. https://www.docker.com/what-docker
  • 12. Bin/Libs APP C Docker Engine Docker capable OS Bin/Libs App B Bin/Libs APP A
  • 13. Bin/Libs Database Docker Engine Docker capable OS Bin/Libs Load balancer Bin/Libs Web ServerWeb Server Bin/Libs
  • 14. • Open Source Devops platform • empowers developer to build and package services and applications • ship containerized applications as independent building unit “Lego” • Enables continuous delivery, and deployment • Portability, reproducibility • Behaves the same way in production, or other env. • Run standalone or distributed
  • 15. § Docker Core Components: § Engine : Portable (light/heavy) weight run time, and packaging tool § Registry : Central repos to manage sharing of packaged Docker images, and enabled (build, ship, release, run) workflows ( the default registry Docker HUB) § Containers Eco System § Modular § Check Schedulers § Compliant § OCI § Holistic § End to end workflows
  • 16.
  • 17. § cgroups by Google § namespace by IBM § selinux by NSA § iptables § Docker in March 2013 was a lightweight runtime and robust tooling to build and ship the encapsulated operating environment to run virtual containers on Linux for your distributed applications.
  • 18.
  • 19. § Image: The basis of a Docker container § Docker Container: The standard unit in which the application service resides "running image instance" § Docker Engine: Runs on Linux, Creates,ships and runs Docker containers deployable on physical or virtual host locally,in a datacenter or cloud service provider § Docker Machine: Docker Machine is a tool that lets you install Docker Engine on virtual hosts,and manage the hosts with docker- machine commands.You can use Machine to create Docker hosts on your local Mac or Windows box, on your company network,in your data center,or on cloud providers like AWS or Digital Ocean. § Docker Registry: On-premises registry for image storing and collaboration
  • 20.
  • 21.
  • 22.
  • 23. Containers • Packages up software binaries and dependencies "minimal" • Isolates software from each other • Container is a standard format • Easily portable across environment • Allows ecosystem to develop around its standard Container
  • 24.
  • 25. § Deploy faster, and more often § Shorter time between deploys § Resource usage improved too (2x-10x) § Portability Freedom: Move containers around (laptop to workstation, laptop to servers, colo-to-cloud, cloud-to-cloud, cloud-to-colo, ...)
  • 26. Network Storage I/OMemoryCPU CGROUP 1 CGROUP 2 CGROUP 3 CGROUP 4 CGROUP 5 CGROUP 6 CGROUP 8 CGROUP 9 CGROUP 7 - Other subsystems: • DEVICE • HUGETLB • CPUSET
  • 28. Host Isolation is achieved via Linux kernel namespaces Container 3 pbs_serve r pbs_sched sshd Container 2 mpi_task(s) pbs_mom sshd Container 1 mpi_task(s) pbs_mom sshd Mount IPC UTSNetworkPID USER
  • 29. Container have several name spaces Host Container 2 mpi_task(s) pbs_mom sshd Container 1 mpi_task(s) pbs_mom sshd Mount IPC UTSNetworkPID Container 3 pbs_serve r pbs_sched sshd USER
  • 30. Network namespace can be shared between one or more container Host Container 2 mpi_task(s) pbs_mom sshd Container 1 mpi_task(s) pbs_mom sshd Mount IPC UTSNetworkPID Container 3 pbs_serve r pbs_sched sshd USER
  • 31.
  • 32.
  • 34. 1- Go to https://docs.docker.com/windows/ 2- then start installation https://docs.docker.com/windows/step_one/ 3- Ensure git bash terminal is installed 4- invoke a git bash terminal 5- verify the docker-machine
  • 35. 1- Initialize the Docker machine environment 2-Verify the Docker-machine docker-machine ls docker-machine env default 3-You might need to create a virtual default machine
  • 36. You might need to create a virtual default machine docker-machine create --driver virtual box default
  • 37. eval `docker-machine env default` docker run hello-world
  • 39. docker search –s 20 alpine curl -s -S 'https://registry.hub.docker.com/v2/repositories/library/alpine/tags/' | jq '."results"[]["name"]' |sort
  • 40. docker pull docker.io/seqvence/static-site docker pull mhart/alpine-node docker pull python:2.7-alpine docker pull manomarks/worker docker pull redis:alpine docker pull postgres:9.4 docker history syed/linpack
  • 42. https://medium.com/@mccode/the-misunderstood-docker-tag-latest-af3babfd6375#.2rn04fqc9 $docker run alpine:latest cat /etc/alpine-release $docker run alpine:2.6 cat /etc/alpine-release $docker run alpine:2.6 uptime $docker run alpine:latest uptime
  • 43. $docker history alpine:latest $docker history alpine:2.6 $docker history syed/linpack
  • 44.
  • 46.
  • 48. for i in {1..10}; do docker run alpine uptime;done docker ps -a man docker-rm docker ps –a docker rm container [container...] Or: docker rm `docker ps --all -q` What if you want to remove: volumes associated with the container? Links associated with the container? Running container(s)?
  • 50.
  • 51. [walid@silverII ~] $ docker run seqvence/static-site
  • 52. How to pass a signal to Kill?
  • 53. docker run --name static-site -e AUTHOR="Walid Shaari"-d -P seqvence/static-site
  • 54.
  • 55. § From the docker-machine § $ docker-machine ip default docker run --name static-site-2 -e AUTHOR="Your Name" -d -p 8888:80 seqvence/static-site
  • 56. § Base § Child § Official § User
  • 57. § https://github.com/docker/docker-birthday-3 § In your homedir § git clone https://github.com/docker/docker-birthday-3 § cd docker-birthday-3/example-voting-app/ § Follow https://github.com/docker/docker-birthday-3 instruction for compose, and swarm § Check example enteries § https://blog.docker.com/2016/04/docker-birthday-app-challenge-winners/
  • 58. https://github.com/yadutaf/infilter To share the host network, PID, and IPC namespaces with the container, run the following command: $ docker run -it --net=host --pid=host --ipc=host alpine sh
  • 59. • There is more • Schedulers • Nomad • Kubernetes • Mesos • Storage engines • ZFS • BTRFS • CEPH • Network overlays • And definitely there is more to be awesome!