SlideShare a Scribd company logo
1 of 32
Docker and Azure: Design, Deploy,
and Scale
Michele Leroux Bustamante
Cofounder, Solliance
Cloud / Security Architect
michelebusta@solliance.net
What’s the plan?
• Discuss what’s available on Azure for Docker
• How do you create, deploy and run containers?
• What does scaling look like?
• Where are things heading?
Virtualization vs. Containerization
VM
OS
Docker Engine
VM
Host OS
Hypervisor
Guest OS Guest OS Guest OS
Binaries Binaries Binaries
App A App B App B
Binaries Shared Binaries
App A App B App B
Container
NOT
a Container
Virtualization vs. Containerization
VM
OS
Docker Engine
VM
Host OS
Hypervisor
Guest OS Guest OS Guest OS
Binaries Binaries Binaries
App A App B App B
Binaries Shared Binaries
App A App B App B
No OS
OS
Fast
Efficient
Simple
Practical
DEMO 1: Registry, Images, Containers
• SETUP:
• Docker Tools installed
• Local virtual box
• Download existing image
• Create and run container
• Access application
• Stop / start container
###DEMO1: REFERENCE
### Local Docker illustration
#Run a Ghost container based on the latest Docker Hub image
#Browse to site at virtual box IP:PORT
###Commands:
$ docker images
$ docker ps
$ docker stop ghost
$ docker run ghost
Docker and Azure
• VM templates
• Support for Docker on Linux or Windows VM
• Container images target the OS, cannot share
• Container Service
• Azure Container Service
• ARM templates to preconfigure environment
• Eventually containers as a first class citizen
• Eventually container orchestration built-in (Mesos)
• Comparable to:
• Amazon EC2 Container Service
• Google Container Service
Azure VM Templates
• Create Linux or Windows VM with Docker installed
• Docker VM Extension
• Docker CLI commands are the same on Windows!
Container Templates
• Single container
• Multi-container
Images and Containers
• Images are created from
• Dockerfile
• Repository
• Create one from a container
• Containers are based on an image
• Run a container, stop, start, etc.
DEMO 2: Create, tag, publish image -> run
• Build an image from a Dockerfile
• Tag an image, for versioning
• Publish an image to Docker Hub
• Run a container from published image
• Update an image, apply tag, publish an update
###DEMO2 REFERENCE
#build image, push to docker hub, run container
#Create a Linux VM with Docker installed
###Building from the machine
#Navigate to repo for Docker Hub /dasblonde/editdemo, review files
#Build the image, tag it, push it to Docker Hub
$ docker build --no-cache -t dasblonde/editdemo .
$ docker tag dasblonde/editdemo:latest dasblonde/editdemo:v1
$ docker push dasblonde/editdemo
#Show Docker Hub registry
$ docker run -d --name editdemov1 -p 8080:8080 dasblonde/editdemo:v1
#Browse to machine at port 8080
###DEMO2 REFERENCE (2/2)
#version image, publish update, run container from versioned image
#Update Dockerfile to create from base v1 image and modify
$ docker build -t dasblonde/editdemo:v2 -f DockerfileUpdateToV2 .
#Review images, note latest points at v1
$ docker tag -f dasblonde/editdemo:v2 dasblonde/editdemo:latest
$ docker push dasblonde/editdemo
#Note updates to Docker Hub versions
#Run new version
$ docker run -d --name editdemov2 -p 8081:8080 dasblonde/editdemo:v2
DEMO 3: Access container, modify, run
• Log in to container on Docker VM
• Modify a file
• Save, exit, run container
###DEMO3 REFERENCE
#Access container, modify files, run container with changes
### connect to the container, modify file, exit
$ docker exec -ti editdemov2 /bin/bash
$ vi FILENAME
$ CTRL + D
### commit container changes to a new image v3, tag it
$ docker commit –m “installed VIM” editdemov2 dasblonde/editdemo:v3
$ docker tag -f dasblonde/editdemo:v3 dasblonde/editdemo:latest
### push images to Docker Hub
$ docker push dasblonde/editdemo
### create and run container v3
$ docker run -d --name editdemov3 -p 8082:8080 dasblonde/editdemo:v3
DEMO 4: compose multiple containers
• ASSUMPTION: Docker Compose is installed
• Create a yml file to compose containers
• Example:
• Node.js client, external port
• Redis cache service, internal port
### Install docker-compose if not available
# NOTE: Compose 1.4.2 requires Docker 1.7.0 or later
$ curl -L https://github.com/docker/compose/releases/download/1.4.2/docker-compose-
`uname -s`-`uname -m` > /usr/local/bin/docker-compose
$ chmod +x /usr/local/bin/docker-compose
###DEMO4 REFERENCE
### navigate to yml folder, create and start containers
$ docker-compose up –d
### stop / start /restart containers
$ docker-compose stop
$ docker-compose start
$ docker-compose restart
### view logs
$ docker-compose logs
### browse to container, app is deployed
Orchestration
• Orchestrators schedule deployments usually across a cluster
• For example:
• Swarm and Compose (Docker)
• Kubernetes (Google)
• Mesos + Swarm, Chronos, Marathon (Mesosphere)
Clustering with Swarm
• ARM templates available to kick start
• Simple cluster template
• Single swarm master
• Multiple agent nodes (3)
• Clustered swarm template
• Multiple swarm master/slave topology (3)
• Multiple agent nodes (3)
DEMO 5: Deploying to a cluster with swarm
• SETUP:
• Provision Azure with ARM template
• Swarm master node
• Agent nodes each have swarm agent running
• Deploy to swarm master
• View provisioned containers across cluster
• View information about the cluster
###DEMO5 REFERENCE
# deploy to swarm from remote machine
# or could access swarm master and do from that machine
### what’s in the swarm?
### replace IP with your swarm DNS
docker -H tcp://0.0.0.0:2376 ps
docker -H tcp://0.0.0.0:2376 info
### deploy something, ghost on swarm
docker -H tcp://0.0.0.0:2376 run -d ghost
### deploy more, another ghost, redis etc
# note swarm decides how to allocate based on cluster resources
Containers / Microservices on Azure
• Now:
• Linux VMs
• Windows Server Container VMs
• Container Templates
• Container / VM Clustering Templates
• Future:
• Hyper-V Containers
• Azure Container Service
• Container Resources
• Mesosphere Data Center Operating System (DCOS)
• Service Fabric
DCOS
• See 7 minute demo at Mesosphere site regarding DCOS
• Very impressive vision regarding container orchestration, scale and
disaster recovery
About Michele
Michele Leroux Bustamante
michelebusta@solliance.net
@michelebusta
Solliance Cofounder
Cloud / Security Architect
Microsoft Regional Director since 2003
Microsoft MVP – Microsoft Azure
Azure Elite, Azure Insider
Glöm inte att utvärdera sessionen direkt i
Microsoft TechDays-appen!

