- Challenge 3 - Move to Azure SQL Database should be done successfuly.
In a previous challenge we deployed the app on Azure but into an Azure Docker-machine playing the role of your local machine. Now with this challenge you will be able to provision an Azure Web App Service for Containers to host your "Rock Paper Scissors Boom" app.
- Provision an Azure Web App Service for Containers via Infrastructure-as-Code from within Azure Cloud Shell. The approach here is to leverage the Azure CLI (not the Azure portal) by executing a series of bash commands. Do you remember? Friends don't let friends use UI to provision Azure services, right? ;)
- Take the same approach to provision an Azure Container Registry (ACR) to push your container in it.
- Deploy the app in your Azure Web App Service for Containers by pulling the Docker image from your ACR previously created, test it as an end-user, and play a game once deployed there.
- In Azure Cloud Shell, make sure
az webapp list
,az acr list
andaz acr repository show-tags
are showing your Azure services properly.- Where is stored your connection string? Have you leveraged
az webapp config connection-string
, you should have!
- Where is stored your connection string? Have you leveraged
- In your web browser, navigate to the app and play a game, make sure it's working without any error.
- In GitHub, make sure you documented the different commands you have used to provision your infrastructure. It could be in a
.md
file or in.sh
file. You will complete this script as you are moving forward with the further challenges. - Be sure you don't commit any secrets/passwords into a public GitHub repo.
- In Azure DevOps (Boards), from the Boards view, you could now drag and drop the user story associated to this Challenge to the
Resolved
orClosed
column, congrats! ;)
- To use a custom Docker image for Web App for Containers, here you are! The "Use a Docker image from any private registry" section is specifically what you are looking for.
- Azure Web App Service CLI documentation
- Azure Container Registry CLI documentation
- You could execute the
git
commands "locally" from within your Azure Cloud Shell, or you could leverage the web editor directy from GitHub.
Too comfortable? Eager to do more? Try this:
- Instead of leveraging Azure Web App Service for Containers, you could deploy your app in Azure Web App Service on Linux, Azure Container Instance (ACI) or Azure Kubernetes Service (AKS).
- Instead of leveraging Azure CLI to provision your infrastructure, you could leverage instead Azure ARM Templates, Ansible for Azure or Terraform for Azure.