forked from GalacticFog/gestalt-k8s-install
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-gestalt-platform
executable file
·53 lines (40 loc) · 1.08 KB
/
install-gestalt-platform
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
#!/bin/bash
. helpers/install-functions.sh
. gestalt.conf
configfile=$1
if [ -z "$configfile" ]; then
exit_with_error "Must specify a configuration file"
fi
if [ ! -f "$configfile" ]; then
exit_with_error "Configuration file '$configfile' not found, aborting."
fi
echo "Checking environment..."
# mkdir -p ./tmp
# exit_on_error "Could not create './tmp', aborting. Check filesystem permissions and try again."
check_for_required_tools
# Include configuration
. $configfile
install_prefix=${install_prefix-gestalt}
install_namespace="${install_prefix}-system"
# Environment checks
check_kubeconfig
check_for_kube
check_for_helm
check_for_existing_namespace
check_for_prior_install
# Build Helm config
. helpers/build-gestalt-config.sh
process_kubeconfig
generate_gestalt_config > gestalt-config.yaml
echo "Helm chart configuration generated."
# Prompt to continue
summarize_config
prompt_or_wait_to_continue
run_pre_install
# Perform Gestalt installation
create_namespace
run_helm_install gestalt-config.yaml
run_post_deploy
wait_for_install_completion
run_post_install
display_summary