-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathinitialize-rackspace-cluster.sh
More file actions
executable file
·40 lines (32 loc) · 1.1 KB
/
initialize-rackspace-cluster.sh
File metadata and controls
executable file
·40 lines (32 loc) · 1.1 KB
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
#!/usr/bin/env bash
#
# Usage: ./initialize-rackspace-cluster.sh
#
set -e
THIS_DIR=$(cd $(dirname $0); pwd) # absolute path
CONTRIB_DIR=$(dirname $THIS_DIR)
ROOT_DIR=$(dirname $CONTRIB_DIR)
source $CONTRIB_DIR/utils.sh
# check for fleetctl in $PATH
if ! which fleetctl > /dev/null; then
echo_red 'Please install fleetctl and ensure it is in your $PATH.'
echo_red 'See https://github.com/coreos/fleet for more information'
exit 1
fi
if [ -z "$FLEETCTL_TUNNEL" ]
then
echo_red 'Please set $FLEETCTL_TUNNEL.'
echo_red 'See https://github.com/coreos/fleet/blob/master/Documentation/remote-access.md'
exit 1
fi
cd $ROOT_DIR
# upload each component's systemd unit to the fleet cluster
for component in registry logger database cache controller builder router
do
pushd $component/systemd > /dev/null
fleetctl submit deis-$component.service
fleetctl start deis-$component.service
popd > /dev/null
done
echo_green "Done! Inspect the state of the services with: fleetctl list-units"
echo_green "Once all the services are running, you can register with your Deis cluster: deis register 1.2.3.4:8000"