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 python | |
import boto3 | |
import datetime | |
import time | |
ENABLED_REGIONS = [ | |
"us-east-1", | |
"us-west-2", | |
"eu-west-1", | |
"eu-central-1", |
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 PREFIX=<your-prefix>- | |
export KMS_KEY_ID=<kms-key-id> | |
export ROOT_KEY=<vault-root-token> | |
export UNSEAL0=<vault-unseal-key-1> | |
export UNSEAL1=<vault-unseal-key-2> | |
export UNSEAL2=<vault-unseal-key-3> | |
export UNSEAL3=<vault-unseal-key-4> | |
export UNSEAL4=<vault-unseal-key-5> | |
mkdir -p /tmp/vault |
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
{ | |
"CN": "server.dc1.cluster.local", | |
"hosts": [ | |
"server.dc1.cluster.local", | |
"127.0.0.1", | |
"consul.default.svc.cluster.local", | |
"vault.default.svc.cluster.local" | |
], | |
"key": { | |
"algo": "rsa", |
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
# Default values for vault. | |
# This is a YAML-formatted file. | |
# Declare variables to be passed into your templates. | |
replicaCount: 3 | |
image: | |
repository: vault | |
tag: 0.9.3 | |
pullPolicy: IfNotPresent | |
service: | |
name: vault |
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
# This script is built on kops bootstrap | |
# https://github.com/dcwangmit01/kops/blob/ef958a7f870eb3dc20981617859b8ad69057bb2a/hooks/nvidia-bootstrap/image/run.sh | |
mkdir nvidia | |
cd nvidia | |
# Get the NVIDIA driver | |
wget http://us.download.nvidia.com/tesla/390.46/NVIDIA-Linux-x86_64-390.46.run | |
chmod a+x NVIDIA-Linux-x86_64-390.46.run |
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
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \ | |
apt-key add - | |
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) | |
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \ | |
sudo tee /etc/apt/sources.list.d/nvidia-docker.list | |
apt-get update && sudo apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ |
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
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: gpu-pod | |
spec: | |
containers: | |
- name: cuda-container | |
image: nvidia/cuda:9.0-devel | |
resources: | |
limits: |
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
apiVersion: kops/v1alpha2 | |
kind: InstanceGroup | |
metadata: | |
labels: | |
name: p3.2xlarge | |
spec: | |
image: My-k8s-1.9-debian-stretch-2018-05-03 | |
kubelet: | |
featureGates: | |
DevicePlugins: "true" |
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
apiVersion: extensions/v1beta1 | |
kind: DaemonSet | |
metadata: | |
name: nvidia-device-plugin-daemonset | |
namespace: kube-system | |
spec: | |
template: | |
metadata: | |
# Mark this pod as a critical add-on; when enabled, the critical add-on scheduler | |
# reserves resources for critical add-on pods so that they can be rescheduled after |