Skip to content

Commit 1f0a0bb

Browse files
microsoftopensourcemithunshanbhag
authored andcommitted
updates to L100 cloud native app walkthrough
1 parent 4d376b7 commit 1f0a0bb

File tree

836 files changed

+42494
-32
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

836 files changed

+42494
-32
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.sh eol=lf
2+
mvnw eol=lf
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: contoso-traders-app-deployment-legacy
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: ["main"]
7+
paths:
8+
[
9+
"src/ContosoTraders.Api.Core/**",
10+
"src/ContosoTraders.Api.Images/**",
11+
"src/ContosoTraders.Api.Products/**",
12+
]
13+
14+
env:
15+
PRODUCTS_WEBAPP_NAME: contoso-traders-products
16+
17+
jobs:
18+
deploy-products-api:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: checkout code
22+
uses: actions/checkout@v3
23+
- name: azure login
24+
uses: azure/login@v1
25+
with:
26+
creds: ${{ secrets.SERVICEPRINCIPAL }}
27+
# @TODO: REMOVE EVERYTHING BELOW THIS LINE AFTER AKS INTEGRATION IS DONE
28+
- name: install dotnet
29+
uses: actions/setup-dotnet@v3
30+
with:
31+
dotnet-version: 6.0.x
32+
- name: dotnet publish
33+
run: dotnet publish -o ../Publish/ContosoTraders.Api.Products -c release
34+
working-directory: src/ContosoTraders.Api.Products
35+
- name: diagnostic output
36+
run: ls -la ./src/Publish/ContosoTraders.Api.Products
37+
- name: deploy to app service
38+
uses: Azure/webapps-deploy@v2
39+
with:
40+
app-name: ${{ env.PRODUCTS_WEBAPP_NAME }}${{ secrets.ENVIRONMENT }}
41+
package: ./src/Publish/ContosoTraders.Api.Products
42+
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: contoso-traders-load-testing
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
KV_NAME: contosotraderskv
8+
LOAD_TEST_SERVICE_NAME: contoso-traders-loadtest
9+
RESOURCE_GROUP_NAME: contoso-traders-rg
10+
11+
jobs:
12+
load-test-carts-api:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: checkout code
16+
uses: actions/checkout@v3
17+
- name: azure login
18+
uses: azure/login@v1
19+
with:
20+
creds: ${{ secrets.SERVICEPRINCIPAL }}
21+
# extract the endpoint url of the aca app from kv
22+
- name: fetch cartsApiEndpoint
23+
uses: azure/CLI@v1
24+
id: fetch-cartsApiEndpoint
25+
with:
26+
inlineScript: echo "cartsApiEndpoint"="$(az keyvault secret show --vault-name ${{ env.KV_NAME }}${{ secrets.ENVIRONMENT }} -n cartsApiEndpoint --query "value" -o tsv)" >> $GITHUB_OUTPUT
27+
- name: load test (carts API)
28+
uses: Azure/[email protected]
29+
with:
30+
# Path of the YAML file. Should be fully qualified path or relative to the default working directory
31+
loadtestConfigFile: ./tests/loadtests/contoso-traders-carts.yaml
32+
loadtestResource: ${{ env.LOAD_TEST_SERVICE_NAME }}${{ secrets.ENVIRONMENT }}
33+
resourceGroup: ${{ env.RESOURCE_GROUP_NAME }}
34+
env: |
35+
[
36+
{
37+
"name": "domain",
38+
"value": "${{ steps.fetch-cartsApiEndpoint.outputs.cartsApiEndpoint }}"
39+
},
40+
{
41+
"name": "protocol",
42+
"value": "https"
43+
},
44+
{
45+
"name": "path",
46+
"value": "v1/ShoppingCart/loadtest"
47+
},
48+
{
49+
"name": "threads_per_engine",
50+
"value": "5"
51+
},
52+
{
53+
"name": "ramp_up_time",
54+
"value": "0"
55+
},
56+
{
57+
"name": "duration_in_sec",
58+
"value": "120"
59+
}
60+
]
61+
62+
load-test-products-api:
63+
runs-on: ubuntu-latest
64+
steps:
65+
- name: checkout code
66+
uses: actions/checkout@v3
67+
- name: azure login
68+
uses: azure/login@v1
69+
with:
70+
creds: ${{ secrets.SERVICEPRINCIPAL }}
71+
# extract the endpoint url of the aks app from kv
72+
- name: fetch productsApiEndpoint
73+
uses: azure/CLI@v1
74+
id: fetch-productsApiEndpoint
75+
with:
76+
inlineScript: echo "productsApiEndpoint"="$(az keyvault secret show --vault-name ${{ env.KV_NAME }}${{ secrets.ENVIRONMENT }} -n productsApiEndpoint --query "value" -o tsv)" >> $GITHUB_OUTPUT
77+
- name: load test (products API)
78+
uses: Azure/[email protected]
79+
with:
80+
# Path of the YAML file. Should be fully qualified path or relative to the default working directory
81+
loadtestConfigFile: ./tests/loadtests/contoso-traders-products.yaml
82+
loadtestResource: ${{ env.LOAD_TEST_SERVICE_NAME }}${{ secrets.ENVIRONMENT }}
83+
resourceGroup: ${{ env.RESOURCE_GROUP_NAME }}
84+
env: |
85+
[
86+
{
87+
"name": "domain",
88+
"value": "${{ steps.fetch-productsApiEndpoint.outputs.productsApiEndpoint }}"
89+
},
90+
{
91+
"name": "protocol",
92+
"value": "https"
93+
},
94+
{
95+
"name": "path",
96+
"value": "v1/Products/1"
97+
},
98+
{
99+
"name": "threads_per_engine",
100+
"value": "5"
101+
},
102+
{
103+
"name": "ramp_up_time",
104+
"value": "0"
105+
},
106+
{
107+
"name": "duration_in_sec",
108+
"value": "120"
109+
}
110+
]

0 commit comments

Comments
 (0)