You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: asset-manager/WORKSHOP.md
+62-3Lines changed: 62 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,66 @@ Now, you migrate the **Worker Service** to use Azure Blob Storage and Azure Serv
92
92
93
93
## Deploy to Azure
94
94
95
-
At this point, you have successfully migrated the sample Java application `asset-manager` to use Azure Database for PostgreSQL, Azure Blob Storage, and Azure Service Bus.
95
+
At this point, you have successfully migrated the sample Java application `asset-manager` to use Azure Database for PostgreSQL, Azure Blob Storage, and Azure Service Bus. Now, you can deploy the migrated application to Azure using the Azure CLI after you identify a working location for your Azure resources.
96
96
97
-
To deploy your app to Azure, you can use the Azure GitHub Copilot to automatically generate IOC files for quick deployment.
98
-
See https://learn.microsoft.com/en-us/azure/developer/github-copilot-azure/quickstart-deploy-existing-app for more details.
97
+
For example, an Azure Database for PostgreSQL Flexible Server requires a location that supports the service. Follow the instructions below to find a suitable location.
98
+
99
+
1. Run the following command to list all available locations for your account:
100
+
101
+
```bash
102
+
az account list-locations -o table
103
+
```
104
+
105
+
1. Try a location from column **Name** in the output. For example, `eastus2` stands for **East US 2**.
106
+
107
+
1. Run the following command to list all available SKUs in the selected location for Azure Database for PostgreSQL Flexible Server:
108
+
109
+
```bash
110
+
az postgres flexible-server list-skus --location <your location> -o table
111
+
```
112
+
113
+
1. If you see the output contains the SKU `Standard_B1ms` and the **Tier** is `Burstable`, you can use the location for the deployment. Otherwise, try another location.
You can either run the deployment script locally or use the GitHub Codespaces. The recommended approach is to run the deployment script in the GitHub Codespaces, as it provides a ready-to-use environment with all the necessary dependencies.
122
+
123
+
Deploy using GitHub Codespaces:
124
+
1. Commit and push the changes to your forked repository.
125
+
1. Follow instructions in [Use GitHub Codespaces for Deployment](README.md#use-github-codespaces-for-deployment) to deploy the app to Azure.
126
+
127
+
Deploy using local environment by running the deployment script in the terminal:
128
+
1. Run `az login` to sign in to Azure.
129
+
1. Run the following commands to deploy the app to Azure:
130
+
131
+
Winndows:
132
+
```batch
133
+
scripts\deploy-to-azure.cmd -ResourceGroupName <your resource group name> -Location <your resource group location, e.g., eastus2> -Prefix <your unique resource prefix>
134
+
```
135
+
136
+
Linux:
137
+
```bash
138
+
scripts/deploy-to-azure.sh -ResourceGroupName <your resource group name> -Location <your resource group location, e.g., eastus2> -Prefix <your unique resource prefix>
139
+
```
140
+
141
+
Once the deployment script completes successfully, it outputs the URL of the Web application. Open the URL in a browser to verify if the application is running as expected.
142
+
143
+
## Clean up
144
+
145
+
When you are done with the workshop, clean up the Azure resources to avoid incurring costs.
146
+
147
+
Winndows:
148
+
```batch
149
+
scripts\cleanup-azure-resources.cmd -ResourceGroupName <your resource group name>
150
+
```
151
+
152
+
Linux:
153
+
```bash
154
+
scripts/cleanup-azure-resources.sh -ResourceGroupName <your resource group name>
155
+
```
156
+
157
+
If you deploy the app using GitHub Codespaces, delete the Codespaces environment by navigating to your forked repository in GitHub and selecting **Code** > **Codespaces** > **Delete**.
0 commit comments