Introducción a Docker - Parte 1

Slides:



Advertisements
Presentaciones similares
Instalación de Subversion Para instalar Subversion en Ubuntu, abrimos una terminal.
Advertisements

2003 HYPACK MAX Training Seminar1 77 – Digitizing Chart Data to DGW Format El programa del MAPA se usa para digitalizar la información del mapa náutica.
Speaking Exercises 1.Save this program as speaking exercise #1YOUR NAME in the M drive 2.Read each question out loud into your microphone, and then reply.
Opciones bajo el comando Tools del menú principal
GWT Designer, Organización del proyecto GWT Google Web Toolkit Prof
Antonio Gámir TSP – Windows Client Microsoft Ibérica.
para desarrolladores Minimizar el cambio Concentrarse en estabilidad, confiabilidad y rendimiento. Ayudar a mejorar la productividad Reducir la curva.
Editing Slides With Polaris Office, you can create new .ppt and .pptx presentations or edit your presentation with ease.
Programación orientada a objetos
PRUEBA DE UBICACION PARA HISPANOHABLANTES
Cómo ordenar a las personas en situaciones formales.
Implementacion de F.S. Asignación espacio Manejo espacio libre Emely Arráiz Ene-Mar 08.
Aprenda MySQL en 120 minutos Tutorial. Dirigido a...
Capítulo 2 ¡A conocernos! Vocabulario 1 Apuntes (notes)
Ingeniería de Software Andrés Salinas Bendeck
COMANDOS LINUX REDES COMANDOS DEL GIOVANNI ABRIZ MORALES VERANO 2015.
ECOM-6030 PASOS PARA LA INSTALACIÓN DE EASYPHP Prof. Nelliud D. Torres © - Derechos Reservados.
English Language II (2). English Language I (2) Warm-up.
Nuestra escuela. Un proyecto de mandatos y localizaciones.
“Android: Un acercamiento practico” Manuel Alejandro Moscoso Domínguez Estudiante de Ingeniería en Bioinformática Talca, 8 de octubre de 2009.
Clase práctica Nº 1. Introducción al entorno de desarrollo Eclipse. Dpto. de Ciencias e Ingeniería de la Computación. Universidad Nacional del Sur.
Introducción a Linux Jornadas Noviembre 2009 GUL – UC3M Tania Pérez.
SOFTWARE LIBRE Y OTRAS YERBAS Taller de Arte y Programación (UDELAR) Montevideo, agosto de 2010.
Master on Free Software Tarefas Una aplicación cliente/servidor y multi- backend de GTD para GNOME, Maemo.org y Moblin.org.
Fedora Remix FLISol Chihuahua 25 Abr 2009 Fedora Remix Alejandro Acosta Contribuidor Fedora Ambassadors, FreeMedia.
API J2ME Fernando Jesús Sánchez Herrera Técnico de Apoyo de Investigación Universidad Extremadura.
Sistemas de Control de Versiones (SCMs) Introducción a los conceptos de control de versiones Introducción a las herramientas darcs y svn Margarita Manterola.
Instalación de Windows 7 beta 1 en Virtualbox http:// Instalación de Windows 7 beta 1 en Virtualbox.
Empaquetamiento de RPM. Que es un archivo RPM? Un archivo rpm es formato de archivo definido para el manejador de paquetes rpm y en esencia es un archivo.
Opciones del Package Manager. - Create new package: Me permite crear un nuevo paquete - Write new specification files for all installed, locally generated.
Cómo trabajar con aplicaciones de Google Gmail, un popular
Greetings, Introductions
Conociendo un Ubuntu: Una distribución diferente a Linux
Español 3 10 de mayo de 2017.
MAVEN: Introducción.
Línea de Comando de Unix
Desde cero a una Distribución Features, Drush Make y Profiler
Rafael Asprilla Universidad de Panamá ,
Introducción a Sistemas Operativos (clase práctica)
Una breve introducción
GNU LINUX APRENDIENDO A USAR LA TERMINAL ISC. HIRAM GUERRERO CASTILLO
Snaps en Python Distribuyendo programas mediante Facundo Batista
CIENCIA TECNOLOGÍA Y SOCIEDADES
Taller: Modelización de Energías Renovables Despacho Eléctrico
Vámonos Escribe las frases y conjuga los verbos:
Introduction & Agenda Introduction to Microchip Device Blocksets Introduction to MATLAB Plug-In in MPLAB®IDE Creating a SIMULINK model with Microchip.
Introducción a Visual Studio .NET
Actividad 3 Servicios y Servidores
Las herramientas Case Julian madrigal.
Árboles Binario de Búsqueda
INTRODUCCIÓN A JAVA.
Comandos de Linux Luna Luna Francisco Jesús
Sistemas de control de versiones
How to Log in to RosettaStone and Install the Speech Component
What’s new with SQL 2017 Christian Araujo
Gestion de redes Héctor Lara García
Docker como la máxima expresión de Devops
Gestión de PCs tradicional
FRACTIONAL REGULATION ENERGY SAVING DEVICE
Título de Proyecto Paso 1 Paso 2 Paso 3 Paso 4 Presentación
¿Qué hora es?.
FMPAC entrenamiento de Computación
JKSimMet Software (windows & buttons) Split Engineering Chile Ltda. General Salvo #331 oficina 201 Casilla Sucursal Panorámico Providencia – Santiago,
Fundamentals of Web Development - 2 nd Ed.Randy Connolly and Ricardo Hoar Fundamentals of Web DevelopmentRandy Connolly and Ricardo Hoar © 2017 Pearson.
TAREA Estudian: Study vocabulary list.
To insert audio you need to be on that slide
Voter’s Registration REGISTRO DE VOTANTE
Welcome to PowerPoint gdskcgdskfcbskjc. Designer helps you get your point across PowerPoint Designer suggests professional designs for your presentation,
TABLET INFORMATION SUBMIT A Presentation Template.
ENTERPRISE ARCHITECTURE UCV –TRUJILLO Ing. Mg. Daniel Antonio Miranda Acuña.
Transcripción de la presentación:

