Skip to content

Commit 2e9c569

Browse files
majguoyiliuTo
authored andcommitted
update readme
Signed-off-by: Jianguo Ma <[email protected]>
1 parent 828faee commit 2e9c569

File tree

1 file changed

+65
-6
lines changed

1 file changed

+65
-6
lines changed

asset-manager/README.md

Lines changed: 65 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Sample project for migration tool code remediation that manages assets in cloud storage.
33

44
## Current Infrastructure
5-
The project currently uses the following 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:
66
* AWS S3 for image storage, using password-based authentication (access key/secret key)
77
* RabbitMQ for message queuing, using password-based authentication
88
* PostgreSQL database for metadata storage, using password-based authentication
@@ -77,7 +77,7 @@ class User user
7777
Password-based authentication
7878

7979
## Migrated Infrastructure
80-
After migration, the project will use the following Azure services:
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:
8181
* Azure Blob Storage for image storage, using managed identity authentication
8282
* Azure Service Bus for message queuing, using managed identity authentication
8383
* Azure Database for PostgreSQL for metadata storage, using managed identity authentication
@@ -153,6 +153,14 @@ Managed identity based authentication
153153

154154
## Run Locally
155155

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:
157+
158+
```bash
159+
git clone https://github.com/Azure-Samples/java-migration-copilot-samples.git
160+
cd java-migration-copilot-samples/asset-manager
161+
git checkout main
162+
```
163+
156164
**Prerequisites**: JDK, Docker
157165

158166
Run the following commands to start the apps locally. This will:
@@ -162,15 +170,66 @@ Run the following commands to start the apps locally. This will:
162170
Windows:
163171

164172
```batch
165-
cd asset-manager
166173
scripts\start.cmd
167174
```
168175

169176
Linux:
170177

171-
```sh
172-
cd asset-manager
178+
```bash
173179
scripts/start.sh
174180
```
175181

176-
To stop, run `stop.cmd` or `stop.sh` in the `scripts` directory.
182+
To stop, run `stop.cmd` or `stop.sh` in the `scripts` directory.
183+
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:
187+
188+
```bash
189+
git clone https://github.com/Azure-Samples/java-migration-copilot-samples.git
190+
cd java-migration-copilot-samples/asset-manager
191+
git checkout expected
192+
```
193+
194+
**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 `cleanup-azure-resources.cmd` or `cleanup-azure-resources.sh` in the `scripts` directory.
214+
215+
## Java Migration Copilot Workshop
216+
217+
Check out the [`workshop`](https://github.com/Azure-Samples/java-migration-copilot-samples/tree/workshop/asset-manager) branch for Java Migration Copilot workshop:
218+
219+
```bash
220+
git clone https://github.com/Azure-Samples/java-migration-copilot-samples.git
221+
cd java-migration-copilot-samples/asset-manager
222+
git checkout workshop
223+
```
224+
225+
Compared to the `main` branch, the `workshop` branch has additional comments that have already migrated the code for **Web Application** with custom code remediation, including:
226+
* Azure Blob Storage for image storage, using managed identity authentication
227+
* Azure Service Bus for message queuing, using managed identity authentication
228+
229+
The remaining targets of the workshop are:
230+
* 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.
231+
* 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**.
232+
233+
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.
234+
235+
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

Comments
 (0)