Merge pull request #2 from microsoft/master

merge from master
This commit is contained in:
Melony QIN
2020-08-14 00:36:39 +01:00
committed by GitHub
2 changed files with 33 additions and 22 deletions
@@ -1,26 +1,5 @@
#!/bin/bash
# Get controller username and password as input. It is used as default for the controller.
#
if [ -z "$AZDATA_USERNAME" ]
then
read -p "Create Username for Azure Arc Data Controller: " username
echo
export AZDATA_USERNAME=$username
fi
if [ -z "$AZDATA_PASSWORD" ]
then
while true; do
read -s -p "Create Password for Azure Arc Data Controller: " password
echo
read -s -p "Confirm your Password: " password2
echo
[ "$password" = "$password2" ] && break
echo "Password mismatch. Please try again."
done
export AZDATA_PASSWORD=$password
fi
# Prompt for private preview repository username and password provided by Microsoft
#
if [ -z "$DOCKER_USERNAME" ]
@@ -67,6 +46,27 @@ then
export ARC_DC_REGION=$dc_region
fi
# Get controller username and password as input. It is used as default for the controller.
#
if [ -z "$AZDATA_USERNAME" ]
then
read -p "Create Username for Azure Arc Data Controller: " username
echo
export AZDATA_USERNAME=$username
fi
if [ -z "$AZDATA_PASSWORD" ]
then
while true; do
read -s -p "Create Password for Azure Arc Data Controller: " password
echo
read -s -p "Confirm your Password: " password2
echo
[ "$password" = "$password2" ] && break
echo "Password mismatch. Please try again."
done
export AZDATA_PASSWORD=$password
fi
set -Eeuo pipefail
# This is a script to create single-node Kubernetes cluster and deploy Azure Arc Data Controller on it.
@@ -106,9 +106,20 @@
"The following code can be used to install packages on each executor node at runtime. \\\n",
"**Note**: This functionality is not available on a non-root BDC deployment (including OpenShift). This installation is temporary, and must be performed each time a new Spark session is invoked.\n",
"\n",
"If you want to use this from CU5 upwards, you must add two settings pre-deployment.\n",
"\n",
"In contron.json, add (under security):\n",
"\n",
"_\"allowRunAsRoot\": true_\n",
"\n",
"In BDC.json, add (under spec.services.spark.settings): \n",
"\n",
"_\"yarn-site.yarn.nodemanager.container-executor.class\": \"org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor\"_\n",
"\n",
"``` Python\n",
"import subprocess\n",
"\n",
"import os\n",
"os.environ[\"XDG_CACHE_HOME\"]=\"/tmp\"\n",
"# Install TensorFlow\n",
"stdout = subprocess.check_output(\n",
" \"pip3 install tensorflow\",\n",