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
Sample project for migration tool code remediation that manages assets in cloud storage.
3
2
4
-
## Current Infrastructure
5
-
The project currently uses the following infrastructure, in [`main`](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/main/asset-manager) branch:
3
+
This [`source`](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/source/asset-manager) branch of the asset-manager project is the original state before being migrated to Azure service:
6
4
* AWS S3 for image storage, using password-based authentication (access key/secret key)
7
5
* RabbitMQ for message queuing, using password-based authentication
8
6
* PostgreSQL database for metadata storage, using password-based authentication
@@ -76,89 +74,14 @@ class User user
76
74
```
77
75
Password-based authentication
78
76
79
-
## Migrated Infrastructure
80
-
After migration, the project will use the following Azure services, in [`expected`](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/expected/asset-manager) branch:
81
-
* Azure Blob Storage for image storage, using managed identity authentication
82
-
* Azure Service Bus for message queuing, using managed identity authentication
83
-
* Azure Database for PostgreSQL for metadata storage, using managed identity authentication
classDef user fill:#ef9a9a,stroke:#b71c1c,color:#b71c1c
144
-
145
-
class WebApp,Worker app
146
-
class AzBlob,LocalFS storage
147
-
class ServiceBus broker
148
-
class AzPostgreSQL db
149
-
class Queue,RetryQueue queue
150
-
class User user
151
-
```
152
-
Managed identity based authentication
153
-
154
77
## Run Locally
155
78
156
-
Check out the [`main`](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/main/asset-manager) branch to run the current infrastructure locally:
79
+
Check out the [`source`](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/source/asset-manager) branch to run the current infrastructure locally:
To stop, run `stop.cmd` or `stop.sh` in the `scripts` directory.
183
106
184
-
## Run Migrated Code on Azure
185
-
186
-
Check out the [`expected`](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/expected/asset-manager) branch to run the migrated infrastructure on Azure:
**Prerequisites**: Azure CLI and you have signed in using `az login`
195
-
196
-
Run the following commands to deploy the apps to Azure. This will:
197
-
* Use Azure Blob Storage instead of S3 to store the image
198
-
* Use Azure Service Bus instead of RabbitMQ for message queuing
199
-
* Use Azure Database for PostgreSQL Flexible Server instead of PostgreSQL for metadata storage
200
-
201
-
Windows:
202
-
203
-
```batch
204
-
scripts\deploy-to-azure.cmd -ResourceGroupName <your resource group name> -Location <your resource group location, e.g., eastus2> -Prefix <your unique resource prefix>
205
-
```
206
-
207
-
Linux:
208
-
209
-
```bash
210
-
scripts/deploy-to-azure.sh -ResourceGroupName <your resource group name> -Location <your resource group location, e.g., eastus2> -Prefix <your unique resource prefix>
211
-
```
212
-
213
-
To clean up, run `scripts\cleanup-azure-resources.cmd -ResourceGroupName <your resource group name>` or `scripts/cleanup-azure-resources.sh -ResourceGroupName <your resource group name>` for Windows and Linux, respectively.
214
-
215
-
### Use GitHub Codespaces for Deployment
216
-
217
-
The deployment scripts can also be executed in GitHub Codespaces, which pre-installs the necessary dependencies. Follow the steps below to deploy the apps to Azure using GitHub Codespaces:
218
-
219
-
1. Open the repository in GitHub Codespaces by selecting on the **Code** button, selecting **Codespaces** tab, openining the existing codespace or selecting **Create codespace** for the target branch.
220
-
1. The codespace will automatically open in the browser. Wait until it is ready.
221
-
1. Navigate to the terminal in the codespace and run `az login` to sign in to Azure. Follow the instructions to complete the sign-in process.
222
-
1. At the last step of the sign-in process, you will be asked to select a subscription and tenant. Select the appropriate subscription and tenant.
223
-
1. Run the following commands in the terminal to deploy the apps to Azure:
224
-
225
-
```bash
226
-
cd asset-manager && git pull
227
-
scripts/deploy-to-azure.sh -ResourceGroupName <your resource group name> -Location <your resource group location, e.g., eastus2> -Prefix <your unique resource prefix>
228
-
```
229
-
230
-
1. To clean up, run `scripts\cleanup-azure-resources.cmd -ResourceGroupName <your resource group name>` or `scripts/cleanup-azure-resources.sh -ResourceGroupName <your resource group name>` for Windows and Linux, respectively.
231
-
232
-
## Java Migration Copilot Workshop
233
-
234
-
Check out the [`workshop`](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/workshop/asset-manager) branch for Java Migration Copilot workshop:
Compared to the `main` branch, the `workshop` branch has additional commits that have already migrated the code for **Web Application** with custom code remediation, including:
243
-
* Azure Blob Storage for image storage, using managed identity authentication
244
-
* Azure Service Bus for message queuing, using managed identity authentication
245
-
246
-
The remaining targets of the workshop are:
247
-
* For both **Web Application** and **Worker Service**, migrate to Azure Database for PostgreSQL Flexible server for metadata storage with managed identity authentication, using predefined prompt.
248
-
* For **Worker Service**, migrate to Azure Blob Storage and Azure Service Bus for image storage and message queuing, respectively, with managed identity authentication, using custom propmt created from existing commits that migrated the **Web Application**.
249
-
250
-
Once the workshop is successfully completed, you should be able to run the migrated code on Azure, similar to [Run Migrated Code on Azure](#run-migrated-code-on-azure) but using the `workshop` branch with the migrated code.
251
-
252
-
For more details, refer to the [workshop guide](https://github.com/Azure-Samples/java-migration-copilot-samples/blob/workshop/asset-manager/WORKSHOP.md).
0 commit comments