Skip to content

Commit 71de823

Browse files
committed
chore(workflow): remove cilium
1 parent 96f684d commit 71de823

3 files changed

Lines changed: 72 additions & 20 deletions

File tree

_scripts/install.sh

Lines changed: 65 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,28 @@ if [[ -z "${PLATFORM_DOMAIN}" ]] ; then
1212
exit 1
1313
fi
1414

15+
if [[ -z "${DRYCC_ADMIN_USERNAME}" || -z "${DRYCC_ADMIN_PASSWORD}" ]] ; then
16+
echo -e "\\033[31m---> Please set the DRYCC_ADMIN_USERNAME and DRYCC_ADMIN_PASSWORD variable.\\033[0m"
17+
echo -e "\\033[31m---> For example:\\033[0m"
18+
echo -e "\\033[31m---> export DRYCC_ADMIN_USERNAME=admin\\033[0m"
19+
echo -e "\\033[31m---> export DRYCC_ADMIN_PASSWORD=admin\\033[0m"
20+
echo -e "\\033[31m---> This password is used by end users to log in and manage drycc.\\033[0m"
21+
echo -e "\\033[31m---> Please set a high security string!!!\\033[0m"
22+
exit 1
23+
fi
24+
1525
function clean_before_exit {
1626
# delay before exiting, so stdout/stderr flushes through the logging system
17-
rm -rf helm-broker
1827
sleep 3
1928
}
2029
trap clean_before_exit EXIT
2130

22-
if [[ "${INSTALL_K3S_MIRROR}"=="cn" ]] ; then
31+
if [[ "${INSTALL_K3S_MIRROR}" == "cn" ]] ; then
2332
mkdir -p /etc/rancher/k3s
2433
cat << EOF > "/etc/rancher/k3s/registries.yaml"
2534
mirrors:
2635
"docker.io":
2736
endpoint:
28-
- "docker.mirrors.ustc.edu.cn"
2937
- "http://hub-mirror.c.163.com"
3038
- "https://registry-1.docker.io"
3139
EOF
@@ -34,34 +42,26 @@ else
3442
k3s_install_url="https://get.k3s.io"
3543
fi
3644
if [[ -z "${K3S_URL}" ]] ; then
37-
INSTALL_K3S_EXEC="server --no-flannel --cluster-cidr=10.233.0.0/16"
45+
INSTALL_K3S_EXEC="server --cluster-cidr=10.233.0.0/16"
3846
else
39-
INSTALL_K3S_EXEC="agent --no-flannel"
47+
INSTALL_K3S_EXEC="agent"
4048
fi
4149

42-
export INSTALL_K3S_EXEC='--no-flannel'
43-
4450
alias install-k3s="curl -sfL "${k3s_install_url}" | sh - $@"
4551

4652
install-k3s
4753

4854
curl -sfL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash -
4955

50-
helm repo add cilium https://helm.cilium.io/
5156
helm repo add longhorn https://charts.longhorn.io
5257
helm repo add jetstack https://charts.jetstack.io
5358
helm repo add svc-cat https://kubernetes-sigs.github.io/service-catalog
5459
helm repo add drycc https://charts.drycc.cc/${CHANNEL:-stable}
5560
helm repo update
56-
git clone --dept 1 https://github.com/kyma-project/helm-broker
57-
5861

59-
helm install cilium --set operator.replicas=1 cilium/cilium --namespace kube-system
6062
helm install longhorn --create-namespace --set persistence.defaultClass=false --set persistence.defaultClassReplicaCount=1 longhorn/longhorn --namespace longhorn-system
6163
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --set installCRDs=true
62-
helm install catalog svc-cat/catalog --set asyncBindingOperationsEnabled=true --namespace catalog --create-namespace
63-
helm install helm-broker --set global.helm_broker.dir=/ --set global.helm_controller.dir=/ helm-broker/charts/helm-broker/ --namespace helm-broker --create-namespace
64-
64+
helm install catalog svc-cat/catalog --set asyncBindingOperationsEnabled=true --namespace catalog --create-namespace --wait
6565

