docker containers in azure

17
VSHN AG I Neugasse 10 I 8005 Zürich I T 044 545 53 00 www.vshn.ch Azure Cloud User Group Switzerland 18.1.2017 Containers in Azure Aarno Aukia VSHN AG

Upload: aarno-aukia

Post on 24-Jan-2017

163 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Docker Containers in Azure

VSHN AG I Neugasse 10 I 8005 Zürich I T 044 545 53 00 www.vshn.ch

Azure Cloud User Group Switzerland 18.1.2017

Containers in Azure

Aarno AukiaVSHN AG

Page 2: Docker Containers in Azure

VSHN AG I Neugasse 10 I 8005 Zürich I T 044 545 53 00 www.vshn.ch

Agenda

● About Aarno / VSHN● How were we running OSS applications

on Azure ?● Shortcomings & wishes● What is Docker, Kubernetes, OpenShift ?● Why use them ?● Examples

Page 3: Docker Containers in Azure

VSHN AG I Neugasse 10 I 8005 Zürich I T 044 545 53 00 www.vshn.ch

Who

Aarno Aukia, CTO & co-founder

ETH → Google → Atrila → VSHN

@aarnoaukia http://about.me/aarno

VSHN - the DevOps Company

Since 2014: 17 people in Zürich

Running web applications on-premises and in the clouds making both visitors and developers happy

https://vshn.ch @vshn_ch

Opensource Azure partner

Docker Partner

Page 4: Docker Containers in Azure

VSHN AG I Neugasse 10 I 8005 Zürich I T 044 545 53 00 www.vshn.ch

How were we running OSS applications on Azure ?

Virtual servers

Managed by Puppet/Ansible

Page 5: Docker Containers in Azure

VSHN AG I Neugasse 10 I 8005 Zürich I T 044 545 53 00 www.vshn.ch

Page 6: Docker Containers in Azure

VSHN AG I Neugasse 10 I 8005 Zürich I T 044 545 53 00 www.vshn.ch

Shortcomings

Scaling up/down takes manual effort & time

PHP/MySQL/Solr/ElasticSearch versions/plugins defined by configuration management for each server, not for each project/deployment and have to be communicated separately

Adding new technology (e.g. npm/grunt) is complex

Page 7: Docker Containers in Azure

VSHN AG I Neugasse 10 I 8005 Zürich I T 044 545 53 00 www.vshn.ch

Wishful thinking...

Solves build-ship-run workflow, integrates in CI/CD, DevOps & self-service

Handles the standard software plattform problems: scaling, hitless deployment, monitoring, backup, etc

Open standards: 100% open source, backed by big community

No lock-in, free to choose any provider, works on any infrastructure

Extensible with API

Page 8: Docker Containers in Azure

VSHN AG I Neugasse 10 I 8005 Zürich I T 044 545 53 00 www.vshn.ch

Docker

Lightweight container runtime

Package code, runtime, plugins, libraries

Helps you to use 12-Factor-App pattern (explicit entrypoint, port, volume configurations, see https://12factor.net)

Automatically built, quickly started, one-time use

https://blog.vshn.ch/2016/11/docker

https://github.com/docker/docker

Page 9: Docker Containers in Azure

VSHN AG I Neugasse 10 I 8005 Zürich I T 044 545 53 00 www.vshn.ch

From container to production ?

Page 10: Docker Containers in Azure

VSHN AG I Neugasse 10 I 8005 Zürich I T 044 545 53 00 www.vshn.ch

Kubernetes

Container orchestrator:

How many of a kind should be running ?

On which IP/port/machine are they ?

How do they find each other ?

What happens when a container/machine running them disappears ?

Scaling, load balancing, rolling deployments

https://blog.vshn.ch/2016/08/openshift

https://github.com/kubernetes/kubernetes

Page 11: Docker Containers in Azure

VSHN AG I Neugasse 10 I 8005 Zürich I T 044 545 53 00 www.vshn.ch

Container orchestration

Page 12: Docker Containers in Azure

VSHN AG I Neugasse 10 I 8005 Zürich I T 044 545 53 00 www.vshn.ch

OpenShift

How to get the application in the container ?

Web-GUI, CLI client, REST-API

https://blog.vshn.ch/2016/08/openshift

https://github.com/openshift/origin

Page 13: Docker Containers in Azure

VSHN AG I Neugasse 10 I 8005 Zürich I T 044 545 53 00 www.vshn.ch

OpenShift

Page 14: Docker Containers in Azure

VSHN AG I Neugasse 10 I 8005 Zürich I T 044 545 53 00 www.vshn.ch

APPUiO

Managed Docker, Kubernetes, OpenShift

Flavours: Big shared plattform in the cloud, private plattform in the cloud or on-premises

Hosted in Switzerland (ISO/FINMA-certified) or whereever you want (Azure)

Community for Developers and Operations, Dev & Ops = DevOps

Free monthly half-day training TechLabs

Starting at CHF 40/mt in Switzerland

Page 15: Docker Containers in Azure

VSHN AG I Neugasse 10 I 8005 Zürich I T 044 545 53 00 www.vshn.ch

Why?

You have full control over the container contents → no more old versions by the hosting provider

You control the build, deploy process from the GUI/CLI/API

Plattform takes care of seamless deployment, SSL, load balancing, scaling, system updates, monitoring, backups, hardware, storage, network, etc

You don't need to handle Docker, Kubernetes, OpenShift internals if you don't want to

Page 16: Docker Containers in Azure

VSHN AG I Neugasse 10 I 8005 Zürich I T 044 545 53 00 www.vshn.ch

Demotime

Links:

https://github.com/arska/phpinfo.git

https://github.com/arska/example-php-sti-helloworld.git

https://github.com/arska/springdemo

https://github.com/arska/python-helloworld

Page 17: Docker Containers in Azure

VSHN AG I Neugasse 10 I 8005 Zürich I T 044 545 53 00 www.vshn.ch

Bonus

Creating a template:

oc export bc,is,svc,dc --as-template=mytemplate -o json