From 128b89125ec5a3328601577f47ee723a52075349 Mon Sep 17 00:00:00 2001 From: WenyXu Date: Thu, 16 May 2024 17:28:34 +0000 Subject: [PATCH] chore(ci): add cfg for setup GreptimeDB cluster --- .github/workflows/develop.yml | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 0e05569b4b14..3768fe6bb220 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -231,6 +231,62 @@ jobs: path: /tmp/unstable-greptime/ retention-days: 3 + e2e: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: nolar/setup-k3d-k3s@v1 + with: + version: v1.27 + k3d-name: kube + k3d-args: "--no-lb --no-rollback --k3s-arg --disable=traefik,servicelb,metrics-server@server:*" + - name: Install greptime operator + run: | + helm repo add greptime https://greptimeteam.github.io/helm-charts/ + helm repo update + helm upgrade \ + --install \ + --create-namespace \ + greptimedb-operator greptime/greptimedb-operator \ + -n greptimedb-admin + - name: Install etcd cluster + run: | + helm upgrade \ + --install etcd oci://registry-1.docker.io/bitnamicharts/etcd \ + --set replicaCount=3 \ + --set auth.rbac.create=false \ + --set auth.rbac.token.enabled=false \ + --set persistence.size=1Gi \ + --create-namespace \ + -n etcd-cluster + - name: Wait for etcd + run: | + kubectl wait \ + --for=condition=Ready \ + pod -l app.kubernetes.io/instance=etcd \ + --timeout=120s \ + -n etcd-cluster + - name: Print etcd info + run: kubectl get all --show-labels -n etcd-cluster + - name: Install GreptimeDB cluster + run: | + helm upgrade \ + --install my-greptimedb \ + --set meta.etcdEndpoints=etcd.etcd-cluster.svc.cluster.local:2379 \ + greptime/greptimedb-cluster \ + --create-namespace \ + -n my-greptimedb + - name: Print GreptimeDB info + run: kubectl get all --show-labels -n my-greptimedb + - name: Wait for GreptimeDB + run: | + kubectl wait \ + --for=condition=Ready \ + pod -l app.greptime.io/component=my-greptimedb-datanode \ + --timeout=120s \ + -n my-greptimedb + - name: Print GreptimeDB info + run: kubectl get all --show-labels -n my-greptimedb sqlness: name: Sqlness Test