More Related Content

More from Michele Leroux Bustamante

.NET Developer Days - Launching Patterns for Containers
.NET Developer Days - Launching Patterns for Containers.NET Developer Days - Launching Patterns for Containers
.NET Developer Days - Launching Patterns for ContainersMichele Leroux Bustamante
 
.NET Developer Days - So many Docker platforms, so little time...
.NET Developer Days - So many Docker platforms, so little time....NET Developer Days - So many Docker platforms, so little time...
.NET Developer Days - So many Docker platforms, so little time...Michele Leroux Bustamante
 
Design Practices for a Secure Azure Solution
Design Practices for a Secure Azure SolutionDesign Practices for a Secure Azure Solution
Design Practices for a Secure Azure SolutionMichele Leroux Bustamante
 
The Ultimate Logging Architecture - You KNOW you want it!
The Ultimate Logging Architecture - You KNOW you want it!The Ultimate Logging Architecture - You KNOW you want it!
The Ultimate Logging Architecture - You KNOW you want it!Michele Leroux Bustamante
 
Unleash Your Inner Startup (Sweden, Dev Sum)
Unleash Your Inner Startup (Sweden, Dev Sum)Unleash Your Inner Startup (Sweden, Dev Sum)
Unleash Your Inner Startup (Sweden, Dev Sum)Michele Leroux Bustamante
 
Pricing and Revenue Projection in a Cloud-Centric World
Pricing and Revenue Projection in a Cloud-Centric WorldPricing and Revenue Projection in a Cloud-Centric World
Pricing and Revenue Projection in a Cloud-Centric WorldMichele Leroux Bustamante
 

More from Michele Leroux Bustamante (19)

So Many Docker Platforms...so little time
So Many Docker Platforms...so little timeSo Many Docker Platforms...so little time
So Many Docker Platforms...so little time
 
Surviving Microservices - v2
Surviving Microservices - v2Surviving Microservices - v2
Surviving Microservices - v2
 
.NET Developer Days - Launching Patterns for Containers
.NET Developer Days - Launching Patterns for Containers.NET Developer Days - Launching Patterns for Containers
.NET Developer Days - Launching Patterns for Containers
 
.NET Developer Days - So many Docker platforms, so little time...
.NET Developer Days - So many Docker platforms, so little time....NET Developer Days - So many Docker platforms, so little time...
.NET Developer Days - So many Docker platforms, so little time...
 
