Challenge 01 - Path A: Got Containers?

< Previous Challenge - Home - Next Challenge >

Introduction

The first step in our journey will be to take our application and package it as a container image using Docker.

Description

To help ensure everyone can start this hack on the same page and avoid the complexities of installing and setting up Docker, we have provided you with an ARM Template that will deploy a Linux VM into Azure. Once deployed, the Linux VM will have the FabMedical application’s source code and all of the Docker & Node.js tools pre-installed.

You will use the Linux VM during this challenge to perform several tasks to prepare the application for containerization and eventual deployment into Kubernetes, including:

Deploy an Azure Linux VM “Build Machine”

Deploy an Azure VM using the provided ARM Template and parameters file in the /Challenge-01/build-machine folder of the Resources.zip file provided to you by your coach.

This is a three step process which any Azure professional should be familiar with. We will list these steps below in case you are new to Azure.

NOTE: If you are using Azure Cloud Shell to run this hack, you will need to upload the Resources.zip file provided by your coach into the Cloud Shell. Unpack the Resources.zip file there first, and then proceed with the instructions below.

  1. Log into your Azure Subscription with the Azure CLI:
     az login
    
  2. Create a new Resource Group:
     az group create --name <resource-group-name> --location <azure-region>
    
    • If using a shared Azure subscription, we recommend you use the a combination of your initials and “rg” for the <resource-group-name> value. For example: peterlaudati-rg
    • The <azure-region> value must be one of the pre-defined Azure Region names. You can view the list of available region names by running the following command: az account list-locations -o table
  3. Deploy the template by running the following Azure CLI command from wherever you have unpacked the /Challenge-01/build-machine folder:
     az deployment group create -g <resource-group-name> -n LinuxBuildVM -f docker-build-machine-vm.json -p docker-build-machine-vm.parameters.json
    
    • The template deployment will ask you to provide an admin password for the VM. The 12-character password must meet 3 out of 4 of these criteria:
      • Have lower characters
      • Have upper characters
      • Have a digit
      • Have a special character

When the deployment is complete, you can ssh into the build machine using port 2266 on the VMs public IP:

Build & Run the FabMedical Application

Create Dockerfiles to Containerize the FabMedical Application

Run the Containerized FabMedical Application with Docker

Success Criteria

  1. Verify that you can run both the Node.js based web and api parts of the FabMedical app on the VM
  2. Verify that you have created 2 Dockerfiles files and created a container image for both web and api.
  3. Verify that you can run the application using containers.

Learning Resources