Linux & Docker auf Azure



Similar documents
Intro to Docker and Containers

Platform as a Service and Container Clouds

Intro to Docker for CMS

Docker Containers. Marko Ambrož, Žiga Hudolin Ministrstvo za javno upravo DIREKTORAT ZA INFORMATIKO

Building a Continuous Integration Pipeline with Docker

Working with Docker on Microsoft Azure

Upgrading Your Skills to MCSA Windows Server 2012 MOC 20417

Linstantiation of applications. Docker accelerate

Docker : devops, shared registries, HPC and emerging use cases. François Moreews & Olivier Sallou

Rainer Stropek software architects gmbh. Entwicklung modularer Anwendungen mit C# und dem Managed Extensibility Framework (MEF)

Cross-Platform ASP.NET 5 For the Cloud. Anthony Sneed

Thomas Rümmler AIT GmbH & Co. KG Christian Schlag AIT GmbH & Co. KG. Central Build and Release Management with TFS

Type-C Ubuntu Product & Strategy Canonical Ltd.

repositor.io Simple Repository Management Jürgen Brunk München, 03/2015

How Bigtop Leveraged Docker for Build Automation and One-Click Hadoop Provisioning

How To Manage Build And Release With Tfs 2013

Central Release and Build Management with TFS. Christian Schlag

Using Docker in Cloud Networks

Linux A first-class citizen in Windows Azure. Bruno Terkaly bterkaly@microsoft.com Principal Software Engineer Mobile/Cloud/Startup/Enterprise

Microsoft Nano Server «Tuva» Rinon Belegu

Microsoft Certified IT Professional (MCITP) MCTS: Windows 7, Configuration ( )

The Virtualization Practice

NATIVE ADVERTISING, CONTENT MARKETING & CO. AUFBRUCH IN EIN NEUES GOLDENES ZEITALTER DES MARKETINGS?

Mit einem Auge auf den mathema/schen Horizont: Was der Lehrer braucht für die Zukun= seiner Schüler

ISLET: Jon Schipp, Ohio Linux Fest An Attempt to Improve Linux-based Software Training

The Bro Network Security Monitor

Chris Rosen, Technical Product Manager for IBM Containers, Lin Sun, Senior Software Engineer for IBM Containers,

TIn 1: Lecture 3: Lernziele. Lecture 3 The Belly of the Architect. Basic internal components of the Pointers and data storage in memory

Lightweight Virtualization with Linux Containers (LXC)

BP1 Mobile App Management: Solutions for ios and Android. Gary Barton Mobility Architect Citrix Receivers and Gateways Group

Remote Desktop With P2P VNC

Upgrade-Preisliste. Upgrade Price List

WHITEPAPER INTRODUCTION TO CONTAINER SECURITY. Introduction to Container Security

Cloud Simulator for Scalability Testing

Search Engines Chapter 2 Architecture Felix Naumann

Docker. dotcloud PaaS Français. Mars 2013 OpenSource. Ecrit en GO

UTILIZING THE PORTABILITY OF DOCKER TO DESIGN A PORTABLE AND SCALABLE CONTINUOUS INTEGRATION STACK

BP9 - Citrix Receiver Optimierung: So verbessern Sie Management und Benutzerkomfort. Systems Engineer, Citrix Systems GmbH

Exemplar for Internal Assessment Resource German Level 1. Resource title: Planning a School Exchange

Diese Liste wird präsentiert von. Netheweb.de

Creating a dynamic software deployment solution using free/libre software

22. April 2010 Siemens Enterprise Communications

Continuous Integration and Delivery. manage development build deploy / release

Zielgruppe Dieses Training eignet sich für IT-Professionals.

Symantec Backup Exec (TM) 13 Installation Log

systemd Mehr als nur ein neues Init-System Markus Schade

Voraussetzungen/ Prerequisites *for English see below*

Developments in the Austrian Surveying Education

Software / FileMaker / Plug-Ins Mailit 6 for FileMaker 10-13

Docker on OpenStack. August Author : Nitin Agarwal nitinagarwal3006@gmail.com. Supervisor(s) : Belmiro Moreira

INSTALL ZENTYAL SERVER

Analytics & Marketing 4.0 Wie die Anwendung von BigData die Customer Loyalty von morgen schafft

