Skip to content

Commit ce74ddb

Browse files
author
Tom Moore
committed
Added the End to End guide for Refactoring Toolkit V1
1 parent 1e39aff commit ce74ddb

40 files changed

+939
-0
lines changed

SampleApplications/2022/MediaCatalog/CloudFormation/mediacatalog.yml

Lines changed: 442 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Setting up your environment
2+
3+
In order to follow this guide, you will need to have a development environment. The environment must have at a minimum:
4+
5+
* A Microsoft Windows laptop, desktop, EC2 Instance or Virtual Machine.
6+
* Microsoft Visual Studio 2022 Community, or better. [here](https://visualstudio.microsoft.com/)
7+
* Git source control. [here](https://git-scm.com/)
8+
* Administrative access to Windows.
9+
* An AWS Account. [here](https://aws.amazon.com)
10+
* IAM Credentials into your account. [here](https://us-east-1.console.aws.amazon.com/iamv2/home#/home)
11+
* AWS Command Line Interface installed. [here](https://aws.amazon.com/cli/)
12+
13+
This guide assumes that in addition to having Windows set up, you have already installed the tools listed above, and that you have configured access to your AWS Account for the command line. If you have not already done so, please complete the installation and configuration before proceeding.
14+
15+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Sample Application
2+
3+
Throughout this guide, we will be refactoring a sample application. This application is available in the AWS .NET Samples GitHub repository.
4+
5+
Download the code [here](https://github.com/aws-samples/aws-net-guides).
6+
7+
At a command line, using your git client type:
8+
9+
```
10+
git clone git@github.com:aws-samples/aws-net-guides.git
11+
```
12+
13+
The sample application that we will use is in the sub folder:
14+
15+
```
16+
SampleApplications\2022\MediaCatalog\MediaLibrary4.8
17+
```
18+
19+
The sample application has a required set of infrastructure that must be deployed into your account. The infrastructure is deployed using Cloud Formation. From the AWS Console, you can create a new CloudFormation stack and use the template located in the sample application.
20+
```
21+
aws-net-guides\SampleApplications\2022\MediaCatalog\CloudFormation\mediacatalog.yml
22+
```
23+
24+
You can also deploy the stack from the AWS Command line using the following command in the aws-net-guides\SampleApplications\2022\MediaCatalog\CloudFormation\ folder.
25+
```
26+
aws cloudformation deploy --template-file MediaCatalog.yml --stack-name MediaCatalogStack --capabilities CAPABILITY_IAM
27+
```
28+
29+
You should make a copy of the Sample Application code, as the actions in this guide will be destructive to the project and source code. For example copy the folder "SampleApplications\2022\MediaCatalog\MediaLibrary4.8" to "C:\Source\MediaLibrary4.8" as this will allow us to change the application source files, while still having the original source code available.
30+
31+
The rest of this guide will assume that your sample project is stored in "C:\Source\MediaLibrary4.8\".
32+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# A Tour of the Sample Application
2+
3+
In visual studio, open the solution file:
4+
```
5+
C:\Source\MediaLibrary4.8\MediaLibrary\MediaLibrary.sln
6+
```
7+
8+
Once the Solution file is open in Visual Studio, run the solution to have a look at the starting point for the sample application.
9+
10+
![Media Catalog](img/home-page.png)
11+
12+
From the main page, click the "upload" link under the Upload title.
13+
14+
Use the Browse and Upload buttons to upload an image to the application.
15+
16+
![Upload](img/upload.png)
17+
18+
In the sample code folder, there are sample images provided by the Smithsonian Institution. These images can be found in the following location:
19+
```
20+
aws-net-guides\SampleApplications\2022\MediaCatalog\MediaLibrary6.0\SampleImages\
21+
```
22+
23+
Browse to this folder and select the image "NZP-20140817-6602RG-000003.jpg" click "Upload File" once the file has been selected.
24+
25+
The upload process automatically uses Amazon Rekognition to scan the image for any content that might be offensive. The application code automatically rejects any image where any moderation flags have been found.
26+
27+
Once uploaded, the application will bring you to a list of the files that have been uploaded, and are ready to process.
28+
29+
![Process](img/process.png)
30+
31+
Click the "Process" link beside the image. This will use Amazon Rekognition to scan the image and find labels for things that are in the image.
32+
33+
The processing page will give you a list of all the labels that Rekognition has detected and give you an opportunity to save the labels that you want against the image.
34+
35+
![Rekognition Results](img/results.png)
36+
37+
Select the options for cheetah, wildlife, animal and mammal. Then click Save.
38+
39+
You will then be brought back to the image list view. The image will no longer have a "Process" link, but will not have a link that allows you to view the previously saved results.
40+
41+
![Final](img/final.png)
42+
43+
This completes the tour of the Media Catalog application. Feel free to spend more time looking around at the application and becoming familiar with the other functions that are available before moving on to the next part of the guide.
44+
45+
16.2 KB
Loading
46.4 KB
Loading
16.4 KB
Loading
98.5 KB
Loading
19.3 KB
Loading
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Installing the AWS Toolkit for .NET Modernization
2+
3+
The AWS Toolkit for .NET Refactoring installs in Visual Studio as an Extension. If you don't have visual Studio open, start it now and select the option to continue without code.
4+
5+
![Open VS](img/visual-studio-open.png)
6+
7+
From Visual Studio, click on the Extensions menu item, and then click on Manage Extensions.
8+
9+
![Manage Extenstions](img/manage-extenstions.png)
10+
11+
Make sure the option to search for “Online” extensions is selected. Then type “AWS” in the search field. Your extensions list will be filtered down. From this menu you can select the “AWS Toolkit for .NET Refactoring VA 2022” from the menu. Once selected, click the Download button.
12+
13+
![Manage Extenstions](img/download-toolkit.png)
14+
15+
Once the download has been completed, you will receive a message that the changes will be scheduled once Visual Studio is closed. At this point click the Close button, and shut down visual Studio.
16+
17+
![Close Visual Studio](img/close-visual-studio.png)
18+
19+
Click the Close button, then close down Visual Studio. Once Visual Studio closes the Visual Sudio Extension Installer application will run.
20+
21+
![Close Visual Studio](img/modify-visual-studio.png)
22+
23+
Click the Modify button to allow Visual Studio to install the extension.
24+
25+
This completes the instalation of the .NET Refactoring Toolkit for .NET.

0 commit comments

Comments
 (0)