View acs_sp.sh
This file contains 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
# env name = lower case, no spaces, | |
ENV_NAME=YOUR_ENVNAME | |
LOCATION=YOUR_LOCATION | |
# create resource group | |
az group create -n "${ENV_NAME}" -l "${LOCATION}" | |
RG_ID=$(az group show -n "${ENV_NAME}" --query id -o tsv) | |
# create service principal | |
SP_PWD=$(az ad sp create-for-rbac --name "${ENV_NAME}" --skip-assignment --query password -o tsv) |
View setPermissions.sh
This file contains 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 JULIA_PKGDIR="/home/hadoop/.julia/" | |
declare -a users=("jlssh01" "spark" "yarn" "hadoop") | |
for usr in "${users[@]}"; do | |
setfacl -m -R u:${usr}:rwx "${JULIA_PKGDIR}v0.5" | |
done | |
export JULIA_HOME="/usr/local/julia-6445c82d00" | |
$JULIA_HOME/bin/julia -e 'Pkg.Add("IJulia")' |
View setenv.sh
This file contains 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
#!/usr/bin/env bash | |
export JULIA_PKGDIR="/home/hadoop/.julia/" | |
echo "JULIA_PKGDIR=${JULIA_PKGDIR}" | tee -a /etc/environment |
View configureYarn.sh
This file contains 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
#!/usr/bin/env bash | |
# install julia | |
JULIA_HOME=/usr/local/julia-6445c82d00 | |
# install maven | |
export M2_HOME=/usr/local/apache-maven-3.2.2 | |
export PATH=$M2_HOME/bin:$PATH | |
# Create Directories |
View reinstallSparkJulia.sh
This file contains 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
#!/usr/bin/env bash | |
# install julia | |
JULIA_HOME=/usr/local/julia-6445c82d00 | |
# maven | |
export M2_HOME=/usr/local/apache-maven-3.2.2 | |
export PATH=$M2_HOME/bin:$PATH | |
# Clean and Create Directories |
View cleanJulia.sh
This file contains 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
rm -rf /usr/local/julia-6445c82d00/ | |
rm -rf /home/hadoop/.julia/ | |
rm -rf /home/hadoop/ |
View installJulia.sh
This file contains 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
#!/usr/bin/env bash | |
# install julia | |
curl -s https://julialang.s3.amazonaws.com/bin/linux/x64/0.5/julia-0.5.1-linux-x86_64.tar.gz | sudo tar -xz -C /usr/local/ | |
JULIA_HOME=/usr/local/julia-6445c82d00 | |
# install maven | |
curl -s http://mirror.olnevhost.net/pub/apache/maven/binaries/apache-maven-3.2.2-bin.tar.gz | sudo tar -xz -C /usr/local/ | |
export M2_HOME=/usr/local/apache-maven-3.2.2 | |
export PATH=$M2_HOME/bin:$PATH |