-
If you haven't already clone this repo onto the demo laptop
git clone https://github.com/ManoMarks/vmworld2016demo.git -
Make sure Docker for Mac is installed.
-
Edit the
/etc/hostsfile on the demo laptop and add the following entry forwww.catweb.demo(it points to the IP of the load balancer for the UCP nodes)13.91.251.79 www.catweb.demo -
In the advanced preferences for Docker for Mac add
dtrdemo.westus.cloudapp.azure.comunderInsecure registriesand clickApply & Restart
This demo is designed to show a build, ship, run workflow using a simple Flask-based web app, catweb.
The basic flow is run the app run the app locally, modify the web template to show how hot mounting a volume works, build an updated image, push to DTR, then deploy on Azure using Docker Data Center.
-
$ cd ~/vmworld2016demo/catweb(this location will vary depending on where the repo was cloned to) -
Show and explain the Dockerfile and how the app is built, you can also show the source code if you wish.
-
Run the app and mount the local directory into the source code directory in the container
$ docker run -d -p 5000:5000 --name catweb -v $(pwd):/usr/src/app dtrdemo.westus.cloudapp.azure.com/demouser/catweb -
Switch into the browser and show the app running at
http://localhost:5000 -
Switch back to your terminal and edit the
index.htmlfile in thetemplatesdirectory. Usually I change it by using an attendee's name in the title e.g. "Josephine's Random Cat Gif". Save your changes.Note: If you
cdinto thetemplatesdirectory to edit the file, make sure tocdback into thecatwebdirectory before rebuilding the image in a few steps -
Switch back to the web browser and show how the change you made is immediately reflected in the running container.
-
Switch back to the terminal and build a new version of the catweb image.
Note: I usually tag the image w/ the name I used when I edited the
index.htmlfile so it's easier to remember which one to deploy$ docker build -t dtrdemo.westus.cloudapp.azure.com/demouser/catweb:<tag> -
Push the new image to DTR.
$ docker push dtrdemo.westus.cloudapp.azure.com/demouser/catweb:<tag>Note: If you get an error saying you need to authenticate, you'll need to log in to the DTR server
$ docker login -u demouser -p demo dtrdemo.westus.cloudapp.azure.com -
In a web browser navigate to
https://dtrdemo.westus.cloudapp.azure.com. If prompted to log in the username isdemouserand the password isdemo.Click on
Repositoriesand show the image you just uploaded -
In a web browser navigate to
https://ucpdemo.westus.cloudapp.azure.comand log into UCP. Feel free to give a quick tour of UCP and some of its features. -
From the left menu, click
ContainersNote: Sometimes the left menu is blank, simply reload the page if this happens
-
Click the
+ Deploy Containerbutton and fill in the following values-
Image name:
dtrdemo.westus.cloudapp.azure.com/demouser/catweb:<tag> -
Under
Networkmake sure the box next toAutomatically expose all portsis checked -
Under
Labelsadd two lables:interlock.hostnameandwwwinterlock.domainandcatweb.demoNote: Make sure to click the plus after each one
-
-
Click
Run Container -
After the container is successfully deployed, navigate in the web browser to
http://www.catweb.demoThis will navigate to your newly deployed container running on Azure.
NOTE Do this after EACH demo
- In Universal Control Plane remove the container you just deployed. If you don't there will be conflicting versions running.