diff --git a/.github/workflows/minikube.yml b/.github/workflows/minikube.yml new file mode 100644 index 0000000..47f750c --- /dev/null +++ b/.github/workflows/minikube.yml @@ -0,0 +1,20 @@ + +name: Run on minikube + +on: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Run on minikube + run: | + bash scripts/run-minikube.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7278112 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,31 @@ + +name: Release Charts + +on: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Install Helm + uses: azure/setup-helm@v1 + with: + version: v3.4.0 + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.2.1 + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/aurras-deployment-kubernetes.iml b/.idea/aurras-deployment-kubernetes.iml new file mode 100644 index 0000000..0d583e5 --- /dev/null +++ b/.idea/aurras-deployment-kubernetes.iml @@ -0,0 +1,15 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..e04d3ea --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,21 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..d56657a --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..9a40dbe --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/protobuf.xml b/.idea/protobuf.xml new file mode 100644 index 0000000..8e725c0 --- /dev/null +++ b/.idea/protobuf.xml @@ -0,0 +1,27 @@ + + + + + + buf.build/googleapis/googleapis + $USER_HOME$/.cache/buf/v1/module/data/buf.build/googleapis/googleapis/d1263fe26f8e430a967dc22a4d0cad18 + buf.build/googleapis/googleapis:d1263fe26f8e430a967dc22a4d0cad18 + $USER_HOME$/.cache/buf/v1/module/data/buf.build/googleapis/googleapis/d1263fe26f8e430a967dc22a4d0cad18/buf.yaml + + + + + 62f35d8aed1149c291d606d958a7ce32 + googleapis + buf.build + googleapis + + + buf.build/grpc-ecosystem/grpc-gateway + $USER_HOME$/.cache/buf/v1/module/data/buf.build/grpc-ecosystem/grpc-gateway/bc28b723cd774c32b6fbc77621518765 + buf.build/grpc-ecosystem/grpc-gateway:bc28b723cd774c32b6fbc77621518765 + $USER_HOME$/.cache/buf/v1/module/data/buf.build/grpc-ecosystem/grpc-gateway/bc28b723cd774c32b6fbc77621518765/buf.yaml + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/NOTES.md b/NOTES.md new file mode 100644 index 0000000..4b9aba0 --- /dev/null +++ b/NOTES.md @@ -0,0 +1,24 @@ + + + +- What is openwhisk cloned into here for? + - Antipattern +- Top directory should be `charts` generally + +- aurrus chart + - Rm HPA? + - Rm Ingress? +- Separate internal vs external Ops stuff + - Create another repo + - aurras-ops + - Keep private + +- Goals of this repo + - Chart people can deploy aurras with + - Charts for required infra / directions on how to apply the ones you need + - Deployable via minikube + + +- Application + - Type of thing (ie helm) + diff --git a/aurras-event-feed-substrate/helm/config/types.json b/aurras-event-feed-substrate/helm/config/types.json deleted file mode 100644 index 9e26dfe..0000000 --- a/aurras-event-feed-substrate/helm/config/types.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/aurras-event-feed-substrate/helm/.helmignore b/charts/aurras-event-feed/.helmignore similarity index 100% rename from aurras-event-feed-substrate/helm/.helmignore rename to charts/aurras-event-feed/.helmignore diff --git a/aurras-event-feed-substrate/helm/Chart.yaml b/charts/aurras-event-feed/Chart.yaml similarity index 100% rename from aurras-event-feed-substrate/helm/Chart.yaml rename to charts/aurras-event-feed/Chart.yaml diff --git a/aurras-event-feed-substrate/helm/templates/NOTES.txt b/charts/aurras-event-feed/templates/NOTES.txt similarity index 100% rename from aurras-event-feed-substrate/helm/templates/NOTES.txt rename to charts/aurras-event-feed/templates/NOTES.txt diff --git a/aurras-event-feed-substrate/helm/templates/_helpers.tpl b/charts/aurras-event-feed/templates/_helpers.tpl similarity index 100% rename from aurras-event-feed-substrate/helm/templates/_helpers.tpl rename to charts/aurras-event-feed/templates/_helpers.tpl diff --git a/aurras-event-feed-substrate/helm/templates/deployment.yaml b/charts/aurras-event-feed/templates/deployment.yaml similarity index 100% rename from aurras-event-feed-substrate/helm/templates/deployment.yaml rename to charts/aurras-event-feed/templates/deployment.yaml diff --git a/aurras-event-feed-substrate/helm/templates/hpa.yaml b/charts/aurras-event-feed/templates/hpa.yaml similarity index 100% rename from aurras-event-feed-substrate/helm/templates/hpa.yaml rename to charts/aurras-event-feed/templates/hpa.yaml diff --git a/aurras-event-feed-substrate/helm/templates/ingress.yaml b/charts/aurras-event-feed/templates/ingress.yaml similarity index 100% rename from aurras-event-feed-substrate/helm/templates/ingress.yaml rename to charts/aurras-event-feed/templates/ingress.yaml diff --git a/aurras-event-feed-substrate/helm/templates/service.yaml b/charts/aurras-event-feed/templates/service.yaml similarity index 100% rename from aurras-event-feed-substrate/helm/templates/service.yaml rename to charts/aurras-event-feed/templates/service.yaml diff --git a/aurras-event-feed-substrate/helm/templates/serviceaccount.yaml b/charts/aurras-event-feed/templates/serviceaccount.yaml similarity index 100% rename from aurras-event-feed-substrate/helm/templates/serviceaccount.yaml rename to charts/aurras-event-feed/templates/serviceaccount.yaml diff --git a/aurras-event-feed-substrate/helm/templates/tests/test-connection.yaml b/charts/aurras-event-feed/templates/tests/test-connection.yaml similarity index 100% rename from aurras-event-feed-substrate/helm/templates/tests/test-connection.yaml rename to charts/aurras-event-feed/templates/tests/test-connection.yaml diff --git a/aurras-event-feed-substrate/helm/templates/typesconfigmap.yaml b/charts/aurras-event-feed/templates/typesconfigmap.yaml similarity index 100% rename from aurras-event-feed-substrate/helm/templates/typesconfigmap.yaml rename to charts/aurras-event-feed/templates/typesconfigmap.yaml diff --git a/aurras-event-feed-substrate/helm/values.yaml b/charts/aurras-event-feed/values.yaml similarity index 100% rename from aurras-event-feed-substrate/helm/values.yaml rename to charts/aurras-event-feed/values.yaml diff --git a/aurras-event-feed-substrate/helm/charts/.gitkeep b/examples/general/namespaces.yaml similarity index 100% rename from aurras-event-feed-substrate/helm/charts/.gitkeep rename to examples/general/namespaces.yaml diff --git a/examples/minikube/ openwhisk-values.yaml b/examples/minikube/ openwhisk-values.yaml new file mode 100644 index 0000000..e69de29 diff --git a/examples/minikube/openwhisk-helm.sh b/examples/minikube/openwhisk-helm.sh new file mode 100644 index 0000000..dcbeb94 --- /dev/null +++ b/examples/minikube/openwhisk-helm.sh @@ -0,0 +1,3 @@ + +helm update --namespace aurras + diff --git a/examples/minikube/storage-class.yaml b/examples/minikube/storage-class.yaml new file mode 100644 index 0000000..acc2182 --- /dev/null +++ b/examples/minikube/storage-class.yaml @@ -0,0 +1,11 @@ +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + namespace: kube-system + name: standard + annotations: + storageclass.beta.kubernetes.io/is-default-class: "true" + labels: + addonmanager.kubernetes.io/mode: Reconcile + +provisioner: k8s.io/minikube-hostpath diff --git a/openwhisk b/openwhisk deleted file mode 160000 index 9dbf566..0000000 --- a/openwhisk +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9dbf566348a7132846bb6364298df589579ebcf4 diff --git a/scripts/deploy.sh b/scripts/deploy.sh new file mode 100644 index 0000000..7e9ae5e --- /dev/null +++ b/scripts/deploy.sh @@ -0,0 +1,6 @@ + + +helm repo add openwhisk https://openwhisk.apache.org/charts +helm repo update +helm install owdev openwhisk/openwhisk -n openwhisk --create-namespace -f mycluster.yaml + diff --git a/scripts/helm-release.sh b/scripts/helm-release.sh new file mode 100644 index 0000000..d7f2614 --- /dev/null +++ b/scripts/helm-release.sh @@ -0,0 +1,26 @@ +#!/bin/bash +BRANCH=gh-pages +mkdir -p .releases +mkdir -p .releases-done + +for chart in $(ls charts); do + helm package "charts/${chart}" --dependency-update --destination .releases/ + cr upload -r "${CIRCLE_PROJECT_REPONAME}" -o "${CIRCLE_PROJECT_USERNAME}" -p ".releases/" -t "${GITHUB_TOKEN}" + mv .releases/${chart}* .releases-done/ +done + +mv .cr-index/index.yaml .releases/ +mv .releases-done/* .releases/ + +git checkout -f ${BRANCH} +mkdir .cr-index +mv .releases/index.yaml .cr-index/ +cr index -c https://insight-infrastructure.github.io/charts -r "${CIRCLE_PROJECT_REPONAME}" -o "${CIRCLE_PROJECT_USERNAME}" -p .releases/ -t "${GITHUB_TOKEN}" +mv .cr-index/index.yaml . +rm .cr-index + +git config user.email "${GITHUB_EMAIL}" +git config user.name "${GITHUB_USERNAME}" +git add index.yaml +git commit -m "update helm chart repo index to ${CIRCLE_SHA1}" +git push https://${GITHUB_TOKEN}@github.com/insight-infrastructure/charts.git ${BRANCH} diff --git a/scripts/lint.sh b/scripts/lint.sh new file mode 100644 index 0000000..0071667 --- /dev/null +++ b/scripts/lint.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +for chart in $(ls charts); do + helm lint "charts/${chart}" +done diff --git a/scripts/run-minikube.sh b/scripts/run-minikube.sh new file mode 100644 index 0000000..67c02d7 --- /dev/null +++ b/scripts/run-minikube.sh @@ -0,0 +1,5 @@ +minikube start + +kubectl apply -f examples/minikube/storage-class.yaml + +helm repo add