This file contains hidden or 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
docker run -it \ | |
-v $(pwd):/spark \ | |
-v /c/path/to/.m2:/root/.m2 \ | |
-v /c/path/to/.sbt:/root/.sbt \ | |
-v /c/path/to/.ivy2:/root/.ivy2 \ | |
-w /spark \ | |
--network host \ | |
openjdk:8 bash |
This file contains hidden or 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
# Thanks to: https://forums.docker.com/t/accessing-host-machine-from-within-docker-container/14248/10 | |
docker run --network host \ | |
--rm \ | |
openjdk:8 bash -c "apt update; apt install net-tools; route | awk '/^default/ { print \$2 }' | grep -v 0.0.0.0" |
This file contains hidden or 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
#!/bin/bash | |
# from: https://docs.aws.amazon.com/eks/latest/userguide/getting-started-eksctl.html | |
# download and extract the latest version of eksctl (including prerelease) | |
# from: https://gist.github.com/steinwaywhw/a4cd19cda655b8249d908261a62687f8 | |
LATEST_EKSCTL=`curl -s https://api.github.com/repos/weaveworks/eksctl/releases | | |
jq ".[0].assets | map(select(.name == \"eksctl_Linux_amd64.tar.gz\")) | .[0].browser_download_url" | | |
tr -d '"'` |
This file contains hidden or 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
#!/bin/bash | |
# from: https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html | |
BUCKET=amazon-eks | |
LATEST_KUBECTL_VERSION=`aws s3 ls s3://$BUCKET/ | | |
grep --invert-match "cloudformation\|manifests" | | |
awk '{print $2}' | | |
cut -d/ -f 1 | |
This file contains hidden or 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
#!/bin/bash | |
# from https://unix.stackexchange.com/questions/69314/automated-ssh-keygen-without-passphrase-how | |
cat /dev/zero | | |
ssh-keygen -q -N "" |
This file contains hidden or 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
apiVersion: eksctl.io/v1alpha5 | |
kind: ClusterConfig | |
metadata: | |
name: dev | |
region: ap-southeast-1 | |
nodeGroups: | |
- name: ng-1 | |
availabilityZones: ["ap-southeast-1a"] |
This file contains hidden or 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
#!/bin/bash | |
# based on https://www.kubeflow.org/docs/aws/deploy/install-kubeflow/ | |
# install the the latest kfctl | |
LATEST_KFCTL=`curl -s https://api.github.com/repos/kubeflow/kfctl/releases | | |
jq ".[0].assets | map(select(.name | contains(\"linux\"))) | .[0].browser_download_url" | | |
tr -d '"'` | |
echo "Downloading kfctl from" $LATEST_KFCTL |
This file contains hidden or 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
#!/bin/bash | |
# from https://docs.aws.amazon.com/eks/latest/userguide/install-aws-iam-authenticator.html | |
BUCKET=amazon-eks | |
VERSION=`aws s3 ls s3://$BUCKET/ | | |
grep --invert-match "cloudformation\|manifests" | | |
awk '{print $2}' | | |
cut -d/ -f 1 | |
This file contains hidden or 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
#!/bin/bash | |
export AWS_DEFAULT_REGION=ap-southeast-1 | |
export EDITOR="code-insiders --wait" | |
source activate python3 | |
pip install --upgrade awscli |
This file contains hidden or 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
kubectl create deployment --image=jupyter/tensorflow-notebook:latest jupyter |