Skip to content

Instantly share code, notes, and snippets.

Avatar

G-Man GONZALORUIZ

  • Google
  • Guildford, United Kingdom
View GitHub Profile
@GONZALORUIZ
GONZALORUIZ / acs_sp.sh
Created Aug 14, 2017
ACS Kubernetes Granular permissions
View acs_sp.sh
# 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)
@GONZALORUIZ
GONZALORUIZ / setPermissions.sh
Last active May 16, 2017
setPremissions.sh
View setPermissions.sh
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
#!/usr/bin/env bash
export JULIA_PKGDIR="/home/hadoop/.julia/"
echo "JULIA_PKGDIR=${JULIA_PKGDIR}" | tee -a /etc/environment
View configureYarn.sh
#!/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
@GONZALORUIZ
GONZALORUIZ / reinstallSparkJulia.sh
Last active May 8, 2017
Delete and Reinstall Previous Spark Julia Package
View reinstallSparkJulia.sh
#!/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
rm -rf /usr/local/julia-6445c82d00/
rm -rf /home/hadoop/.julia/
rm -rf /home/hadoop/
@GONZALORUIZ
GONZALORUIZ / installJulia.sh
Last active Jun 12, 2017
Install Julia on Azure HDInsight
View installJulia.sh
#!/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