From 0383d102cb8da4ecc9d60bef86c01baf31efe058 Mon Sep 17 00:00:00 2001 From: Manfred Riem Date: Mon, 12 Feb 2024 07:21:05 -0600 Subject: [PATCH 1/3] Fixes #71 - Add Azure Container Apps landing page --- README.md | 2 +- containerapp/README.md | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 containerapp/README.md diff --git a/README.md b/README.md index 2662fe3..04c7ff1 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ Set your default subscription for this session using the subscription id from th ## Examples 1. [Azure App Service examples](appservice/README.md) +1. [Azure Container Apps examples](containerapp/README.md) 1. [Azure Container Registry examples](acr/README.md) 1. [Azure Key Vault examples](keyvault/README.md) 1. [Azure Resource Group examples](group/README.md) - diff --git a/containerapp/README.md b/containerapp/README.md new file mode 100644 index 0000000..c814c24 --- /dev/null +++ b/containerapp/README.md @@ -0,0 +1,11 @@ +### Azure Container Apps examples + +| Name | Link | Status +| ---- | ---- | ------ +| 1. [Create an environment](create-environment/README.md) | [Workflow](../.github/workflows/containerapp_create-environment_README_md.yml) | [![containerapp/create-environment/README.md](https://github.com/mnriem/csharp-on-azure-examples/actions/workflows/containerapp_create-environment_README_md.yml/badge.svg)](https://github.com/mnriem/csharp-on-azure-examples/actions/workflows/containerapp_create-environment_README_md.yml) + + From 3e63aea15620b865a10d0e2a62f0167e982cfa57 Mon Sep 17 00:00:00 2001 From: Manfred Riem Date: Wed, 14 Feb 2024 08:42:20 -0600 Subject: [PATCH 2/3] Fixes #73 - Create 'Deploy an ASP.NET application' example --- SCHEDULE.md | 2 +- WORKFLOWS.md | 1 + containerapp/aspnet/README.md | 76 +++++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 containerapp/aspnet/README.md diff --git a/SCHEDULE.md b/SCHEDULE.md index ccd901f..4c7db0d 100644 --- a/SCHEDULE.md +++ b/SCHEDULE.md @@ -16,4 +16,4 @@ _Search for "Week X" to make sure you see all the content to be refreshed for th | Azure Container Registry exampels | Build and push ASP.NET Hello World application | Week 8 | | Azure Key Vault examples | Create a self-signed certificate | Week 9 | | Azure Container App examples | Create an environment | Week 10 | - +| | Deploy an ASP.NET application | Week 11 | diff --git a/WORKFLOWS.md b/WORKFLOWS.md index 1af440f..f30a869 100644 --- a/WORKFLOWS.md +++ b/WORKFLOWS.md @@ -22,3 +22,4 @@ | Azure Container Registry examples | Build and push ASP.NET Hello World application | [![acr/create/README.md](https://github.com/mnriem/csharp-on-azure-examples/actions/workflows/acr_aspnet-helloworld_README_md.yml/badge.svg)](https://github.com/mnriem/csharp-on-azure-examples/actions/workflows/acr_aspnet-helloworld_README_md.yml) | 0 8 * * 1 | | Azure Key Vault examples | Create a self-signed certificate | [![keyvault/create-self-signed-certificate/README.md](https://github.com/mnriem/csharp-on-azure-examples/actions/workflows/keyvault_create-self-signed-certificate_README_md.yml/badge.svg)](https://github.com/mnriem/csharp-on-azure-examples/actions/workflows/keyvault_create-self-signed-certificate_README_md.yml) | 0 9 * * 1 | | Azure Container App examples | Create an environment | [![containerapp/create-environment/README.md](https://github.com/mnriem/csharp-on-azure-examples/actions/workflows/containerapp_create-environment_README_md.yml/badge.svg)](https://github.com/mnriem/csharp-on-azure-examples/actions/workflows/containerapp_create-environment_README_md.yml) | 0 10 * * 1 | +| Azure Container App examples | Deploy an ASP.NET application | [![containerapp/create-environment/README.md](https://github.com/mnriem/csharp-on-azure-examples/actions/workflows/containerapp_aspnet_README_md.yml/badge.svg)](https://github.com/mnriem/csharp-on-azure-examples/actions/workflows/containerapp_aspnet_README_md.yml) | 0 11 * * 1 | diff --git a/containerapp/aspnet/README.md b/containerapp/aspnet/README.md new file mode 100644 index 0000000..8701766 --- /dev/null +++ b/containerapp/aspnet/README.md @@ -0,0 +1,76 @@ + +# Deploy ASP.NET application + +[![appservice/deploy-aspnet-helloworld/README.md](https://github.com/mnriem/csharp-on-azure-examples/actions/workflows/containerapp_aspnet_README_md.yml/badge.svg)](https://github.com/mnriem/csharp-on-azure-examples/actions/workflows/containerapp_aspnet_README_md.yml) + +## Prerequisites + +This example assumes you have previously completed the following example: + +1. [Create an Azure Resource Group](../../group/create/README.md) +1. [Create an Azure Container Apps Environment](../create-environment/) + + + + +## Deploy an ASP.NET application + + + +To deploy the ASP.NET container image to Azure Container Apps use the command +line below. + +```shell + export ACA_ASPNET=aspnet + + az containerapp create \ + --name $ACA_ASPNET \ + --resource-group $RESOURCE_GROUP \ + --environment $ACA_ENVIRONMENT_NAME \ + --image $ACR_NAME.azurecr.io/$ACR_HELLOWORLD_IMAGE \ + --target-port 8080 \ + --ingress 'external' \ + --registry-server $ACR_NAME.azurecr.io \ + --min-replicas 1 + + az containerapp show \ + --resource-group $RESOURCE_GROUP \ + --name $ACA_ASPNET \ + --query properties.configuration.ingress.fqdn \ + --output tsv +``` + +Then open your browser to the URL echoed above and you should see: + +```text +Hello World! +``` + + + +## Cleanup + + + +Do NOT forget to remove the resources once you are done running the example. + +1m From c92dd4b674fe8fbb787aea96a2cb2ddab49cded6 Mon Sep 17 00:00:00 2001 From: Manfred Riem Date: Mon, 25 Mar 2024 14:54:40 -0500 Subject: [PATCH 3/3] Fixes #76 - Fix 'Deploy ASP.NET Hello World application' example --- appservice/create-plan/README.md | 2 +- group/create/README.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/appservice/create-plan/README.md b/appservice/create-plan/README.md index c15db52..efc5a61 100644 --- a/appservice/create-plan/README.md +++ b/appservice/create-plan/README.md @@ -37,7 +37,7 @@ Then, create the App Service Plan using the following command line: --location $REGION \ --name $APPSERVICE_PLAN \ --is-linux \ - --sku P1v3 + --sku P2v3 ```