Kapitel 2 Unternehmensarchitektur III

The Definitive Guide To Docker Containers

A lap around Team Foundation Server 2015 en Visual Studio 2015

I-Q SCHACHT & KOLLEGEN QUALITÄTSKONSTRUKTION GMBH ISO 26262:2011. Liste der Work Products aus der Norm

Storage XenMotion Tampa Technology Project

UBUNTU VIRTUAL MACHINE + CAFFE MACHINE LEARNING LIBRARY SETUP TUTORIAL

BP8 Citrix Integrations with System Center Configuration Manager 2012

Embedded Software Development and Test in 2011 using a mini- HIL approach

Data virtualization: playing with Oracle 12c on Docker containers

Taking Drupal development to the Cloud. Karel Bemelmans

Benutzerfreundlich, tiefe Betriebskosten und hohe Sicherheit. Warum sich diese Ziele nicht widersprechen müssen

Vorläufiges English Programme im akademischen Jahr 2015/2016 Preliminary English Programme in the Academic Year 2015/2016 *for English see below*

Vorläufiges English Programme im akademischen Jahr 2015/2016 Preliminary English Programme in the Academic Year 2015/2016 *for English see below*

Automation & Open Source. How to tame the Cloud?

Introduction U41241-J-Z

It is also possible to combine courses from the English and the German programme, which is of course available for everyone!

GETTING FEEDBACK REALLY FAST WITH DESIGN THINKING AND AGILE SOFTWARE ENGINEERING

AlienVault Unified Security Management (USM) 4.x-5.x. Deploying HIDS Agents to Linux Hosts

Getting Started Using Project Photon on VMware Fusion/Workstation

Update to V10. Automic Support: Best Practices Josef Scharl. Please ask your questions here Event code 6262

SPICE auf der Überholspur. Vergleich von ISO (TR) und Automotive SPICE

Finest Laboratory Products

How To Install Project Photon On Vsphere 5.5 & 6.0 (Vmware Vspher) With Docker (Virtual) On Linux (Amd64) On A Ubuntu Vspheon Vspheres 5.4

Configuring and Administering Hyper-V in Windows Server 2012 MOC 55021

AnyWeb AG

VMware Mirage Centralized Desktop Management with local Execution

CPE111 COMPUTER EXPLORATION

IDENTIKEY FEDERATION SERVICES

Cloud OS Network. Uwe Lüthy, Die Bedeutung einer Partner Managed Cloud für Kunden. Partner Technology Strategiest

QAS DEBUG - User und Computer

What new with Informix Software as a Service and Bluemix? Brian Hughes IBM

Data Center Orchestration

Automating Big Data Benchmarking for Different Architectures with ALOJA

Building an Architecture Model Entwerfen Sie mit AxiomSys ein Kontextdiagramm, das folgendermaßen aussieht:

Amazon EC2 Container Service. Developer Guide API Version

Jenkins World Tour 2015 Santa Clara, CA, September 2-3

Do Containers fully 'contain' security issues? A closer look at Docker and Warden. By Farshad Abasi,

Cloud Performance Group 1. Event. 14. Januar 2016 / Matthias Gessenay (matthias.gessenay@corporatesoftware.ch)

Source Control Systems

Elena Chiocchetti & Natascia Ralli (EURAC) Tanja Wissik & Vesna Lušicky (University of Vienna)

CS197U: A Hands on Introduction to Unix

Transcription:

Linux & Docker auf Azure Linux in der Azure Cloud Web Mail Twitter Rainer Stropek software architects gmbh http://www.timecockpit.com rainer@timecockpit.com @rstropek Saves the day.

Your Host Rainer Stropek Developer, Entrepreneur Azure MVP, MS Regional Director Trainer bei IT-Visions Contact software architects gmbh rainer@timecockpit.com Twitter: @rstropek

