-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.sh
62 lines (44 loc) · 1.81 KB
/
playbook.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
WORK_DIR=$(pwd)
# Start/Create Kubernetes Cluster
# minikube start
# Set minikube context
# kubectl config use-context minikube
# Get Cluster IP
# kubectl get services
# Add/Delete Kubernetes Cluster Custom Route (CIDR clsuter network)
# sudo route -n add 10.96.0.0/16 192.168.99.100
# sudo route -n delete 10.96.0.0/16 192.168.99.100
# Use Minikube Docker Daemon
# eval $(minikube docker-env)
# Build Openmpi Docker Image
# docker build . -t tsimchev/openmpi:latest
# Generate SSH Key
# ssh-keygen -f ${WORK_DIR}/id_rsa -C '' -N '' -t rsa
# Create Kubernetes Secret
# kubectl create secret generic openmpi-id-rsa --from-file=id_rsa=${WORK_DIR}/id_rsa --from-file=id_rsa.pub=${WORK_DIR}/id_rsa.pub
# Delete Kubernetes Secret
# kubectl delete secret generic openmpi-id-rsa
# Create Deployment and Service
# kubectl create -f ./openmpi.yml
# Destroy Deployment and Service
# kubectl delete -f ./openmpi.yml
# Describe Pod
# kubectl describe pod openmpi-node-68cb79474f-gkh75
# Navigate to container
# kubectl exec -it openmpi-node-68cb79474f-hjw72 -- /bin/bash
# Generate SSH key
# ssh-keygen -f /etc/ssh/id_rsa -C '' -N '' -t rsa
# Build locally
# docker build openmpi-base -t tsimchev/openmpi-base:latest
# docker build openmpi-cluster -t tsimchev/openmpi-cluster:latest
# docker build openmpi-cluster-app -t tsimchev/openmpi-cluster-app:latest
# Build GKE
# gcloud config set project massive-sandbox-235519
# gcloud builds submit --timeout=2h --tag gcr.io/massive-sandbox-235519/openmpi-base ~/Desktop/openmpi/tmp/openmpi-base
# gcloud builds submit --timeout=2h --tag gcr.io/massive-sandbox-235519/openmpi-cluster ~/Desktop/openmpi/tmp/openmpi-cluster
# Run Intel MPI Bench Marks
# for BM in $(ls -1 ~/mpi-benchmarks/ | grep IMB-)
# do
# mpirun --hostfile ~/mpi.hosts -n 3 ~/mpi-benchmarks/${BM} | tee ${BM}.log
# done