Design Practices for a Secure Azure Solution
Design Practices for a Secure Azure SolutionDesign Practices for a Secure Azure Solution
Design Practices for a Secure Azure Solution
 
The Ultimate Logging Architecture - You KNOW you want it!
The Ultimate Logging Architecture - You KNOW you want it!The Ultimate Logging Architecture - You KNOW you want it!
The Ultimate Logging Architecture - You KNOW you want it!
 
The Power of Social Login
The Power of Social LoginThe Power of Social Login
The Power of Social Login
 
Unleash Your Inner Startup (Sweden, Dev Sum)
Unleash Your Inner Startup (Sweden, Dev Sum)Unleash Your Inner Startup (Sweden, Dev Sum)
Unleash Your Inner Startup (Sweden, Dev Sum)
 
Deep thoughts from the real world of azure
Deep thoughts from the real world of azureDeep thoughts from the real world of azure
Deep thoughts from the real world of azure
 
Social Login
Social LoginSocial Login
Social Login
 
Security Avalanche
Security AvalancheSecurity Avalanche
Security Avalanche
 
Surviving the Azure Avalanche
Surviving the Azure AvalancheSurviving the Azure Avalanche
Surviving the Azure Avalanche
 
DevOps for Azure
DevOps for AzureDevOps for Azure
DevOps for Azure
 
End to End Security with MVC and Web API
End to End Security with MVC and Web APIEnd to End Security with MVC and Web API
End to End Security with MVC and Web API
 
Windows Azure Essentials V3
Windows Azure Essentials V3Windows Azure Essentials V3
Windows Azure Essentials V3
 
Channel Your Inner Startup and Go For It!
Channel Your Inner Startup and Go For It!Channel Your Inner Startup and Go For It!
Channel Your Inner Startup and Go For It!
 
Global Windows Azure Bootcamp - San Diego
Global Windows Azure Bootcamp - San DiegoGlobal Windows Azure Bootcamp - San Diego
Global Windows Azure Bootcamp - San Diego
 
Windows Azure Essentials
Windows Azure EssentialsWindows Azure Essentials
Windows Azure Essentials
 
Pricing and Revenue Projection in a Cloud-Centric World
Pricing and Revenue Projection in a Cloud-Centric WorldPricing and Revenue Projection in a Cloud-Centric World
Pricing and Revenue Projection in a Cloud-Centric World
 

Recently uploaded

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 

