Skip to content

Commit 43b1a37

Browse files
committed
revert deploy to azure
1 parent a480bb5 commit 43b1a37

File tree

1 file changed

+62
-3
lines changed

1 file changed

+62
-3
lines changed

asset-manager/WORKSHOP.md

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,66 @@ Now, you migrate the **Worker Service** to use Azure Blob Storage and Azure Serv
9292

9393
## Deploy to Azure
9494

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.
9696

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.
114+
115+
```text
116+
SKU Tier VCore Memory Max Disk IOPS
117+
----------------- --------------- ------- -------- ---------------
118+
Standard_B1ms Burstable 1 2 GiB 640e
119+
```
120+
121+
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

Comments
 (0)