Skip to content

Commit

Permalink
Merge pull request #733 from aws/dev
Browse files Browse the repository at this point in the history
chore: release 1.8
  • Loading branch information
philasmar authored Dec 15, 2022
2 parents 9431c11 + 5845c43 commit 205d8d9
Show file tree
Hide file tree
Showing 158 changed files with 778 additions and 1,842 deletions.
21 changes: 7 additions & 14 deletions AWS.Deploy.sln
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ManualLinuxTesting", "Manua
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWS.Deploy.Recipes.CDK.Common", "src\AWS.Deploy.Recipes.CDK.Common\AWS.Deploy.Recipes.CDK.Common.csproj", "{FAE4D4C5-9107-4622-A050-E30CC70BE754}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWasm31", "testapps\BlazorWasm31\BlazorWasm31.csproj", "{795F4F21-4474-40FD-AF2A-1F703FA7CEC2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWasm50", "testapps\BlazorWasm50\BlazorWasm50.csproj", "{315E01AE-51DC-410F-983E-BA80AD561C57}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWS.Deploy.Orchestration.UnitTests", "test\AWS.Deploy.Orchestration.UnitTests\AWS.Deploy.Orchestration.UnitTests.csproj", "{3F7A5CA6-7178-4DBF-8DAD-6A63684C7A8E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWS.Deploy.CLI.Common.UnitTests", "test\AWS.Deploy.CLI.Common.UnitTests\AWS.Deploy.CLI.Common.UnitTests.csproj", "{4AD9D400-3F3D-4076-B34C-0F88576C1889}"
Expand All @@ -70,6 +66,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkerServiceExample", "tes
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebApiNET6", "testapps\WebApiNET6\WebApiNET6.csproj", "{B2EA65BD-9FFE-4452-B2DC-574EB1A9FAF1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWasm60", "testapps\BlazorWasm60\BlazorWasm60.csproj", "{CEEBEC39-40E5-4A9B-878A-6EDB52B9B43E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -124,14 +122,6 @@ Global
{FAE4D4C5-9107-4622-A050-E30CC70BE754}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FAE4D4C5-9107-4622-A050-E30CC70BE754}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FAE4D4C5-9107-4622-A050-E30CC70BE754}.Release|Any CPU.Build.0 = Release|Any CPU
{795F4F21-4474-40FD-AF2A-1F703FA7CEC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{795F4F21-4474-40FD-AF2A-1F703FA7CEC2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{795F4F21-4474-40FD-AF2A-1F703FA7CEC2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{795F4F21-4474-40FD-AF2A-1F703FA7CEC2}.Release|Any CPU.Build.0 = Release|Any CPU
{315E01AE-51DC-410F-983E-BA80AD561C57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{315E01AE-51DC-410F-983E-BA80AD561C57}.Debug|Any CPU.Build.0 = Debug|Any CPU
{315E01AE-51DC-410F-983E-BA80AD561C57}.Release|Any CPU.ActiveCfg = Release|Any CPU
{315E01AE-51DC-410F-983E-BA80AD561C57}.Release|Any CPU.Build.0 = Release|Any CPU
{3F7A5CA6-7178-4DBF-8DAD-6A63684C7A8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3F7A5CA6-7178-4DBF-8DAD-6A63684C7A8E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3F7A5CA6-7178-4DBF-8DAD-6A63684C7A8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -172,6 +162,10 @@ Global
{B2EA65BD-9FFE-4452-B2DC-574EB1A9FAF1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B2EA65BD-9FFE-4452-B2DC-574EB1A9FAF1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B2EA65BD-9FFE-4452-B2DC-574EB1A9FAF1}.Release|Any CPU.Build.0 = Release|Any CPU
{CEEBEC39-40E5-4A9B-878A-6EDB52B9B43E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CEEBEC39-40E5-4A9B-878A-6EDB52B9B43E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CEEBEC39-40E5-4A9B-878A-6EDB52B9B43E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CEEBEC39-40E5-4A9B-878A-6EDB52B9B43E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -190,8 +184,6 @@ Global
{3AAC19A6-02E8-45D0-BDD0-CAD0FBE15F64} = {11C7056E-93C1-408B-BD87-5270595BBE0E}
{D0172E70-D5BC-4EDE-84E4-9ADB67B5F8FB} = {BD466B5C-D8B0-4069-98A9-6DC8F01FA757}
{FAE4D4C5-9107-4622-A050-E30CC70BE754} = {11C7056E-93C1-408B-BD87-5270595BBE0E}
{795F4F21-4474-40FD-AF2A-1F703FA7CEC2} = {C3A0C716-BDEA-4393-B223-AF8F8531522A}
{315E01AE-51DC-410F-983E-BA80AD561C57} = {C3A0C716-BDEA-4393-B223-AF8F8531522A}
{3F7A5CA6-7178-4DBF-8DAD-6A63684C7A8E} = {BD466B5C-D8B0-4069-98A9-6DC8F01FA757}
{4AD9D400-3F3D-4076-B34C-0F88576C1889} = {BD466B5C-D8B0-4069-98A9-6DC8F01FA757}
{6EDCA334-3317-44A4-A017-2A8D810EE7A7} = {C3A0C716-BDEA-4393-B223-AF8F8531522A}
Expand All @@ -203,6 +195,7 @@ Global
{74444ED0-9044-4DF7-A111-7D9F81ADF0FD} = {BD466B5C-D8B0-4069-98A9-6DC8F01FA757}
{7C330493-9BF7-4DB6-815B-807C08500AC6} = {C3A0C716-BDEA-4393-B223-AF8F8531522A}
{B2EA65BD-9FFE-4452-B2DC-574EB1A9FAF1} = {C3A0C716-BDEA-4393-B223-AF8F8531522A}
{CEEBEC39-40E5-4A9B-878A-6EDB52B9B43E} = {C3A0C716-BDEA-4393-B223-AF8F8531522A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5A4B2863-1763-4496-B122-651A38A4F5D7}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ To take advantage of this library you’ll need:
* The local credential profile can be configured by a variety of tools. For example, the credential profile can be configured with the [AWS Toolkit for Visual Studio](https://docs.aws.amazon.com/toolkit-for-visual-studio/latest/user-guide/credentials.html) or the [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html), among others.
* Note: You need to make sure to add the appropriate CloudFormation permissions to your credentials's profile / assumed role.
* For SSO, please visit the [.NET SDK Reference Guide](https://docs.aws.amazon.com/sdkref/latest/guide/access-sso.html).
* [.NET Core 3.1](https://dotnet.microsoft.com/download) or later
* [.NET 6](https://dotnet.microsoft.com/download) or later
* [Node.js 14](https://nodejs.org/en/download/) or later
* The [AWS Cloud Development Kit (CDK)](https://aws.amazon.com/cdk/) is used by this tool to create the AWS infrastructure to run applications. The CDK requires Node.js to function. This dependency is needed for deployments that are CDK based. If you will be using deployments that are not CDK based, you are not required to have this dependency.
* (optional) [Docker](https://docs.docker.com/get-docker/)
Expand Down
4 changes: 2 additions & 2 deletions THIRD_PARTY_LICENSES
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,6 @@ Copyright (c) 2016 .NET Foundation
Copyright (c) 2016 .NET Foundation
** Microsoft.TemplateEngine.Orchestrator.RunnableProjects; version 5.0.1 -- https://www.nuget.org/packages/Microsoft.TemplateEngine.Orchestrator.RunnableProjects
Copyright (c) 2016 .NET Foundation
** Microsoft.Extensions.Configuration.Json; version 3.1.7 -- https://www.nuget.org/packages/Microsoft.Bcl.AsyncInterhttps://www.nuget.org/packages/Microsoft.Extensions.Configuration.Jsonfaces
Copyright (c) .NET Foundation and Contributors
** Microsoft.Extensions.DependencyInjection; version 6.0.0 -- https://www.nuget.org/packages/Microsoft.Extensions.DependencyInjection
Copyright (c) .NET Foundation and Contributors
** Microsoft.Extensions.DependencyInjection.Abstractions; version 6.0.0 -- https://www.nuget.org/packages/Microsoft.Extensions.DependencyInjection.Abstractions
Expand All @@ -353,6 +351,8 @@ Copyright (c) .NET Foundation and Contributors
Copyright (c) Microsoft Corporation.
** System.Text.Json; version 6.0.4 -- https://www.nuget.org/packages/System.Text.Json
Copyright (c) .NET Foundation and Contributors
** Microsoft.Extensions.Configuration.Json; version 6.0.0 -- https://www.nuget.org/packages/Microsoft.Bcl.AsyncInterhttps://www.nuget.org/packages/Microsoft.Extensions.Configuration.Jsonfaces
Copyright (c) .NET Foundation and Contributors

All rights reserved.

Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ nav:
- Getting started:
- Pre-requisites: docs/getting-started/pre-requisites.md
- How to install: docs/getting-started/installation.md
- Set up Credentials: docs/getting-started/setup-creds.md
- Set up custom workspace: docs/getting-started/custom-workspace.md
- Set up credentials: docs/getting-started/setup-creds.md
- Set up a custom workspace: docs/getting-started/custom-workspace.md
- Deploy "Hello World": docs/getting-started/run-tool.md
- Support matrix: docs/support.md
- Commands:
Expand Down
3 changes: 2 additions & 1 deletion site/content/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,11 @@ Material for MkDocs is a theme for MkDocs, a static site generator geared toward
```
pip install mkdocs-material
```

For, other installation options [see here](https://squidfunk.github.io/mkdocs-material/getting-started/)

### Deploying to a Local Server
MkDocs comes with a built-in dev-server that lets you preview your documentation as you work on it.
MkDocs comes with a built-in dev-server that lets you preview your documentation as you work on it.

From the root of the project repository, run the following command:
```
Expand Down
17 changes: 10 additions & 7 deletions site/content/docs/cicd.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ You can use AWS Deploy Tool when developing your app using any Continuous Deploy

To turn off the interactive features, use the `-s (--silent)` switch. This will ensure the tool never prompts for any questions that could block an automated process.

dotnet aws deploy --silent
```
dotnet aws deploy --silent
```

### Creating a deployment settings file

Expand Down Expand Up @@ -38,21 +40,23 @@ Here's an example of a web application with the following directory structure:
┗ MyWebApplication.sln

To perform a deployment and also persist the deployment configuration to a JSON file, use the following command:

```
dotnet aws deploy --project-path MyWebApplication/MyWebApplication/MyWebApplication.csproj --save-settings deploymentsettings.json
```

This will create a JSON file at `MyWebApplication/MyWebApplication/deploymentsettings.json` with the following structure:
```

```json
{
"AWSProfile": <AWS_PROFILE>
"AWSRegion": <AWS_REGION>,
"ApplicationName": <APPLICATION_NAME>,
"RecipeId": <RECIPE_ID>
"Settings": <JSON_BLOB>
}
```

* _**AWSProfile**_: The name of the AWS profile that was used during deployment.

* _**AWSRegion**_: The name of the AWS region where the deployed application is hosted.
Expand Down Expand Up @@ -89,7 +93,6 @@ dotnet aws deploy --project-path <PROJECT_PATH> --apply <SETTINGS_FILE_PATH>

To deploy the application with the above directory structure in CI/CD pipeline without any prompts, use the following command:

dotnet aws deploy --silent --project-path MyWebApplication/MyWebApplication/MyWebApplication.csproj --apply deploymentsettings.json



```
dotnet aws deploy --silent --project-path MyWebApplication/MyWebApplication/MyWebApplication.csproj --apply deploymentsettings.json
```
11 changes: 8 additions & 3 deletions site/content/docs/commands/delete.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
# delete-deployment command

### Usage
dotnet aws delete-deployment - Tears down the application stack.

`dotnet aws delete-deployment` - Tears down the application stack.

### Synopsis
dotnet aws delete-deployment <APPLICATION-NAME> [-d|--diagnostics] [-s|--silent] [--profile <PROFILE>] [--region <REGION>] [-?|-h|--help]

```
dotnet aws delete-deployment <APPLICATION-NAME> [-d|--diagnostics] [-s|--silent] [--profile <PROFILE>] [--region <REGION>] [-?|-h|--help]
```
### Description
Tears down the application stack.

### Examples

dotnet aws delete-deployment MY_APPLICATION --region us-west-2
```
dotnet aws delete-deployment MY_APPLICATION --region us-west-2
```
21 changes: 15 additions & 6 deletions site/content/docs/commands/deploy.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# deploy command

### Usage
dotnet aws deploy - Inspect, build, and deploy the .NET project to AWS using the chosen AWS compute.


`dotnet aws deploy` - Inspect, build, and deploy the .NET project to AWS using the chosen AWS compute.

### Synopsis
dotnet aws deploy [-d|—-diagnostics] [-s|--silent] [--profile <PROFILE>] [--region <REGION>] [--project-path <PROJECT-PATH>] [[--save-settings|--save-all-settings] <SETTINGS-FILE-PATH>] [--application-name <CLOUD-APPLICATION-NAME>] [--apply <PATH-TO-DEPLOYMENT-SETTINGS>] [--deployment-project <CDK-DEPLOYMENT-PROJECT-PATH>] [-?|-h|--help]

```
dotnet aws deploy [-d|—-diagnostics] [-s|--silent] [--profile <PROFILE>] [--region <REGION>] [--project-path <PROJECT-PATH>] [[--save-settings|--save-all-settings] <SETTINGS-FILE-PATH>] [--application-name <CLOUD-APPLICATION-NAME>] [--apply <PATH-TO-DEPLOYMENT-SETTINGS>] [--deployment-project <CDK-DEPLOYMENT-PROJECT-PATH>] [-?|-h|--help]
```

### Description
Inspects the project and recommends AWS compute that is most suited to the type of deployed application. Then builds the project, generates a deployment CDK project to provision the required infrastructure, and deploys the .NET project to AWS using the chosen AWS compute.
Expand All @@ -13,10 +18,14 @@ Inspects the project and recommends AWS compute that is most suited to the type

Deploying HelloWorld

dotnet new web -n HelloWorld -f net6.0
cd HelloWorld
dotnet aws deploy
```
dotnet new web -n HelloWorld -f net6.0
cd HelloWorld
dotnet aws deploy
```

Deploying application to a non-default profile

dotnet aws deploy --profile myCustomProfile --region us-east1
```
dotnet aws deploy --profile myCustomProfile --region us-east1
```
13 changes: 9 additions & 4 deletions site/content/docs/commands/list.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
# list-deployments command

### Usage
dotnet aws list-deployments - Lists available cloud applications that were deployed using AWS Deploy Tool

`dotnet aws list-deployments` - Lists available cloud applications that were deployed using AWS Deploy Tool

### Synopsis
dotnet new list-deployments [-d|--diagnostics] [-s|--silent] [--profile <PROFILE>] [--region <REGION>] [-?|-h|--help]

```
dotnet new list-deployments [-d|--diagnostics] [-s|--silent] [--profile <PROFILE>] [--region <REGION>] [-?|-h|--help]
```

### Description
Lists available cloud applications that were deployed using AWS Deploy Tool.

### Examples

dotnet aws list-deployments --region us-west-2

```
dotnet aws list-deployments --region us-west-2
```
10 changes: 7 additions & 3 deletions site/content/docs/commands/server-mode.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# server-mode command

### Usage
dotnet aws server-mode - Launches the tool in a server mode for integrations with IDE, for example Visual Studio.

`dotnet aws server-mode` - Launches the tool in a server mode for integrations with IDE, for example Visual Studio.

### Synopsis
dotnet aws server-mode [-d|--diagnostics] [-s|--silent] [-?|-h|--help] [--port <PORT>] [--parent-pid <PARENT-PID>] [--unsecure-mode]

```
dotnet aws server-mode [-d|--diagnostics] [-s|--silent] [-?|-h|--help] [--port <PORT>] [--parent-pid <PARENT-PID>] [--unsecure-mode]
```

### Description
Starts the tool in the server mode to provide integration with IDEs, for example Visual Studio. This tool is not intended for the end user usage unless you are writing a custom integration into an IDE.
Starts the tool in the server mode to provide integration with IDEs, for example Visual Studio. This tool is not intended for end user usage unless you are writing a custom integration into an IDE.

### Examples
```
Expand Down
14 changes: 7 additions & 7 deletions site/content/docs/deployment-projects/cdk-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ The following links are useful resources to learn more about AWS CDK and how to

The layout of the generated CDK project puts all the code that was used to create the AWS resources defined in the starting recipe in a directory called **Generated**.

![Catagories in AWS Toolkit for Visual Studio](../../assets/images/deployment-project-file-layout.png)
![Categories in AWS Toolkit for Visual Studio](../../assets/images/deployment-project-file-layout.png)

It is recommended to not modify the code in the `Generated` directory to make it easier to merge future changes from the starting recipe into your custom deployment project. If you do not intend to update your custom deployment project from the original built-in recipe you may modify the code or rearrange the directory layout.

If you choose to not modify the `Generated` code it is recommended to customize the CDK project starting from the `AppStack` class. Here is the constructor of `AppStack`.

```
```csharp
internal AppStack(Construct scope, IDeployToolStackProps<Configuration> props)
: base(scope, props.StackName, props)
{
Expand All @@ -45,13 +45,15 @@ internal AppStack(Construct scope, IDeployToolStackProps<Configuration> props)
}
```

The `var generatedRecipe = new Recipe(this, props.RecipeProps);` line of code creates all of the AWS resources from the `Generated` directory. Your customizations could create new AWS resources via CDK constructs before or after this line. Typically you would create new resources before this line if you want those resources to be connected to the resources defined in the `Recipe` type. If you need to create new resources that are connected to the resources defined in the `Recipe` then create them after this line. The instance of `Recipe` has public properties for all of the resources that were created in the `Recipe`.
The `var generatedRecipe = new Recipe(this, props.RecipeProps);` statement creates all of the AWS resources specified in the CDK code in the `Generated` directory. Your customizations can create additional custom AWS resources from CDK constructs either before or after this statement.

If you have custom resources you want to connect to resources generated by the recipe, create your custom resource before the statement. For example, you might want to set an environment variable in a container definition to the name of a custom DynamoDB table. In that scenario, your custom table should be created before the statement. However, if you want to connect a custom resource to a resource created by the recipe, create the custom resource after the statement. An example might be connecting a custom Amazon CloudFront distribution to an Application Load Balancer created in a recipe. Custom resources that have no connection to the resources created by the recipe can be added before, or after, the statement.

In this constructor a callback method called `CustomizeCDKProps` is setup. This callback method is called right before any constructs are created from the `Recipe`. This allows modifying the construct's property object before it is passed into the construct.

The example below shows the `CustomizeCDKProps` callback that checks to see if the resource being created is the Beanstalk Environment. If it is, cast the property object to the appropriate property object and then make whatever customizations are needed.

```
```csharp
private void CustomizeCDKProps(CustomizePropsEventArgs<Recipe> evnt)
{
if (string.Equals(evnt.ResourceLogicalName, nameof(evnt.Construct.BeanstalkEnvironment)))
Expand All @@ -72,7 +74,7 @@ With the configuration read from the deploy tool, the CDK environment is set to

The other major difference from normal CDK projects is the call to `CDKRecipeSetup.RegisterStack`. This is required to stamp the CloudFormation stack with the recipe id that created the stack. Future redeployments can only update existing stacks that were created by the original recipe. It also serializes the settings collected from the deploy tool into the metadata for the CloudFormation stack so redeployments can use the previous settings used for deployment.

```
```csharp
public static void Main(string[] args)
{
var app = new App();
Expand Down Expand Up @@ -105,5 +107,3 @@ The option settings that are defined in the [recipe file](recipe-file.md) are pa
When you add new settings to the recipe file, you also need to add the `Id` of the new settings to the `Configuration` object. If you added an `Object` setting with a collection of child settings, first create a new type representing that entire `Object`. For reach child setting id, add a property on the new type. Finally, add a new property on `Configuration` for your new type with the property name being the id of the `Object` setting.

The `Configuration` object follows the same `Generated` directory pattern described above. Custom settings should be added to the partial `Configuration.cs` file outside of the `Generated` directory.


Loading

0 comments on commit 205d8d9

Please sign in to comment.