forked from percona/percona-everest-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·42 lines (34 loc) · 1.38 KB
/
install.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
#!/bin/bash
if ! command -v curl &> /dev/null
then
echo "curl command not found. Please install it."
exit
fi
if ! command -v kubectl &> /dev/null
then
echo "kubectl command not found. Please install it."
exit
fi
os=$(uname -s | tr '[:upper:]' '[:lower:]')
arch=$(uname -m | tr '[:upper:]' '[:lower:]')
if [[ ($os == "linux" || $os == "darwin") && $arch == "x86_64" ]]
then
arch="amd64"
fi
echo "Downloading the latest release of Percona Everest CLI"
echo "https://github.com/percona/percona-everest-cli/releases/download/latest/everestctl-$os-$arch"
curl -sL https://github.com/percona/percona-everest-cli/releases/download/latest/everestctl-$os-$arch -o everestctl
chmod +x everestctl
# If KUBECONFIG is set let the user know we are using it
if [[ -n "${KUBECONFIG}" ]]; then
echo "Using KUBECONFIG: ${KUBECONFIG}"
else
echo "KUBECONFIG is not set. Using default k8s cluster"
fi
echo "Provisioning Everest with monitoring disabled"
echo "If you want to enable monitoring please refer to the everest installation documentation."
echo ""
./everestctl install --operator.mongodb=true --operator.postgresql=true --operator.xtradb-cluster=true --skip-wizard
echo "Your provisioned Everest instance will be available at http://127.0.0.1:8080"
echo "Exposing Everest using kubectl port-forwarding. You can expose it manually"
kubectl port-forward -n percona-everest deployment/percona-everest 8080:8080