forked from cyberark/kubernetes-conjur-deploy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart
executable file
·44 lines (33 loc) · 1.11 KB
/
start
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
#!/bin/bash
set -euo pipefail
# XXX: Prevents `set -u` from breaking out of the checks if this
# variable is not defined
export DEPLOY_MASTER_CLUSTER="${DEPLOY_MASTER_CLUSTER:-false}"
export FOLLOWER_SEED="${FOLLOWER_SEED:-}"
STOP_RUNNING_ENV="${STOP_RUNNING_ENV:-true}"
if [[ $PLATFORM == openshift ]]; then
export OPENSHIFT_USERNAME="${OPENSHIFT_USERNAME:-$OSHIFT_CLUSTER_ADMIN_USERNAME}"
oc login -u $OPENSHIFT_USERNAME
fi
./0_check_dependencies.sh
if [[ "${STOP_RUNNING_ENV}" = "true" ]]; then
echo "Environment variable STOP_RUNNING_ENV is set to 'true', stopping running env"
./stop
fi
./1_prepare_conjur_namespace.sh
./2_prepare_docker_images.sh
if [[ "${DEPLOY_MASTER_CLUSTER}" = "true" ]]; then
./3_deploy_conjur_master_cluster.sh
fi
./4_deploy_conjur_followers.sh
if [[ "${DEPLOY_MASTER_CLUSTER}" = "true" ]]; then
./5_create_load_balancer.sh
./6_configure_master.sh
./7_configure_standbys.sh
fi
if [[ -f "${FOLLOWER_SEED}" ]] || [[ "${DEPLOY_MASTER_CLUSTER}" = "true" ]]; then
./8_configure_followers.sh
fi
if [[ "${DEPLOY_MASTER_CLUSTER}" = "true" ]]; then
./9_print_cluster_info.sh
fi