- Challenge 2 - Run the app should be done successfuly.
So far we have deployed a SQL Server on Linux containers which was really convenient for dev/test scenarios, especially locally. But now with this challenge we would like to leverage Azure SQL Database as a Platform-as-a-Service (PaaS) which offers out-of-the-box features for Production: security patch, SQL Server upgrades, Auto-tuning, Geo-replication, Scaling up or down the size of the server, etc. that we don't want to do by ourself.
- Provision your Azure SQL Database 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. Friends don't let friends use UI to provision Azure services, right? ;)
- Update your app (re-build and re-deploy the Docker image) with the new connection string (as environment variable), test the app as an end-user, and play a game once deployed there.
- In Azure Cloud Shell, make sure
az sql server list
andaz sql db list
are showing your Azure services properly. - In Azure Cloud Shell, do a
docker rm
of your SQL Server on Linux container. - 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 update or 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! ;)
- Azure SQL Database Service CLI documentation, here are some snippets you could leverage.
- 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 CLI to provision your infrastructure, you could leverage instead Azure ARM Templates, Ansible for Azure or Terraform for Azure.