-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy path2-create-infra-via-ARM.sh
48 lines (42 loc) · 1.56 KB
/
2-create-infra-via-ARM.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
source ./0-variables.sh
az group create \
--name "${rg_name}" \
--location "${location}"
#
# Now that the service principal exists, we launch an ARM template to create
# SQL Server, SQL Database, KeyVault and Azure Container Registry
#
az group deployment create \
--resource-group "${rg_name}" \
--template-file azuredeploy-0.json \
--parameters \
"{\
\"prefix\": { \"value\": \"${prefix}\" }, \
\"servicePrincipalObjectID\": { \"value\": \"${service_principal_object_id}\" }, \
\"servicePrincipalClientSecret\": { \"value\": \"${service_principal_pass}\" }, \
\"sqlPassword\": { \"value\": \"${sql_password}\" }, \
\"githubPersonalAccessToken\": { \"value\": \"${github}\" }, \
\"githubRepositoryUrl\": { \"value\": \"https://github.com/chgeuer/spring_boot_aad_kv.git\" } \
}"
#
# Build the Docker image in the registry
#
az acr task run \
--registry "${acr_name}" \
--name "${acr_build_task_name}"
#
# Now that the Docker image is ready to use, we can trigger the compute node creation.
#
az group deployment create \
--resource-group "${rg_name}" \
--template-file azuredeploy-1.json \
--parameters "\
{ \
\"prefix\": { \"value\": \"${prefix}\" }, \
\"servicePrincipalApplicationID\": { \"value\": \"${service_principal_application_id}\" }, \
\"servicePrincipalClientSecret\": { \"value\": \"${service_principal_pass}\" }, \
\"githubPersonalAccessToken\": { \"value\": \"${github}\" }, \
\"githubRepositoryUrl\": { \"value\": \"https://github.com/chgeuer/spring_boot_aad_kv.git\" } \
} \
"