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 | |
# delete the jupyter deployment | |
kubectl delete -f /tmp/deploy.yaml | |
# delete the FSx filesystems | |
kubectl delete -f /tmp/claim.yaml | |
kubectl delete -f /tmp/claim-kf.yaml | |
kubectl delete -f /tmp/storage-class.yaml | |
kubectl delete -k github.com/kubernetes-sigs/aws-fsx-csi-driver/deploy/kubernetes/overlays/stable/?ref=master |
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: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: fsx-claim-kf | |
namespace: anonymous | |
spec: | |
accessModes: | |
- ReadWriteMany | |
storageClassName: fsx-sc | |
resources: |
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: apps/v1 | |
kind: Deployment | |
metadata: | |
creationTimestamp: null | |
labels: | |
app: jupyter | |
name: jupyter | |
spec: | |
replicas: 1 | |
selector: |
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 --dry-run -o yaml > /tmp/deploy.yaml | |
code-insiders /tmp/deploy.yaml | |
kubectl apply -f /tmp/deploy.yaml |
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://aws.amazon.com/blogs/opensource/using-fsx-lustre-csi-driver-amazon-eks/ | |
# and | |
# from https://github.com/kubernetes-sigs/aws-fsx-csi-driver | |
pushd /tmp | |
# create an IAM policy to allow FSx use | |
cat >policy.json <<EOF | |
{ |
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 |
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
#!/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 | |
# 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
apiVersion: eksctl.io/v1alpha5 | |
kind: ClusterConfig | |
metadata: | |
name: dev | |
region: ap-southeast-1 | |
nodeGroups: | |
- name: ng-1 | |
availabilityZones: ["ap-southeast-1a"] |