-
Notifications
You must be signed in to change notification settings - Fork 3
/
start.sh
49 lines (41 loc) · 1.27 KB
/
start.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
#! /bin/bash
# control usage
if [[ ! -f config.sh ]]; then
echo "you need to prepare the config.sh file first"
echo " => open config.sh in the editor of your choice"
echo " report to the project README.md for instructions"
cp templates/template.config.sh config.sh
cp templates/template.synced_folders.yml synced_folders.yml
exit 1
fi
echo "Control ssh key"
if [[ ! -f id_rsa ]]; then
echo "you need to an ssh key"
echo " - add id_rsa to the main folder"
exit 1
fi
chmod 600 id_rsa
# controlling master or node
. ./config.sh
if [[ $etcd_cluster_ip == "" ]];then
echo "Will start as master"
else
echo "Will start as node"
fi
echo "Prepare folders"
mkdir -p auto_generated
rm -rf auto_generated/*
echo "Prepare config for different services"
./bootstrap_scripts/prepare_config_files.sh
echo -e "Configuration is finished\n\n"
echo "Launch Vagrant"
vagrant destroy -f \
&& vagrant up \
&& echo "Vagrant is up" \
&& echo "Will proceed to some async download now :" \
&& echo " - flannel | 7 Mb)" \
&& echo " - kubectl | 20 Mb)" \
&& echo " - kubernetes | 220 Mb)" \
&& echo " " \
&& echo "Automatically ssh you in your CoreOS VM" \
&& ./ssh_coreos.sh