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

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

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!