summaryrefslogtreecommitdiff
path: root/deploy_a_system.sh
blob: ef99ce9f1c68e50d75546eee9b2666b9d2c1cc9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

# Script to deploy a cluster

cluster_name="$1"

definitions_dir=/home/patrickdarley/definitions
ybd_dir=/home/patrickdarley/ybd

# Can only deploy with a single instance of ybd. Crashes
# with >1
sed -i '/^instances: /c\instances: 1' /home/patrickdarley/ybd/config/ybd.conf

# try changing to the definitions dir then building
# ybd seems to set the "target" to be current dir, regardless
# Of it being definitions or not

cd "$definitions_dir"

sudo "$ybd_dir"/ybd.py clusters/"$cluster_name"