Docker in the EGI Docker in the EGI Federated Cloud Federated - - PowerPoint PPT Presentation

docker in the egi docker in the egi federated cloud
SMART_READER_LITE
LIVE PREVIEW

Docker in the EGI Docker in the EGI Federated Cloud Federated - - PowerPoint PPT Presentation

Docker in the EGI Docker in the EGI Federated Cloud Federated Cloud Carlos Gimeno cgimeno@bifi.es Instituto de Biocomputacin y Fsica de Sistemas Complejos info@bifi.es http://bifi.es 0. Index Introduction What is Docker? A


slide-1
SLIDE 1

Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es

Docker in the EGI Federated Cloud Docker in the EGI Federated Cloud

Carlos Gimeno – cgimeno@bifi.es

slide-2
SLIDE 2

2 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es

  • 0. Index

Introduction

What is Docker? A container? What I need to run Docker?

Usage in the EGI Federated Cloud A quick look into the future To know more Questions?

slide-3
SLIDE 3

3 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es

  • 1. Introduction – What is Docker?

What is Docker?

Docker is an open source container virtualization framework. It allow us to create lightweigth, portable, and self- sufficient containers. You can use this containers to test your applications, build and run services...

slide-4
SLIDE 4

4 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es

  • 1. Introduction – What is Docker

A container?

Containers are ligthweight virtualization enviroments, which are built on top of facilities provided by the Linux Kernel (cgroups and namespaces) Opposed to a traditional VM, they don't require or include a separate Operating System

slide-5
SLIDE 5

5 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es

  • 1. Introduction – What is Docker?
slide-6
SLIDE 6

6 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es

  • 1. Introduction - Prerequisites

What I need to run Docker?

Requires 64-bit OS Linux kernel version >= 3.10 ( >=3.13 if you're using Ubuntu 12.04) There is an image available in the AppDB ready to use. https://appdb.egi.eu/store/vappliance/ubuntu.14.04.2.lts.

slide-7
SLIDE 7

7 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es

  • 1. Usage in the EGI Federated

Cloud

How to use Docker in the EGI Federated Cloud?

Subscribe to the image list:

  • https://vmcaster.appdb.egi.eu/store/vappliance/ubuntu.14.04.2

Create a new instance with this image

  • User: Ubuntu

Test Docker

  • docker run hello-world
slide-8
SLIDE 8

8 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es

  • 1. Usage in the EGI Federated

Cloud

Useful commands:

Docker ps: List all running containers Docker run: Create and run a new container Docker stop: Stop a running container Docker rm: Remove a stopped container Docker images: List images available to create a new container. Docker save > file: Save an image to a file Docker load < file: Load an image from a file

slide-9
SLIDE 9

9 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es

  • 1. Usage in the EGI Federated

Cloud

Using Dockerfiles

Dockerfiles are recipes designed to build a new container from a base image They are equivalent to Vagrantfile (Vagrant) Use them to create replicable enviroments for your applications, services... You can find some examples here:

  • https://docs.docker.com/reference/builder/
slide-10
SLIDE 10

10 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es

  • 1. Usage in the EGI Federated

Cloud

A silly example (I): Apache2 Container

slide-11
SLIDE 11

11 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es

  • 1. Usage in the EGI Federated

Cloud

A silly example (II): Build the container

Once you have finished your Dockerfile build the container:

  • Docker build -t image_name .

To create a new container with the new image

  • Docker run -d -P image_name
  • d: Run in background
  • P map ports from container into physical machine

Use docker ps to check if the container is running!

slide-12
SLIDE 12

12 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es

  • 2. A quick look into the future

What will bring to us the future?

Docker popularity is increasing everyday and there are a lot of projects that we'll to keep an eye on them

  • CoreOS: A basic OS designed to create clusters of

applications deployed in containers

  • Kubernetes: Allows to create a cluster of Linux containers

in our already installed servers

  • Docker Swarm: Same as Kubernetes (TO-DO Task in

Fedcloud)

slide-13
SLIDE 13

13 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es

  • 4. T
  • know more

Documentation Available

Official Documentation

  • https://docs.docker.com/userguide/

Docker entry in Wikipedia

  • http://en.wikipedia.org/wiki/Docker_%28software%29
slide-14
SLIDE 14

14 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es

  • 5. Questions?