Introducción a Docker - Parte 1 @javierprovecho

¿Que es Docker? Plataforma abierta para crear y ejecutar aplicaciones distribuidas. Destinado a desarrolladores y administradores. Construcción basada en componentes separados. Ejecución en distintas plataformas (servers, desktops, laptops…) con una misma compilación.

¿En que esta basado? (requisitos) Sistemas 64 bits Linux kernel 3.8+ GoLang Linux container (LXC)

¿Cómo funciona? (frente a VMs) Máquinas virtuales SO Anfitrión Hipervisor SO Invitado Librerías Aplicación

¿Cómo funciona? (frente a VMs) Docker SO Anfitrión Librerías Aplicación

¿Cómo funciona? (frente a VMs)

¿Por qué para desarrolladores? Sin problemas de dependencias. Cualquier lenguaje de programación. Aplicaciones portables multiplataforma. Control de versiones. Repositorios públicos o privados. Compilaciones automatizadas.

¿Por qué para administradores? Abstracción del SO anfitrión. Escalabilidad rápida. Seguridad añadida. Máximo rendimiento. Menor tamaño de los contenedores. Mayor aprovechamiento del hardware. Funciona dentro de máquinas virtuales.

Ventajas Docker es código abierto https://github.com/docker/docker Sistema enfocado a aplicaciones, no a máquinas. Reutilización de compilaciones previas. Ecosistema en crecimiento (Docker Hub, StackOverFlow…). Aislamiento de recursos (sistema de archivos, red, ram…).

¡Aún más! Linux container daemon (LXD) Hecho por Ubuntu/Canonical. Hipervisor para contenedores. Migración en caliente entre distintas máquinas. Seguridad a nivel de hardware. Gestión avanzada de redes. API REST limpia y extensible.

¡Aún más! Kubernetes Hecho por Google. Gestor de clústeres de contenedores. API de bajo nivel. Mecanismos de self-healing: Reinicios automáticos. Programación de eventos. Clonación/réplicas.

Introducción a Docker - Parte 2 @javierprovecho

Demostraciones Ubuntu 14.10 LAMP stack Wordpress Cloud 9 IDE Fedora Desktop

docker run -t -i ubuntu:utopic

docker run -p 80:80 -p 3306:3306 tutum/lamp curl http://localhost/

