-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·83 lines (70 loc) · 3.45 KB
/
install.sh
File metadata and controls
executable file
·83 lines (70 loc) · 3.45 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
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
79
80
81
82
83
#!/usr/bin/env bash
set -eo pipefail
shopt -s expand_aliases
if [[ -z "${PLATFORM_DOMAIN}" ]] ; then
echo -e "\\033[31m---> Please set the PLATFORM_DOMAIN variable.\\033[0m"
echo -e "\\033[31m---> For example:\\033[0m"
echo -e "\\033[31m---> export PLATFORM_DOMAIN=drycc.cc\\033[0m"
echo -e "\\033[31m---> And confirm that wildcard domain name resolution has been set.\\033[0m"
echo -e "\\033[31m---> For example, the current server IP is 8.8.8.8\\033[0m"
echo -e "\\033[31m---> Please point *.drycc.cc to 8.8.8.8\\033[0m"
exit 1
fi
function clean_before_exit {
# delay before exiting, so stdout/stderr flushes through the logging system
rm -rf helm-broker
sleep 3
}
trap clean_before_exit EXIT
if [[ "${INSTALL_K3S_MIRROR}"=="cn" ]] ; then
k3s_install_url="http://rancher-mirror.cnrancher.com/k3s/k3s-install.sh"
else
k3s_install_url="https://get.k3s.io"
fi
if [[ -z "${K3S_URL}" ]] ; then
INSTALL_K3S_EXEC="server --no-flannel --cluster-cidr=10.233.0.0/16"
else
INSTALL_K3S_EXEC="agent --no-flannel"
fi
export INSTALL_K3S_EXEC='--no-flannel'
alias install-k3s="curl -sfL "${k3s_install_url}" | sh - $@"
install-k3s
curl -sfL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash -
helm repo add cilium https://helm.cilium.io/
helm repo add longhorn https://charts.longhorn.io
helm repo add jetstack https://charts.jetstack.io
helm repo add svc-cat https://kubernetes-sigs.github.io/service-catalog
helm repo add drycc https://charts.drycc.cc/${CHANNEL:-stable}
helm repo update
git clone --dept 1 https://github.com/kyma-project/helm-broker
helm install cilium --set operator.replicas=1 cilium/cilium --namespace kube-system
helm install longhorn --create-namespace --set persistence.defaultClass=false --set persistence.defaultClassReplicaCount=1 longhorn/longhorn --namespace longhorn-system
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --set installCRDs=true
helm install catalog svc-cat/catalog --set asyncBindingOperationsEnabled=true --namespace catalog --create-namespace
helm install helm-broker --set global.helm_broker.dir=/ --set global.helm_controller.dir=/ helm-broker/charts/helm-broker/ --namespace helm-broker --create-namespace
echo -e "\\033[32m---> Waiting cert-manager...\\033[0m"
while [ $(kubectl get pods -n cert-manager|grep Running|wc -l) -le 2 ]
do
kubectl get pods -n cert-manager
sleep 10
done
helm install drycc drycc/workflow \
--set builder.service.type=LoadBalancer \
--set global.platform_domain="${PLATFORM_DOMAIN}" \
--set global.ingress_class=traefik \
--set fluentd.daemon_environment.CONTAINER_TAIL_PARSER_TYPE="/^(?<time>.+) (?<stream>stdout|stderr)( (?<tags>.))? (?<log>.*)$/" \
--set controller.app_storage_class=longhorn \
--set minio.persistence.enabled=true \
--set minio.persistence.size=${MINIO_PERSISTENCE_SIZE:-5Gi} \
--set minio.persistence.storageClass="longhorn" \
--set rabbitmq.persistence.enabled=true \
--set rabbitmq.persistence.size=${RABBITMQ_PERSISTENCE_SIZE:-5Gi} \
--set rabbitmq.persistence.storageClass="longhorn" \
--set influxdb.persistence.enabled=true \
--set influxdb.persistence.size=${INFLUXDB_PERSISTENCE_SIZE:-5Gi} \
--set influxdb.persistence.storageClass="longhorn" \
--set monitor.grafana.persistence.enabled=true \
--set monitor.grafana.persistence.size=${MONITOR_PERSISTENCE_SIZE:-5Gi} \
--set monitor.grafana.persistence.storageClass="longhorn" \
--namespace drycc \
--create-namespace