Recently uploaded (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

Docker and Azure: Design, Deploy, and Scale

  • 1.
  • 2. Docker and Azure: Design, Deploy, and Scale Michele Leroux Bustamante Cofounder, Solliance Cloud / Security Architect michelebusta@solliance.net
  • 3. What’s the plan? • Discuss what’s available on Azure for Docker • How do you create, deploy and run containers? • What does scaling look like? • Where are things heading?
  • 4. Virtualization vs. Containerization VM OS Docker Engine VM Host OS Hypervisor Guest OS Guest OS Guest OS Binaries Binaries Binaries App A App B App B Binaries Shared Binaries App A App B App B Container NOT a Container
  • 5. Virtualization vs. Containerization VM OS Docker Engine VM Host OS Hypervisor Guest OS Guest OS Guest OS Binaries Binaries Binaries App A App B App B Binaries Shared Binaries App A App B App B No OS OS Fast Efficient Simple Practical
  • 6.
  • 7. DEMO 1: Registry, Images, Containers • SETUP: • Docker Tools installed • Local virtual box • Download existing image • Create and run container • Access application • Stop / start container
  • 8. ###DEMO1: REFERENCE ### Local Docker illustration #Run a Ghost container based on the latest Docker Hub image #Browse to site at virtual box IP:PORT ###Commands: $ docker images $ docker ps $ docker stop ghost $ docker run ghost
  • 9. Docker and Azure • VM templates • Support for Docker on Linux or Windows VM • Container images target the OS, cannot share • Container Service • Azure Container Service • ARM templates to preconfigure environment • Eventually containers as a first class citizen • Eventually container orchestration built-in (Mesos) • Comparable to: • Amazon EC2 Container Service • Google Container Service
  • 10. Azure VM Templates • Create Linux or Windows VM with Docker installed • Docker VM Extension • Docker CLI commands are the same on Windows!
  • 11. Container Templates • Single container • Multi-container
  • 12.
  • 13.
  • 14. Images and Containers • Images are created from • Dockerfile • Repository • Create one from a container • Containers are based on an image • Run a container, stop, start, etc.
  • 15. DEMO 2: Create, tag, publish image -> run • Build an image from a Dockerfile • Tag an image, for versioning • Publish an image to Docker Hub • Run a container from published image • Update an image, apply tag, publish an update
  • 16. ###DEMO2 REFERENCE #build image, push to docker hub, run container #Create a Linux VM with Docker installed ###Building from the machine #Navigate to repo for Docker Hub /dasblonde/editdemo, review files #Build the image, tag it, push it to Docker Hub $ docker build --no-cache -t dasblonde/editdemo . $ docker tag dasblonde/editdemo:latest dasblonde/editdemo:v1 $ docker push dasblonde/editdemo #Show Docker Hub registry $ docker run -d --name editdemov1 -p 8080:8080 dasblonde/editdemo:v1 #Browse to machine at port 8080
  • 17. ###DEMO2 REFERENCE (2/2) #version image, publish update, run container from versioned image #Update Dockerfile to create from base v1 image and modify $ docker build -t dasblonde/editdemo:v2 -f DockerfileUpdateToV2 . #Review images, note latest points at v1 $ docker tag -f dasblonde/editdemo:v2 dasblonde/editdemo:latest $ docker push dasblonde/editdemo #Note updates to Docker Hub versions #Run new version $ docker run -d --name editdemov2 -p 8081:8080 dasblonde/editdemo:v2
  • 18. DEMO 3: Access container, modify, run • Log in to container on Docker VM • Modify a file • Save, exit, run container
  • 19. ###DEMO3 REFERENCE #Access container, modify files, run container with changes ### connect to the container, modify file, exit $ docker exec -ti editdemov2 /bin/bash $ vi FILENAME $ CTRL + D ### commit container changes to a new image v3, tag it $ docker commit –m “installed VIM” editdemov2 dasblonde/editdemo:v3 $ docker tag -f dasblonde/editdemo:v3 dasblonde/editdemo:latest ### push images to Docker Hub $ docker push dasblonde/editdemo ### create and run container v3 $ docker run -d --name editdemov3 -p 8082:8080 dasblonde/editdemo:v3
  • 20. DEMO 4: compose multiple containers • ASSUMPTION: Docker Compose is installed • Create a yml file to compose containers • Example: • Node.js client, external port • Redis cache service, internal port
  • 21. ### Install docker-compose if not available # NOTE: Compose 1.4.2 requires Docker 1.7.0 or later $ curl -L https://github.com/docker/compose/releases/download/1.4.2/docker-compose- `uname -s`-`uname -m` > /usr/local/bin/docker-compose $ chmod +x /usr/local/bin/docker-compose
  • 22. ###DEMO4 REFERENCE ### navigate to yml folder, create and start containers $ docker-compose up –d ### stop / start /restart containers $ docker-compose stop $ docker-compose start $ docker-compose restart ### view logs $ docker-compose logs ### browse to container, app is deployed
  • 23. Orchestration • Orchestrators schedule deployments usually across a cluster • For example: • Swarm and Compose (Docker) • Kubernetes (Google) • Mesos + Swarm, Chronos, Marathon (Mesosphere)
  • 24. Clustering with Swarm • ARM templates available to kick start • Simple cluster template • Single swarm master • Multiple agent nodes (3) • Clustered swarm template • Multiple swarm master/slave topology (3) • Multiple agent nodes (3)
  • 25. DEMO 5: Deploying to a cluster with swarm • SETUP: • Provision Azure with ARM template • Swarm master node • Agent nodes each have swarm agent running • Deploy to swarm master • View provisioned containers across cluster • View information about the cluster
  • 26. ###DEMO5 REFERENCE # deploy to swarm from remote machine # or could access swarm master and do from that machine ### what’s in the swarm? ### replace IP with your swarm DNS docker -H tcp://0.0.0.0:2376 ps docker -H tcp://0.0.0.0:2376 info ### deploy something, ghost on swarm docker -H tcp://0.0.0.0:2376 run -d ghost ### deploy more, another ghost, redis etc # note swarm decides how to allocate based on cluster resources
  • 27.
  • 28. Containers / Microservices on Azure • Now: • Linux VMs • Windows Server Container VMs • Container Templates • Container / VM Clustering Templates • Future: • Hyper-V Containers • Azure Container Service • Container Resources • Mesosphere Data Center Operating System (DCOS) • Service Fabric
  • 29.
  • 30. DCOS • See 7 minute demo at Mesosphere site regarding DCOS • Very impressive vision regarding container orchestration, scale and disaster recovery
  • 31. About Michele Michele Leroux Bustamante michelebusta@solliance.net @michelebusta Solliance Cofounder Cloud / Security Architect Microsoft Regional Director since 2003 Microsoft MVP – Microsoft Azure Azure Elite, Azure Insider
  • 32. Glöm inte att utvärdera sessionen direkt i Microsoft TechDays-appen!