docker run -d -p 80:80 tutum/wordpress curl http://localhost/

docker run -d -p 3131:3131 -v /tmp:/workspace alanct/cloud9

docker run -d -p 3389:3389 jumanjiman/xrdp foo:bar

Introducción a Docker - Parte 3 @javierprovecho

Paso 1.1 - Cómo instalar Docker docker pull alanct/cloud9 Paso 1.1 - Cómo instalar Docker # curl -sSL https://get.docker.com/ubuntu/ | sh Get:29 http://security.ubuntu.com trusty-security/multiverse Sources [698 B] Get:30 http://security.ubuntu.com trusty-security/main i386 Packages [147 kB] Get:31 http://security.ubuntu.com trusty-security/restricted i386 Packages [14 B] Get:32 http://security.ubuntu.com trusty-security/universe i386 Packages [51.2 kB] Get:33 http://security.ubuntu.com trusty-security/multiverse i386 Packages [1,401 B] Get:34 http://security.ubuntu.com trusty-security/main Translation-en [75.0 kB] Hit http://security.ubuntu.com trusty-security/multiverse Translation-en Hit http://security.ubuntu.com trusty-security/restricted Translation-en Get:35 http://security.ubuntu.com trusty-security/universe Translation-en [30.5 kB] Fetched 1,700 kB in 5s (311 kB/s) Reading package lists... Done ...

Paso 1.2 - Cómo acceder a Docker docker pull alanct/cloud9 Paso 1.2 - Cómo acceder a Docker # docker Usage: Docker [OPTIONS] COMMAND [arg...] -H="127.0.0.1:4243": Host:port to bind/connect to A self-sufficient runtime for linux containers. Commands: attach Attach to a running container build Build a container from a Dockerfile commit Create a new image from a container's changes diff Inspect changes on a container's filesystem export Stream the contents of a container as a tar archive history Show the history of an image images List images import Create a new filesystem image from the contents of a tarball info Display system-wide information insert Insert a file in an image inspect Return low-level information on a container ...

Paso 2.1 - Buscar imágenes docker pull alanct/cloud9 # docker search tutorial Found 1 results matching your query ("tutorial") NAME DESCRIPTION learn/tutorial An image for the interactive tutorial

Paso 2.2 - Descargar imágenes docker pull alanct/cloud9 Paso 2.2 - Descargar imágenes # docker pull learn/tutorial Pulling repository learn/tutorial from https://index.docker.io/v1 Pulling image 8dbd9e392a964056420e5d58ca5cc376ef18e2de93b5cc90e868a1bbc8318c1c (precise) from ubuntu Pulling image b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc (12.10) from ubuntu Pulling image 27cf784147099545 () from tutorial

Paso 3 - Ejecutar comandos docker pull alanct/cloud9 Paso 3 - Ejecutar comandos # docker run learn/tutorial echo “Hola mundo” Hola mundo

Paso 4 - Instalar paquetes docker pull alanct/cloud9 Paso 4 - Instalar paquetes # docker run learn/tutorial apt-get install -y ping Reading package lists... Building dependency tree... The following NEW packages will be installed: iputils-ping 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 56.1 kB of archives. After this operation, 143 kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu/ precise/main iputils-ping amd64 3:20101006-1ubuntu1 [56.1 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 56.1 kB in 1s (50.3 kB/s) Selecting previously unselected package iputils-ping. (Reading database ... 7545 files and directories currently installed.) Unpacking iputils-ping (from .../iputils-ping_3%3a20101006-1ubuntu1_amd64.deb) ... Setting up iputils-ping (3:20101006-1ubuntu1) ...

Paso 4 - Instalar paquetes docker pull alanct/cloud9 Paso 4 - Instalar paquetes # docker run learn/tutorial apt-get install -y ping Reading package lists... Building dependency tree... The following NEW packages will be installed: iputils-ping 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 56.1 kB of archives. After this operation, 143 kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu/ precise/main iputils-ping amd64 3:20101006-1ubuntu1 [56.1 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 56.1 kB in 1s (50.3 kB/s) Selecting previously unselected package iputils-ping. (Reading database ... 7545 files and directories currently installed.) Unpacking iputils-ping (from .../iputils-ping_3%3a20101006-1ubuntu1_amd64.deb) ... Setting up iputils-ping (3:20101006-1ubuntu1) ...

