Skip to content

Commit 00d6573

Browse files
committed
First draft Assignment 2; lecrture update, container steps
1 parent 2be2c56 commit 00d6573

3 files changed

Lines changed: 50 additions & 20 deletions

File tree

Assignment2.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
# EWU-CSCD396-2023-Fall
22

3-
## Assignment 2
3+
## Assignment 2 - DRAFT!!!
44

55
The purpose of this assignment is to solidify your learning of:
66

7-
- Web App
8-
- Storage Account
9-
- Key Vault
10-
- Using Azure CLI
7+
- Build and deploying containers
8+
- Terraform IaC
9+
- Fnctions and Logic Apps
10+
- Messaging and Eventing
1111

1212
## Prerequisites
1313

1414
- Install VSCode Extension 'Azure App Service'
1515

1616
## Instructions
1717

18+
- All cloud infrastructure should be built with Terraform. Terraform State should be maintained in a Storage Account
19+
- All services should be deployed through a GitHub Action workflow
20+
1821
Complete the following Tutorials and do not clean up resources until assignment is graded.
1922

20-
1. Create Web App
23+
1. Create and deploy a containerized Web App
24+
2125
{https://learn.microsoft.com/en-us/azure/app-service/quickstart-dotnetcore?tabs=net70&pivots=development-environment-cli}
2226
Note: Deploy application code using az cli, not the VSCode extension
2327

@@ -30,24 +34,18 @@ Complete the following Tutorials and do not clean up resources until assignment
3034

3135
- Url Accessible ❌✅
3236

33-
2. Create and Connect Storage Account - Using Azure CLI when option is available
37+
2. Create and deploy an Auzre Function Bound to Service Bus. The function should write messages received to a storage account
38+
3439
{https://learn.microsoft.com/en-us/azure/app-service/scenario-secure-app-access-storage?tabs=azure-cli}
3540

3641
- Enabled Managed Identity on Web App ❌✅
3742
- Created Storage Account ❌✅
3843
- Web App Granted Access to Storage Account ❌✅
3944

40-
3. Create a Key Vault
41-
https://learn.microsoft.com/en-us/azure/key-vault/general/quick-create-cli
42-
https://learn.microsoft.com/en-us/azure/app-service/app-service-configuration-references#granting-your-app-access-to-referenced-key-vaults
43-
https://learn.microsoft.com/en-us/azure/app-service/app-service-key-vault-references?tabs=azure-cli
45+
3. Add a feature to the web app to write a message to the Service Bus from step 2. Ideally this ia a text box for the message and a button to submit the message to the bus. You can use the Azure SDK for .NET to send messages to the bus from your web app.
46+
47+
4448

45-
- Key Vault Created ❌✅
46-
- Key Vault Secret Created ❌✅
47-
- Key Vault Access policy created for user 'jcurry9@ewu.edu' with secret 'Get' permission ❌✅
48-
- Web App Granted Access to Key Vault ❌✅
49-
- Reference key vault secret as an app setting on your web app where the app setting name is the secret name and the value references your secret using the secret uri ❌✅
50-
(https://learn.microsoft.com/en-us/azure/app-service/app-service-key-vault-references?tabs=azure-cli#source-app-settings-from-key-vault)
5149

5250
4. Create a PowerShell script called Assignment2.ps1 on your branch within the Assignment2 folder ❌✅
5351

@@ -68,4 +66,5 @@ $StorageAccount = ""
6866

6967
## Extra Credit
7068

71-
TBD
69+
- Have the web app write the message to an Azure SQL Table in addition to the message bus
70+
-

Lectures.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@
6969
- Containers and the Container Use Case
7070
- Docker and Docker Desktop
7171
- Container Registry
72-
- Azure Container Instance*
73-
- Azure Container Apps**
72+
- Azure Container Apps
7473
- Kubernetes and Azure Kubernetes Service (AKS)**
7574

7675
## Lecture 6

doc/containers.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
## Containerize with DotNet
3+
[Containerize with DotNet](https://learn.microsoft.com/en-us/dotnet/core/containers/overview?tabs=windows)
4+
1. use built in container tools in .NET 8+
5+
1. set project properties to enable containerization
6+
```
7+
<PropertyGroup>
8+
<IsPublishable>true</IsPublishable>
9+
<EnableSdkContainerSupport>true</EnableSdkContainerSupport>
10+
</PropertyGroup>
11+
```
12+
1. Be sure Docker is running
13+
1. Run `dotnet publish -c Release` to build and publish the application, which will also create a Docker image.
14+
1. Run `docker images` to see the created image.
15+
1. Properties can be set in the project file or via command line arguments to `dotnet publish` to specify the base image, target OS, and other containerization options.
16+
```
17+
dotnet publish --os linux --arch x64 /t:PublishContainer /p:ContainerImageTags=`"0.0.1`;latest`"
18+
```
19+
20+
## Publish to Azure Container Registry
21+
[Publish to Azure Container Registry](https://learn.microsoft.com/en-us/dotnet/core/containers/azure-container-registry?tabs=windows)
22+
1. Create an Azure Container Registry (ACR)
23+
1. Install the Azure CLI and log in to your Azure account using `az login`
24+
1. Use the Azure CLI to log in to your ACR using `az acr login --name <registry-name>`
25+
1. Tag your Docker image with the ACR login server name using `docker tag <image-name> <registry-name>.azurecr.io/<image-name>:<tag>`
26+
1. Push the Docker image to ACR using `docker push <registry-name>.azurecr
27+
28+
29+
## Containerize with Docker
30+
[Containerize with Docker](https://learn.microsoft.com/en-us/dotnet/core/docker/build-container?tabs=windows&pivots=dotnet-10-0)
31+
32+
https://learn.microsoft.com/en-us/dotnet/architecture/microservices/

0 commit comments

Comments
 (0)