Skip to content

Instantly share code, notes, and snippets.

View GONZALORUIZ's full-sized avatar

G-Man GONZALORUIZ

  • Google
  • Guildford, United Kingdom
View GitHub Profile
@GONZALORUIZ
GONZALORUIZ / acs_sp.sh
Created August 14, 2017 15:06
ACS Kubernetes Granular permissions
# 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 14:37
setPremissions.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")'
#!/usr/bin/env bash
export JULIA_PKGDIR="/home/hadoop/.julia/"
echo "JULIA_PKGDIR=${JULIA_PKGDIR}" | tee -a /etc/environment
#!/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 13:24
Delete and Reinstall Previous Spark Julia Package
#!/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
@GONZALORUIZ
GONZALORUIZ / cleanJulia.sh
Last active May 16, 2017 20:10
Clean Julia
rm -rf /usr/local/julia-6445c82d00/
rm -rf /home/hadoop/.julia/
rm -rf /home/hadoop/
@GONZALORUIZ
GONZALORUIZ / installJulia.sh
Last active June 12, 2017 12:23
Install Julia on Azure HDInsight
#!/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