6666
echo -e "\\033[32m---> Waiting cert-manager...\\033[0m"
6767
while [ $(kubectl get pods -n cert-manager|grep Running|wc -l) -le 2 ]
@@ -70,23 +70,71 @@ do
7070
sleep 10
7171
done
7272

73+
echo -e "\\033[32m---> Start installing workflow...\\033[0m"
74+
75+
RABBITMQ_USERNAME=$(cat /proc/sys/kernel/random/uuid)
76+
RABBITMQ_PASSWORD=$(cat /proc/sys/kernel/random/uuid)
77+
7378
helm install drycc drycc/workflow \
7479
--set builder.service.type=LoadBalancer \
80+
--set global.cluster_domain="cluster.local" \
7581
--set global.platform_domain="${PLATFORM_DOMAIN}" \
7682
--set global.ingress_class=traefik \
7783
--set fluentd.daemon_environment.CONTAINER_TAIL_PARSER_TYPE="/^(?<time>.+) (?<stream>stdout|stderr)( (?<tags>.))? (?<log>.*)$/" \
7884
--set controller.app_storage_class=longhorn \
7985
--set minio.persistence.enabled=true \
8086
--set minio.persistence.size=${MINIO_PERSISTENCE_SIZE:-5Gi} \
8187
--set minio.persistence.storageClass="longhorn" \
88+
--set rabbitmq.username="${RABBITMQ_USERNAME}" \
89+
--set rabbitmq.password="${RABBITMQ_PASSWORD}" \
8290
--set rabbitmq.persistence.enabled=true \
8391
--set rabbitmq.persistence.size=${RABBITMQ_PERSISTENCE_SIZE:-5Gi} \
8492
--set rabbitmq.persistence.storageClass="longhorn" \
8593
--set influxdb.persistence.enabled=true \
8694
--set influxdb.persistence.size=${INFLUXDB_PERSISTENCE_SIZE:-5Gi} \
8795
--set influxdb.persistence.storageClass="longhorn" \
88-
--set monitor.grafana.persistence.enabled=true \
89-
--set monitor.grafana.persistence.size=${MONITOR_PERSISTENCE_SIZE:-5Gi} \
96+
--set monitor.grafana.persistence.enabled=true \ --set monitor.grafana.persistence.size=${MONITOR_PERSISTENCE_SIZE:-5Gi} \
9097
--set monitor.grafana.persistence.storageClass="longhorn" \
98+
--set passport.admin_username=${DRYCC_ADMIN_USERNAME} \
99+
--set passport.admin_password=${DRYCC_ADMIN_PASSWORD} \
91100
--namespace drycc \
92-
--create-namespace
101+
--create-namespace --wait --timeout 30m0s
102+
103+
HELMBROKER_USERNAME=$(cat /proc/sys/kernel/random/uuid)
104+
HELMBROKER_PASSWORD=$(cat /proc/sys/kernel/random/uuid)
105+
106+
echo -e "\\033[32m---> Start installing helmbroker...\\033[0m"
107+
108+
helm install helmbroker drycc/helmbroker \
109+
--set platform_domain="cluster.local" \
110+
--set persistence.storageClass="longhorn" \
111+
--set persistence.size=${HELMBROKER_PERSISTENCE_SIZE:-5Gi} \
112+
--set platform_domain=${PLATFORM_DOMAIN} \
113+
--set username=${HELMBROKER_USERNAME} \
114+
--set password=${HELMBROKER_PASSWORD} \
115+
--set environment.HELMBROKER_CELERY_BROKER="amqp://${RABBITMQ_USERNAME}:${RABBITMQ_PASSWORD}@drycc-rabbitmq-0.drycc-rabbitmq.drycc.svc.cluster.local:5672/drycc" \
116+
--namespace drycc --create-namespace --wait
117+
118+
kubectl apply -f - <<EOF
119+
apiVersion: servicecatalog.k8s.io/v1beta1
120+
kind: ClusterServiceBroker
121+
metadata:
122+
finalizers:
123+
- kubernetes-incubator/service-catalog
124+
generation: 1
125+
labels:
126+
app.kubernetes.io/managed-by: Helm
127+
heritage: Helm
128+
name: helmbroker
129+
spec:
130+
relistBehavior: Duration
131+
relistRequests: 5
132+
url: http://${HELMBROKER_USERNAME}:${HELMBROKER_PASSWORD}@drycc-helmbroker.${PLATFORM_DOMAIN}
133+
EOF
134+
135+
echo -e "\\033[32m---> Please save the following information for future use.\\033[0m"
136+
echo -e "\\033[32m---> Rabbitmq username: $RABBITMQ_USERNAME\\033[0m"
137+
echo -e "\\033[32m---> Rabbitmq password: $RABBITMQ_PASSWORD\\033[0m"
138+
echo -e "\\033[32m---> Helmbroker username: $HELMBROKER_USERNAME\\033[0m"
139+
echo -e "\\033[32m---> Helmbroker password: $HELMBROKER_PASSWORD\\033[0m"
140+
echo -e "\\033[32m---> Installation complete, enjoy life...\\033[0m"

