diff --git a/sdk/python/jobs/spark/setup_spark.sh b/sdk/python/jobs/spark/setup_spark.sh index faea23617d..9b6b5d4505 100644 --- a/sdk/python/jobs/spark/setup_spark.sh +++ b/sdk/python/jobs/spark/setup_spark.sh @@ -1,6 +1,6 @@ # SUBSCRIPTION_ID=$(az account show --query id -o tsv) -LOCATION=$(az ml workspace show --query location -o tsv) +LOCATION="eastus" RESOURCE_GROUP=$(az group show --query name -o tsv) AML_WORKSPACE_NAME=$(az configure -l --query "[?name=='workspace'].value" -o tsv) API_VERSION="2022-05-01" @@ -48,13 +48,16 @@ AML_USER_MANAGED_ID_OID=$(az identity show --resource-group $RESOURCE_GROUP -n $ # if [[ "$2" == *"managed_vnet"* ]] then - TIMESTAMP=`date +%m%d%H%M%S` + TIMESTAMP=`date +%m%d%H%M` AML_WORKSPACE_NAME=${AML_WORKSPACE_NAME}-vnet-$TIMESTAMP AZURE_STORAGE_ACCOUNT=${RESOURCE_GROUP}blobvnet + DEFAULT_STORAGE_ACCOUNT="sparkdefaultvnet" BLOB_CONTAINER_NAME="blobstoragevnetcontainer" GEN2_STORAGE_ACCOUNT_NAME=${RESOURCE_GROUP}gen2vnet ADLS_CONTAINER_NAME="gen2containervnet" + az storage account create -n $DEFAULT_STORAGE_ACCOUNT -g $RESOURCE_GROUP -l $LOCATION --sku Standard_LRS + az storage account create -n $AZURE_STORAGE_ACCOUNT -g $RESOURCE_GROUP -l $LOCATION --sku Standard_LRS az storage container create -n $BLOB_CONTAINER_NAME --account-name $AZURE_STORAGE_ACCOUNT @@ -80,7 +83,8 @@ then s//$ACCESS_KEY_SECRET_NAME/g; s//$BLOB_CONTAINER_NAME/g; s//$GEN2_STORAGE_ACCOUNT_NAME/g; - s//$ADLS_CONTAINER_NAME/g;" $2 + s//$ADLS_CONTAINER_NAME/g + s//$DEFAULT_STORAGE_ACCOUNT/g;" $2 # # elif [[ "$2" == *"run_interactive_session_notebook"* ]] diff --git a/sdk/python/jobs/spark/submit_spark_standalone_jobs_managed_vnet.ipynb b/sdk/python/jobs/spark/submit_spark_standalone_jobs_managed_vnet.ipynb index cfa920dfae..eace1dce40 100644 --- a/sdk/python/jobs/spark/submit_spark_standalone_jobs_managed_vnet.ipynb +++ b/sdk/python/jobs/spark/submit_spark_standalone_jobs_managed_vnet.ipynb @@ -114,6 +114,9 @@ "region = \"\"\n", "# Enter Azure Blob storage account name for the outbound rule\n", "blob_storage_account = \"\"\n", + "default_storage_account = \"\"\n", + "\n", + "default_storage_resource_id = f\"/subscriptions/{subscription_id}/resourceGroups/{resource_group}/providers/Microsoft.Storage/storageAccounts/{default_storage_account}\"\n", "\n", "ws_mvnet = Workspace(\n", " name=ws_name,\n", @@ -121,6 +124,7 @@ " hbi_workspace=False,\n", " public_network_access=\"Disabled\", # Comment this out to enable Public Network Access\n", " tags=dict(purpose=\"demo\"),\n", + " storage_account=default_storage_resource_id,\n", ")\n", "\n", "ws_mvnet.managed_network = ManagedNetwork(\n",