Created
March 5, 2025 00:33
-
-
Save dmauser/4b9d7c38af19d2a741c358f025ce2b8e to your computer and use it in GitHub Desktop.
onboard-arc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export subscriptionId="96799577-30b5-4a07-b0d3-ca5b40c5c05d"; | |
| export resourceGroup="arc-lab"; | |
| export tenantId="b1fa3d67-2da0-44d9-84f5-6bb580bd1d15"; | |
| export location="northcentralus"; | |
| export authType="token"; | |
| export correlationId="5f7d1872-3bb4-4445-8eab-53d15747ce09"; | |
| export cloud="AzureCloud"; | |
| 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"; | |
| bash "$LINUX_INSTALL_SCRIPT"; | |
| sudo azcmagent connect --resource-group "$resourceGroup" --tenant-id "$tenantId" --location "$location" --subscription-id "$subscriptionId" --cloud "$cloud" --tags 'ArcSQLServerExtensionDeployment=Disabled' --correlation-id "$correlationId"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment