forked from coreos/coreos-vagrant
-
Notifications
You must be signed in to change notification settings - Fork 9
/
start.sh
executable file
·79 lines (64 loc) · 3.03 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
COREOS_MEMORY=${COREOS_MEMORY:-2048}
COREOS_CPUS=${COREOS_CPUS:-1}
COREOS_CHANNEL=${COREOS_CHANNEL:-alpha}
NUM_INSTANCES=${NUM_INSTANCES:-3}
ENABLE_KUBERNETES=${ENABLE_KUBERNETES:-true}
ENABLE_PANAMAX=${ENABLE_PANAMAX:-false}
ENABLE_LIBSWARM=${ENABLE_LIBSWARM:-false}
ENABLE_KIBANA=${ENABLE_KIBANA:-false}
ENABLE_ELASTICSEARCH=${ENABLE_ELASTICSEARCH:-false}
ENABLE_LOGSTASH=${ENABLE_LOGSTASH:-false}
ENABLE_DEIS=${ENABLE_DEIS:-false}
ENABLE_ZOOKEEPER=${ENABLE_ZOOKEEPER:-false}
ENABLE_INFLUXDB=${ENABLE_INFLUXDB:-false}
ENABLE_CADVISOR=${ENABLE_CADVISOR:-false}
ENABLE_GRAFANA=${ENABLE_GRAFANA:-false}
ENABLE_HEAPSTER=${ENABLE_HEAPSTER:-false}
ENABLE_GALERA=${ENABLE_GALERA:-false}
# Dependent services
[ "${ENABLE_PANAMAX}" = "true" ] && ENABLE_LIBSWARM=true
[ "${ENABLE_KIBANA}" = "true" ] && ENABLE_ELASTICSEARCH=true
[ "${ENABLE_KIBANA}" = "true" ] && ENABLE_LOGSTASH=true
[ "${ENABLE_HEAPSTER}" = "true" ] && ENABLE_GRAFANA=true
[ "${ENABLE_GRAFANA}" = "true" ] && ENABLE_CADVISOR=true
[ "${ENABLE_GRAFANA}" = "true" ] && ENABLE_ELASTICSEARCH=true
[ "${ENABLE_CADVISOR}" = "true" ] && ENABLE_INFLUXDB=true
export COREOS_MEMORY COREOS_CPUS COREOS_CHANNEL NUM_INSTANCES
set -e
which vagrant || (
echo "Vagrant is required for this project"
false
)
(
cat user-data.sample
cat cloud-init/flannel.unit
[ "$ENABLE_LIBSWARM" = "true" ] && cat cloud-init/libswarm.unit
[ "$ENABLE_KUBERNETES" = "true" ] && cat cloud-init/kubernetes.unit
[ "$ENABLE_ELASTICSEARCH" = "true" ] && cat cloud-init/elasticsearch.unit
[ "$ENABLE_LOGSTASH" = "true" ] && cat cloud-init/logstash.unit
[ "$ENABLE_KIBANA" = "true" ] && cat cloud-init/kibana.unit
[ "$ENABLE_PANAMAX" = "true" ] && cat cloud-init/panamax.unit
[ "$ENABLE_DEIS" = "true" ] && cat cloud-init/deis.unit
[ "$ENABLE_ZOOKEEPER" = "true" ] && cat cloud-init/zookeeper.unit
[ "$ENABLE_INFLUXDB" = "true" ] && cat cloud-init/influxdb.unit
[ "$ENABLE_CADVISOR" = "true" ] && cat cloud-init/cadvisor.unit
[ "$ENABLE_GRAFANA" = "true" ] && cat cloud-init/grafana.unit
[ "$ENABLE_HEAPSTER" = "true" ] && cat cloud-init/heapster.unit
[ "$ENABLE_GALERA" = "true" ] && cat cloud-init/galera.unit
echo "write_files:"
[ "$ENABLE_KUBERNETES" = "true" ] && cat cloud-init/kubernetes.write_file
[ "$ENABLE_ELASTICSEARCH" = "true" ] && cat cloud-init/elasticsearch.write_file
[ "$ENABLE_LOGSTASH" = "true" ] && cat cloud-init/logstash.write_file
[ "$ENABLE_KIBANA" = "true" ] && cat cloud-init/kibana.write_file
[ "$ENABLE_PANAMAX" = "true" ] && cat cloud-init/panamax.write_file
[ "$ENABLE_DEIS" = "true" ] && cat cloud-init/deis.write_file
[ "$ENABLE_ZOOKEEPER" = "true" ] && cat cloud-init/zookeeper.write_file
[ "$ENABLE_INFLUXDB" = "true" ] && cat cloud-init/influxdb.write_file
[ "$ENABLE_CADVISOR" = "true" ] && cat cloud-init/cadvisor.write_file
[ "$ENABLE_GRAFANA" = "true" ] && cat cloud-init/grafana.write_file
[ "$ENABLE_HEAPSTER" = "true" ] && cat cloud-init/heapster.write_file
[ "$ENABLE_GALERA" = "true" ] && cat cloud-init/galera.write_file
true
) > user-data
vagrant up