summaryrefslogtreecommitdiff
path: root/deploy_a_system.sh
blob: e28da5a422f80875f81b29aca6b6b3cee1bc7db9 (plain)
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
#!/bin/sh

# Script to deploy a cluster

set -e

cluster_name="$1"

definitions_dir=definitions
ybd_dir=/home/patrickdarley/ybd

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

# Make sure the btrfs module is loaded else all deploys shall be in vain
sudo modprobe btrfs

# 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" 


# Err, should probably just change he deploy script but that is tlsa's
# not mine. So will do this for now. Also assumed we wanted