diff --git a/.github/workflows/kind-cloud.yaml b/.github/workflows/kind-cloud.yaml deleted file mode 100644 index 54fd009..0000000 --- a/.github/workflows/kind-cloud.yaml +++ /dev/null @@ -1,103 +0,0 @@ -name: Deploy on Kubernetes (Cloud) - -on: - workflow_dispatch: - schedule: - - cron: "0 0 * * *" # This will run the workflow every day at midnight UTC - -jobs: - deploy-kind: - runs-on: ubuntu-latest - strategy: - matrix: - kind: [v0.21.0, v0.22.0, v0.23.0, v0.24.0] - steps: - - name: Create k8s Kind Cluster - uses: helm/kind-action@v1 - with: - version: ${{ matrix.kind }} - - name: Print Kubernetes Version - run: | - kubectl version - - name: Test Kubernetes Cluster - run: | - kubectl get no - kubectl get pods -A -o wide - kubectl get sc - - name: Checkout repository - uses: actions/checkout@v2 - - name: Install OpenEBS - run: | - kubectl apply -f https://openebs.github.io/charts/openebs-operator.yaml - echo "Sleeping for 60 seconds, give time for the operator to create the CRDs" && sleep 60 - kubectl get sc - kubectl get po -A -o wide - - name: Install MongoDB - id: install-mongodb - run: | - helm repo add bitnami https://charts.bitnami.com/bitnami - kubectl create namespace mongodb - helm install mongodb -n mongodb bitnami/mongodb --values ./base/mongodb-values.yaml - echo "Sleeping for 250 seconds, give time for the helm chart to create the pods" && sleep 250 - kubectl get pods -A -o wide - kubectl get pods -A -o wide | grep mongodb | awk '{print $3}' | grep -q '1/1' && echo "mongodb pod is running with status 1/1" || (echo "mongodb pod is not running with status 1/1" && exit 1) - - name: Install Minio - id: install-minio - run: | - git clone --depth 1 --branch v6.0.1 https://github.com/minio/operator.git && kubectl apply -k operator/ - kubectl apply -f ./base/minio-tenant-base.yaml - echo "Sleeping for 60 seconds, give time for the operator/tenant to create the CRDs" && sleep 60 - kubectl get po -A -o wide - kubectl get po -A -o wide | grep myminio-pool-0-0 | awk '{print $3}' | grep -q '2/2' && echo "myminio-pool-0-0 pod is running with status 2/2" || (echo "myminio-pool-0-0 pod is not running with status 2/2" && exit 1) - - name: Install Kerberos Vault - id: install-kerberos-vault - run: | - kubectl create namespace kerberos-vault - kubectl apply -f ./base/mongodb-configmap.yaml -n kerberos-vault - kubectl apply -f ./base/vault/kerberos-vault-deployment.yaml -n kerberos-vault - kubectl apply -f ./base/vault/kerberos-vault-service.yaml -n kerberos-vault - echo "Sleeping for 30 seconds, give time for the helm chart to create the pods" && sleep 30 - kubectl get pods -A -o wide - kubectl get pods -A -o wide | grep kerberos-vault | awk '{print $3}' | grep -q '1/1' && echo "kerberos-vault pod is running with status 1/1" || (echo "kerberos-vault pod is not running with status 1/1" && exit 1) - - name: Install RabbitMQ - id: install-rabbitmq - run: | - helm repo add bitnami https://charts.bitnami.com/bitnami - kubectl create namespace rabbitmq - helm install rabbitmq -n rabbitmq bitnami/rabbitmq --values ./rabbitmq-values.yaml - echo "Sleeping for 60 seconds, give time for the helm chart to create the pods" && sleep 60 - kubectl get pods -A -o wide - kubectl get pods -A -o wide | grep rabbitmq | awk '{print $3}' | grep -q '1/1' && echo "rabbitmq pod is running with status 1/1" || (echo "rabbitmq pod is not running with status 1/1" && exit 1) - - name: Install Prometheus operator - id: install-prometheus-operator - run: | - kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.48.1/bundle.yaml - echo "Sleeping for 30 seconds, give time for the operator to create the CRDs" && sleep 30 - kubectl get crd - kubectl get po -A -o wide - - name: Install Vernemq (MQTT Broker) - id: install-vernemq - run: | - kubectl create namespace vernemq - helm repo add vernemq https://vernemq.github.io/docker-vernemq - helm install vernemq vernemq/vernemq --values ./base/vernemq-values.yaml -n vernemq --create-namespace - echo "Sleeping for 120 seconds, give time for the helm chart to create the pods" && sleep 120 - kubectl get pods -A -o wide - kubectl get pods -A -o wide | grep vernemq-0 | awk '{print $3}' | grep -q '1/1' && echo "vernemq pod is running with status 1/1" || (echo "vernemq pod is not running with status 1/1" && exit 1) - kubectl exec --namespace vernemq vernemq-0 /vernemq/bin/vmq-admin cluster show - - name: Install Kerberos Hub helm chart - id: install-kerberos-hub - run: | - helm repo add kerberos https://charts.kerberos.io - kubectl create namespace kerberos-hub - helm install hub kerberos/hub --values base/hub/kerberos-hub-values.yaml -n kerberos-hub --create-namespace - echo "Sleeping for 300 seconds, give time for the helm chart to create the pods" && sleep 300 - kubectl get pods -A -o wide - kubectl get pods -A -o wide | grep kerberos-hub | awk '{print $3}' | grep -q '1/1' && echo "kerberos-hub pod is running with status 1/1" || (echo "kerberos-hub pod is not running with status 1/1" && exit 1) - # - name: Install Kerberos Agent - # id: install-kerberos-agent - # run: | - # kubectl apply -f ./kerberos-agent-deployment.yaml - # echo "Sleeping for 30 seconds, give time for the helm chart to create the pods" && sleep 30 - # kubectl get pods -A -o wide - # kubectl get pods -A -o wide | grep agent | awk '{print $3}' | grep -q '1/1' && echo "kerberos-agent pod is running with status 1/1" || (echo "kerberos-agent pod is not running with status 1/1" && exit 1) diff --git a/.github/workflows/kind.yaml b/.github/workflows/kind.yaml index 4655194..46b1ac2 100644 --- a/.github/workflows/kind.yaml +++ b/.github/workflows/kind.yaml @@ -1,4 +1,4 @@ -name: Deploy on Kubernetes (Edge) +name: Deploy on Kind on: workflow_dispatch: @@ -6,20 +6,20 @@ on: - cron: "0 0 * * *" # This will run the workflow every day at midnight UTC jobs: - deploy-kind: + deploy: runs-on: ubuntu-latest strategy: matrix: kind: [v0.21.0, v0.22.0, v0.23.0, v0.24.0] steps: - - name: Create k8s Kind Cluster + - name: Create kind uses: helm/kind-action@v1 with: version: ${{ matrix.kind }} - name: Print Kubernetes Version run: | kubectl version - - name: Test Kubernetes Cluster + - name: Test kind run: | kubectl get no kubectl get pods -A -o wide @@ -85,3 +85,12 @@ jobs: echo "Sleeping for 250 seconds, give time for the helm chart to create the pods" && sleep 250 kubectl get pods -A -o wide kubectl get pods -A -o wide | grep data-filtering | awk '{print $3}' | grep -q '1/1' && echo "data-filtering pod is running with status 1/1" || (echo "data-filtering pod is not running with status 1/1" && exit 1) + - name: Install Kerberos Hub helm chart + id: install-kerberos-hub + run: | + helm repo add kerberos https://charts.kerberos.io + kubectl create namespace kerberos-hub + helm install hub kerberos/hub --values ./base/hub/kerberos-hub-values.yaml -n kerberos-hub --create-namespace + echo "Sleeping for 300 seconds, give time for the helm chart to create the pods" && sleep 300 + kubectl get pods -A -o wide + kubectl get pods -A -o wide | grep kerberos-hub | awk '{print $3}' | grep -q '1/1' && echo "kerberos-hub pod is running with status 1/1" || (echo "kerberos-hub pod is not running with status 1/1" && exit 1) diff --git a/.github/workflows/microk8s.yaml b/.github/workflows/microk8s.yaml index 7aac88c..7fd2ec0 100644 --- a/.github/workflows/microk8s.yaml +++ b/.github/workflows/microk8s.yaml @@ -1,15 +1,14 @@ -name: Deploy on Microk8s (Edge) +name: Deploy on microk8s on: workflow_dispatch: schedule: - cron: "0 0 * * *" # This will run the workflow every day at midnight UTC jobs: - deploy-microk8s: + deploy: runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04] - name: MicroK8s steps: - uses: balchua/microk8s-actions@v0.4.3 with: @@ -18,7 +17,7 @@ jobs: - name: Set permissions run: | sudo chown -f -R $USER $HOME/.kube $HOME/.config - - name: Test MicroK8s + - name: Test microk8s id: list-pods run: | kubectl get no @@ -84,3 +83,12 @@ jobs: echo "Sleeping for 250 seconds, give time for the helm chart to create the pods" && sleep 250 kubectl get pods -A -o wide kubectl get pods -A -o wide | grep data-filtering | awk '{print $3}' | grep -q '1/1' && echo "data-filtering pod is running with status 1/1" || (echo "data-filtering pod is not running with status 1/1" && exit 1) + - name: Install Kerberos Hub helm chart + id: install-kerberos-hub + run: | + helm repo add kerberos https://charts.kerberos.io + kubectl create namespace kerberos-hub + helm install hub kerberos/hub --values ./base/hub/kerberos-hub-values.yaml -n kerberos-hub --create-namespace + echo "Sleeping for 300 seconds, give time for the helm chart to create the pods" && sleep 300 + kubectl get pods -A -o wide + kubectl get pods -A -o wide | grep kerberos-hub | awk '{print $3}' | grep -q '1/1' && echo "kerberos-hub pod is running with status 1/1" || (echo "kerberos-hub pod is not running with status 1/1" && exit 1) diff --git a/base/kustomization.yaml b/base/kustomization.yaml index e1e6a19..0f07b36 100644 --- a/base/kustomization.yaml +++ b/base/kustomization.yaml @@ -1,7 +1,13 @@ resources: - mongodb-configmap.yaml -- kerberos-factory-deployment.yaml -- kerberos-factory-service.yaml -- kerberos-factory-clusterrole.yaml -- kerberos-vault-deployment.yaml -- kerberos-vault-service.yaml +- factory/kerberos-factory-deployment.yaml +- factory/kerberos-factory-service.yaml +- factory/kerberos-factory-clusterrole.yaml +- vault/kerberos-vault-deployment.yaml +- vault/kerberos-vault-service.yaml + +helmCharts: + - name: mongodb + releaseName: mongodb + repo: https://charts.bitnami.com/bitnami + valuesFile: mongodb-values.yaml \ No newline at end of file diff --git a/base/minio-tenant-base.yaml b/base/minio/minio-tenant-base.yaml similarity index 100% rename from base/minio-tenant-base.yaml rename to base/minio/minio-tenant-base.yaml diff --git a/base/mongodb-configmap.yaml b/base/mongodb/mongodb-configmap.yaml similarity index 100% rename from base/mongodb-configmap.yaml rename to base/mongodb/mongodb-configmap.yaml diff --git a/base/mongodb-values.yaml b/base/mongodb/mongodb-values.yaml similarity index 100% rename from base/mongodb-values.yaml rename to base/mongodb/mongodb-values.yaml diff --git a/base/rabbitmq-values.yaml b/base/rabbitmq/rabbitmq-values.yaml similarity index 100% rename from base/rabbitmq-values.yaml rename to base/rabbitmq/rabbitmq-values.yaml diff --git a/base/vernemq-values.yaml b/base/vernemq/vernemq-values.yaml similarity index 100% rename from base/vernemq-values.yaml rename to base/vernemq/vernemq-values.yaml