Agenda (German) Es ist selten, dass es ein Tool, das es Stand heute nur für Linux gibt, in unzählige Microsoft-Blogs und sogar auf die TechEd schafft. Docker ist dieses Kunststück im letzten Jahr gelungen. Der Grund ist sicherlich zum einen die neue Offenheit von Microsoft hinsichtlich Linux. Der Hauptgrund ist aber die Begeisterung über das große Potential, das Docker hat. Dass Docker für Administratoren ein Thema ist, um das sie 2015 nicht herum kommen werden, scheint offensichtlich. Wie sieht es aber mit der Relevanz für uns Softwareentwickler aus? Wird Docker unseren Entwicklungsalltag beeinflussen? Unser Ziel bei diesem Vortrag ist der Aufbau einer Testumgebung mit Docker, in der wir am Ende eine ASP.NET 5 Anwendung betreiben können. Sie lernen an diesem Beispiel auch die wichtigsten Grundelemente von Docker kennen. Hinweis: Docker-Video auf Channel9

Azure Wer kennt die Microsoft-Cloud noch nicht?

Docker Wer kennt Docker noch überhaupt nicht?

Virtual Machines What is Docker? Virtual machines vs. Docker Each VM runs its own guest operating system Container reuse the host operating system Container run in user space Docker Container Image Source: https://www.docker.com/whatisdocker/

What s Docker? Container virtualization Container run in user space and use kernel of host Has been existing in Linux for quite a while Docker builds on Linux Containers (LXC) and makes it easy to use and consume Advantages? Fast, small, and agile (e.g. Docker in Docker) Disadvantages? Security (less isolated)

What s Docker? Command line tool, REST services Docker client can manage remote Docker daemon Container packaging format Dockerfiles for image creation from source code Version management for images Images can be based on images Docker Hub: Platform to exchange images and Dockerfiles Publishing on Docker Hub is not in scope of this talk

Docker in Windows Boot2Docker Run lightweight Linux in VirtualBox Compile Docker client on Windows Written in GO Container virtualization in Windows Announced for next version of Windows Server Use Azure to play with Docker Existing VM image (Docker on Ubuntu server) in Azure marketplace

Docker in Azure Create Ubuntu server with Docker in Microsoft Azure Demo

sudo apt-get -qqy update sudo apt-get install -qqy nodejs-legacy npm sudo npm install -g grunt-cli docker pull ubuntu Samples Internal notes Prior to session create Azure VM with Docker on Ubuntu server

Container Working with containers

Docker CLI Documentation http://docs.docker.com/reference/commandline/cli Important Commands for Containers docker run Run a command in a new container docker ps List containers docker start/stop Restarts/stops a container docker rm Removes container(s) docker attach Attach to running container docker top Display processes running in container docker exec Run a command in a container

docker run --name hellodocker -i -t ubuntu /bin/bash Name of the container Image name Allocate pseudo-tty Keep STDIN open Command to execute Docker CLI Starting Containers Interactive container Daemonized container Running in the background --rm removes container when it exits docker run --name -d ubuntu /bin/bash -c "while true; do echo hi; done" Command to execute (with arguments) Detach the container to the background (daemonized)

# Check if docker is running docker info # Start interactive container docker run --name hellodocker -i -t ubuntu /bin/bash apt-get -qqy update && apt-get -qqy install vim vim hello_basta.txt exit Demo Interactive Container # List containers docker ps docker ps a docker ps --no-trunc -aq # Restart container docker start hellodocker # Attach to container docker attach hellodocker # Remove container docker rm hellodocker # Remove all containers docker rm `docker ps --no-trunc -aq`

# Start demonized container and get logs docker run --name backgroundcontainer -d ubuntu /bin/bash \ -c "while true; do echo hello world; sleep 1; done" # Get the logs (-f for continuous monitoring) docker logs backgroundcontainer Demo Daemonized Container # Check the processes in docker container docker top backgroundcontainer # Open interactive shell in running container docker exec -i -t backgroundcontainer /bin/bash

Images Working with images

File System Layers Rootfs stays read-only Union-mount file system over the read-only file system Multiple file systems stacked on top of each other Only top-most file system is writable Copy-on-write Image Source: https://docs.docker.com/terms/layer

Docker CLI Important Commands for Images docker images List all images docker search Search for image on Docker Hub docker pull Pulls an image from the registry (Docker Hub) docker commit Create image from container docker inspect Get low-level information on container or image

docker commit -m="linuxwochen image" --author="rainer Stropek" Docker CLI Building Images from Containers Message Author of the image templatecontainer rstropek/ubuntu:withvim Name of the container Target repository:tag

