blob: bfc69a6f5240fa279c51a7e8e2196dec77608a61 (
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
31
32
33
34
35
36
37
38
39
40
41
|
#!/bin/sh
# Script to deploy a cluster
set -ex
cluster_name="$1"
definitions_dir=$(pwd)/definitions
ybd_dir=$(pwd)/ybd
# Can only deploy with a single instance of ybd. Crashes
# with >1
sudo sed -i '/^instances: /c\instances: 1' "$ybd_dir"/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"
# Remove built system artifacts, tar and .unpacked
# They are bloat and not needed after the deploy As they have
# the image is made and has been archived. Future systems are
# to be different as that is the whole point.
# remove .morph clustername
cluster=$cluster_name
# Search for the dir that has this name in /src/artifacts/^^^
# Use this to remove the dir that contains the artifacts
#sudo rm -r
|