In this section, we set up the reference example to be explored in Parts 2 through 7 of this workshop. The provisioning and deployment process will take approximately 40 minutes. While the installation is running, please proceed to Parts 2 through 7 to continue with the workshop.
The reference implementation is a production-grade web application that guides developers through migrating an on-premises web application to Azure, showcasing architectural changes and enhancements that leverage Azure strengths.
In the workshop we will only be deploying a development deployment which is a simplified version of the full production deployment.
The production environment aligns to a hub and spoke network architecture to centralize common resources. This network topology provided cost savings, enhanced security, and facilitated network integration (platform and hybrid). The full production deployment is not covered in this workshop but is available in the GitHub repository.
Note: The teardown section previously found here has been removed to avoid redundancy and maintain clarity throughout the workshop. Teardown instructions are comprehensively covered in Part 7, ensuring that all resources are appropriately cleaned up at the conclusion of the workshop.
At a command prompt, open the Windows Subsystem for Linux by typing the below command:
wslthen in the WSL window clone the repository and open the project using the Dev Container:
git clone https://github.com/Azure/reliable-web-app-pattern-java.git
cd reliable-web-app-pattern-javaIf required, ensure Docker Desktop is started. Open the repository folder in Visual Studio Code. You can do this from the command prompt:
code .Once Visual Studio Code is launched, you should see a popup allowing you to click on the button Reopen in Container.
If you don't see the popup, open the Visual Studio Code Command Palette to execute the command. There are three ways to open the command palette:
- For Mac users, use the keyboard shortcut ⇧⌘P
- For Windows and Linux users, use Ctrl+Shift+P
- From the Visual Studio Code top menu, navigate to View -> Command Palette.
Once the command palette is open, search for Dev Containers: Rebuild and Reopen in Container.
Before deploying, you must be authenticated to Azure and have the appropriate subscription selected. Run the following command to authenticate:
az login --scope https://graph.microsoft.com//.defaultSet the subscription to the one you want to use (you can use az account list to list available subscriptions):
export AZURE_SUBSCRIPTION_ID="<your-subscription-id>"az account set --subscription $AZURE_SUBSCRIPTION_IDUse the next command to login with the Azure Dev CLI (AZD) tool:
azd auth loginNext, we provide the AZD tool with variables that it uses to create the deployment. The first thing we initialize is the AZD environment with a name.
The environment name should be less than 18 characters and must be comprised of lower-case, numeric, and dash characters (for example, contosowebapp). The environment name is used for resource group naming and specific resource naming;
azd env new <pick_a_name>Enable the AZD Terraform provider:
azd config set alpha.terraform onSelect the subscription that will be used for the deployment:
azd env set AZURE_SUBSCRIPTION_ID $AZURE_SUBSCRIPTION_IDSet the Azure region to be used:
azd env set AZURE_LOCATION <pick_a_region>Run the following command to create the Azure resources and deploy the code (about 15-minutes to complete):
azd upNavigate to the Front Door URL in a browser to view the Contoso Fiber CAMS application. Use the Endpoint URL from the output of the deployment.
You will see an output similar to the following:
Deploying services (azd deploy)
(✓) Done: Deploying service application
- Endpoint: https://fd-contosocams-dev-frcfgefndcctbgdh.z02.azurefd.netClick on the "Service Plans" link in the left-side menu of the Contoso Fiber application. This will try to make a query to retrieve a list of all service plans.
Now that you have deployed the reference implementation, you can proceed to the next section of the workshop, which provides an overview of the Reliable Web Application pattern.
To tear down the deployment, run the following command:
azd down --purge --force

