-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOnboardingScript.sh
More file actions
23 lines (18 loc) · 1.3 KB
/
Copy pathOnboardingScript.sh
File metadata and controls
23 lines (18 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
export subscriptionId="eb201104-508f-440f-8c8c-2b1932127434";
export resourceGroup="RG-UCEFDEV-ZUS2-HCM-ARC";
export tenantId="2f8e97a5-0940-4b89-bbc6-ec31807101d1";
export location="eastus2";
export authType="token";
export correlationId="876f1688-d249-4c48-be2b-68306c692e6f";
export cloud="AzureCloud";
# Download the installation package
LINUX_INSTALL_SCRIPT="/tmp/install_linux_azcmagent.sh"
if [ -f "$LINUX_INSTALL_SCRIPT" ]; then rm -f "$LINUX_INSTALL_SCRIPT"; fi;
output=$(wget https://gbl.his.arc.azure.com/azcmagent-linux -O "$LINUX_INSTALL_SCRIPT" 2>&1);
if [ $? != 0 ]; then wget -qO- --method=PUT --body-data="{\"subscriptionId\":\"$subscriptionId\",\"resourceGroup\":\"$resourceGroup\",\"tenantId\":\"$tenantId\",\"location\":\"$location\",\"correlationId\":\"$correlationId\",\"authType\":\"$authType\",\"operation\":\"onboarding\",\"messageType\":\"DownloadScriptFailed\",\"message\":\"$output\"}" "https://gbl.his.arc.azure.com/log" &> /dev/null || true; fi;
echo "$output";
# Install the hybrid agent
bash "$LINUX_INSTALL_SCRIPT";
sleep 5;
# Run connect command
sudo azcmagent connect --resource-group "$resourceGroup" --tenant-id "$tenantId" --location "$location" --subscription-id "$subscriptionId" --cloud "$cloud" --tags 'ArcSQLServerExtensionDeployment=Disabled' --correlation-id "$correlationId";