_scripts/uninstall.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ shopt -s expand_aliases
55
/usr/local/bin/k3s-killall.sh
66
/usr/local/bin/k3s-uninstall.sh
77

8+
rm -rf /etc/rancher
89
rm -rf /usr/local/bin/helm ~/.config/helm

src/quickstart/install-workflow.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,18 @@ For RHEL, CentOS, and EKS with EKS Kubernetes Worker AMI with AmazonLinux2 image
5555
$ yum install nfs-utils
5656
```
5757

58-
### Installing curl and git
58+
### Installing curl
5959

6060
For Debian and Ubuntu, use this command:
6161

6262
```
63-
$ apt-get install curl git
63+
$ apt-get install curl
6464
```
6565

6666
For RHEL, CentOS, and EKS with EKS Kubernetes Worker AMI with AmazonLinux2 image, use this command:
6767

6868
```
69-
$ yum install curl git
69+
$ yum install curl
7070
```
7171

7272
## Hardware
@@ -121,12 +121,15 @@ When using this method to install drycc, the following environment variables can
121121
ENVIRONMENT VARIABLE | DESCRIPTION
122122
--------------------------------|------------------------------------------------------------------------------------------------
123123
PLATFORM_DOMAIN | Required item, specify drycc's domain name
124+
DRYCC_ADMIN_USERNAME | Required item, specify drycc's admin username
125+
DRYCC_ADMIN_PASSWORD | Required item, specify drycc's admin password
124126
CHANNEL | By default, `stable` channel will be installed. You can also specify `testing`
125127
INSTALL_K3S_MIRROR | Specify the accelerated mirror location. Currently, only `cn` is supported
126128
MINIO_PERSISTENCE_SIZE | The size of the persistence space allocated to `minio`, which is `5Gi` by default
127129
MONITOR_PERSISTENCE_SIZE | The size of the persistence space allocated to `monitor`, which is `5Gi` by default
128130
INFLUXDB_PERSISTENCE_SIZE | The size of the persistence space allocated to `influxdb`, which is `5Gi` by default
129131
RABBITMQ_PERSISTENCE_SIZE | The size of the persistence space allocated to `rabbitmq`, which is `5Gi` by default
132+
HELMBROKER_PERSISTENCE_SIZE | The size of the persistence space allocated to `helmbroker`, which is `5Gi` by default
130133

131134
Since the installation script will install k3s, other environment variables can refer to k3s installation [environment variables](https://rancher.com/docs/k3s/latest/en/installation/install-options/).
132135

0 commit comments

Comments
 (0)