# Start interactive container docker run --name templatecontainer -i -t ubuntu /bin/bash apt-get -qqy update && apt-get -qqy install vim echo "Hello Linuxwochen!" > helloworld.txt exit Demo Create Image # Build image from container docker commit -m="linuxwochen image" --author="rainer" \ templatecontainer rstropek/ubuntu:withvim # Remove container docker rm -f templatecontainer # Create new container from new image docker run --name newcontainer -i -t rstropek/ubuntu /bin/bash # Remove image docker rmi <image> # Run DockerUI in container # https://github.com/crosbymichael/dockerui docker run -d -p 9000:9000 --privileged \ -v /var/run/docker.sock:/var/run/docker.sock \ dockerui/dockerui

Dockerfiles Creating images from source

# Version 0.0.1 FROM nginx MAINTAINER Rainer Stropek "rainer@timecockpit.com" ENV REFRESHED_AT 2014-02-22 RUN apt-get -qq update Execute command in new layer on top of the image and commit the result COPY *.html /usr/share/nginx/html/ Copy files to the filesystem of the container Dockerfiles Documentation https://docs.docker.com/reference/builder/ https://registry.hub.docker.com/_/nginx/ See Dockerfile for nginx docker build t staticweb. Tag for the image Dockerfile location

docker run --name staticwebcontainer -d -p 80:80 staticweb Docker CLI Exposing ports Expose port 80 Run daemonized

# Get sample code from GitHub git clone https://github.com/rstropek/dockervs2015intro.git # Build website cd dockerdemos/01-staticweb/app npm install grunt cd.. Demo Dockerfile # Build image from Dockerfile docker build -t staticweb. docker run --name staticwebcontainer -d -p 80:80 staticweb # Change website content and rebuild container # Run a second container, run a third container (linked) docker run -i -t --link <cont1>:sweb1 --link <cont2>:sweb2 ubuntu /bin/bash apt-get install curl curl http://sweb1

# Run grunt inside a docker container docker run --rm -v ~/DockerVS2015Intro/dockerDemos/01- staticweb/app:/data killercentury/nodejs-bower-grunt grunt Demo Automated build # Run daemonized grunt inside a docker container docker run -d -v ~/DockerVS2015Intro/dockerDemos/01- staticweb/app:/data killercentury/nodejs-bower-grunt grunt watch # Run nginx webserver inside daemonized container docker run -d -p 80:80 -v ~/DockerVS2015Intro/dockerDemos/01- staticweb/app:/var/www/html dockerfile/nginx

# Run grunt inside a docker container docker run --rm Remove the container when it exists Demo Run Grunt (build) in Container -v ~/DockerVS2015Intro/dockerDemos/01- staticweb/app:/data Mount host volume (host:container) dockerfile/nodejs-bower-grunt grunt Use existing image Run grunt

ASP.NET in Docker Running ASP.NET in Docker

FROM microsoft/aspnet MAINTAINER Rainer Stropek "rainer@timecockpit.com" ENV REFRESHED_AT 2015-01-02 Dockerfile ENV SOURCE_DIR /app/src RUN mkdir -p $SOURCE_DIR WORKDIR $SOURCE_DIR COPY refreshandrunsample.sh $SOURCE_DIR/ RUN chmod a+x $SOURCE_DIR/refreshAndRunSample.sh RUN apt-get -qqy install git RUN git init \ && git pull https://github.com/aspnet/home.git \ && cd samples/hellomvc/ \ && kpm restore Base image: https://registry.hub.docker.c om/u/microsoft/aspnet/ Run container docker --tls run -d -t -p 80:5004 <image> ENTRYPOINT ["/app/src/refreshandrunsample.sh"]

Application Scenarios Running continuous integration in containers Rebuild complex runtime environment on my laptop Identical environment for dev, test, and prod Cost reduction in the cloud High density hosting (e.g. multiple versions) Split software into multiple, independent services Micro-services, see Manfred s session tomorrow

Linuxwochen Wien, 2015 Rainer Stropek software architects gmbh Q&A Thank your for coming! Mail Web Twitter rainer@timecockpit.com http://www.timecockpit.com @rstropek Saves the day.