Docker in the EGI Docker in the EGI Federated Cloud Federated Cloud Carlos Gimeno – cgimeno@bifi.es 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? Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es 2
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... Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es 3
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 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es 4
1. Introduction – What is Docker? Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es 5
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. Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es 6
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 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es 7
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 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es 8
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/ Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es 9
1. Usage in the EGI Federated Cloud A silly example (I): Apache2 Container Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es 10
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! Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es 11
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) Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es 12
4. T o know more Documentation Available Official Documentation ● https://docs.docker.com/userguide/ Docker entry in Wikipedia ● http://en.wikipedia.org/wiki/Docker_%28software%29 Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es 13
5. Questions? Instituto de Biocomputación y Física de Sistemas Complejos • info@bifi.es • http://bifi.es 14
Recommend
More recommend