PARALLEL & SCALABLE MACHINE LEARNING & DEEP LEARNING Prof. Dr. – Ing. Morris Riedel Adjunct Associated Professor School of Engineering and Natural Sciences, University of Iceland Research Group Leader, Juelich Supercomputing Centre, Germany Docker and Container Management November 22 th , 2018 Room Endurmenntun – Naustið Cloud Computing & Big Data SHORT LECTURE 12
24
Embed
School ofEngineering andNatural Sciences, University ...€¦ · School ofEngineering andNatural Sciences, University ofIceland Research Group Leader, JuelichSupercomputingCentre,
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
PARALLEL & SCALABLE MACHINE LEARNING & DEEP LEARNING
Prof. Dr. – Ing. Morris RiedelAdjunct Associated ProfessorSchool of Engineering and Natural Sciences, University of IcelandResearch Group Leader, Juelich Supercomputing Centre, Germany
Docker and Container ManagementNovember 22th, 2018Room Endurmenntun – Naustið
Cloud Computing & Big Data
SHORT LECTURE 12
Review of Lecture 11 – Data Analytics & Cloud Data Mining
Data Analytics & Clustering
Short Lecture 12 – Docker and Container Management
Association Rule Mining
Collaborative Filtering
(causality vs. correlation) (unsupervised learning)
Short Lecture 12 – Docker and Container Management
11. Data Analytics & Cloud Data Mining
12. Docker & Container Management
13. OpenStack Cloud Operating System
14. Online Social Networking & Graphs
15. Data Streaming Tools & Applications
16. Epilogue
+ additional practical lectures for our
hands-on exercises in context
Practical Topics
Theoretical / Conceptual Topics3 / 24
Short Lecture 12 – Docker and Container Management
Outline
This is only a Short Lecture Goal is to provide a few pointers to other
advanced related university courses/topics ‘Docker & Container Management’
needs a full course & substantial tutorial Links previous Lectures & Practical Lectures
with further material to study & research
Docker & Container Management Cloud Service Challenge & Docker Container Virtualization vs. Container Approaches Kubernetes & Apache Mesos Tools AWS & Google & MS Azure Cloud Examples Apache Mesos AirBNB Example
Promises from previous lecture(s):
Lecture 5: Lecture 12 provides details on containers & Docker used in cloud computing for machine learning
Lecture 8: Lecture 12 provides more details about containers, images, and registries including tool Docker
Lecture 9: Lecture 12 provides more details about Kubernetes, containers & registries including tool Docker
4 / 24
Docker & Container Management
Short Lecture 12 – Docker and Container Management 5 / 24
Cloud service customers pay for? Hardware, storage, network (e.g. AWS IAAS, cf. Lecture 8) General software elements (e.g. GAE PAAS elements, cf. Lecture 9) Service: the heart of the cloud offering (apps & added-value, cf. Lecture 10)
Revisited: What is Cloud Computing from 10.000 ft?
Short Lecture 12 – Docker and Container Management
[6] Distributed & Cloud Computing Book
Challenge: Service development typically means wasting hours setting up remote developer environments, intalling and configuring required software libraries, system tools, spinning up new instances (e.g. EC2 AWS compute instances) and making copies of production code to run locally
Motivation: Need for a tool that bundles all dependencies/configurations & make remote runs easy
(service-oriented platform with virtualized resources)
(desktops)
(laptops)
(powered by global data centers)
6 / 24
Docker Tool – Container & Images
Known for ‘containerization of software‘ Docker container enable a software to be ready-to-run ‘Container images‘ contain everything that is needed to run:
source code, runtime, system tools, specific libraries, data, … Enables flexibility and portability
on where the application softwareis able to run (‘towards a standard‘)
E.g. same docker image can run onAmazon Web services, GoogleCloud platform, or Microsoft Azure
Short Lecture 12 – Docker and Container Management
[7] Docker Web page
The core idea of Docker is to provide a software container with all required software elements that guarantees that the application within the software container will always run the same way, regardless of the environment it is running in or which cloud infrastructure is used underneath
Docker is an open-source tool that automates the deployment of applications within so-called software containers that can be bundled as a Docker image and broadly used in Clouds today
(Note: there is also a commercial Docker Enterprise version)
7 / 24
Docker Tool – Docker Hub Repositories Example
Docker community image repository 100,000+ free applications in
public and private registries Find and pull images from community and official libraries Manage, push to, and pull from private image libraries Automatically create new images (e.g. changes via source code repository) E.g. tools for developer-test pipeline automation or applications for users
Short Lecture 12 – Docker and Container Management
[8] Docker Hub Web page
(Apache Web serverfor developing anddeploying Web services,e.g. REST, SOAP, etc.)
(Statistical Computing withR software ready to use fordata analysis, data mining,and machine learning, etc.)
8 / 24
Using VMs (cf. Lecture 4) Approach for Docker hosts to run on Hypervisors Deployment approach is transparent for Docker Engine
Interaction with VM software E.g. App 4 running as isolated application on the Docker Engine can
interact with a database that is hosted in the ‘pure VM‘ (not in container)
Container Approaches using Virtualization – Docker Example
Short Lecture 12 – Docker and Container Management
[7] Docker Web page
(practice: by mixing Docker hosts with traditional VMssystem administrators get a better resource utilization)
(traditional VM)
9 / 24
Virtualization (high storage footprint) VMs include application, binaries, libraries and an
entire guest operating system (~tens of GBs)
Containers (low storage footprint, vendor-lock free) Include application, all dependencies, runs isolated, but share kernel of
the operating system with other containers (vendor independence )
Virtualization vs. Container Approaches – Docker Example
Short Lecture 12 – Docker and Container Management
[7] Docker Web page
10 / 24
Docker Tool – Docker Hub Repository – Hadoop Example
Docker community image repository 100,000+ free applications including Hadoop (e.g. map-reduce, cf. Lecture 5)
Short Lecture 12 – Docker and Container Management
Short Lecture 12 – Docker and Container Management
[9] Kubernetes Web page
Kubernetes is an open-source container orchestration tool for automated container deployment, scaling, and management that is often used with Docker and integrated into many clouds today
Apache Mesos is an open-source tool that abstracts CPU, memory, storage, and compute resourcesaway from machines to enable a datacenter that looks like a single pool of resources for end users
[10] Slideshare, ‘BuildingClustered Applications withKubernetes and Docker’
[11] Apache Mesos Web page
12 / 24
AWS Cloud Service Portfolio – Compute – Revisited
Multiple compute products Deploy, run, and scale applications as
virtual servers, containers, or code Products & Usage
Amazon EC2: Virtual servers in the cloud Amazon EC2 Container Registry: Store and retrieve Docker images Amazon EC2 Container Service: Run & manage Docker containers Amazon Lightsail: Launch and manage virtual private servers Amazon VPC: Isolated cloud resources AWS Batch: Run batch jobs at any scale AWS Elastic Beanstalk: Run and manage Web Apps AWS Lambda: Run your code in response to events Auto Scaling: Automatic Elasticity
Short Lecture 12 – Docker and Container Management
[12] AWS Web page
13 / 24
Container Registry – Amazon EC2 Container Registry Example
Repository features Provides Docker container
registry & reliable access Simplify development to
production workflow Push container images to ECR
using Docker CLI from development laptop
Works together with Amazon EC2 Container Service (ECS)
Short Lecture 12 – Docker and Container Management
The Amazon EC2 Container Registry (ECR) provides a highly reliablerepository in order to store and retrieveDocker images that in turn can be easilydeployed on the EC2 Amazon IAAS cloud(cf. Lecture 8)
[12] AWS Web page
14 / 24
Container Registry – Amazon EC2 Container Service Example
Service features Provides service to run and
manage Docker containers Pulls Docker images from ECR
directly to the EC2 IAAS cloud for production deployments
Short Lecture 12 – Docker and Container Management
The Amazon EC2 Container Service (ECS) is a highly scalable, fast, container management service that runs, stops, and manages Docker containers on the EC2 Amazon IAAS cloud (cf. Lecture 5)
[12] AWS Web page
15 / 24
Container Registry & Service – Amazon Pricing Example
ECR Pricing No upfront fees Pay for use of data
stored in repositories and data transferred
Storage is $0.10 per GB / month
ECS Pricing No additional charge
for this serive(!) But: Pay-per-use for other AWS
resources that are available E.g. EC2 instances or EBS
volumes (cf. Lecture 8)
Short Lecture 12 – Docker and Container Management
[12] AWS Web page
16 / 24
Google Cloud – Compute & Storage – Revisited
Short Lecture 12 – Docker and Container Management
The Google Cloud Platform offers a wide variety of IAAS/PAAS/SAAS technologies in the areas of compute, storage and databases, networking, big data, machine learning, management tools, developer tools, as well as identity and security – many of them can be combined for applications
The Google App Engine (GAE) PAAS solution is taking advantage of the IAAS Google infrastructure
(PAAS level)
(IAAS level)
17 / 24
Google Cloud – Kubernetes Engine
Short Lecture 12 – Docker and Container Management 18 / 24
[14] Google Cloud – Kubernetes Engine
Microsoft Azure – Azure Kubernetes Service
Short Lecture 12 – Docker and Container Management 19 / 24
[15] Microsoft Azure Cloud Azure Kubernetes Service
[Video] Apache Mesos Example at AirBnB
Short Lecture 12 – Docker and Container Management
[13] YouTube, ‘How Airbnb Simplifies with Mesos’
20 / 24
Lecture Bibliography
Short Lecture 12 – Docker and Container Management 21 / 24
Lecture Bibliography (1)
[1] An Introduction to Statistical Learning with Applications in R, Online: http://www-bcf.usc.edu/~gareth/ISL/index.html
[2] Jupyter Web page,Online: http://jupyter.org/
[3] scikit-learn Web page,Online: https://scikit-learn.org
[4] Microsoft Azure HDInsight Cluster Web page, Online: https://azure.microsoft.com/en-us/services/hdinsight/
[5] Apache Spark Web page, Online: http://spark.apache.org/
[6] K. Hwang, G. C. Fox, J. J. Dongarra, ‘Distributed and Cloud Computing’, Book, Online: http://store.elsevier.com/product.jsp?locale=en_EU&isbn=9780128002049
[7] Docker Web page, Online: https://www.docker.com/
[8] Docker Hub Web page, Online: https://hub.docker.com/
[9] Kubernetes Web page, Online: https://kubernetes.io/
[10] Slideshare, ‘Building Clustered Applications with Kubernetes and Docker‘, Online: https://www.slideshare.net/wattsteve/kubernetes-48013640
Short Lecture 12 – Docker and Container Management 22 / 24
Lecture Bibliography (2)
[11] Apache Mesos Web page, Online: http://mesos.apache.org/
[12] Amazon Web Services Web Page, Online: https://aws.amazon.com
[13] YouTube Video, ‘How Airbnb Simplifies with Mesos‘, Online: https://www.youtube.com/watch?v=GfpGmhZwaoM
[14] Google Cloud Kubernetes Engine,Online: https://cloud.google.com/kubernetes-engine/
[15] Microsoft Azure, Azure Kubernetes Service,Online: https://azure.microsoft.com/en-gb/services/kubernetes-service/
Short Lecture 12 – Docker and Container Management 23 / 24
Short Lecture 12 – Docker and Container Management 24 / 24