Skip to content

Commit 459c80c

Browse files
authored
Merge branch 'Azure' into feature/enable-accumulative-editing
2 parents 1fc9d0c + cb3fba8 commit 459c80c

File tree

33 files changed

+518
-2
lines changed

33 files changed

+518
-2
lines changed

apps/acme-assist/src/main/resources/application.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ management:
1919
endpoints:
2020
web:
2121
exposure:
22-
include: info,health
22+
include: info,health

azure-spring-apps-enterprise/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1903,7 +1903,7 @@ cd apps/acme-assist
19031903
--build-env BP_JVM_VERSION=17 \
19041904
--env \
19051905
SPRING_AI_AZURE_OPENAI_ENDPOINT=${SPRING_AI_AZURE_OPENAI_ENDPOINT} \
1906-
SPRING_AI_AZURE_OPENAI_API_KEY=${SPRING_AI_AZURE_OPENAI_API_KEY}
1906+
SPRING_AI_AZURE_OPENAI_API_KEY=${SPRING_AI_AZURE_OPENAI_APIKEY}
19071907
```
19081908

19091909
1. Test the `acme-fitness` application in the browser again. Go to `ASK TO FITASSIST` and converse with the assistant, e.g.

azure-spring-apps-enterprise/workshops/azure-spring-apps-enterprise/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ There are 3 workshops that are available here:
1010

1111
- [ai](./ai/README.md) : Deploys an AI assist service component to an existing mock e-commerce polyglot application called acme-fitness. Goal of this workshop is to introduce users to Spring AI and how to work with Azure OpenAI resources.
1212

13+
- [day](./day/README.md) : Full day Azure for Spring Developers workshop. It introduces Azure Portal, Azure CLI and Azure Spring Apps Enterprise to Spring developers. They start deploying a simple Spring Hello World application. Then they look at Acme Fitness Store polyglot mock e-commerce application. Finally, they explore Azure OpenAI service and deploy AI chat component for the Acme Fitness Store polyglot application and connect it to Azure OpenAI service.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# 00 - Workshop Kickoff
2+
3+
Please check with the workshop moderator if this step has already been configured and completed for you.
4+
5+
## Create Azure Account for the workshop
6+
7+
To start the workshop, you need to have an Azure account with active subscription. If this is not provided by your company, please sign-up for a free Azure account which gives you $100 worth of free credit per month. Free account can be created by visiting [Microsoft Azure Pass](https://www.microsoftazurepass.com/)
8+
9+
As part of the workshop you will be provided a __Promo Code__ which gives $100 worth of free credits. Please make sure you enter the __Promo Code__ when you sign up for the new Azure account.
10+
11+
Once the account is created, please forward your `subscription id` to the workshop moderator. They will ensure the background processing is completed for you to go ahead and start using the subscription.
12+
13+
Subscription id can be accessed as below
14+
- Login to [Azure Portal](https://portal.azure.com)
15+
- In the search bar, type the keyword `Subscriptions`. This should pull up your subscription.
16+
![Subscriptions in Azure Portal](./images/azure-portal-subscriptions.png)
17+
- Click on the subscription link that shows up in the search results
18+
- On the result page you will find the `Subscription ID`, e.g. `00001111-aaaa-bbbb-cccc-ddddeeeeffff`
19+
20+
## Alternatively - Connect to an existing Azure Subscription
21+
22+
Check with the workshop moderator, an environment might have already been created for you. Please provide your Microsoft / Azure account so they can associate your account with an existing subscription.
23+
24+
## Next Guide
25+
26+
Next guide [01 - Azure Introduction](../01-azure-introduction/README.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
# 01 - Azure Introduction
2+
3+
In this section we will configure your Azure Subscription and Azure CLI.
4+
5+
## Login to Azure Portal
6+
7+
* Please go to [Azure Portal](https://portal.azure.com) and use your Microsoft / Azure account to login. You might need to authenticate with your phone number.
8+
9+
### Alternative 1: Using Azure Cloud Shell
10+
11+
* Select `Azure Cloud Shell` from the top navigation bar, e.g.
12+
13+
![Select Cloud Shell from Azure Portal navigation bar](./images/cloud-shell-01.png)
14+
15+
* If this is the first time you run Azure Cloud Shell, you will need to select `Bash`, e.g.
16+
17+
![Select Bash](./images/cloud-shell-02.png)
18+
19+
* Select to `Mount storage account`. Select storage account subscription from existing subscriptions, e.g.
20+
21+
![Select to mount storage account and use existing subscription](./images/cloud-shell-03.png)
22+
23+
* Select `We will create a storage account for you` if you don't want to play with unique storage account names and naming rules, e.g.
24+
25+
![Create a storage account for you](./images/cloud-shell-04.png)
26+
27+
* Finally, wait for the Azure Cloud Shell to connect. Type in `az version` to find out the version of the Azure CLI, e.g.
28+
29+
```shell
30+
az version
31+
```
32+
33+
![Azure Cloud Shell az version](./images/cloud-shell-05.png)
34+
35+
### Alternative 2: Using your desktop shell
36+
37+
* Please install [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli?view=azure-cli-latest) to your desktop.
38+
39+
* Use `az version` to check the version of Azure CLI installed, e.g.
40+
41+
```shell
42+
az version
43+
44+
{
45+
"azure-cli": "2.60.0",
46+
"azure-cli-core": "2.60.0",
47+
"azure-cli-telemetry": "1.1.0",
48+
"extensions": {
49+
"ai-examples": "0.2.5",
50+
"ml": "2.25.1",
51+
"ssh": "2.0.3"
52+
}
53+
}
54+
```
55+
56+
* Login using Azure CLI, e.g.
57+
58+
```shell
59+
az login
60+
```
61+
62+
* Follow the login instructions.
63+
64+
* Alternatively, you could use device code, e.g.
65+
66+
```shell
67+
az login --use-device-code
68+
69+
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code EJHGVJQHA to authenticate.
70+
```
71+
72+
* Follow the directions in the browser, and paste the code from the shell above, e.g.
73+
74+
![Azure CLI login using device code](./images/azure-cli-login-01.png)
75+
76+
* Feel free to close the browser window, once you login, e.g.
77+
78+
![Azure CLI login using device code](./images/azure-cli-login-02.png)
79+
80+
81+
82+
## Azure CLI
83+
84+
Please refer to [Azure CLI documentation](https://learn.microsoft.com/en-us/cli/azure/cheat-sheet-onboarding) for more details.
85+
86+
### List all your subscriptions
87+
88+
* You can use Azure CLI to list all of your subscritions and account details, e.g.
89+
90+
```shell
91+
az account list -o table
92+
```
93+
94+
### Optional: Setting up default subscription
95+
96+
* You can set the default subscription in case you have multiple subscriptions, e.g.
97+
```shell
98+
az account set --subscription 00001111-aaaa-bbbb-cccc-ddddeeeeffff
99+
```
100+
101+
## Add Spring extension
102+
103+
* From your shell environment install Azure Spring extension, e.g.
104+
105+
```shell
106+
az extension add --upgrade --name spring
107+
```
108+
109+
* Check installed extensions, e.g.
110+
111+
```
112+
az extension list -o table
113+
114+
Experimental ExtensionType Name Path Preview Version
115+
-------------- --------------- ----------- ----------------------------------------------------------------- --------- ---------
116+
False whl ai-examples /usr/lib/python3.9/site-packages/azure-cli-extensions/ai-examples True 0.2.5
117+
False whl ml /usr/lib/python3.9/site-packages/azure-cli-extensions/ml False 2.25.1
118+
False whl spring /home/neven/.azure/cliextensions/spring False 1.24.1
119+
False whl ssh /usr/lib/python3.9/site-packages/azure-cli-extensions/ssh False 2.0.3
120+
```
121+
122+
* Test the `spring` command, e.g.
123+
124+
```shell
125+
az spring --help
126+
```
127+
128+
## Create a Resource Group using Portal
129+
130+
* Click on `Resource groups` under your `Settings` in subscription, e.g.
131+
132+
![Resource groups](./images/azure-portal-resource-group-01.png)
133+
134+
* Click on `Create` to create a new resource group, e.g.
135+
136+
![Create new Resource Group](./images/azure-portal-resource-group-02.png)
137+
138+
* Select a subscription. Type in a Resource group name, which should be unique within subscription context. Select the Region as instructed by the workshop moderator.
139+
140+
![Create new Resource Group - select resource group name](./images/azure-portal-resource-group-03.png)
141+
142+
* Validate the configuration, e.g.
143+
144+
![Azure Portal Resource Group](./images/azure-portal-resource-group-04.png)
145+
146+
* Look at the `Resource groups` and search for a new resource group being created, e.g.
147+
148+
![New Resource group](./images/azure-portal-resource-group-05.png)
149+
150+
* Let's delete a resource group, e.g.
151+
152+
![New Resource group](./images/azure-portal-resource-group-06.png)
153+
154+
* Confirm the name of the resource group to be deleted, e.g.
155+
156+
![Confirm the deletion of a resource group](./images/azure-portal-resource-group-07.png)
157+
158+
159+
## Create a Resource Group using Azure CLI
160+
161+
* List all existing resource groups in the subscription, e.g.
162+
163+
```shell
164+
az group list -o table
165+
```
166+
167+
* Create a new resource group using Azure CLI, e.g.
168+
169+
```shell
170+
az group create --name my-resource-group --location westeurope
171+
```
172+
173+
* Congratulations! You have successfully created a Resource Group using both Azure Portal and Azure CLI.
174+
175+
## Next Guide
176+
177+
Next guide - [02 - Azure Spring Apps Enterprise Introduction](../02-azure-spring-apps-enterprise-introduction/README.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
# 02 - Azure Spring Apps Enterprise Introduction
2+
3+
In this lab we will explore Azure Spring Apps Enterprise (ASA-E) and create an instance we will use throughout the day.
4+
5+
## Accept Azure Spring Apps plan
6+
7+
* You need to accept the Azure Spring Apps Enterprise plan, e.g.
8+
9+
```shell
10+
az term accept --publisher vmware-inc --product azure-spring-cloud-vmware-tanzu-2 --plan asa-ent-hr-mtr
11+
```
12+
13+
* Hopefully, there are no problems with your subscription signing the terms. You should see output like this, e.g.
14+
15+
```text
16+
Command group 'term' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
17+
{
18+
"accepted": true,
19+
"id": "/subscriptions/00001111-aaaa-bbbb-cccc-ddddeeeeffff/providers/Microsoft.MarketplaceOrdering/offerTypes/Microsoft.MarketplaceOrdering/offertypes/publishers/vmware-inc/offers/azure-spring-cloud-vmware-tanzu-2/plans/asa-ent-hr-mtr/agreements/current",
20+
"licenseTextLink": "https://mpcprodsa.blob.core.windows.net/legalterms/3E5ED_legalterms_VMWARE%253a2DINC%253a24AZURE%253a2DSPRING%253a2DCLOUD%253a2DVMWARE%253a2DTANZU%253a2D2%253a24ASA%253a2DENT%253a2DHR%253a2DMTR%253a24TO3RAC3XZSHSDTP65CFZW6IPPAHH7AK67FSWSYMURETXWPUSCAVD4OLQYHA6YD5CWK4S4UAJE7VXIOTVYYJ7EJA67IXPJPVHUB2B7DY.txt",
21+
"marketplaceTermsLink": "https://mpcprodsa.blob.core.windows.net/marketplaceterms/3EDEF_marketplaceterms_SAAS%253a245XNIYDD23KXQBTPZZUVTDJNYHJZ5Y76OXRLYJ2DHP67BFUMFY42RHUG62CKSGJIAUTE2UN6MIODUJ4JBTOMEQBMWQM4VD2QGXBRTTUY.txt",
22+
"name": "asa-ent-hr-mtr",
23+
"plan": "asa-ent-hr-mtr",
24+
"privacyPolicyLink": "https://www.vmware.com/help/privacy.html",
25+
"product": "azure-spring-cloud-vmware-tanzu-2",
26+
"publisher": "vmware-inc",
27+
"retrieveDatetime": "2024-05-17T19:33:42.611828Z",
28+
"signature": "OT7T65UQENLCKBAT5465AVRDAO3IOB46AINSWT5PTBU3Z9RZ3ZBLKCFNWTRE7TLN22MOIFYR7DXOQ466D6DR4OC3NXZ56GQ4HZ4HPDY",
29+
"systemData": {
30+
"createdAt": "2024-05-17T19:33:46.875169+00:00",
31+
"createdBy": "00001111-aaaa-bbbb-cccc-ddddeeeeffff",
32+
"createdByType": "ManagedIdentity",
33+
"lastModifiedAt": "2024-05-17T19:33:46.875169+00:00",
34+
"lastModifiedBy": "00001111-aaaa-bbbb-cccc-ddddeeeeffff",
35+
"lastModifiedByType": "ManagedIdentity"
36+
},
37+
"type": "Microsoft.MarketplaceOrdering/offertypes"
38+
}
39+
```
40+
41+
## Create ASA-E Instance
42+
43+
* Let's configure environment variables for this workshop, please use corresponding workshop id, e.g. `asae-student01`
44+
45+
```shell
46+
export REGION=westeurope
47+
export SUBSCRIPTION=asae-student01
48+
export RESOURCE_GROUP=asae-student01
49+
export SPRING_APPS_SERVICE=asae-student01
50+
```
51+
52+
* Let's create a resource group for this workshop first, e.g.
53+
54+
```shell
55+
az group create \
56+
--name ${RESOURCE_GROUP} \
57+
--location ${REGION}
58+
```
59+
60+
* Let's create an instance of Azure Spring Apps Enterprise, e.g.
61+
62+
```shell
63+
az spring create \
64+
--name "${SPRING_APPS_SERVICE}" \
65+
--resource-group "${RESOURCE_GROUP}" \
66+
--location "${REGION}" \
67+
--sku enterprise \
68+
--enable-application-configuration-service \
69+
--application-configuration-service-generation Gen2 \
70+
--enable-gateway \
71+
--enable-service-registry \
72+
--enable-application-live-view \
73+
--enable-application-accelerator \
74+
--enable-api-portal \
75+
--build-pool-size S2 \
76+
--verbose
77+
```
78+
79+
* The above `az spring create` command will take 10+ minutes to complete, as we are configuring lot of components for this Azure Spring Apps Enterprise instance. You can observe the output in the shell, e.g.
80+
81+
```text
82+
- Creating Service ..
83+
Start configure Application Insights
84+
Application Insights "asae-student01" was created for this Azure Spring Apps. You can visit https://portal.azure.com/#resource/subscriptions/00001111-aaaa-bbbb-cccc-ddddeeeeffff/resourceGroups/asae-student01/providers/microsoft.insights/components/asae-student01/overview to view your Application Insights component
85+
- Creating Application Configuration Service ..
86+
Create with generation Gen2
87+
- Creating Application Live View ..
88+
- View Application Live View through Dev Tool portal. Create Dev Tool Portal by running "az spring dev-tool create --service asae-student01 --resource-group asae-student01 --assign-endpoint"
89+
- Creating Dev Tool Portal ..
90+
- Creating Service Registry ..
91+
- Creating Spring Cloud Gateway ..
92+
- Creating API portal ..
93+
- Creating Application Accelerator ..
94+
{
95+
"id": "/subscriptions/00001111-aaaa-bbbb-cccc-ddddeeeeffff/resourceGroups/asae-student01/providers/Microsoft.AppPlatform/Spring/asae-student01",
96+
"location": "westeurope",
97+
"name": "asae-student01",
98+
"properties": {
99+
"fqdn": "asae-student01.azuremicroservices.io",
100+
"infraResourceGroup": null,
101+
"maintenanceScheduleConfiguration": null,
102+
"managedEnvironmentId": null,
103+
"marketplaceResource": {
104+
"plan": "asa-ent-hr-mtr",
105+
"product": "azure-spring-cloud-vmware-tanzu-2",
106+
"publisher": "vmware-inc"
107+
},
108+
"networkProfile": {
109+
"appNetworkResourceGroup": null,
110+
"appSubnetId": null,
111+
"ingressConfig": null,
112+
"outboundIPs": {
113+
"publicIPs": [
114+
"98.64.250.101",
115+
"98.64.250.102"
116+
]
117+
},
118+
"outboundType": "loadBalancer",
119+
"requiredTraffics": null,
120+
"serviceCidr": null,
121+
"serviceRuntimeNetworkResourceGroup": null,
122+
"serviceRuntimeSubnetId": null
123+
},
124+
"powerState": "Running",
125+
"provisioningState": "Succeeded",
126+
"serviceId": "9b691e1378be429d8dd63ef79c441f08",
127+
"version": 3,
128+
"vnetAddons": null,
129+
"zoneRedundant": false
130+
},
131+
"resourceGroup": "asae-student01",
132+
"sku": {
133+
"capacity": null,
134+
"name": "E0",
135+
"tier": "Enterprise"
136+
},
137+
"systemData": {
138+
"createdAt": "2024-05-17T20:20:29.258713+00:00",
139+
"createdBy": "[email protected]",
140+
"createdByType": "User",
141+
"lastModifiedAt": "2024-05-17T20:20:29.258713+00:00",
142+
"lastModifiedBy": "[email protected]",
143+
"lastModifiedByType": "User"
144+
},
145+
"tags": null,
146+
"type": "Microsoft.AppPlatform/Spring"
147+
}
148+
Command ran in 631.394 seconds (init: 0.167, invoke: 631.227)
149+
```
150+
151+
* Please explore in [Azure portal](https://portal.azure.com) the creation of the new Azure Spring Apps Enterprise instance, e.g.
152+
153+
![Creating ASAE instance as seen in Azure Portal](./images/azure-spring-apps-enterprise-instance-01.png)
154+
155+
* Once completed, you will see the status changed to `Succeeded`, e.g.
156+
157+
![Completed ASAE instance creation as seen in Azure portal](./images/azure-spring-apps-enterprise-instance-02.png)
158+
159+
* Feel free to explore the [Azure portal](https://portal.azure.com) for the ASA-E instance you have just created.
160+
161+
## Next Guide
162+
163+
Next guide - [03 - Workshop Environment Setup](../03-setup-workshop-environment/README.md)

0 commit comments

Comments
 (0)