Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Commit 0fbdbf5

Browse files
authored
Fix Openhack Deployments (#306)
* remove duplicate login logic * fix tenantId logic * Remove labdeploy template
1 parent 3af0fc2 commit 0fbdbf5

File tree

4 files changed

+5
-211
lines changed

4 files changed

+5
-211
lines changed

provision-team/setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ echo "=========================================="
141141
echo "Username: $azureUserName"
142142
echo "Password: $azurePassword"
143143

144-
if [[ -z "$tenantId" ]]; then
144+
if [[ "$tenantId" == "noSP" ]]; then
145145
echo "Command will be az login --username=$azureUserName --password=$azurePassword"
146146
az login --username=$azureUserName --password=$azurePassword
147147
else

provision-vm/Docker/startup.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,5 @@ echo 'export KVSTORE_DIR=/home/azureuser/team_env/kvstore' >> /home/azureuser/.b
2626

2727
cd /home/azureuser/openhack-devops-proctor/provision-team
2828

29-
# Running the provisioning of the team environment
30-
31-
if [[ -z "$TENANTID" ]]; then
32-
az login --username=$AZUREUSERNAME --password=$AZUREPASSWORD
33-
else
34-
az login --service-principal --username=$AZUREUSERNAME --password=$AZUREPASSWORD --tenant=$TENANTID
35-
fi
36-
3729
# Launching the team provisioning in background
3830
PATH=$PATH:/opt/mssql-tools/bin KVSTORE_DIR=/home/azureuser/team_env/kvstore ./setup.sh -i $SUBID -l $LOCATION -n $TEAMNAME -u "$AZUREUSERNAME" -p "$AZUREPASSWORD" -r "$RECIPIENTEMAIL" -c "$CHATCONNECTIONSTRING" -q "$CHATMESSAGEQUEUE" -t "$TENANTID" -a "$APPID" 2>&1 | tee -a /home/azureuser/logs/teamdeploy.out

provision-vm/azuredeploy.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,28 @@
44
"parameters": {
55
"spUserName": {
66
"type": "string",
7+
"defaultValue": "",
78
"metadata": {
89
"description": "Username for the service principal account."
910
}
1011
},
1112
"spPassword": {
1213
"type": "string",
14+
"defaultValue": "",
1315
"metadata": {
1416
"description": "Password for the service principal account."
1517
}
1618
},
1719
"spTenant": {
1820
"type": "string",
21+
"defaultValue": "noSP",
1922
"metadata": {
2023
"description": "Tenant ID of the service principal account."
2124
}
2225
},
2326
"spAppId": {
2427
"type": "string",
28+
"defaultValue": "",
2529
"metadata": {
2630
"description": "Application ID of the service principal account."
2731
}

provision-vm/labdeploy.json

Lines changed: 0 additions & 202 deletions
This file was deleted.

0 commit comments

Comments
 (0)