Paso 5 - Guardar cambios docker pull alanct/cloud9 # docker ps ID IMAGE COMMAND CREATED STATUS # docker ps -a ID IMAGE COMMAND CREATED STATUS 6982a9948422 ubuntu:12.04 apt-get install ping 1 minute ago Exit 0 # docker commit 698 learn/ping effb66b31edb

Paso 6 - Ejecutar la nueva imagen docker pull alanct/cloud9 Paso 6 - Ejecutar la nueva imagen # docker run learn/ping ping inf.uva.es PING inf.uva.es (157.88.109.216) 56(84) bytes of data. 64 bytes from www.inf.uva.es (157.88.109.216): icmp_seq=1 ttl=55 time=55.1 ms 64 bytes from www.inf.uva.es (157.88.109.216): icmp_seq=2 ttl=55 time=53.7 ms 64 bytes from www.inf.uva.es (157.88.109.216): icmp_seq=3 ttl=55 time=55.4 ms 64 bytes from www.inf.uva.es (157.88.109.216): icmp_seq=4 ttl=55 time=54.6 ms 64 bytes from www.inf.uva.es (157.88.109.216): icmp_seq=5 ttl=55 time=55.1 ms 64 bytes from www.inf.uva.es (157.88.109.216): icmp_seq=6 ttl=55 time=55.6 ms 64 bytes from www.inf.uva.es (157.88.109.216): icmp_seq=7 ttl=55 time=53.6 ms 64 bytes from www.inf.uva.es (157.88.109.216): icmp_seq=8 ttl=55 time=56.2 ms 64 bytes from www.inf.uva.es (157.88.109.216): icmp_seq=9 ttl=55 time=53.2 ms ...

Paso 7 - Inspeccionar el contenedor docker pull alanct/cloud9 Paso 7 - Inspeccionar el contenedor # docker inspect efe [2014/11/06 00:00:01 GET /v1.3/containers/efef/json { "ID": "efefdc74a1d5900d7d7a74740e5261c09f5f42b6dae58ded6a1fde1cde7f4ac5", "Created": "2014-11-06T00:00:01.417119736Z", "Path": "ping", "Args": [ "inf.uva.es" ], "Config": { "Hostname": "efefdc74a1d5", "User": "", "Memory": 0, "MemorySwap": 0, "CpuShares": 0, "AttachStdin": false, "AttachStdout": true, "AttachStderr": true, "PortSpecs": null, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": null, ...

Paso 8 - Dockerfile docker pull alanct/cloud9 # nano Dockerfile FROM ubuntu:latest RUN apt-get -y update RUN apt-get -y upgrade RUN apt-get -y install git python RUN echo “Hola mundo” >> index.html EXPOSE 80 CMD [“python”, “-m”, “SimpleHTTPServer”, “80”] # docker build -t learn/webserver . ... # docker run -P learn/webserver Serving HTTP on 0.0.0.0 port 80 ...

Paso 9.1 - Guardar/cargar imágenes docker pull alanct/cloud9 Paso 9.1 - Guardar/cargar imágenes # docker save learn/ping > /tmp/imagen.tar ... # docker load < /tmp/imagen.tar

Paso 9.2 - Exportar/importar conten. docker pull alanct/cloud9 Paso 9.2 - Exportar/importar conten. # docker ps -a ID IMAGE COMMAND CREATED STATUS 6982a9948422 ubuntu:12.04 apt-get install ping 1 minute ago Exit 0 # docker export 698 > /tmp/contenedor.tar ... # cat /tmp/contenedor.tar | docker import - learn/ping-export:latest

Introducción a Docker - Parte 4 @javierprovecho

Crédito $10 en servicios de la nube. Enlaces Crédito $10 en servicios de la nube. http://goo.gl/yaXF8Y

Licencia Esta obra está bajo una Licencia Creative Commons Atribución-CompartirIgual 4.0 Internacional.

Agradecimientos Escuela Técnica Superior de Ingeniería Informática de Valladolid Grupo Universitario de Informática de Valladolid