diff --git a/.agents/skills/add-to-release-please/SKILL.md b/.agents/skills/add-to-release-please/SKILL.md index 9e7416b4..1afa1f73 100644 --- a/.agents/skills/add-to-release-please/SKILL.md +++ b/.agents/skills/add-to-release-please/SKILL.md @@ -30,9 +30,9 @@ The path is the package key in both config files (repo-relative directory). Conf | Kind | Path examples | |---|---| | App | `apps/cogstack-cohorter` | -| Helm chart | `helm-charts/medcat-service-helm` | +| Helm chart | `deployment/charts/medcat-service-helm` | -Helm charts in this repo are top-level directories under `helm-charts//` with a `Chart.yaml`. The package key is that directory. See [Helm charts](#helm-charts) before editing. +Helm charts in this repo are directories under `deployment/charts//` with a `Chart.yaml`. The package key is that directory. See [Helm charts](#helm-charts) before editing. ### 2. Update `release-please-config.json` @@ -61,7 +61,7 @@ Add under `packages`. Match the file's 4-space indent. | `helm` | Chart dir with `Chart.yaml` | `version` | | `simple` | No single root version file, or nested API + frontend | CHANGELOG only; use `extra-files` for nested bumps | -`component` is the git tag prefix: `{component}-v{version}` (e.g. `cohorter-v0.7.0`). For Helm charts in this repo, `component` is the package path (`helm-charts/`), so the tag is `helm-charts/-v`. +`component` is the git tag prefix: `{component}-v{version}` (e.g. `cohorter-v0.7.0`). Helm charts retain `helm-charts/` as their component, independently of their package path under `deployment/charts/`, so the tag remains `helm-charts/-v`. **`extra-files`** (paths relative to the package directory) โ€” e.g. python API + node frontend under `simple`: @@ -102,12 +102,12 @@ This is sourced from [release-please#2561](https://github.com/googleapis/release ### Helm charts -Copy an existing chart entry such as `helm-charts/medcat-service-helm`. Charts here always use `release-type` `helm`, `component` equal to the package key, and these changelog sections. Do not add `extra-files`. +Copy an existing chart entry such as `deployment/charts/medcat-service-helm`. Charts here always use `release-type` `helm`, `component` `helm-charts/`, and these changelog sections. Do not add `extra-files`. -`` is the directory name (for example `ocr-service-helm`). It must match `name` in `Chart.yaml`, and `Chart.yaml` must sit directly under `helm-charts/` (not nested). +`` is the directory name (for example `ocr-service-helm`). It must match `name` in `Chart.yaml`, and the chart directory must sit directly under `deployment/charts/`. ```json -"helm-charts/": { +"deployment/charts/": { "release-type": "helm", "component": "helm-charts/", "changelog-path": "CHANGELOG.md", @@ -125,7 +125,7 @@ Copy an existing chart entry such as `helm-charts/medcat-service-helm`. Charts h } ``` -`.github/workflows/kubernetes-charts-build.yaml` already discovers every `helm-charts/*/Chart.yaml` and publishes tags matching `helm-charts/*-v*.*.*`. Do not add a workflow or edit `release-please.yml` for a chart that fits this layout. Release-please writes `CHANGELOG.md` on the first release. +`.github/workflows/build_helm_charts.yml` already discovers every `deployment/charts/*/Chart.yaml` and publishes tags matching `helm-charts/*-v*.*.*`. Do not add a workflow or edit `release_packages.yml` for a chart that fits this layout. Release-please writes `CHANGELOG.md` on the first release. ### 3. Update `.release-please-manifest.json` diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c37ee58b..ae17d9d3 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,7 +9,7 @@ updates: - package-ecosystem: "devcontainers" directory: "/" schedule: - interval: "weekly" + interval: "monthly" commit-message: prefix: "build" groups: @@ -21,7 +21,7 @@ updates: - package-ecosystem: "github-actions" directory: "/" schedule: - interval: "weekly" + interval: "monthly" commit-message: prefix: "build" @@ -29,7 +29,7 @@ updates: - package-ecosystem: "docker" directory: "/apps/cogstack-jupyter-hub" schedule: - interval: "weekly" + interval: "monthly" registries: - dockerhub commit-message: @@ -43,7 +43,7 @@ updates: - package-ecosystem: "uv" directory: "/apps/cogstack-jupyter-hub" schedule: - interval: "weekly" + interval: "monthly" commit-message: prefix: "build(jupyter)" groups: diff --git a/.github/linters/ct.yaml b/.github/linters/ct.yaml index 69e2ad47..d48d34f0 100644 --- a/.github/linters/ct.yaml +++ b/.github/linters/ct.yaml @@ -2,7 +2,7 @@ remote: origin target-branch: main chart-dirs: - - helm-charts + - deployment/charts helm-extra-args: --timeout 1000s chart-repos: - opensearch=https://opensearch-project.github.io/helm-charts diff --git a/.github/scripts/helm-recursive-dependency-update.py b/.github/scripts/helm-recursive-dependency-update.py index 5a2fb822..4f6b0218 100755 --- a/.github/scripts/helm-recursive-dependency-update.py +++ b/.github/scripts/helm-recursive-dependency-update.py @@ -22,7 +22,7 @@ 3. Topologically sort so dependencies come before dependents. 4. Run `helm dependency update` in that order. -Usage (cwd should be helm-charts/): +Usage (cwd should be deployment/charts/): helm-recursive-dependency-update.py helm-recursive-dependency-update.py CHART [CHART ...] """ diff --git a/.github/workflows/doc-build.yml b/.github/workflows/build_docs.yml similarity index 92% rename from .github/workflows/doc-build.yml rename to .github/workflows/build_docs.yml index 6cf1dd5d..3f6d26f0 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/build_docs.yml @@ -1,6 +1,6 @@ # This is a simple action to check that the documentation is building. # Note the real documentation build is done by readthedocs externally, and none of the files created in this action are used. -name: documentation-build +name: build_docs on: push: @@ -10,7 +10,7 @@ on: - "docs-v*.*.*" paths: - "docs/**" - - ".github/workflows/doc-build**" + - ".github/workflows/build_docs.yml" release: types: [published] diff --git a/.github/workflows/kubernetes-charts-build.yaml b/.github/workflows/build_helm_charts.yml similarity index 88% rename from .github/workflows/kubernetes-charts-build.yaml rename to .github/workflows/build_helm_charts.yml index 75215dd9..7a23d39a 100644 --- a/.github/workflows/kubernetes-charts-build.yaml +++ b/.github/workflows/build_helm_charts.yml @@ -1,9 +1,9 @@ -# Lint, test, and publish Helm charts under helm-charts/. +# Lint, test, and publish Helm charts under deployment/charts/. # # Triggers: -# - Pull requests touching helm-charts/ or this workflow: lint and install-test +# - Pull requests touching deployment/charts/ or this workflow: lint and install-test # changed charts only; does not publish. -# - Push to main (helm-charts/ paths): lint/test all charts, then package and +# - Push to main (deployment/charts/ paths): lint/test all charts, then package and # push every top-level chart to Docker Hub OCI at version 0.0.1. # - Per-chart release tags (e.g. helm-charts/medcat-trainer-helm-v0.1.2): # lint/test all charts, then package and push only the tagged chart at the @@ -12,7 +12,7 @@ # # Charts are discovered automatically from top-level Chart.yaml files. Release # versions for tagged releases are managed by release-please. -name: Kubernetes - Lint, Test, and Publish Helm Charts +name: build_helm_charts on: push: @@ -20,16 +20,16 @@ on: tags: - "helm-charts/*-v*.*.*" # e.g., helm-charts/medcat-trainer-helm-v0.1.2 paths: - - "helm-charts/**" - - ".github/workflows/kubernetes-charts-build**" + - "deployment/charts/**" + - ".github/workflows/build_helm_charts.yml" pull_request: paths: - - "helm-charts/**" - - ".github/workflows/kubernetes-charts-build**" + - "deployment/charts/**" + - ".github/workflows/build_helm_charts.yml" defaults: run: - working-directory: ./helm-charts + working-directory: ./deployment/charts jobs: helm-lint-test: @@ -83,7 +83,7 @@ jobs: fi - name: Recursive dependency update (all charts, including nested) - run: ../.github/scripts/helm-recursive-dependency-update.py + run: ../../.github/scripts/helm-recursive-dependency-update.py - name: Run chart-testing (lint) if: steps.list-changed.outputs.changed == 'true' @@ -166,7 +166,7 @@ jobs: - name: Recursive dependency update (all charts, including nested) # Waiting on helm recursive feature https://github.com/helm/helm/pull/30855 # Could alternatively switch to helm "cascade" plugin - run: ../.github/scripts/helm-recursive-dependency-update.py ${{ steps.charts.outputs.charts }} + run: ../../.github/scripts/helm-recursive-dependency-update.py ${{ steps.charts.outputs.charts }} - name: Package Helm Charts run: | @@ -190,4 +190,4 @@ jobs: if: github.ref_type == 'tag' with: tag_name: ${{ github.ref_name }} - files: helm-charts/${{ steps.charts.outputs.chart }}-${{ steps.version.outputs.chart_version }}.tgz + files: deployment/charts/${{ steps.charts.outputs.chart }}-${{ steps.version.outputs.chart_version }}.tgz diff --git a/.github/workflows/cogstack-cohorter-docker.yml b/.github/workflows/docker_build_cohorter.yml similarity index 94% rename from .github/workflows/cogstack-cohorter-docker.yml rename to .github/workflows/docker_build_cohorter.yml index 0c5d3030..2a9f524e 100644 --- a/.github/workflows/cogstack-cohorter-docker.yml +++ b/.github/workflows/docker_build_cohorter.yml @@ -1,4 +1,4 @@ -name: ci-build-cohorter +name: docker_build_cohorter on: push: @@ -7,11 +7,11 @@ on: - "cohorter-v*.*.*" # e.g., cohorter-v1.2.3 paths: - "apps/cogstack-cohorter/**" - - ".github/workflows/cogstack-cohorter-docker**" + - ".github/workflows/docker_build_cohorter.yml" pull_request: paths: - "apps/cogstack-cohorter/**" - - ".github/workflows/cogstack-cohorter-docker**" + - ".github/workflows/docker_build_cohorter.yml" jobs: docker-build-and-push: diff --git a/.github/workflows/jupyter-docker-build.yml b/.github/workflows/docker_build_jupyterhub.yml similarity index 98% rename from .github/workflows/jupyter-docker-build.yml rename to .github/workflows/docker_build_jupyterhub.yml index 1b4aae65..de3fa06a 100644 --- a/.github/workflows/jupyter-docker-build.yml +++ b/.github/workflows/docker_build_jupyterhub.yml @@ -1,4 +1,4 @@ -name: docker-jupyter-hub-all +name: docker_build_jupyterhub permissions: contents: read @@ -9,11 +9,11 @@ on: tags: ['cogstack-jupyter-hub-v*.*.*'] paths: - "apps/cogstack-jupyter-hub/**" - - ".github/workflows/docker-build.yml" + - ".github/workflows/docker_build_jupyterhub.yml" pull_request: paths: - "apps/cogstack-jupyter-hub/**" - - ".github/workflows/docker-build.yml" + - ".github/workflows/docker_build_jupyterhub.yml" workflow_dispatch: concurrency: diff --git a/.github/workflows/observability-docker.yml b/.github/workflows/docker_build_observability.yml similarity index 59% rename from .github/workflows/observability-docker.yml rename to .github/workflows/docker_build_observability.yml index b7820d95..e9b56b8f 100644 --- a/.github/workflows/observability-docker.yml +++ b/.github/workflows/docker_build_observability.yml @@ -1,4 +1,4 @@ -name: ci-build +name: docker_build_observability on: push: @@ -6,12 +6,14 @@ on: tags: - "v*.*.*" # e.g., v0.1.1 paths: - - "observability/**" - - ".github/workflows/observability**" + - "apps/observability/**" + - "deployment/examples/observability/**" + - ".github/workflows/docker_build_observability.yml" pull_request: paths: - - "observability/**" - - ".github/workflows/observability**" + - "apps/observability/**" + - "deployment/examples/observability/**" + - ".github/workflows/docker_build_observability.yml" jobs: docker: @@ -21,24 +23,24 @@ jobs: matrix: # This should be replaced with Docker Bake instead include: - name: prometheus - context: observability/prometheus - dockerfile: observability/prometheus/Dockerfile.prometheus + context: apps/observability/prometheus + dockerfile: apps/observability/prometheus/Dockerfile.prometheus image: cogstacksystems/cogstack-observability-prometheus - name: blackbox - context: observability/prometheus - dockerfile: observability/prometheus/Dockerfile.blackbox + context: apps/observability/prometheus + dockerfile: apps/observability/prometheus/Dockerfile.blackbox image: cogstacksystems/cogstack-observability-blackbox-exporter - name: grafana - context: observability/grafana - dockerfile: observability/grafana/Dockerfile + context: apps/observability/grafana + dockerfile: apps/observability/grafana/Dockerfile image: cogstacksystems/cogstack-observability-grafana - name: traefik - context: observability/traefik - dockerfile: observability/traefik/Dockerfile + context: apps/observability/traefik + dockerfile: apps/observability/traefik/Dockerfile image: cogstacksystems/cogstack-observability-traefik - name: alloy - context: observability/grafana-alloy - dockerfile: observability/grafana-alloy/Dockerfile + context: apps/observability/grafana-alloy + dockerfile: apps/observability/grafana-alloy/Dockerfile image: cogstacksystems/cogstack-observability-alloy steps: - name: Checkout branch @@ -80,6 +82,7 @@ jobs: cache-to: type=registry,ref=${{ matrix.image}}:buildcache,mode=max test-observability-quickstart-scripts: + needs: docker runs-on: ubuntu-latest name: Test observability Quickstart scripts @@ -90,16 +93,31 @@ jobs: - name: Set up Python uses: actions/setup-python@v7 with: - python-version: "3.9" + python-version: "3.13" cache: pip - name: Install Python dependencies - run: pip install -r observability/test/requirements.txt + run: pip install -r deployment/examples/observability/test/requirements.txt - name: Run Simple quickstart test run: | echo "๐Ÿงช Running Simple quickstart test..." - bash observability/test/test-quickstart.sh + IMAGE_TAG="sha-${GITHUB_SHA::7}" + echo "Using images tagged ${IMAGE_TAG}" + export OBSERVABILITY_BASE_URL="file://${GITHUB_WORKSPACE}/deployment/examples/observability" + export COMPOSE_FILE="${GITHUB_WORKSPACE}/deployment/examples/observability/simple/observability-simple/docker-compose.yml:${RUNNER_TEMP}/observability-images.yml" + { + echo "services:" + for service in alloy prometheus grafana traefik; do + printf ' %s:\n image: cogstacksystems/cogstack-observability-%s:%s\n' \ + "$service" "$service" "$IMAGE_TAG" + done + } > "${RUNNER_TEMP}/observability-images.yml" + if ! bash deployment/examples/observability/test/test-quickstart.sh; then + docker compose ps --all || true + docker compose logs --no-color --tail=100 || true + exit 1 + fi - name: Report test result if: always() diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build_ocr-service.yml similarity index 51% rename from .github/workflows/docker_build.yml rename to .github/workflows/docker_build_ocr-service.yml index c391e1ba..bc12580c 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build_ocr-service.yml @@ -1,4 +1,4 @@ -name: docker-ocr-service +name: docker_build_ocr-service on: push: @@ -6,13 +6,17 @@ on: tags: ['ocr-service-v*.*.*'] paths: - "apps/ocr-service/**" - - ".github/workflows/docker_build.yml" - - ".github/workflows/ocr-service-**" + - ".github/workflows/docker_build_ocr-service.yml" + - ".github/workflows/test_ocr-service.yml" + - ".github/workflows/docker_template_ocr-service.yml" + - ".github/workflows/docker_smoke_ocr-service.yml" pull_request: paths: - "apps/ocr-service/**" - - ".github/workflows/docker_build.yml" - - ".github/workflows/ocr-service-**" + - ".github/workflows/docker_build_ocr-service.yml" + - ".github/workflows/test_ocr-service.yml" + - ".github/workflows/docker_template_ocr-service.yml" + - ".github/workflows/docker_smoke_ocr-service.yml" release: types: [published] workflow_dispatch: @@ -23,7 +27,7 @@ permissions: jobs: build: if: github.event_name != 'release' || startsWith(github.event.release.tag_name, 'ocr-service-v') - uses: ./.github/workflows/ocr-service-docker-template.yml + uses: ./.github/workflows/docker_template_ocr-service.yml with: image: cogstacksystems/cogstack-ocr-service context: apps/ocr-service diff --git a/.github/workflows/jupyter-docker-smoke-test.yml b/.github/workflows/docker_smoke_jupyterhub.yml similarity index 95% rename from .github/workflows/jupyter-docker-smoke-test.yml rename to .github/workflows/docker_smoke_jupyterhub.yml index b23eb047..7c63a9ed 100644 --- a/.github/workflows/jupyter-docker-smoke-test.yml +++ b/.github/workflows/docker_smoke_jupyterhub.yml @@ -1,4 +1,4 @@ -name: docker-smoke-test +name: docker_smoke_jupyterhub permissions: contents: read @@ -9,11 +9,11 @@ on: tags: ['cogstack-jupyter-hub-v*.*.*'] paths: - "apps/cogstack-jupyter-hub/**" - - ".github/workflows/docker-smoke-test.yml" + - ".github/workflows/docker_smoke_jupyterhub.yml" pull_request: paths: - "apps/cogstack-jupyter-hub/**" - - ".github/workflows/docker-smoke-test.yml" + - ".github/workflows/docker_smoke_jupyterhub.yml" workflow_dispatch: concurrency: diff --git a/.github/workflows/ocr-service-docker-smoke.yml b/.github/workflows/docker_smoke_ocr-service.yml similarity index 92% rename from .github/workflows/ocr-service-docker-smoke.yml rename to .github/workflows/docker_smoke_ocr-service.yml index 0fa9f175..0cedd27a 100644 --- a/.github/workflows/ocr-service-docker-smoke.yml +++ b/.github/workflows/docker_smoke_ocr-service.yml @@ -1,16 +1,20 @@ -name: docker-smoke-ocr-service +name: docker_smoke_ocr-service on: push: branches: [ "*" ] paths: - "apps/ocr-service/**" - - ".github/workflows/ocr-service-**" + - ".github/workflows/test_ocr-service.yml" + - ".github/workflows/docker_template_ocr-service.yml" + - ".github/workflows/docker_smoke_ocr-service.yml" pull_request: branches: [ "*" ] paths: - "apps/ocr-service/**" - - ".github/workflows/ocr-service-**" + - ".github/workflows/test_ocr-service.yml" + - ".github/workflows/docker_template_ocr-service.yml" + - ".github/workflows/docker_smoke_ocr-service.yml" workflow_dispatch: permissions: diff --git a/.github/workflows/ocr-service-docker-template.yml b/.github/workflows/docker_template_ocr-service.yml similarity index 99% rename from .github/workflows/ocr-service-docker-template.yml rename to .github/workflows/docker_template_ocr-service.yml index 619ef6ba..f97d5be9 100644 --- a/.github/workflows/ocr-service-docker-template.yml +++ b/.github/workflows/docker_template_ocr-service.yml @@ -1,4 +1,4 @@ -name: docker-multi-arch-template +name: docker_template_ocr-service permissions: contents: read diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/lint_pr.yml similarity index 95% rename from .github/workflows/pr-lint.yml rename to .github/workflows/lint_pr.yml index dd6a4667..dac1937b 100644 --- a/.github/workflows/pr-lint.yml +++ b/.github/workflows/lint_pr.yml @@ -1,4 +1,4 @@ -name: PR - Lint +name: lint_pr on: pull_request: diff --git a/.github/workflows/terraform-openstack-kubernetes-k3s.yml b/.github/workflows/publish_terraform_openstack_k3s.yml similarity index 88% rename from .github/workflows/terraform-openstack-kubernetes-k3s.yml rename to .github/workflows/publish_terraform_openstack_k3s.yml index 01e04f55..fbf936ec 100644 --- a/.github/workflows/terraform-openstack-kubernetes-k3s.yml +++ b/.github/workflows/publish_terraform_openstack_k3s.yml @@ -1,7 +1,7 @@ -# Mirror terraform-modules/openstack-kubernetes-k3s into the public +# Mirror deployment/terraform/openstack-kubernetes-k3s into the public # terraform-openstack-kubernetes-k3s repo (Terraform Registry source). # GitHub App (COGSTACK_CI_APP_*) must be installed on that repo with contents: write. -name: Publish terraform-openstack-kubernetes-k3s +name: publish_terraform_openstack_k3s on: push: @@ -35,7 +35,7 @@ jobs: - run: | VERSION="${GITHUB_REF_NAME##*-v}" rsync -a --delete --exclude .git --exclude .terraform/ \ - terraform-modules/openstack-kubernetes-k3s/ mirror/ + deployment/terraform/openstack-kubernetes-k3s/ mirror/ cp LICENSE mirror/LICENSE cd mirror git config user.name github-actions[bot] diff --git a/.github/workflows/release-please.yml b/.github/workflows/release_packages.yml similarity index 96% rename from .github/workflows/release-please.yml rename to .github/workflows/release_packages.yml index 6a3a0e7f..9161d084 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release_packages.yml @@ -1,4 +1,4 @@ -name: Release Please +name: release_packages on: push: diff --git a/.github/workflows/ocr-service-tests.yml b/.github/workflows/test_ocr-service.yml similarity index 95% rename from .github/workflows/ocr-service-tests.yml rename to .github/workflows/test_ocr-service.yml index c338a019..aa14f273 100644 --- a/.github/workflows/ocr-service-tests.yml +++ b/.github/workflows/test_ocr-service.yml @@ -1,4 +1,4 @@ -name: tests-ocr-service +name: test_ocr-service permissions: contents: read @@ -9,12 +9,16 @@ on: branches: [ "*" ] paths: - "apps/ocr-service/**" - - ".github/workflows/ocr-service-**" + - ".github/workflows/test_ocr-service.yml" + - ".github/workflows/docker_template_ocr-service.yml" + - ".github/workflows/docker_smoke_ocr-service.yml" pull_request: branches: [ "*" ] paths: - "apps/ocr-service/**" - - ".github/workflows/ocr-service-**" + - ".github/workflows/test_ocr-service.yml" + - ".github/workflows/docker_template_ocr-service.yml" + - ".github/workflows/docker_smoke_ocr-service.yml" release: types: [published] @@ -71,7 +75,7 @@ jobs: uses: actions/cache@v6 with: path: /var/cache/apt/archives - key: ${{ runner.os }}-apt-${{ hashFiles('.github/workflows/ocr-service-tests.yml') }} + key: ${{ runner.os }}-apt-${{ hashFiles('.github/workflows/test_ocr-service.yml') }} restore-keys: | ${{ runner.os }}-apt- @@ -90,7 +94,6 @@ jobs: # add extra repos sudo apt-add-repository -y -n multiverse sudo apt-add-repository -y -n universe - sudo add-apt-repository -y -n ppa:graphics-drivers/ppa sudo apt update -yq sudo apt upgrade -y diff --git a/.gitignore b/.gitignore index f157d3c1..e88da896 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ # Custom ignores -observability/examples/simple/observability-simple -observability/examples/full/cogstack-observability +deployment/examples/observability/simple/observability-simple +deployment/examples/observability/full/cogstack-observability _build **/.build/ @@ -218,3 +218,4 @@ cython_debug/ # PyPI configuration file .pypirc +.DS_Store diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0829e40e..841d6088 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ repos: rev: v1.14.2 hooks: - id: helm-docs-container - files: helm-charts/(.*)/values.yaml + files: deployment/charts/(.*)/values.yaml args: # Make the tool search for charts only under the `example-charts` directory - - --chart-search-root=helm-charts + - --chart-search-root=deployment/charts diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 18860c9e..2a647f5d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,12 +1,12 @@ { - "helm-charts/medcat-service-helm": "0.6.0", - "helm-charts/medcat-trainer-helm": "0.5.2", - "helm-charts/cogstack-ce-helm": "0.7.1", - "helm-charts/cogstack-cohorter-helm": "0.5.0", - "helm-charts/cogstack-observability-helm": "0.4.1", - "helm-charts/cogstack-jupyterhub-helm": "0.5.0", - "helm-charts/ocr-service-helm": "0.1.0", - "terraform-modules/openstack-kubernetes-k3s": "0.1.1", + "deployment/charts/medcat-service-helm": "0.6.0", + "deployment/charts/medcat-trainer-helm": "0.5.2", + "deployment/charts/cogstack-ce-helm": "0.7.1", + "deployment/charts/cogstack-cohorter-helm": "0.5.0", + "deployment/charts/cogstack-observability-helm": "0.4.1", + "deployment/charts/cogstack-jupyterhub-helm": "0.5.0", + "deployment/charts/ocr-service-helm": "0.1.0", + "deployment/terraform/openstack-kubernetes-k3s": "0.1.1", "apps/ocr-service": "1.1.4", "apps/cogstack-jupyter-hub": "2.3.10" } diff --git a/README.md b/README.md index ef3b2422..5b1c7c4d 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ See the latest documentation on [Readthedocs](https://docs.cogstack.org/en/lates Cohort definition tooling with NL2DSL and web UI - + CogStack Dashboards Demo
CogStack Dashboards Demo
@@ -73,4 +73,4 @@ See the latest documentation on [Readthedocs](https://docs.cogstack.org/en/lates - Source for the official cogstack documentation. This git repo stores the top level documetation that hosts on https://docs.cogstack.org - CogStack deployment instructions and examples - Helm Charts for deployments -- CogStack platform tools eg Observability. +- CogStack platform tools eg [Observability](apps/observability). diff --git a/cogstack-dashboards-demo/.gitignore b/apps/cogstack-dashboards-demo/.gitignore similarity index 100% rename from cogstack-dashboards-demo/.gitignore rename to apps/cogstack-dashboards-demo/.gitignore diff --git a/cogstack-dashboards-demo/LICENSE b/apps/cogstack-dashboards-demo/LICENSE similarity index 100% rename from cogstack-dashboards-demo/LICENSE rename to apps/cogstack-dashboards-demo/LICENSE diff --git a/cogstack-dashboards-demo/README.md b/apps/cogstack-dashboards-demo/README.md similarity index 100% rename from cogstack-dashboards-demo/README.md rename to apps/cogstack-dashboards-demo/README.md diff --git a/cogstack-dashboards-demo/data/.gitkeep b/apps/cogstack-dashboards-demo/data/.gitkeep similarity index 100% rename from cogstack-dashboards-demo/data/.gitkeep rename to apps/cogstack-dashboards-demo/data/.gitkeep diff --git a/cogstack-dashboards-demo/figures/clusters.png b/apps/cogstack-dashboards-demo/figures/clusters.png similarity index 100% rename from cogstack-dashboards-demo/figures/clusters.png rename to apps/cogstack-dashboards-demo/figures/clusters.png diff --git a/cogstack-dashboards-demo/figures/disorder_per_age.png b/apps/cogstack-dashboards-demo/figures/disorder_per_age.png similarity index 100% rename from cogstack-dashboards-demo/figures/disorder_per_age.png rename to apps/cogstack-dashboards-demo/figures/disorder_per_age.png diff --git a/cogstack-dashboards-demo/figures/disorder_per_gender.png b/apps/cogstack-dashboards-demo/figures/disorder_per_gender.png similarity index 100% rename from cogstack-dashboards-demo/figures/disorder_per_gender.png rename to apps/cogstack-dashboards-demo/figures/disorder_per_gender.png diff --git a/cogstack-dashboards-demo/figures/handpicked_co_occurrences.png b/apps/cogstack-dashboards-demo/figures/handpicked_co_occurrences.png similarity index 100% rename from cogstack-dashboards-demo/figures/handpicked_co_occurrences.png rename to apps/cogstack-dashboards-demo/figures/handpicked_co_occurrences.png diff --git a/cogstack-dashboards-demo/figures/presence.png b/apps/cogstack-dashboards-demo/figures/presence.png similarity index 100% rename from cogstack-dashboards-demo/figures/presence.png rename to apps/cogstack-dashboards-demo/figures/presence.png diff --git a/cogstack-dashboards-demo/figures/subject.png b/apps/cogstack-dashboards-demo/figures/subject.png similarity index 100% rename from cogstack-dashboards-demo/figures/subject.png rename to apps/cogstack-dashboards-demo/figures/subject.png diff --git a/cogstack-dashboards-demo/figures/time.png b/apps/cogstack-dashboards-demo/figures/time.png similarity index 100% rename from cogstack-dashboards-demo/figures/time.png rename to apps/cogstack-dashboards-demo/figures/time.png diff --git a/cogstack-dashboards-demo/figures/top_level_concepts.png b/apps/cogstack-dashboards-demo/figures/top_level_concepts.png similarity index 100% rename from cogstack-dashboards-demo/figures/top_level_concepts.png rename to apps/cogstack-dashboards-demo/figures/top_level_concepts.png diff --git a/cogstack-dashboards-demo/requirements.txt b/apps/cogstack-dashboards-demo/requirements.txt similarity index 100% rename from cogstack-dashboards-demo/requirements.txt rename to apps/cogstack-dashboards-demo/requirements.txt diff --git a/cogstack-dashboards-demo/sample_access_scripts/python_os_access.py b/apps/cogstack-dashboards-demo/sample_access_scripts/python_os_access.py similarity index 100% rename from cogstack-dashboards-demo/sample_access_scripts/python_os_access.py rename to apps/cogstack-dashboards-demo/sample_access_scripts/python_os_access.py diff --git a/cogstack-dashboards-demo/sample_access_scripts/sample_curl_command.sh b/apps/cogstack-dashboards-demo/sample_access_scripts/sample_curl_command.sh similarity index 100% rename from cogstack-dashboards-demo/sample_access_scripts/sample_curl_command.sh rename to apps/cogstack-dashboards-demo/sample_access_scripts/sample_curl_command.sh diff --git a/cogstack-dashboards-demo/staging_scripts/co_occurence_generator.py b/apps/cogstack-dashboards-demo/staging_scripts/co_occurence_generator.py similarity index 100% rename from cogstack-dashboards-demo/staging_scripts/co_occurence_generator.py rename to apps/cogstack-dashboards-demo/staging_scripts/co_occurence_generator.py diff --git a/cogstack-dashboards-demo/staging_scripts/co_occurence_hand_selected.py b/apps/cogstack-dashboards-demo/staging_scripts/co_occurence_hand_selected.py similarity index 100% rename from cogstack-dashboards-demo/staging_scripts/co_occurence_hand_selected.py rename to apps/cogstack-dashboards-demo/staging_scripts/co_occurence_hand_selected.py diff --git a/cogstack-dashboards-demo/staging_scripts/disorder_codes.py b/apps/cogstack-dashboards-demo/staging_scripts/disorder_codes.py similarity index 100% rename from cogstack-dashboards-demo/staging_scripts/disorder_codes.py rename to apps/cogstack-dashboards-demo/staging_scripts/disorder_codes.py diff --git a/cogstack-dashboards-demo/staging_scripts/disorders_per_age.py b/apps/cogstack-dashboards-demo/staging_scripts/disorders_per_age.py similarity index 100% rename from cogstack-dashboards-demo/staging_scripts/disorders_per_age.py rename to apps/cogstack-dashboards-demo/staging_scripts/disorders_per_age.py diff --git a/cogstack-dashboards-demo/staging_scripts/disorders_per_sex.py b/apps/cogstack-dashboards-demo/staging_scripts/disorders_per_sex.py similarity index 100% rename from cogstack-dashboards-demo/staging_scripts/disorders_per_sex.py rename to apps/cogstack-dashboards-demo/staging_scripts/disorders_per_sex.py diff --git a/cogstack-dashboards-demo/staging_scripts/patients_per_disorder.py b/apps/cogstack-dashboards-demo/staging_scripts/patients_per_disorder.py similarity index 100% rename from cogstack-dashboards-demo/staging_scripts/patients_per_disorder.py rename to apps/cogstack-dashboards-demo/staging_scripts/patients_per_disorder.py diff --git a/cogstack-dashboards-demo/staging_scripts/top_level_codes.py b/apps/cogstack-dashboards-demo/staging_scripts/top_level_codes.py similarity index 100% rename from cogstack-dashboards-demo/staging_scripts/top_level_codes.py rename to apps/cogstack-dashboards-demo/staging_scripts/top_level_codes.py diff --git a/cogstack-dashboards-demo/visualisation_scripts/generate_meta_images.py b/apps/cogstack-dashboards-demo/visualisation_scripts/generate_meta_images.py similarity index 100% rename from cogstack-dashboards-demo/visualisation_scripts/generate_meta_images.py rename to apps/cogstack-dashboards-demo/visualisation_scripts/generate_meta_images.py diff --git a/cogstack-dashboards-demo/visualisation_scripts/pca_co_occurence.py b/apps/cogstack-dashboards-demo/visualisation_scripts/pca_co_occurence.py similarity index 100% rename from cogstack-dashboards-demo/visualisation_scripts/pca_co_occurence.py rename to apps/cogstack-dashboards-demo/visualisation_scripts/pca_co_occurence.py diff --git a/cogstack-dashboards-demo/visualisation_scripts/vis_disorder_per_age.py b/apps/cogstack-dashboards-demo/visualisation_scripts/vis_disorder_per_age.py similarity index 100% rename from cogstack-dashboards-demo/visualisation_scripts/vis_disorder_per_age.py rename to apps/cogstack-dashboards-demo/visualisation_scripts/vis_disorder_per_age.py diff --git a/cogstack-dashboards-demo/visualisation_scripts/vis_disorder_per_gender.py b/apps/cogstack-dashboards-demo/visualisation_scripts/vis_disorder_per_gender.py similarity index 100% rename from cogstack-dashboards-demo/visualisation_scripts/vis_disorder_per_gender.py rename to apps/cogstack-dashboards-demo/visualisation_scripts/vis_disorder_per_gender.py diff --git a/cogstack-dashboards-demo/visualisation_scripts/vis_top_codes.py b/apps/cogstack-dashboards-demo/visualisation_scripts/vis_top_codes.py similarity index 100% rename from cogstack-dashboards-demo/visualisation_scripts/vis_top_codes.py rename to apps/cogstack-dashboards-demo/visualisation_scripts/vis_top_codes.py diff --git a/cogstack-dashboards-demo/visualisation_scripts/visualise_co_occurence.py b/apps/cogstack-dashboards-demo/visualisation_scripts/visualise_co_occurence.py similarity index 100% rename from cogstack-dashboards-demo/visualisation_scripts/visualise_co_occurence.py rename to apps/cogstack-dashboards-demo/visualisation_scripts/visualise_co_occurence.py diff --git a/apps/cogstack-jupyter-hub/README.md b/apps/cogstack-jupyter-hub/README.md index f6b8d94d..8953ab81 100644 --- a/apps/cogstack-jupyter-hub/README.md +++ b/apps/cogstack-jupyter-hub/README.md @@ -1,6 +1,6 @@ # Cogstack-Jupyter-Hub -[![docker-jupyter-hub-all](https://github.com/CogStack/cogstack-platform/actions/workflows/jupyter-docker-build.yml/badge.svg?branch=main)](https://github.com/CogStack/cogstack-platform/actions/workflows/jupyter-docker-build.yml) +[![docker_build_jupyterhub](https://github.com/CogStack/cogstack-platform/actions/workflows/docker_build_jupyterhub.yml/badge.svg?branch=main)](https://github.com/CogStack/cogstack-platform/actions/workflows/docker_build_jupyterhub.yml) ## Introduction diff --git a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/.helmignore b/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/.helmignore deleted file mode 100644 index 9d315138..00000000 --- a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/.helmignore +++ /dev/null @@ -1,10 +0,0 @@ -# Common VCS directories -.git/ -.gitignore - -# IDE files -.vscode/ -.idea/ - -# macOS -.DS_Store diff --git a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/Chart.yaml b/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/Chart.yaml deleted file mode 100644 index 33532eae..00000000 --- a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v2 -name: cogstack-jupyterhub -description: Helm chart for deploying CogStack JupyterHub -type: application -version: 0.1.0 -appVersion: "2.2.3" diff --git a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/README.md b/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/README.md deleted file mode 100644 index 01c1a1cb..00000000 --- a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# cogstack-jupyterhub Helm Chart - -This chart deploys the CogStack JupyterHub service and mirrors the current Docker Compose setup: - -- loads `env/general.env` and `env/jupyter.env` -- mounts `jupyterhub_config.py`, `userlist`, and `teamlist` -- mounts TLS/cookie files used by JupyterHub -- mounts `/var/run/docker.sock` for DockerSpawner - -## Install using repo env files - -From the repository root: - -```bash -helm upgrade --install cogstack-jupyterhub ./charts/cogstack-jupyterhub \ - --namespace cogstack --create-namespace \ - --set envFiles.useBundled=false \ - --set hubFiles.useBundled=false \ - --set securityFiles.useBundled=false \ - --set-file envFiles.jupyter=env/jupyter.env \ - --set-file envFiles.general=env/general.env \ - --set-file hubFiles.jupyterhubConfig=config/jupyterhub_config.py \ - --set-file hubFiles.userlist=config/userlist \ - --set-file hubFiles.teamlist=config/teamlist \ - --set-file securityFiles.cookieSecret=config/jupyterhub_cookie_secret \ - --set-file securityFiles.tlsKey=security/nifi.key \ - --set-file securityFiles.tlsCert=security/nifi.pem -``` - -## Bundled file mode - -By default, the chart contains copies of current repo files under `charts/cogstack-jupyterhub/files/*`. -If you leave `*.useBundled=true`, Helm will use those bundled copies. - -## Notes - -- This chart keeps DockerSpawner behavior, so it mounts the host Docker socket. -- For multi-node/production Kubernetes, migrating to KubeSpawner is strongly recommended. diff --git a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/files/config/jupyterhub_config.py b/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/files/config/jupyterhub_config.py deleted file mode 100755 index 543850b0..00000000 --- a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/files/config/jupyterhub_config.py +++ /dev/null @@ -1,457 +0,0 @@ -# Configuration file for jupyter-hub -# source : https://github.com/jupyterhub/jupyterhub-deploy-docker/blob/main/basic-example/jupyterhub_config.py - -import os -import sys -import docker -import dockerspawner -import traceback -import logging -#import traitlets -from jupyterhub.auth import LocalAuthenticator -from nativeauthenticator import NativeAuthenticator -from traitlets.config import Config -from oauthenticator.generic import GenericOAuthenticator - - -class LocalNativeAuthenticator(NativeAuthenticator, LocalAuthenticator): - pass - - -DOCKER_NOTEBOOK_IMAGE = os.getenv("JUPYTER_HUB_SINGLEUSER_DOCKER_NOTEBOOK_IMAGE", - "cogstacksystems:jupyterhub/singleuser:latest") - -# JupyterHub requires a single-user instance of the Notebook server, so we -# default to using the `start-singleuser.sh` script included in the -# jupyter/docker-stacks *-notebook images as the Docker run command when -# spawning containers. Optionally, you can override the Docker run command -# using the JUPYTER_HUB_DOCKER_SPAWN_CMD environment variable. -SPAWN_CMD = os.environ.get("JUPYTER_HUB_DOCKER_SPAWN_CMD", "start-singleuser.py") - -# Connect containers to this Docker network -# IMPORTANT, THIS MUST MATCH THE NETWORK DECLARED in "services.yml", by default: "cogstack-net" -NETWORK_NAME = os.environ.get("JUPYTER_HUB_DOCKER_NETWORK_NAME", "cogstack-net") - -# The IP address or hostname of the JupyterHub container in the Docker network -HUB_CONTAINER_IP_OR_NAME = os.environ.get("JUPYTER_HUB_DOCKER_CONTAINER_NAME", "cogstack-jupyter-hub") - -# The timeout in seconds after which the idle notebook container will be shutdown - 7 days -NOTEBOOK_IDLE_TIMEOUT = int(os.environ.get("DOCKER_NOTEBOOK_IDLE_TIMEOUT", str(7 * 24 * 60 * 60))) - -SELECT_NOTEBOOK_IMAGE_ALLOWED = str(os.environ.get("JUPYTERHUB_DOCKER_SELECT_NOTEBOOK_IMAGE_ALLOWED", "false")).lower() - -RUN_IN_DEBUG_MODE = str(os.environ.get("JUPYTERHUB_DOCKER_NOTEBOOK_DEBUG_MODE", "false")).lower() - -ENABLE_OIDC_AUTH = str(os.environ.get("JUPYTERHUB_DOCKER_ENABLE_OIDC_AUTH", "false")).lower() - -# Explicitly set notebook directory because we"ll be mounting a host volume to -# it. Most jupyter/docker-stacks *-notebook images run the Notebook server as -# user `jovyan`, and set the notebook directory to `/home/jovyan/work`. -# We follow the same convention. -NOTEBOOK_DIR = os.environ.get("JUPYTER_HUB_DOCKER_NOTEBOOK_DIR", "/home/jovyan/work") -SHARED_CONTENT_DIR = os.environ.get("JUPYTER_HUB_DOCKER_SHARED_DIR", "/home/jovyan/scratch") -#WORK_DIR = os.environ.get("DOCKER_JUPYTER_WORK_DIR", "/lab/workspaces/auto-b/tree/" + str(NOTEBOOK_DIR.split("/")[-1])) -WORK_DIR = "/lab/" - -ENV_PROXIES = { - "HTTP_PROXY": os.environ.get("HTTP_PROXY", ""), - "HTTPS_PROXY": os.environ.get("HTTPS_PROXY", ""), - "NO_PROXY": ",".join(list(filter(len, os.environ.get("NO_PROXY", "").split(",") + [HUB_CONTAINER_IP_OR_NAME]))), - "http_proxy": os.environ.get("HTTP_PROXY", os.environ.get("http_proxy", "")), - "https_proxy": os.environ.get("HTTPS_PROXY", os.environ.get("https_proxy", "")), - "no_proxy": ",".join(list(filter(len, os.environ.get("no_proxy", "").split(",") + [HUB_CONTAINER_IP_OR_NAME]))), -} - -os.environ["NO_PROXY"] = "" -os.environ["no_proxy"] = "" -os.environ["HTTP_PROXY"] = "" -os.environ["HTTPS_PROXY"] = "" -os.environ["http_proxy"] = "" -os.environ["https_proxy"] = "" - -c: Config = get_config() - -# Spawn containers from this image -# Either use the CoGstack one from the repo which is huge and contains all the stuff needed or, -# use the default official one which is clean. -c.DockerSpawner.image = DOCKER_NOTEBOOK_IMAGE - -c.DockerSpawner.use_internal_ip = True -c.DockerSpawner.network_name = NETWORK_NAME -# Pass the network name as argument to spawned containers -c.DockerSpawner.extra_host_config = {"network_mode": NETWORK_NAME} - -# # Mount the real users Docker volume on the host to the notebook user"s -# # notebook directory in the container -c.DockerSpawner.volumes = {"jupyterhub-user-{username}": NOTEBOOK_DIR, "jupyter-hub-shared-scratch": SHARED_CONTENT_DIR} - -# Remove containers once they are stopped -c.DockerSpawner.remove = False - -if SELECT_NOTEBOOK_IMAGE_ALLOWED == "true": - # c.DockerSpawner.image_whitelist has been deprecated for allowed_images - c.DockerSpawner.allowed_images = { - "minimal": "jupyterhub/singleuser:latest", - "cogstack": "cogstacksystems/jupyter-singleuser:latest", - "cogstack-gpu": "cogstacksystems/jupyter-singleuser-gpu:latest" - } - # https://github.com/jupyterhub/dockerspawner/issues/423 - c.DockerSpawner.remove = True - -if RUN_IN_DEBUG_MODE == "true": - # For debugging arguments passed to spawned containers - c.DockerSpawner.debug = True - c.Spawner.debug = True - # Enable debug-logging of the single-user server - c.LocalProcessSpawner.debug = True - - -# Spawn single-user servers as Docker containers -class DockerSpawner(dockerspawner.DockerSpawner): - def start(self): - # username is self.user.name - self.volumes = {"jupyterhub-user-{}".format(self.user.name): NOTEBOOK_DIR} - - # Mount the real users Docker volume on the host to the notebook user"s - # # notebook directory in the container - #self.volumes = {f"jupyterhub-user-{self.user.name}": NOTEBOOK_DIR, "jupyter-hub-shared-scratch": SHARED_CONTENT_DIR} - - if self.user.name not in whitelist: - whitelist.add(self.user.name) - with open(userlist_path, "a") as f: - f.write("\n") - f.write(self.user.name) - - if self.user.name in list(team_map.keys()): - for team in team_map[self.user.name]: - team_dir_path = os.path.join(SHARED_CONTENT_DIR, team) - self.volumes["jupyterhub-team-{}".format(team)] = { - "bind": team_dir_path, - "mode": "rw", # or ro for read-only - } - - # this is a temporary fix, need to actually check permissions - self.mem_limit = RESOURCE_ALLOCATION_USER_RAM_LIMIT - self.post_start_cmd = "chmod -R 777 " + SHARED_CONTENT_DIR - - return super().start() - - -def pre_spawn_hook(spawner: DockerSpawner): - #username = spawner.user.name - #spawner.environment["GREETING"] = f"Hello {username}" - try: - for key, value in ENV_PROXIES.items(): - spawner.environment[str(key)] = str(value) - with open("/home/jovyan/test.txt", "w+") as f: - for key, value in ENV_PROXIES.items(): - f.write("export" + " " + str(key) + "=" + str(value) + "\n") - except Exception: - traceback.print_exc() - - -""" - def pre_spawn_hook(spawner): - username = str(spawner.user.name).lower() - try: - pwd.getpwnam(username) - except KeyError: - subprocess.check_call(["useradd", "-ms", "/bin/bash", username]) -""" - -c.Spawner.default_url = WORK_DIR -c.Spawner.pre_spawn_hook = pre_spawn_hook - -#c.Spawner.ip = "127.0.0.1" - -# This is buggy, setting the HTTP(s)_PROXY & NO_PROXY variables via pre/post -# spawn hook is better -#c.Spawner.environment = ENV_PROXIES - -# AUTHENTICATION -#c.Authenticator.allowed_users = {"admin"} -c.Authenticator.admin_users = admin = {"admin"} - -# By default all users that make sign up on Native Authenticator -# need an admin approval so they can actually log in the system. -c.Authenticator.open_signup = False - -c.NotebookApp.allow_root = False - -c.LocalAuthenticator.create_system_users = True -c.SystemdSpawner.dynamic_users = True -c.PAMAuthenticator.admin_groups = {"wheel"} -c.Authenticator.allowed_users = whitelist = set() - -#c.Authenticator.manage_groups = True -#c.Authenticator.allow_all = True - -curr_dir = os.path.dirname(__file__) - -# Get active users -userlist_path = os.path.join(curr_dir, "userlist") -teamlist_path = os.path.join(curr_dir, "teamlist") - -# Resource allocation env vars -# RAM - GB of ram, CPU - num of cores -RESOURCE_ALLOCATION_USER_CPU_LIMIT = os.environ.get("JUPYTER_HUB_SINGLEUSER_RESOURCE_ALLOCATION_USER_CPU_LIMIT", "2") -RESOURCE_ALLOCATION_USER_RAM_LIMIT = os.environ.get("JUPYTER_HUB_SINGLEUSER_RESOURCE_ALLOCATION_USER_RAM_LIMIT", "2.0G") -RESOURCE_ALLOCATION_ADMIN_CPU_LIMIT = os.environ.get("JUPYTER_HUB_SINGLEUSER_RESOURCE_ALLOCATION_ADMIN_CPU_LIMIT", "2") -RESOURCE_ALLOCATION_ADMIN_RAM_LIMIT = os.environ.get("JUPYTER_HUB_SINGLEUSER_RESOURCE_ALLOCATION_ADMIN_RAM_LIMIT", "4.0G") - - -def per_user_limit(role): - ram_limits = {"user": (int(RESOURCE_ALLOCATION_USER_CPU_LIMIT), RESOURCE_ALLOCATION_USER_RAM_LIMIT), - "admin": (int(RESOURCE_ALLOCATION_ADMIN_CPU_LIMIT), RESOURCE_ALLOCATION_ADMIN_RAM_LIMIT)} - return ram_limits.get(role) - - -# Spawn single-user servers as Docker containers -c.JupyterHub.spawner_class = DockerSpawner - -# set DockerSpawner args -c.DockerSpawner.extra_create_kwargs = {"user": "root"} -c.DockerSpawner.args = [ - "--allow-root", - "--NotebookApp.token=''", -] - -c.DockerSpawner.cmd = [SPAWN_CMD] if isinstance(SPAWN_CMD, str) else SPAWN_CMD - -c.DockerSpawner.notebook_dir = NOTEBOOK_DIR - -with open(userlist_path) as f: - for line in f: - if not line: - continue - parts = line.split() - # in case of newline at the end of userlist file - if len(parts) >= 1: - name = str(parts[0]).lower() - role = "user" - - if (len(parts) > 1): - role = parts[1] - whitelist.add(name) - if len(parts) > 1 and role == "admin": - admin.add(name) - - c.Spawner.mem_limit = c.SwarmSpawner.mem_limit = c.DockerSpawner.mem_limit = per_user_limit(role)[1] - c.Spawner.cpu_limit = c.SwarmSpawner.cpu_limit = c.DockerSpawner.cpu_limit = per_user_limit(role)[0] - - c.Spawner.cpu_guarantee = c.SwarmSpawner.cpu_guarantee = c.DockerSpawner.cpu_guarantee = 1 - c.Spawner.mem_guarantee = c.SwarmSpawner.mem_guarantee = c.DockerSpawner.mem_guarantee = "1.0G" - - prev_conf = c.DockerSpawner.extra_host_config - prev_conf.update({"mem_limit": c.DockerSpawner.mem_limit}) - - c.DockerSpawner.extra_host_config = prev_conf - -# Get team memberships -team_map = {user: set() for user in whitelist} -with open(teamlist_path) as f: - for line in f: - if not line: - continue - parts = line.split() - if len(parts) > 1: - team = parts[0] - members = set(parts[1:]) - for member in members: - team_map[member].add(team) - -gpu_support_enabled = os.environ.get("JUPYTERHUB_DOCKER_ENABLE_GPU_SUPPORT", "false") - -if gpu_support_enabled.lower() == "true": - c.DockerSpawner.extra_host_config = { - "device_requests": [ - docker.types.DeviceRequest( - count=-1, - capabilities=[["gpu", "utility", "compute", "video"]] - ), - ], - } - -c.DockerSpawner.environment = { - "GRANT_SUDO": "1", - "UID": "0", # workaround https://github.com/jupyter/docker-stacks/pull/420, -} - -c.DockerSpawner.environment.update(ENV_PROXIES) - -# Alternative, use: "nativeauthenticator.NativeAuthenticator" -#c.JupyterHub.authenticator_class = LocalNativeAuthenticator - -if ENABLE_OIDC_AUTH == "true": - # Use Generic OAuth with Keycloak - c.JupyterHub.authenticator_class = GenericOAuthenticator - - # Automatically redirect to OAuth provider (skip login button) - c.Authenticator.auto_login = True - - # Keycloak configuration - c.GenericOAuthenticator.client_id = os.environ.get("JUPYTERHUB_OAUTH_CLIENT_ID", "cogstack-jupyterhub") - c.GenericOAuthenticator.client_secret = os.environ.get("JUPYTERHUB_OAUTH_CLIENT_SECRET", "") - c.GenericOAuthenticator.oauth_callback_url = os.environ.get( - "JUPYTERHUB_OAUTH_CALLBACK_URL", - "https://localhost:8888/hub/oauth_callback" - ) - - # Keycloak endpoints - # Browser-accessible URL - keycloak_url_public = os.environ.get("JUPYTERHUB_KEYCLOAK_URL_PUBLIC", "http://keycloak.cogstack.localhost") - # Internal container URL (for backend token exchange) - keycloak_url_internal = os.environ.get("JUPYTERHUB_KEYCLOAK_URL_INTERNAL", "http://keycloak:8080") - realm = os.environ.get("JUPYTERHUB_KEYCLOAK_REALM", "cogstack-realm") - - # authorize_url is accessed by the browser, so use public URL - c.GenericOAuthenticator.authorize_url = f"{keycloak_url_public}/realms/{realm}/protocol/openid-connect/auth" - # token_url and userdata_url are accessed by JupyterHub backend, so use internal URL - c.GenericOAuthenticator.token_url = f"{keycloak_url_internal}/realms/{realm}/protocol/openid-connect/token" - c.GenericOAuthenticator.userdata_url = f"{keycloak_url_internal}/realms/{realm}/protocol/openid-connect/userinfo" - - c.GenericOAuthenticator.username_claim = "preferred_username" - - # Require users to be in specific Keycloak groups - c.GenericOAuthenticator.manage_groups = True - c.GenericOAuthenticator.allowed_groups = ["jupyterhub-users", "juypterhub-admins"] - c.GenericOAuthenticator.claim_groups_key = "groups" - - # Map Keycloak roles to JupyterHub admin - c.GenericOAuthenticator.admin_groups = ["jupyterhub-admins"] - - c.GenericOAuthenticator.scope = ["openid", "profile", "email", "groups"] - - # Allow all authenticated users (or restrict with allowed_groups above) - # c.GenericOAuthenticator.allow_all = True -else: - c.FirstUseAuthenticator.create_users = True - c.JupyterHub.authenticator_class = "firstuseauthenticator.FirstUseAuthenticator" - -# User containers will access hub by container name on the Docker network -c.JupyterHub.ip = "0.0.0.0" -c.JupyterHub.hub_ip = "0.0.0.0" -c.JupyterHub.hub_connect_ip = HUB_CONTAINER_IP_OR_NAME - -jupyter_hub_port = int(os.environ.get("JUPYTERHUB_INTERNAL_PORT", 8888)) -jupyter_hub_proxy_api_port = int(os.environ.get("JUPYTERHUB_INTERNAL_PROXY_API_PORT", 8887)) -jupyter_hub_ssl_port = int(os.environ.get("JUPYTERHUB_SSL_PORT", 443)) -jupyter_hub_proxy_url = str(os.environ.get("JUPYTERHUB_PROXY_API_URL", "http://127.0.0.1:")) - -c.ConfigurableHTTPProxy.api_url = jupyter_hub_proxy_url + str(jupyter_hub_proxy_api_port) -# c.JupyterHub.hub_connect_url = f"https://{HUB_CONTAINER_IP_OR_NAME}:{jupyter_hub_ssl_port}" -# c.DockerSpawner.hub_connect_url = c.JupyterHub.hub_connect_url - -# ideally a private network address -# c.JupyterHub.proxy_api_ip = "10.0.1.4" -# c.JupyterHub.proxy_api_port = jupyter_hub_proxy_api_port - -# TLS config -c.JupyterHub.port = jupyter_hub_ssl_port -c.JupyterHub.ssl_key = os.environ.get("JUPYTERHUB_SSL_KEY", "/srv/jupyterhub/security/nifi.key") -c.JupyterHub.ssl_cert = os.environ.get("JUPYTERHUB_SSL_CERT", "/srv/jupyterhub/security/nifi.pem") - -# Persist hub data on volume mounted inside container -data_dir = os.environ.get("JUPYTERHUB_DATA_VOLUME_CONTAINER", "") - -c.JupyterHub.cookie_secret_file = data_dir + "jupyterhub_cookie_secret" - -c.JupyterHub.services = [] - -if NOTEBOOK_IDLE_TIMEOUT > 0: - c.JupyterHub.services.append({ - "name": "idle-culler", - "admin": True, - "command": [ - sys.executable, - "-m", "jupyterhub_idle_culler", - f"--timeout={NOTEBOOK_IDLE_TIMEOUT}", - "--url=http://127.0.0.1:8081/hub/api", - ], - }) - -#------------------------------------------------------------------------------ -# Application(SingletonConfigurable) configuration -#------------------------------------------------------------------------------ -# This is an application. - -c.JupyterHub.pid_file = "/srv/jupyterhub/jupyter_hub.pid" -c.ConfigurableHTTPProxy.pid_file = "/srv/jupyterhub/jupyter_hub_proxy.pid" - -# The date format used by logging formatters for %(asctime)s -# Default: "%Y-%m-%d %H:%M:%S" -# c.Application.log_datefmt = "%Y-%m-%d %H:%M:%S" - -# The Logging format template -# Default: "[%(name)s]%(highlevel)s %(message)s" -# c.Application.log_format = "[%(name)s]%(highlevel)s %(message)s" - -jupyter_log_level = os.environ.get("JUPYTERHUB_LOG_LEVEL", "INFO") - -# Set the log level by value or name. -# Choices: any of [0, 10, 20, 30, 40, 50, "DEBUG", "INFO", "WARN", "ERROR", "CRITICAL"] -# Default: INFO -c.Application.log_level = jupyter_log_level - -# Instead of starting the Application, dump configuration to stdout -# Default: False -# c.Application.show_config = False - -# Instead of starting the Application, dump configuration to stdout (as JSON) -# Default: False -# c.Application.show_config_json = False - -# Let"s start with the least privilege, especially on a single host having limited resources -c.JupyterHub.allow_named_servers = False - -# Timeout (in seconds) to wait for spawners to initialize -# -# Checking if spawners are healthy can take a long time if many spawners are -# active at hub start time. -# -# If it takes longer than this timeout to check, init_spawner will be left to -# complete in the background and the http server is allowed to start. -# -# A timeout of -1 means wait forever, which can mean a slow startup of the Hub -# but ensures that the Hub is fully consistent by the time it starts responding -# to requests. This matches the behavior of jupyterhub 1.0. -# -# .. versionadded: 1.1.0 -# Default: 10 -c.JupyterHub.init_spawners_timeout = 720 - -# Timeout (in seconds) before giving up on a spawned HTTP server -# -# Once a server has successfully been spawned, this is the amount of time we -# wait before assuming that the server is unable to accept connections. -# Default: 30 -c.Spawner.http_timeout = 720 - -# Timeout (in seconds) before giving up on starting of single-user server. -# -# This is the timeout for start to return, not the timeout for the server to -# respond. Callers of spawner.start will assume that startup has failed if it -# takes longer than this. start should return when the server process is started -# and its location is known. -# Default: 60 -c.Spawner.start_timeout = 720 - - -#------------------------------------------------------------------------------ -# LocalProcessSpawner configuration -#------------------------------------------------------------------------------ - -# A Spawner that just uses Popen to start local processes as users. -# -# Requires users to exist on the local system. -# -# This is the default spawner for JupyterHub. - -# Seconds to wait for process to halt after SIGINT before proceeding to SIGTERM -c.LocalProcessSpawner.interrupt_timeout = 120 - -# Seconds to wait for process to halt after SIGKILL before giving up -c.LocalProcessSpawner.kill_timeout = 120 - -# Seconds to wait for process to halt after SIGTERM before proceeding to SIGKILL -c.LocalProcessSpawner.term_timeout = 120 diff --git a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/files/config/jupyterhub_cookie_secret b/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/files/config/jupyterhub_cookie_secret deleted file mode 100644 index de06abd0..00000000 --- a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/files/config/jupyterhub_cookie_secret +++ /dev/null @@ -1 +0,0 @@ -e91801df470c99061e3272f058a3ecb79b0e852cc3181069c8d333fc4d749394 diff --git a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/files/config/teamlist b/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/files/config/teamlist deleted file mode 100755 index bfbfa72c..00000000 --- a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/files/config/teamlist +++ /dev/null @@ -1 +0,0 @@ -cogstack_sharing admin cogstack_user \ No newline at end of file diff --git a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/files/config/userlist b/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/files/config/userlist deleted file mode 100755 index 364a6e51..00000000 --- a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/files/config/userlist +++ /dev/null @@ -1,2 +0,0 @@ -admin admin -cogstack_user \ No newline at end of file diff --git a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/NOTES.txt b/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/NOTES.txt deleted file mode 100644 index 4ca6415e..00000000 --- a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/NOTES.txt +++ /dev/null @@ -1,22 +0,0 @@ -CogStack JupyterHub has been deployed. - -Service name: - {{ include "cogstack-jupyterhub.fullname" . }} - -Port forward: - kubectl -n {{ .Release.Namespace }} port-forward svc/{{ include "cogstack-jupyterhub.fullname" . }} 8888:{{ .Values.service.port }} - -Recommended install command to use repository env/config files directly: - helm upgrade --install {{ .Release.Name }} {{ .Chart.Name }} \ - --namespace {{ .Release.Namespace }} --create-namespace \ - --set envFiles.useBundled=false \ - --set hubFiles.useBundled=false \ - --set securityFiles.useBundled=false \ - --set-file envFiles.jupyter=env/jupyter.env \ - --set-file envFiles.general=env/general.env \ - --set-file hubFiles.jupyterhubConfig=config/jupyterhub_config.py \ - --set-file hubFiles.userlist=config/userlist \ - --set-file hubFiles.teamlist=config/teamlist \ - --set-file securityFiles.cookieSecret=config/jupyterhub_cookie_secret \ - --set-file securityFiles.tlsKey=security/nifi.key \ - --set-file securityFiles.tlsCert=security/nifi.pem diff --git a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/_helpers.tpl b/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/_helpers.tpl deleted file mode 100644 index 00f8b68d..00000000 --- a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/_helpers.tpl +++ /dev/null @@ -1,59 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{- define "cogstack-jupyterhub.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "cogstack-jupyterhub.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{- define "cogstack-jupyterhub.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "cogstack-jupyterhub.labels" -}} -helm.sh/chart: {{ include "cogstack-jupyterhub.chart" . }} -{{ include "cogstack-jupyterhub.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{- define "cogstack-jupyterhub.selectorLabels" -}} -app.kubernetes.io/name: {{ include "cogstack-jupyterhub.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{- define "cogstack-jupyterhub.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} -{{- default (include "cogstack-jupyterhub.fullname" .) .Values.serviceAccount.name -}} -{{- else -}} -{{- default "default" .Values.serviceAccount.name -}} -{{- end -}} -{{- end -}} - -{{- define "cogstack-jupyterhub.envConfigMapName" -}} -{{- printf "%s-env-files" (include "cogstack-jupyterhub.fullname" .) -}} -{{- end -}} - -{{- define "cogstack-jupyterhub.hubConfigMapName" -}} -{{- printf "%s-hub-config" (include "cogstack-jupyterhub.fullname" .) -}} -{{- end -}} - -{{- define "cogstack-jupyterhub.secretName" -}} -{{- if .Values.securityFiles.existingSecret -}} -{{- .Values.securityFiles.existingSecret -}} -{{- else -}} -{{- printf "%s-hub-secrets" (include "cogstack-jupyterhub.fullname" .) -}} -{{- end -}} -{{- end -}} diff --git a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/configmap-env-files.yaml b/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/configmap-env-files.yaml deleted file mode 100644 index 5c7872c6..00000000 --- a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/configmap-env-files.yaml +++ /dev/null @@ -1,26 +0,0 @@ -{{- if and (not .Values.envFiles.useBundled) (eq (trim .Values.envFiles.jupyter) "") }} -{{- fail "envFiles.jupyter is required when envFiles.useBundled=false" }} -{{- end }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "cogstack-jupyterhub.envConfigMapName" . }} - labels: - {{- include "cogstack-jupyterhub.labels" . | nindent 4 }} -data: - general.env: | -{{- if ne (trim .Values.envFiles.general) "" }} -{{- .Values.envFiles.general | nindent 4 }} -{{- else if .Values.envFiles.useBundled }} -{{- .Files.Get "files/env/general.env" | nindent 4 }} -{{- else }} - # optional -{{- end }} - jupyter.env: | -{{- if ne (trim .Values.envFiles.jupyter) "" }} -{{- .Values.envFiles.jupyter | nindent 4 }} -{{- else if .Values.envFiles.useBundled }} -{{- .Files.Get "files/env/jupyter.env" | nindent 4 }} -{{- else }} - # required when useBundled=false -{{- end }} diff --git a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/configmap-hub-files.yaml b/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/configmap-hub-files.yaml deleted file mode 100644 index ee42054d..00000000 --- a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/configmap-hub-files.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{- if and (not .Values.hubFiles.useBundled) (eq (trim .Values.hubFiles.jupyterhubConfig) "") }} -{{- fail "hubFiles.jupyterhubConfig is required when hubFiles.useBundled=false" }} -{{- end }} -{{- if and (not .Values.hubFiles.useBundled) (eq (trim .Values.hubFiles.userlist) "") }} -{{- fail "hubFiles.userlist is required when hubFiles.useBundled=false" }} -{{- end }} -{{- if and (not .Values.hubFiles.useBundled) (eq (trim .Values.hubFiles.teamlist) "") }} -{{- fail "hubFiles.teamlist is required when hubFiles.useBundled=false" }} -{{- end }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "cogstack-jupyterhub.hubConfigMapName" . }} - labels: - {{- include "cogstack-jupyterhub.labels" . | nindent 4 }} -data: - jupyterhub_config.py: | -{{- if ne (trim .Values.hubFiles.jupyterhubConfig) "" }} -{{- .Values.hubFiles.jupyterhubConfig | nindent 4 }} -{{- else }} -{{- .Files.Get "files/config/jupyterhub_config.py" | nindent 4 }} -{{- end }} - userlist: | -{{- if ne (trim .Values.hubFiles.userlist) "" }} -{{- .Values.hubFiles.userlist | nindent 4 }} -{{- else }} -{{- .Files.Get "files/config/userlist" | nindent 4 }} -{{- end }} - teamlist: | -{{- if ne (trim .Values.hubFiles.teamlist) "" }} -{{- .Values.hubFiles.teamlist | nindent 4 }} -{{- else }} -{{- .Files.Get "files/config/teamlist" | nindent 4 }} -{{- end }} diff --git a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/deployment.yaml b/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/deployment.yaml deleted file mode 100644 index 22c00538..00000000 --- a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/deployment.yaml +++ /dev/null @@ -1,152 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "cogstack-jupyterhub.fullname" . }} - labels: - {{- include "cogstack-jupyterhub.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - {{- include "cogstack-jupyterhub.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "cogstack-jupyterhub.selectorLabels" . | nindent 8 }} - {{- with .Values.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - annotations: - checksum/env-files: {{ include (print $.Template.BasePath "/configmap-env-files.yaml") . | sha256sum }} - checksum/hub-files: {{ include (print $.Template.BasePath "/configmap-hub-files.yaml") . | sha256sum }} - checksum/hub-secret: {{ include (print $.Template.BasePath "/secret-hub-files.yaml") . | sha256sum }} - {{- with .Values.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ include "cogstack-jupyterhub.serviceAccountName" . }} - {{- with .Values.podSecurityContext }} - securityContext: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: hub - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- with .Values.securityContext }} - securityContext: - {{- toYaml . | nindent 12 }} - {{- end }} - command: - - {{ .Values.runtime.shell | quote }} - - -lc - args: - - | - set -eo pipefail - if [ -f /etc/cogstack/env/general.env ]; then - set -a - source /etc/cogstack/env/general.env - set +a - fi - if [ -f /etc/cogstack/env/jupyter.env ]; then - set -a - source /etc/cogstack/env/jupyter.env - set +a - fi - exec {{ .Values.runtime.command }} -f {{ .Values.runtime.configPath }} - ports: - - name: https - containerPort: {{ .Values.service.targetPort }} - protocol: TCP - {{- $extraEnv := .Values.extraEnv | default (dict) }} - {{- if gt (len $extraEnv) 0 }} - env: - {{- range $key := keys $extraEnv | sortAlpha }} - - name: {{ $key }} - value: {{ index $extraEnv $key | quote }} - {{- end }} - {{- end }} - volumeMounts: - - name: env-files - mountPath: /etc/cogstack/env - readOnly: true - - name: hub-config - mountPath: /srv/jupyterhub/jupyterhub_config.py - subPath: jupyterhub_config.py - readOnly: true - - name: hub-config - mountPath: /srv/jupyterhub/userlist - subPath: userlist - readOnly: true - - name: hub-config - mountPath: /srv/jupyterhub/teamlist - subPath: teamlist - readOnly: true - - name: hub-secret - mountPath: /srv/jupyterhub/security - readOnly: true - - name: hub-secret - mountPath: /srv/jupyterhub/jupyterhub_cookie_secret - subPath: jupyterhub_cookie_secret - readOnly: true - - name: hub-data - mountPath: /srv/jupyterhub - - name: shared-scratch - mountPath: /home/jovyan/scratch - {{- if .Values.dockerSocket.enabled }} - - name: docker-socket - mountPath: /var/run/docker.sock - {{- end }} - {{- with .Values.resources }} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - volumes: - - name: env-files - configMap: - name: {{ include "cogstack-jupyterhub.envConfigMapName" . }} - defaultMode: 0444 - - name: hub-config - configMap: - name: {{ include "cogstack-jupyterhub.hubConfigMapName" . }} - defaultMode: 0444 - - name: hub-secret - secret: - secretName: {{ include "cogstack-jupyterhub.secretName" . }} - defaultMode: 0400 - - name: hub-data - {{- if .Values.persistence.hub.enabled }} - persistentVolumeClaim: - claimName: {{ default (printf "%s-hub" (include "cogstack-jupyterhub.fullname" .)) .Values.persistence.hub.existingClaim }} - {{- else }} - emptyDir: {} - {{- end }} - - name: shared-scratch - {{- if .Values.persistence.scratch.enabled }} - persistentVolumeClaim: - claimName: {{ default (printf "%s-scratch" (include "cogstack-jupyterhub.fullname" .)) .Values.persistence.scratch.existingClaim }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.dockerSocket.enabled }} - - name: docker-socket - hostPath: - path: {{ .Values.dockerSocket.hostPath }} - type: Socket - {{- end }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/ingress.yaml b/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/ingress.yaml deleted file mode 100644 index 4179244f..00000000 --- a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/ingress.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if .Values.ingress.enabled -}} -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: {{ include "cogstack-jupyterhub.fullname" . }} - labels: - {{- include "cogstack-jupyterhub.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if .Values.ingress.className }} - ingressClassName: {{ .Values.ingress.className }} - {{- end }} - {{- with .Values.ingress.tls }} - tls: - {{- toYaml . | nindent 4 }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - pathType: {{ .pathType }} - backend: - service: - name: {{ include "cogstack-jupyterhub.fullname" $ }} - port: - number: {{ $.Values.service.port }} - {{- end }} - {{- end }} -{{- end }} diff --git a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/pvc-hub.yaml b/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/pvc-hub.yaml deleted file mode 100644 index bb0a2463..00000000 --- a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/pvc-hub.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if and .Values.persistence.hub.enabled (not .Values.persistence.hub.existingClaim) }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ include "cogstack-jupyterhub.fullname" . }}-hub - labels: - {{- include "cogstack-jupyterhub.labels" . | nindent 4 }} -spec: - accessModes: - {{- toYaml .Values.persistence.hub.accessModes | nindent 4 }} - {{- if .Values.persistence.hub.storageClassName }} - storageClassName: {{ .Values.persistence.hub.storageClassName | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.persistence.hub.size | quote }} -{{- end }} diff --git a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/pvc-scratch.yaml b/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/pvc-scratch.yaml deleted file mode 100644 index a7666cd6..00000000 --- a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/pvc-scratch.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if and .Values.persistence.scratch.enabled (not .Values.persistence.scratch.existingClaim) }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ include "cogstack-jupyterhub.fullname" . }}-scratch - labels: - {{- include "cogstack-jupyterhub.labels" . | nindent 4 }} -spec: - accessModes: - {{- toYaml .Values.persistence.scratch.accessModes | nindent 4 }} - {{- if .Values.persistence.scratch.storageClassName }} - storageClassName: {{ .Values.persistence.scratch.storageClassName | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.persistence.scratch.size | quote }} -{{- end }} diff --git a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/secret-hub-files.yaml b/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/secret-hub-files.yaml deleted file mode 100644 index b3bcae47..00000000 --- a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/secret-hub-files.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- if not .Values.securityFiles.existingSecret }} -{{- if and (not .Values.securityFiles.useBundled) (eq (trim .Values.securityFiles.cookieSecret) "") }} -{{- fail "securityFiles.cookieSecret is required when securityFiles.useBundled=false and no existingSecret is set" }} -{{- end }} -{{- if and (not .Values.securityFiles.useBundled) (eq (trim .Values.securityFiles.tlsKey) "") }} -{{- fail "securityFiles.tlsKey is required when securityFiles.useBundled=false and no existingSecret is set" }} -{{- end }} -{{- if and (not .Values.securityFiles.useBundled) (eq (trim .Values.securityFiles.tlsCert) "") }} -{{- fail "securityFiles.tlsCert is required when securityFiles.useBundled=false and no existingSecret is set" }} -{{- end }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "cogstack-jupyterhub.secretName" . }} - labels: - {{- include "cogstack-jupyterhub.labels" . | nindent 4 }} -type: Opaque -stringData: - jupyterhub_cookie_secret: | -{{- if ne (trim .Values.securityFiles.cookieSecret) "" }} -{{- .Values.securityFiles.cookieSecret | nindent 4 }} -{{- else }} -{{- .Files.Get "files/config/jupyterhub_cookie_secret" | nindent 4 }} -{{- end }} - nifi.key: | -{{- if ne (trim .Values.securityFiles.tlsKey) "" }} -{{- .Values.securityFiles.tlsKey | nindent 4 }} -{{- else }} -{{- .Files.Get "files/security/nifi.key" | nindent 4 }} -{{- end }} - nifi.pem: | -{{- if ne (trim .Values.securityFiles.tlsCert) "" }} -{{- .Values.securityFiles.tlsCert | nindent 4 }} -{{- else }} -{{- .Files.Get "files/security/nifi.pem" | nindent 4 }} -{{- end }} -{{- end }} diff --git a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/service.yaml b/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/service.yaml deleted file mode 100644 index e7e135b4..00000000 --- a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "cogstack-jupyterhub.fullname" . }} - labels: - {{- include "cogstack-jupyterhub.labels" . | nindent 4 }} - {{- with .Values.service.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - type: {{ .Values.service.type }} - selector: - {{- include "cogstack-jupyterhub.selectorLabels" . | nindent 4 }} - ports: - - name: https - port: {{ .Values.service.port }} - targetPort: {{ .Values.service.targetPort }} - protocol: TCP diff --git a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/serviceaccount.yaml b/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/serviceaccount.yaml deleted file mode 100644 index 94b59f79..00000000 --- a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "cogstack-jupyterhub.serviceAccountName" . }} - labels: - {{- include "cogstack-jupyterhub.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/values.yaml b/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/values.yaml deleted file mode 100644 index 859a75d7..00000000 --- a/apps/cogstack-jupyter-hub/charts/cogstack-jupyterhub/values.yaml +++ /dev/null @@ -1,90 +0,0 @@ -replicaCount: 1 - -image: - repository: cogstacksystems/jupyter-hub - tag: "2.2.3" - pullPolicy: IfNotPresent - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - create: false - annotations: {} - name: "" - -podAnnotations: {} -podLabels: {} -podSecurityContext: {} -securityContext: - runAsUser: 0 - runAsGroup: 0 - -resources: {} - -nodeSelector: {} -tolerations: [] -affinity: {} - -extraEnv: {} - -service: - type: ClusterIP - port: 8888 - targetPort: 443 - annotations: {} - -ingress: - enabled: false - className: "" - annotations: {} - hosts: - - host: jupyterhub.local - paths: - - path: / - pathType: Prefix - tls: [] - -persistence: - hub: - enabled: true - existingClaim: "" - storageClassName: "" - accessModes: - - ReadWriteOnce - size: 10Gi - scratch: - enabled: true - existingClaim: "" - storageClassName: "" - accessModes: - - ReadWriteOnce - size: 10Gi - -dockerSocket: - enabled: true - hostPath: /var/run/docker.sock - -envFiles: - useBundled: true - general: "" - jupyter: "" - -hubFiles: - useBundled: true - jupyterhubConfig: "" - userlist: "" - teamlist: "" - -securityFiles: - useBundled: true - existingSecret: "" - cookieSecret: "" - tlsKey: "" - tlsCert: "" - -runtime: - shell: /bin/bash - command: jupyterhub - configPath: /srv/jupyterhub/jupyterhub_config.py diff --git a/observability/README.md b/apps/observability/README.md similarity index 62% rename from observability/README.md rename to apps/observability/README.md index d17c0ee0..78251110 100644 --- a/observability/README.md +++ b/apps/observability/README.md @@ -9,13 +9,15 @@ It provides the following features: - Blackbox Probing of services to find service level indicators of uptime and latency - A working inventory of what is running where -See the docs in the docs root folder for the full documentation +Image definitions and bundled configuration are in this directory. Deployment examples and quickstart smoke tests are in [deployment/examples/observability](../../deployment/examples/observability). + +See the [full documentation](../../docs/docs/platform/observability/index.md). ## Local Development -Run the stack locally with +From the repository root, run the stack locally with ``` -cd ./observability/examples/simple +cd ./deployment/examples/observability/simple docker compose up -d ``` diff --git a/observability/build-docker.sh b/apps/observability/build-docker.sh similarity index 100% rename from observability/build-docker.sh rename to apps/observability/build-docker.sh diff --git a/observability/grafana-alloy/Dockerfile b/apps/observability/grafana-alloy/Dockerfile similarity index 100% rename from observability/grafana-alloy/Dockerfile rename to apps/observability/grafana-alloy/Dockerfile diff --git a/observability/grafana-alloy/defaults/blackbox-exporter.yml b/apps/observability/grafana-alloy/defaults/blackbox-exporter.yml similarity index 100% rename from observability/grafana-alloy/defaults/blackbox-exporter.yml rename to apps/observability/grafana-alloy/defaults/blackbox-exporter.yml diff --git a/observability/grafana-alloy/defaults/config.alloy b/apps/observability/grafana-alloy/defaults/config.alloy similarity index 100% rename from observability/grafana-alloy/defaults/config.alloy rename to apps/observability/grafana-alloy/defaults/config.alloy diff --git a/observability/grafana-alloy/defaults/default-exporters.alloy b/apps/observability/grafana-alloy/defaults/default-exporters.alloy similarity index 100% rename from observability/grafana-alloy/defaults/default-exporters.alloy rename to apps/observability/grafana-alloy/defaults/default-exporters.alloy diff --git a/observability/grafana-alloy/defaults/default-probe.alloy b/apps/observability/grafana-alloy/defaults/default-probe.alloy similarity index 100% rename from observability/grafana-alloy/defaults/default-probe.alloy rename to apps/observability/grafana-alloy/defaults/default-probe.alloy diff --git a/observability/grafana/Dockerfile b/apps/observability/grafana/Dockerfile similarity index 100% rename from observability/grafana/Dockerfile rename to apps/observability/grafana/Dockerfile diff --git a/observability/grafana/alloy/default-config.alloy b/apps/observability/grafana/alloy/default-config.alloy similarity index 100% rename from observability/grafana/alloy/default-config.alloy rename to apps/observability/grafana/alloy/default-config.alloy diff --git a/observability/grafana/provisioning/alerting/cogstack-alerting-rule-group.yml b/apps/observability/grafana/provisioning/alerting/cogstack-alerting-rule-group.yml similarity index 100% rename from observability/grafana/provisioning/alerting/cogstack-alerting-rule-group.yml rename to apps/observability/grafana/provisioning/alerting/cogstack-alerting-rule-group.yml diff --git a/observability/grafana/provisioning/alerting/contact-points.yml b/apps/observability/grafana/provisioning/alerting/contact-points.yml similarity index 100% rename from observability/grafana/provisioning/alerting/contact-points.yml rename to apps/observability/grafana/provisioning/alerting/contact-points.yml diff --git a/observability/grafana/provisioning/alerting/notification-policy.yml b/apps/observability/grafana/provisioning/alerting/notification-policy.yml similarity index 100% rename from observability/grafana/provisioning/alerting/notification-policy.yml rename to apps/observability/grafana/provisioning/alerting/notification-policy.yml diff --git a/observability/grafana/provisioning/alerting/slack-default-alert-template.yml b/apps/observability/grafana/provisioning/alerting/slack-default-alert-template.yml similarity index 100% rename from observability/grafana/provisioning/alerting/slack-default-alert-template.yml rename to apps/observability/grafana/provisioning/alerting/slack-default-alert-template.yml diff --git a/observability/grafana/provisioning/dashboards/default.yml b/apps/observability/grafana/provisioning/dashboards/default.yml similarity index 100% rename from observability/grafana/provisioning/dashboards/default.yml rename to apps/observability/grafana/provisioning/dashboards/default.yml diff --git a/observability/grafana/provisioning/dashboards/default/cogstack/cogstack-availability.json b/apps/observability/grafana/provisioning/dashboards/default/cogstack/cogstack-availability.json similarity index 100% rename from observability/grafana/provisioning/dashboards/default/cogstack/cogstack-availability.json rename to apps/observability/grafana/provisioning/dashboards/default/cogstack/cogstack-availability.json diff --git a/observability/grafana/provisioning/dashboards/default/cogstack/docker-metrics-cadvisor.json b/apps/observability/grafana/provisioning/dashboards/default/cogstack/docker-metrics-cadvisor.json similarity index 100% rename from observability/grafana/provisioning/dashboards/default/cogstack/docker-metrics-cadvisor.json rename to apps/observability/grafana/provisioning/dashboards/default/cogstack/docker-metrics-cadvisor.json diff --git a/observability/grafana/provisioning/dashboards/default/cogstack/elasticsearch-metrics.json b/apps/observability/grafana/provisioning/dashboards/default/cogstack/elasticsearch-metrics.json similarity index 100% rename from observability/grafana/provisioning/dashboards/default/cogstack/elasticsearch-metrics.json rename to apps/observability/grafana/provisioning/dashboards/default/cogstack/elasticsearch-metrics.json diff --git a/observability/grafana/provisioning/dashboards/default/cogstack/vm-metrics-node-exporter.json b/apps/observability/grafana/provisioning/dashboards/default/cogstack/vm-metrics-node-exporter.json similarity index 100% rename from observability/grafana/provisioning/dashboards/default/cogstack/vm-metrics-node-exporter.json rename to apps/observability/grafana/provisioning/dashboards/default/cogstack/vm-metrics-node-exporter.json diff --git a/observability/grafana/provisioning/dashboards/default/internals/grafana-metrics.json b/apps/observability/grafana/provisioning/dashboards/default/internals/grafana-metrics.json similarity index 100% rename from observability/grafana/provisioning/dashboards/default/internals/grafana-metrics.json rename to apps/observability/grafana/provisioning/dashboards/default/internals/grafana-metrics.json diff --git a/observability/grafana/provisioning/dashboards/default/internals/prometheus-metrics.json b/apps/observability/grafana/provisioning/dashboards/default/internals/prometheus-metrics.json similarity index 100% rename from observability/grafana/provisioning/dashboards/default/internals/prometheus-metrics.json rename to apps/observability/grafana/provisioning/dashboards/default/internals/prometheus-metrics.json diff --git a/observability/grafana/provisioning/dashboards/default/internals/traefik-dashboard.json b/apps/observability/grafana/provisioning/dashboards/default/internals/traefik-dashboard.json similarity index 100% rename from observability/grafana/provisioning/dashboards/default/internals/traefik-dashboard.json rename to apps/observability/grafana/provisioning/dashboards/default/internals/traefik-dashboard.json diff --git a/observability/grafana/provisioning/datasources/default.yml b/apps/observability/grafana/provisioning/datasources/default.yml similarity index 100% rename from observability/grafana/provisioning/datasources/default.yml rename to apps/observability/grafana/provisioning/datasources/default.yml diff --git a/observability/prometheus/Dockerfile.blackbox b/apps/observability/prometheus/Dockerfile.blackbox similarity index 100% rename from observability/prometheus/Dockerfile.blackbox rename to apps/observability/prometheus/Dockerfile.blackbox diff --git a/observability/prometheus/Dockerfile.prometheus b/apps/observability/prometheus/Dockerfile.prometheus similarity index 100% rename from observability/prometheus/Dockerfile.prometheus rename to apps/observability/prometheus/Dockerfile.prometheus diff --git a/observability/prometheus/blackbox-exporter/blackbox.yml b/apps/observability/prometheus/blackbox-exporter/blackbox.yml similarity index 100% rename from observability/prometheus/blackbox-exporter/blackbox.yml rename to apps/observability/prometheus/blackbox-exporter/blackbox.yml diff --git a/observability/prometheus/defaults/prometheus.yml b/apps/observability/prometheus/defaults/prometheus.yml similarity index 100% rename from observability/prometheus/defaults/prometheus.yml rename to apps/observability/prometheus/defaults/prometheus.yml diff --git a/observability/prometheus/defaults/recording-rules/recording-rules.sre.yml b/apps/observability/prometheus/defaults/recording-rules/recording-rules.sre.yml similarity index 100% rename from observability/prometheus/defaults/recording-rules/recording-rules.sre.yml rename to apps/observability/prometheus/defaults/recording-rules/recording-rules.sre.yml diff --git a/observability/prometheus/defaults/scrape-configs/scrape-config.exporters.yml b/apps/observability/prometheus/defaults/scrape-configs/scrape-config.exporters.yml similarity index 100% rename from observability/prometheus/defaults/scrape-configs/scrape-config.exporters.yml rename to apps/observability/prometheus/defaults/scrape-configs/scrape-config.exporters.yml diff --git a/observability/prometheus/defaults/scrape-configs/scrape-config.probe.yml b/apps/observability/prometheus/defaults/scrape-configs/scrape-config.probe.yml similarity index 100% rename from observability/prometheus/defaults/scrape-configs/scrape-config.probe.yml rename to apps/observability/prometheus/defaults/scrape-configs/scrape-config.probe.yml diff --git a/observability/prometheus/defaults/scrape-configs/scrape-config.self.yml b/apps/observability/prometheus/defaults/scrape-configs/scrape-config.self.yml similarity index 100% rename from observability/prometheus/defaults/scrape-configs/scrape-config.self.yml rename to apps/observability/prometheus/defaults/scrape-configs/scrape-config.self.yml diff --git a/observability/traefik/Dockerfile b/apps/observability/traefik/Dockerfile similarity index 94% rename from observability/traefik/Dockerfile rename to apps/observability/traefik/Dockerfile index cf299a5f..cf0db58c 100644 --- a/observability/traefik/Dockerfile +++ b/apps/observability/traefik/Dockerfile @@ -1,4 +1,4 @@ -FROM traefik:v3.4 +FROM traefik:v3.7.19 CMD [ \ "--api.insecure=true", \ diff --git a/apps/ocr-service/Dockerfile b/apps/ocr-service/Dockerfile index 5ecab649..eec0cfb4 100644 --- a/apps/ocr-service/Dockerfile +++ b/apps/ocr-service/Dockerfile @@ -45,7 +45,6 @@ RUN apt-get -o Acquire::Retries=5 update -yq && \ # add extra repos RUN apt-add-repository -y -n multiverse && \ apt-add-repository -y -n universe && \ - add-apt-repository -y -n ppa:graphics-drivers/ppa && \ apt-get -o Acquire::Retries=5 update -yq && \ apt-get upgrade -y diff --git a/apps/ocr-service/README.md b/apps/ocr-service/README.md index 566fd0c0..0f7f73f8 100644 --- a/apps/ocr-service/README.md +++ b/apps/ocr-service/README.md @@ -1,9 +1,9 @@ # OCR-Service -[![docker-ocr-service](https://github.com/CogStack/cogstack-platform/actions/workflows/docker_build.yml/badge.svg)](https://github.com/CogStack/cogstack-platform/actions/workflows/docker_build.yml) -[![tests-ocr-service](https://github.com/CogStack/cogstack-platform/actions/workflows/ocr-service-tests.yml/badge.svg)](https://github.com/CogStack/cogstack-platform/actions/workflows/ocr-service-tests.yml) +[![docker_build_ocr-service](https://github.com/CogStack/cogstack-platform/actions/workflows/docker_build_ocr-service.yml/badge.svg)](https://github.com/CogStack/cogstack-platform/actions/workflows/docker_build_ocr-service.yml) +[![test_ocr-service](https://github.com/CogStack/cogstack-platform/actions/workflows/test_ocr-service.yml/badge.svg)](https://github.com/CogStack/cogstack-platform/actions/workflows/test_ocr-service.yml) [![codeql-analysis-ocr-service](https://github.com/CogStack/cogstack-platform/actions/workflows/codeql.yml/badge.svg)](https://github.com/CogStack/cogstack-platform/actions/workflows/codeql.yml) -[![docker-smoke-ocr-service](https://github.com/CogStack/cogstack-platform/actions/workflows/ocr-service-docker-smoke.yml/badge.svg)](https://github.com/CogStack/cogstack-platform/actions/workflows/ocr-service-docker-smoke.yml) +[![docker_smoke_ocr-service](https://github.com/CogStack/cogstack-platform/actions/workflows/docker_smoke_ocr-service.yml/badge.svg)](https://github.com/CogStack/cogstack-platform/actions/workflows/docker_smoke_ocr-service.yml) ## Introduction diff --git a/apps/ocr-service/charts/ocr-service/.helmignore b/apps/ocr-service/charts/ocr-service/.helmignore deleted file mode 100644 index 8d8e609d..00000000 --- a/apps/ocr-service/charts/ocr-service/.helmignore +++ /dev/null @@ -1,4 +0,0 @@ -# Patterns to ignore when building packages. -.DS_Store -.git/ -.gitignore diff --git a/apps/ocr-service/charts/ocr-service/Chart.yaml b/apps/ocr-service/charts/ocr-service/Chart.yaml deleted file mode 100644 index 9e491fe8..00000000 --- a/apps/ocr-service/charts/ocr-service/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v2 -name: ocr-service -description: Helm chart for deploying the CogStack OCR service -type: application -version: 0.2.0 -appVersion: "1.0.9" diff --git a/apps/ocr-service/charts/ocr-service/README.md b/apps/ocr-service/charts/ocr-service/README.md deleted file mode 100644 index fd5854ac..00000000 --- a/apps/ocr-service/charts/ocr-service/README.md +++ /dev/null @@ -1,82 +0,0 @@ -# ocr-service Helm Chart - -Deploys the CogStack OCR service as a Kubernetes `Deployment` + `Service`, with optional `HorizontalPodAutoscaler` (HPA). - -## Install - -```bash -helm install ocr-service ./charts/ocr-service -``` - -Repo shortcut: - -```bash -make helm-install -``` - -### Install with values overlays - -```bash -helm upgrade --install ocr-service ./charts/ocr-service \ - -f ./my-values.yaml -``` - -Text-only profile: - -```bash -helm upgrade --install ocr-service ./charts/ocr-service \ - -f ./charts/ocr-service/values-text-only.yaml -``` - -Repo shortcut: - -```bash -make helm-install-text-only -``` - -Notes: -- Use normal Helm value layering; later `-f` files override earlier ones. -- Put runtime OCR settings under `env`. -- For existing Kubernetes-managed env sources, use `extraEnvFrom` with `secretRef` or `configMapRef`. -- The repo `env/*.env` files remain for local shell and Docker flows; the Helm chart now uses YAML values only. -- Use `HELM_ARGS` with the make targets for namespace or values overrides, for example `make helm-install HELM_ARGS='-n ocr --create-namespace'`. - -Example custom overlay: - -```yaml -image: - tag: "1.0.9" - -env: - OCR_SERVICE_TESSERACT_LANG: "eng" - OCR_SERVICE_CPU_THREADS: "1" - OCR_SERVICE_CONVERTER_THREADS: "1" -``` - -## Upgrade - -```bash -helm upgrade ocr-service ./charts/ocr-service -``` - -## Key values - -- `image.repository` / `image.tag`: container image to run. -- `env`: OCR service environment variables. -- `extraEnvFrom`: import additional env vars from a `Secret` or `ConfigMap`. -- `tmp.*`: writable `emptyDir` mount for `/ocr_service/tmp`. -- `probes.*`: startup/readiness/liveness probe settings. -- `autoscaling.enabled`: enable/disable HPA. - -## Enable HPA - -```yaml -autoscaling: - enabled: true - minReplicas: 2 - maxReplicas: 10 - targetCPUUtilizationPercentage: 75 - targetMemoryUtilizationPercentage: 80 -``` - -HPA requires Kubernetes metrics (usually `metrics-server`) in the cluster. diff --git a/apps/ocr-service/charts/ocr-service/templates/NOTES.txt b/apps/ocr-service/charts/ocr-service/templates/NOTES.txt deleted file mode 100644 index 853ee25c..00000000 --- a/apps/ocr-service/charts/ocr-service/templates/NOTES.txt +++ /dev/null @@ -1,7 +0,0 @@ -1. Get the application URL by running these commands: - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "ocr-service.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME {{ .Values.service.port }}:{{ .Values.service.targetPort }} - -2. Check health and readiness: - curl -sS http://127.0.0.1:{{ .Values.service.port }}/api/health - curl -sS http://127.0.0.1:{{ .Values.service.port }}/api/ready diff --git a/apps/ocr-service/charts/ocr-service/templates/_helpers.tpl b/apps/ocr-service/charts/ocr-service/templates/_helpers.tpl deleted file mode 100644 index 264ea879..00000000 --- a/apps/ocr-service/charts/ocr-service/templates/_helpers.tpl +++ /dev/null @@ -1,60 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "ocr-service.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -*/}} -{{- define "ocr-service.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "ocr-service.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels. -*/}} -{{- define "ocr-service.labels" -}} -helm.sh/chart: {{ include "ocr-service.chart" . }} -{{ include "ocr-service.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels. -*/}} -{{- define "ocr-service.selectorLabels" -}} -app.kubernetes.io/name: {{ include "ocr-service.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use. -*/}} -{{- define "ocr-service.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "ocr-service.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/apps/ocr-service/charts/ocr-service/templates/deployment.yaml b/apps/ocr-service/charts/ocr-service/templates/deployment.yaml deleted file mode 100644 index 1f83340c..00000000 --- a/apps/ocr-service/charts/ocr-service/templates/deployment.yaml +++ /dev/null @@ -1,117 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -{{- $env := .Values.env | default dict }} -metadata: - name: {{ include "ocr-service.fullname" . }} - labels: - {{- include "ocr-service.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "ocr-service.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "ocr-service.selectorLabels" . | nindent 8 }} - {{- with .Values.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ include "ocr-service.serviceAccountName" . }} - automountServiceAccountToken: {{ .Values.podAutomountServiceAccountToken }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ include "ocr-service.name" . }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http - containerPort: {{ .Values.service.targetPort }} - protocol: TCP - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - {{- if or $env .Values.extraEnv }} - env: - {{- range $key := keys $env | sortAlpha }} - - name: {{ $key }} - value: {{ index $env $key | quote }} - {{- end }} - {{- with .Values.extraEnv }} - {{- toYaml . | nindent 12 }} - {{- end }} - {{- end }} - {{- with .Values.extraEnvFrom }} - envFrom: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- if .Values.probes.startup.enabled }} - startupProbe: - httpGet: - path: {{ .Values.probes.startup.path }} - port: http - periodSeconds: {{ .Values.probes.startup.periodSeconds }} - timeoutSeconds: {{ .Values.probes.startup.timeoutSeconds }} - failureThreshold: {{ .Values.probes.startup.failureThreshold }} - {{- end }} - {{- if .Values.probes.readiness.enabled }} - readinessProbe: - httpGet: - path: {{ .Values.probes.readiness.path }} - port: http - initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.readiness.periodSeconds }} - timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} - failureThreshold: {{ .Values.probes.readiness.failureThreshold }} - {{- end }} - {{- if .Values.probes.liveness.enabled }} - livenessProbe: - httpGet: - path: {{ .Values.probes.liveness.path }} - port: http - initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.liveness.periodSeconds }} - timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds }} - failureThreshold: {{ .Values.probes.liveness.failureThreshold }} - {{- end }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- if .Values.tmp.enabled }} - volumeMounts: - - name: ocr-tmp - mountPath: {{ .Values.tmp.mountPath }} - {{- end }} - {{- if .Values.tmp.enabled }} - volumes: - - name: ocr-tmp - emptyDir: - {{- if .Values.tmp.emptyDir.medium }} - medium: {{ .Values.tmp.emptyDir.medium | quote }} - {{- end }} - {{- if .Values.tmp.emptyDir.sizeLimit }} - sizeLimit: {{ .Values.tmp.emptyDir.sizeLimit }} - {{- end }} - {{- end }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/apps/ocr-service/charts/ocr-service/templates/hpa.yaml b/apps/ocr-service/charts/ocr-service/templates/hpa.yaml deleted file mode 100644 index a50c356c..00000000 --- a/apps/ocr-service/charts/ocr-service/templates/hpa.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "ocr-service.fullname" . }} - labels: - {{- include "ocr-service.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "ocr-service.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - target: - type: Utilization - averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/apps/ocr-service/charts/ocr-service/templates/service.yaml b/apps/ocr-service/charts/ocr-service/templates/service.yaml deleted file mode 100644 index 096f5de3..00000000 --- a/apps/ocr-service/charts/ocr-service/templates/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "ocr-service.fullname" . }} - labels: - {{- include "ocr-service.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - selector: - {{- include "ocr-service.selectorLabels" . | nindent 4 }} - ports: - - name: http - port: {{ .Values.service.port }} - targetPort: {{ .Values.service.targetPort }} - protocol: TCP diff --git a/apps/ocr-service/charts/ocr-service/templates/serviceaccount.yaml b/apps/ocr-service/charts/ocr-service/templates/serviceaccount.yaml deleted file mode 100644 index e0831f57..00000000 --- a/apps/ocr-service/charts/ocr-service/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "ocr-service.serviceAccountName" . }} - labels: - {{- include "ocr-service.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -automountServiceAccountToken: {{ .Values.serviceAccount.automount }} -{{- end }} diff --git a/apps/ocr-service/charts/ocr-service/values.yaml b/apps/ocr-service/charts/ocr-service/values.yaml deleted file mode 100644 index f4341c05..00000000 --- a/apps/ocr-service/charts/ocr-service/values.yaml +++ /dev/null @@ -1,123 +0,0 @@ -replicaCount: 1 - -image: - repository: cogstacksystems/cogstack-ocr-service - tag: "1.0.9" - pullPolicy: IfNotPresent - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - create: false - automount: false - annotations: {} - name: "" - -podAutomountServiceAccountToken: false - -podAnnotations: {} -podLabels: {} - -podSecurityContext: - fsGroup: 10001 - fsGroupChangePolicy: OnRootMismatch - -securityContext: - runAsNonRoot: true - runAsUser: 10001 - runAsGroup: 10001 - allowPrivilegeEscalation: false - readOnlyRootFilesystem: false - capabilities: - drop: - - ALL - -service: - type: ClusterIP - port: 8090 - targetPort: 8090 - -resources: - limits: - cpu: "1" - memory: 1Gi - requests: - cpu: 500m - memory: 512Mi - -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 5 - targetCPUUtilizationPercentage: 75 - targetMemoryUtilizationPercentage: 80 - -tmp: - enabled: true - mountPath: /ocr_service/tmp - emptyDir: - medium: "" - sizeLimit: 1Gi - -probes: - startup: - enabled: true - path: /api/ready - periodSeconds: 10 - timeoutSeconds: 5 - failureThreshold: 90 - readiness: - enabled: true - path: /api/ready - initialDelaySeconds: 20 - periodSeconds: 10 - timeoutSeconds: 5 - failureThreshold: 6 - liveness: - enabled: true - path: /api/health - initialDelaySeconds: 30 - periodSeconds: 30 - timeoutSeconds: 5 - failureThreshold: 3 - -env: - OCR_SERVICE_HOST: "0.0.0.0" - OCR_SERVICE_PORT: "8090" - OCR_SERVICE_WORKER_CLASS: "sync" - OCR_WEB_SERVICE_WORKERS: "1" - OCR_SERVICE_LOG_LEVEL: "20" - OCR_SERVICE_DEBUG_MODE: "false" - OCR_SERVICE_OPERATION_MODE: "OCR" - OCR_SERVICE_CPU_THREADS: "1" - OCR_SERVICE_CONVERTER_THREADS: "1" - OCR_SERVICE_TESSERACT_LANG: "eng" - OCR_SERVICE_TESSERACT_TIMEOUT: "30" - OCR_SERVICE_TESSERACT_NICE: "-18" - OCR_SERVICE_TESSERACT_CUSTOM_CONFIG_FLAGS: "" - OCR_SERVICE_IMAGE_DPI: "200" - OCR_SERVICE_LIBRE_OFFICE_PROCESS_TIMEOUT: "20" - OCR_SERVICE_GUNICORN_LOG_FILE_PATH: "-" - OCR_SERVICE_GUNICORN_LOG_LEVEL: "info" - OCR_SERVICE_GUNICORN_MAX_REQUESTS_JITTER: "5000" - OCR_SERVICE_GUNICORN_MAX_REQUESTS: "50000" - OCR_SERVICE_GUNICORN_TIMEOUT: "300" - OCR_SERVICE_GUNICORN_GRACEFUL_TIMEOUT: "30" - OCR_TMP_DIR: "/ocr_service/tmp" - OMP_THREAD_LIMIT: "1" - -# Prefer standard Helm values overlays instead of passing raw `.env` files. -# The repo `env/*.env` files are for local shell and Docker workflows, not Helm. -# Example: -# helm upgrade --install ocr-service ./charts/ocr-service \ -# -f ./charts/ocr-service/values-text-only.yaml \ -# -f ./my-values.yaml - -extraEnv: [] -extraEnvFrom: [] - -nodeSelector: {} -tolerations: [] -affinity: {} diff --git a/cogstack-dashboards-demo/data/SNOMED/.gitkeep b/cogstack-dashboards-demo/data/SNOMED/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/cogstack-dashboards-demo/data/co_occurrences/.gitkeep b/cogstack-dashboards-demo/data/co_occurrences/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/deployment-examples/aws-kubernetes/.gitignore b/deployment-examples/aws-kubernetes/.gitignore deleted file mode 100644 index 1c6e7183..00000000 --- a/deployment-examples/aws-kubernetes/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ - -.env \ No newline at end of file diff --git a/helm-charts/.gitignore b/deployment/charts/.gitignore similarity index 100% rename from helm-charts/.gitignore rename to deployment/charts/.gitignore diff --git a/helm-charts/cogstack-ce-helm/.helmignore b/deployment/charts/cogstack-ce-helm/.helmignore similarity index 100% rename from helm-charts/cogstack-ce-helm/.helmignore rename to deployment/charts/cogstack-ce-helm/.helmignore diff --git a/helm-charts/cogstack-ce-helm/CHANGELOG.md b/deployment/charts/cogstack-ce-helm/CHANGELOG.md similarity index 100% rename from helm-charts/cogstack-ce-helm/CHANGELOG.md rename to deployment/charts/cogstack-ce-helm/CHANGELOG.md diff --git a/helm-charts/cogstack-ce-helm/Chart.lock b/deployment/charts/cogstack-ce-helm/Chart.lock similarity index 100% rename from helm-charts/cogstack-ce-helm/Chart.lock rename to deployment/charts/cogstack-ce-helm/Chart.lock diff --git a/helm-charts/cogstack-ce-helm/Chart.yaml b/deployment/charts/cogstack-ce-helm/Chart.yaml similarity index 100% rename from helm-charts/cogstack-ce-helm/Chart.yaml rename to deployment/charts/cogstack-ce-helm/Chart.yaml diff --git a/helm-charts/cogstack-ce-helm/README.md b/deployment/charts/cogstack-ce-helm/README.md similarity index 100% rename from helm-charts/cogstack-ce-helm/README.md rename to deployment/charts/cogstack-ce-helm/README.md diff --git a/helm-charts/cogstack-ce-helm/README.md.gotmpl b/deployment/charts/cogstack-ce-helm/README.md.gotmpl similarity index 100% rename from helm-charts/cogstack-ce-helm/README.md.gotmpl rename to deployment/charts/cogstack-ce-helm/README.md.gotmpl diff --git a/helm-charts/cogstack-ce-helm/ci/ci-values.yaml b/deployment/charts/cogstack-ce-helm/ci/ci-values.yaml similarity index 100% rename from helm-charts/cogstack-ce-helm/ci/ci-values.yaml rename to deployment/charts/cogstack-ce-helm/ci/ci-values.yaml diff --git a/helm-charts/cogstack-ce-helm/provisioning/base_index_settings.json b/deployment/charts/cogstack-ce-helm/provisioning/base_index_settings.json similarity index 100% rename from helm-charts/cogstack-ce-helm/provisioning/base_index_settings.json rename to deployment/charts/cogstack-ce-helm/provisioning/base_index_settings.json diff --git a/helm-charts/cogstack-ce-helm/provisioning/dashboards.ndjson b/deployment/charts/cogstack-ce-helm/provisioning/dashboards.ndjson similarity index 100% rename from helm-charts/cogstack-ce-helm/provisioning/dashboards.ndjson rename to deployment/charts/cogstack-ce-helm/provisioning/dashboards.ndjson diff --git a/helm-charts/cogstack-ce-helm/provisioning/generate_synthetic_bulk_ndjson.py b/deployment/charts/cogstack-ce-helm/provisioning/generate_synthetic_bulk_ndjson.py similarity index 100% rename from helm-charts/cogstack-ce-helm/provisioning/generate_synthetic_bulk_ndjson.py rename to deployment/charts/cogstack-ce-helm/provisioning/generate_synthetic_bulk_ndjson.py diff --git a/helm-charts/cogstack-ce-helm/provisioning/opensearch-provisioning.sh b/deployment/charts/cogstack-ce-helm/provisioning/opensearch-provisioning.sh similarity index 100% rename from helm-charts/cogstack-ce-helm/provisioning/opensearch-provisioning.sh rename to deployment/charts/cogstack-ce-helm/provisioning/opensearch-provisioning.sh diff --git a/helm-charts/cogstack-ce-helm/templates/NOTES.txt b/deployment/charts/cogstack-ce-helm/templates/NOTES.txt similarity index 100% rename from helm-charts/cogstack-ce-helm/templates/NOTES.txt rename to deployment/charts/cogstack-ce-helm/templates/NOTES.txt diff --git a/helm-charts/cogstack-ce-helm/templates/_helpers.tpl b/deployment/charts/cogstack-ce-helm/templates/_helpers.tpl similarity index 100% rename from helm-charts/cogstack-ce-helm/templates/_helpers.tpl rename to deployment/charts/cogstack-ce-helm/templates/_helpers.tpl diff --git a/helm-charts/cogstack-ce-helm/templates/jupyterhub-configmap.yaml b/deployment/charts/cogstack-ce-helm/templates/jupyterhub-configmap.yaml similarity index 100% rename from helm-charts/cogstack-ce-helm/templates/jupyterhub-configmap.yaml rename to deployment/charts/cogstack-ce-helm/templates/jupyterhub-configmap.yaml diff --git a/helm-charts/cogstack-ce-helm/templates/medcat-trainer-provisioining.yaml b/deployment/charts/cogstack-ce-helm/templates/medcat-trainer-provisioining.yaml similarity index 100% rename from helm-charts/cogstack-ce-helm/templates/medcat-trainer-provisioining.yaml rename to deployment/charts/cogstack-ce-helm/templates/medcat-trainer-provisioining.yaml diff --git a/helm-charts/cogstack-ce-helm/templates/opensearch-provisioning-config-map.yaml b/deployment/charts/cogstack-ce-helm/templates/opensearch-provisioning-config-map.yaml similarity index 100% rename from helm-charts/cogstack-ce-helm/templates/opensearch-provisioning-config-map.yaml rename to deployment/charts/cogstack-ce-helm/templates/opensearch-provisioning-config-map.yaml diff --git a/helm-charts/cogstack-ce-helm/templates/opensearch-provisioning-post-install.yaml b/deployment/charts/cogstack-ce-helm/templates/opensearch-provisioning-post-install.yaml similarity index 100% rename from helm-charts/cogstack-ce-helm/templates/opensearch-provisioning-post-install.yaml rename to deployment/charts/cogstack-ce-helm/templates/opensearch-provisioning-post-install.yaml diff --git a/helm-charts/cogstack-ce-helm/values-observability.yaml b/deployment/charts/cogstack-ce-helm/values-observability.yaml similarity index 100% rename from helm-charts/cogstack-ce-helm/values-observability.yaml rename to deployment/charts/cogstack-ce-helm/values-observability.yaml diff --git a/helm-charts/cogstack-ce-helm/values.yaml b/deployment/charts/cogstack-ce-helm/values.yaml similarity index 100% rename from helm-charts/cogstack-ce-helm/values.yaml rename to deployment/charts/cogstack-ce-helm/values.yaml diff --git a/helm-charts/cogstack-cohorter-helm/.helmignore b/deployment/charts/cogstack-cohorter-helm/.helmignore similarity index 100% rename from helm-charts/cogstack-cohorter-helm/.helmignore rename to deployment/charts/cogstack-cohorter-helm/.helmignore diff --git a/helm-charts/cogstack-cohorter-helm/CHANGELOG.md b/deployment/charts/cogstack-cohorter-helm/CHANGELOG.md similarity index 100% rename from helm-charts/cogstack-cohorter-helm/CHANGELOG.md rename to deployment/charts/cogstack-cohorter-helm/CHANGELOG.md diff --git a/helm-charts/cogstack-cohorter-helm/Chart.lock b/deployment/charts/cogstack-cohorter-helm/Chart.lock similarity index 100% rename from helm-charts/cogstack-cohorter-helm/Chart.lock rename to deployment/charts/cogstack-cohorter-helm/Chart.lock diff --git a/helm-charts/cogstack-cohorter-helm/Chart.yaml b/deployment/charts/cogstack-cohorter-helm/Chart.yaml similarity index 100% rename from helm-charts/cogstack-cohorter-helm/Chart.yaml rename to deployment/charts/cogstack-cohorter-helm/Chart.yaml diff --git a/helm-charts/cogstack-cohorter-helm/README.md b/deployment/charts/cogstack-cohorter-helm/README.md similarity index 100% rename from helm-charts/cogstack-cohorter-helm/README.md rename to deployment/charts/cogstack-cohorter-helm/README.md diff --git a/helm-charts/cogstack-cohorter-helm/README.md.gotmpl b/deployment/charts/cogstack-cohorter-helm/README.md.gotmpl similarity index 100% rename from helm-charts/cogstack-cohorter-helm/README.md.gotmpl rename to deployment/charts/cogstack-cohorter-helm/README.md.gotmpl diff --git a/helm-charts/cogstack-cohorter-helm/ci/ci-values.yaml b/deployment/charts/cogstack-cohorter-helm/ci/ci-values.yaml similarity index 100% rename from helm-charts/cogstack-cohorter-helm/ci/ci-values.yaml rename to deployment/charts/cogstack-cohorter-helm/ci/ci-values.yaml diff --git a/helm-charts/cogstack-cohorter-helm/templates/NOTES.txt b/deployment/charts/cogstack-cohorter-helm/templates/NOTES.txt similarity index 100% rename from helm-charts/cogstack-cohorter-helm/templates/NOTES.txt rename to deployment/charts/cogstack-cohorter-helm/templates/NOTES.txt diff --git a/helm-charts/cogstack-cohorter-helm/templates/_helpers.tpl b/deployment/charts/cogstack-cohorter-helm/templates/_helpers.tpl similarity index 100% rename from helm-charts/cogstack-cohorter-helm/templates/_helpers.tpl rename to deployment/charts/cogstack-cohorter-helm/templates/_helpers.tpl diff --git a/helm-charts/cogstack-cohorter-helm/templates/hpa.yaml b/deployment/charts/cogstack-cohorter-helm/templates/hpa.yaml similarity index 100% rename from helm-charts/cogstack-cohorter-helm/templates/hpa.yaml rename to deployment/charts/cogstack-cohorter-helm/templates/hpa.yaml diff --git a/helm-charts/cogstack-cohorter-helm/templates/httproute.yaml b/deployment/charts/cogstack-cohorter-helm/templates/httproute.yaml similarity index 100% rename from helm-charts/cogstack-cohorter-helm/templates/httproute.yaml rename to deployment/charts/cogstack-cohorter-helm/templates/httproute.yaml diff --git a/helm-charts/cogstack-cohorter-helm/templates/ingress.yaml b/deployment/charts/cogstack-cohorter-helm/templates/ingress.yaml similarity index 100% rename from helm-charts/cogstack-cohorter-helm/templates/ingress.yaml rename to deployment/charts/cogstack-cohorter-helm/templates/ingress.yaml diff --git a/helm-charts/cogstack-cohorter-helm/templates/nl2dsl-deployment.yaml b/deployment/charts/cogstack-cohorter-helm/templates/nl2dsl-deployment.yaml similarity index 100% rename from helm-charts/cogstack-cohorter-helm/templates/nl2dsl-deployment.yaml rename to deployment/charts/cogstack-cohorter-helm/templates/nl2dsl-deployment.yaml diff --git a/helm-charts/cogstack-cohorter-helm/templates/nl2dsl-service.yaml b/deployment/charts/cogstack-cohorter-helm/templates/nl2dsl-service.yaml similarity index 100% rename from helm-charts/cogstack-cohorter-helm/templates/nl2dsl-service.yaml rename to deployment/charts/cogstack-cohorter-helm/templates/nl2dsl-service.yaml diff --git a/helm-charts/cogstack-cohorter-helm/templates/serviceaccount.yaml b/deployment/charts/cogstack-cohorter-helm/templates/serviceaccount.yaml similarity index 100% rename from helm-charts/cogstack-cohorter-helm/templates/serviceaccount.yaml rename to deployment/charts/cogstack-cohorter-helm/templates/serviceaccount.yaml diff --git a/helm-charts/cogstack-cohorter-helm/templates/tests/test-connection.yaml b/deployment/charts/cogstack-cohorter-helm/templates/tests/test-connection.yaml similarity index 100% rename from helm-charts/cogstack-cohorter-helm/templates/tests/test-connection.yaml rename to deployment/charts/cogstack-cohorter-helm/templates/tests/test-connection.yaml diff --git a/helm-charts/cogstack-cohorter-helm/templates/webapp-deployment.yaml b/deployment/charts/cogstack-cohorter-helm/templates/webapp-deployment.yaml similarity index 100% rename from helm-charts/cogstack-cohorter-helm/templates/webapp-deployment.yaml rename to deployment/charts/cogstack-cohorter-helm/templates/webapp-deployment.yaml diff --git a/helm-charts/cogstack-cohorter-helm/templates/webapp-pvc.yaml b/deployment/charts/cogstack-cohorter-helm/templates/webapp-pvc.yaml similarity index 100% rename from helm-charts/cogstack-cohorter-helm/templates/webapp-pvc.yaml rename to deployment/charts/cogstack-cohorter-helm/templates/webapp-pvc.yaml diff --git a/helm-charts/cogstack-cohorter-helm/templates/webapp-service.yaml b/deployment/charts/cogstack-cohorter-helm/templates/webapp-service.yaml similarity index 100% rename from helm-charts/cogstack-cohorter-helm/templates/webapp-service.yaml rename to deployment/charts/cogstack-cohorter-helm/templates/webapp-service.yaml diff --git a/helm-charts/cogstack-cohorter-helm/values.yaml b/deployment/charts/cogstack-cohorter-helm/values.yaml similarity index 100% rename from helm-charts/cogstack-cohorter-helm/values.yaml rename to deployment/charts/cogstack-cohorter-helm/values.yaml diff --git a/helm-charts/cogstack-jupyterhub-helm/CHANGELOG.md b/deployment/charts/cogstack-jupyterhub-helm/CHANGELOG.md similarity index 100% rename from helm-charts/cogstack-jupyterhub-helm/CHANGELOG.md rename to deployment/charts/cogstack-jupyterhub-helm/CHANGELOG.md diff --git a/helm-charts/cogstack-jupyterhub-helm/Chart.lock b/deployment/charts/cogstack-jupyterhub-helm/Chart.lock similarity index 100% rename from helm-charts/cogstack-jupyterhub-helm/Chart.lock rename to deployment/charts/cogstack-jupyterhub-helm/Chart.lock diff --git a/helm-charts/cogstack-jupyterhub-helm/Chart.yaml b/deployment/charts/cogstack-jupyterhub-helm/Chart.yaml similarity index 100% rename from helm-charts/cogstack-jupyterhub-helm/Chart.yaml rename to deployment/charts/cogstack-jupyterhub-helm/Chart.yaml diff --git a/helm-charts/cogstack-jupyterhub-helm/README.md b/deployment/charts/cogstack-jupyterhub-helm/README.md similarity index 100% rename from helm-charts/cogstack-jupyterhub-helm/README.md rename to deployment/charts/cogstack-jupyterhub-helm/README.md diff --git a/helm-charts/cogstack-jupyterhub-helm/README.md.gotmpl b/deployment/charts/cogstack-jupyterhub-helm/README.md.gotmpl similarity index 100% rename from helm-charts/cogstack-jupyterhub-helm/README.md.gotmpl rename to deployment/charts/cogstack-jupyterhub-helm/README.md.gotmpl diff --git a/helm-charts/cogstack-jupyterhub-helm/examples/medcat-opensearch-e2e.ipynb b/deployment/charts/cogstack-jupyterhub-helm/examples/medcat-opensearch-e2e.ipynb similarity index 100% rename from helm-charts/cogstack-jupyterhub-helm/examples/medcat-opensearch-e2e.ipynb rename to deployment/charts/cogstack-jupyterhub-helm/examples/medcat-opensearch-e2e.ipynb diff --git a/helm-charts/cogstack-jupyterhub-helm/examples/medcat-service-tutorial.ipynb b/deployment/charts/cogstack-jupyterhub-helm/examples/medcat-service-tutorial.ipynb similarity index 100% rename from helm-charts/cogstack-jupyterhub-helm/examples/medcat-service-tutorial.ipynb rename to deployment/charts/cogstack-jupyterhub-helm/examples/medcat-service-tutorial.ipynb diff --git a/helm-charts/cogstack-jupyterhub-helm/examples/ocr-service-tutorial.ipynb b/deployment/charts/cogstack-jupyterhub-helm/examples/ocr-service-tutorial.ipynb similarity index 100% rename from helm-charts/cogstack-jupyterhub-helm/examples/ocr-service-tutorial.ipynb rename to deployment/charts/cogstack-jupyterhub-helm/examples/ocr-service-tutorial.ipynb diff --git a/helm-charts/cogstack-jupyterhub-helm/templates/_helpers.tpl b/deployment/charts/cogstack-jupyterhub-helm/templates/_helpers.tpl similarity index 100% rename from helm-charts/cogstack-jupyterhub-helm/templates/_helpers.tpl rename to deployment/charts/cogstack-jupyterhub-helm/templates/_helpers.tpl diff --git a/helm-charts/cogstack-jupyterhub-helm/templates/examples-configmap.yaml b/deployment/charts/cogstack-jupyterhub-helm/templates/examples-configmap.yaml similarity index 100% rename from helm-charts/cogstack-jupyterhub-helm/templates/examples-configmap.yaml rename to deployment/charts/cogstack-jupyterhub-helm/templates/examples-configmap.yaml diff --git a/helm-charts/cogstack-jupyterhub-helm/templates/servicemonitor.yaml b/deployment/charts/cogstack-jupyterhub-helm/templates/servicemonitor.yaml similarity index 100% rename from helm-charts/cogstack-jupyterhub-helm/templates/servicemonitor.yaml rename to deployment/charts/cogstack-jupyterhub-helm/templates/servicemonitor.yaml diff --git a/helm-charts/cogstack-jupyterhub-helm/values.yaml b/deployment/charts/cogstack-jupyterhub-helm/values.yaml similarity index 100% rename from helm-charts/cogstack-jupyterhub-helm/values.yaml rename to deployment/charts/cogstack-jupyterhub-helm/values.yaml diff --git a/helm-charts/cogstack-observability-helm/.helmignore b/deployment/charts/cogstack-observability-helm/.helmignore similarity index 100% rename from helm-charts/cogstack-observability-helm/.helmignore rename to deployment/charts/cogstack-observability-helm/.helmignore diff --git a/helm-charts/cogstack-observability-helm/Chart.lock b/deployment/charts/cogstack-observability-helm/Chart.lock similarity index 100% rename from helm-charts/cogstack-observability-helm/Chart.lock rename to deployment/charts/cogstack-observability-helm/Chart.lock diff --git a/helm-charts/cogstack-observability-helm/Chart.yaml b/deployment/charts/cogstack-observability-helm/Chart.yaml similarity index 100% rename from helm-charts/cogstack-observability-helm/Chart.yaml rename to deployment/charts/cogstack-observability-helm/Chart.yaml diff --git a/helm-charts/cogstack-observability-helm/README.md b/deployment/charts/cogstack-observability-helm/README.md similarity index 100% rename from helm-charts/cogstack-observability-helm/README.md rename to deployment/charts/cogstack-observability-helm/README.md diff --git a/helm-charts/cogstack-observability-helm/README.md.gotmpl b/deployment/charts/cogstack-observability-helm/README.md.gotmpl similarity index 100% rename from helm-charts/cogstack-observability-helm/README.md.gotmpl rename to deployment/charts/cogstack-observability-helm/README.md.gotmpl diff --git a/helm-charts/cogstack-observability-helm/dashboards/cogstack-availability.json b/deployment/charts/cogstack-observability-helm/dashboards/cogstack-availability.json similarity index 100% rename from helm-charts/cogstack-observability-helm/dashboards/cogstack-availability.json rename to deployment/charts/cogstack-observability-helm/dashboards/cogstack-availability.json diff --git a/helm-charts/cogstack-observability-helm/dashboards/fastapi-metrics.json b/deployment/charts/cogstack-observability-helm/dashboards/fastapi-metrics.json similarity index 100% rename from helm-charts/cogstack-observability-helm/dashboards/fastapi-metrics.json rename to deployment/charts/cogstack-observability-helm/dashboards/fastapi-metrics.json diff --git a/helm-charts/cogstack-observability-helm/dashboards/jupyterhub-metrics.json b/deployment/charts/cogstack-observability-helm/dashboards/jupyterhub-metrics.json similarity index 100% rename from helm-charts/cogstack-observability-helm/dashboards/jupyterhub-metrics.json rename to deployment/charts/cogstack-observability-helm/dashboards/jupyterhub-metrics.json diff --git a/helm-charts/cogstack-observability-helm/dashboards/minio-metrics.json b/deployment/charts/cogstack-observability-helm/dashboards/minio-metrics.json similarity index 100% rename from helm-charts/cogstack-observability-helm/dashboards/minio-metrics.json rename to deployment/charts/cogstack-observability-helm/dashboards/minio-metrics.json diff --git a/helm-charts/cogstack-observability-helm/dashboards/opensearch-metrics.json b/deployment/charts/cogstack-observability-helm/dashboards/opensearch-metrics.json similarity index 100% rename from helm-charts/cogstack-observability-helm/dashboards/opensearch-metrics.json rename to deployment/charts/cogstack-observability-helm/dashboards/opensearch-metrics.json diff --git a/helm-charts/cogstack-observability-helm/templates/NOTES.txt b/deployment/charts/cogstack-observability-helm/templates/NOTES.txt similarity index 100% rename from helm-charts/cogstack-observability-helm/templates/NOTES.txt rename to deployment/charts/cogstack-observability-helm/templates/NOTES.txt diff --git a/helm-charts/cogstack-observability-helm/templates/_helpers.tpl b/deployment/charts/cogstack-observability-helm/templates/_helpers.tpl similarity index 100% rename from helm-charts/cogstack-observability-helm/templates/_helpers.tpl rename to deployment/charts/cogstack-observability-helm/templates/_helpers.tpl diff --git a/helm-charts/cogstack-observability-helm/templates/dashboards/availability-configmap.yaml b/deployment/charts/cogstack-observability-helm/templates/dashboards/availability-configmap.yaml similarity index 100% rename from helm-charts/cogstack-observability-helm/templates/dashboards/availability-configmap.yaml rename to deployment/charts/cogstack-observability-helm/templates/dashboards/availability-configmap.yaml diff --git a/helm-charts/cogstack-observability-helm/values-complete.yaml b/deployment/charts/cogstack-observability-helm/values-complete.yaml similarity index 100% rename from helm-charts/cogstack-observability-helm/values-complete.yaml rename to deployment/charts/cogstack-observability-helm/values-complete.yaml diff --git a/helm-charts/cogstack-observability-helm/values.yaml b/deployment/charts/cogstack-observability-helm/values.yaml similarity index 100% rename from helm-charts/cogstack-observability-helm/values.yaml rename to deployment/charts/cogstack-observability-helm/values.yaml diff --git a/helm-charts/local_dev_startup.sh b/deployment/charts/local_dev_startup.sh similarity index 100% rename from helm-charts/local_dev_startup.sh rename to deployment/charts/local_dev_startup.sh diff --git a/helm-charts/medcat-service-helm/.helmignore b/deployment/charts/medcat-service-helm/.helmignore similarity index 100% rename from helm-charts/medcat-service-helm/.helmignore rename to deployment/charts/medcat-service-helm/.helmignore diff --git a/helm-charts/medcat-service-helm/CHANGELOG.md b/deployment/charts/medcat-service-helm/CHANGELOG.md similarity index 100% rename from helm-charts/medcat-service-helm/CHANGELOG.md rename to deployment/charts/medcat-service-helm/CHANGELOG.md diff --git a/helm-charts/medcat-service-helm/Chart.yaml b/deployment/charts/medcat-service-helm/Chart.yaml similarity index 100% rename from helm-charts/medcat-service-helm/Chart.yaml rename to deployment/charts/medcat-service-helm/Chart.yaml diff --git a/helm-charts/medcat-service-helm/README.md b/deployment/charts/medcat-service-helm/README.md similarity index 100% rename from helm-charts/medcat-service-helm/README.md rename to deployment/charts/medcat-service-helm/README.md diff --git a/helm-charts/medcat-service-helm/README.md.gotmpl b/deployment/charts/medcat-service-helm/README.md.gotmpl similarity index 100% rename from helm-charts/medcat-service-helm/README.md.gotmpl rename to deployment/charts/medcat-service-helm/README.md.gotmpl diff --git a/helm-charts/medcat-service-helm/ci/default-values.yaml b/deployment/charts/medcat-service-helm/ci/default-values.yaml similarity index 100% rename from helm-charts/medcat-service-helm/ci/default-values.yaml rename to deployment/charts/medcat-service-helm/ci/default-values.yaml diff --git a/helm-charts/medcat-service-helm/ci/initcontainer-values.yaml b/deployment/charts/medcat-service-helm/ci/initcontainer-values.yaml similarity index 100% rename from helm-charts/medcat-service-helm/ci/initcontainer-values.yaml rename to deployment/charts/medcat-service-helm/ci/initcontainer-values.yaml diff --git a/helm-charts/medcat-service-helm/templates/NOTES.txt b/deployment/charts/medcat-service-helm/templates/NOTES.txt similarity index 100% rename from helm-charts/medcat-service-helm/templates/NOTES.txt rename to deployment/charts/medcat-service-helm/templates/NOTES.txt diff --git a/helm-charts/medcat-service-helm/templates/_helpers.tpl b/deployment/charts/medcat-service-helm/templates/_helpers.tpl similarity index 100% rename from helm-charts/medcat-service-helm/templates/_helpers.tpl rename to deployment/charts/medcat-service-helm/templates/_helpers.tpl diff --git a/helm-charts/medcat-service-helm/templates/configmap.yaml b/deployment/charts/medcat-service-helm/templates/configmap.yaml similarity index 100% rename from helm-charts/medcat-service-helm/templates/configmap.yaml rename to deployment/charts/medcat-service-helm/templates/configmap.yaml diff --git a/helm-charts/medcat-service-helm/templates/deployment.yaml b/deployment/charts/medcat-service-helm/templates/deployment.yaml similarity index 100% rename from helm-charts/medcat-service-helm/templates/deployment.yaml rename to deployment/charts/medcat-service-helm/templates/deployment.yaml diff --git a/helm-charts/medcat-service-helm/templates/extraManifests.yaml b/deployment/charts/medcat-service-helm/templates/extraManifests.yaml similarity index 100% rename from helm-charts/medcat-service-helm/templates/extraManifests.yaml rename to deployment/charts/medcat-service-helm/templates/extraManifests.yaml diff --git a/helm-charts/medcat-service-helm/templates/hpa.yaml b/deployment/charts/medcat-service-helm/templates/hpa.yaml similarity index 100% rename from helm-charts/medcat-service-helm/templates/hpa.yaml rename to deployment/charts/medcat-service-helm/templates/hpa.yaml diff --git a/helm-charts/medcat-service-helm/templates/ingress.yaml b/deployment/charts/medcat-service-helm/templates/ingress.yaml similarity index 100% rename from helm-charts/medcat-service-helm/templates/ingress.yaml rename to deployment/charts/medcat-service-helm/templates/ingress.yaml diff --git a/helm-charts/medcat-service-helm/templates/networkpolicy.yaml b/deployment/charts/medcat-service-helm/templates/networkpolicy.yaml similarity index 100% rename from helm-charts/medcat-service-helm/templates/networkpolicy.yaml rename to deployment/charts/medcat-service-helm/templates/networkpolicy.yaml diff --git a/helm-charts/medcat-service-helm/templates/service.yaml b/deployment/charts/medcat-service-helm/templates/service.yaml similarity index 100% rename from helm-charts/medcat-service-helm/templates/service.yaml rename to deployment/charts/medcat-service-helm/templates/service.yaml diff --git a/helm-charts/medcat-service-helm/templates/serviceMonitor.yaml b/deployment/charts/medcat-service-helm/templates/serviceMonitor.yaml similarity index 100% rename from helm-charts/medcat-service-helm/templates/serviceMonitor.yaml rename to deployment/charts/medcat-service-helm/templates/serviceMonitor.yaml diff --git a/helm-charts/medcat-service-helm/templates/serviceaccount.yaml b/deployment/charts/medcat-service-helm/templates/serviceaccount.yaml similarity index 100% rename from helm-charts/medcat-service-helm/templates/serviceaccount.yaml rename to deployment/charts/medcat-service-helm/templates/serviceaccount.yaml diff --git a/helm-charts/medcat-service-helm/templates/tests/test-acceptance.yaml b/deployment/charts/medcat-service-helm/templates/tests/test-acceptance.yaml similarity index 100% rename from helm-charts/medcat-service-helm/templates/tests/test-acceptance.yaml rename to deployment/charts/medcat-service-helm/templates/tests/test-acceptance.yaml diff --git a/helm-charts/medcat-service-helm/templates/tests/test-connection.yaml b/deployment/charts/medcat-service-helm/templates/tests/test-connection.yaml similarity index 100% rename from helm-charts/medcat-service-helm/templates/tests/test-connection.yaml rename to deployment/charts/medcat-service-helm/templates/tests/test-connection.yaml diff --git a/helm-charts/medcat-service-helm/values.yaml b/deployment/charts/medcat-service-helm/values.yaml similarity index 100% rename from helm-charts/medcat-service-helm/values.yaml rename to deployment/charts/medcat-service-helm/values.yaml diff --git a/helm-charts/medcat-trainer-helm/.helmignore b/deployment/charts/medcat-trainer-helm/.helmignore similarity index 100% rename from helm-charts/medcat-trainer-helm/.helmignore rename to deployment/charts/medcat-trainer-helm/.helmignore diff --git a/helm-charts/medcat-trainer-helm/CHANGELOG.md b/deployment/charts/medcat-trainer-helm/CHANGELOG.md similarity index 100% rename from helm-charts/medcat-trainer-helm/CHANGELOG.md rename to deployment/charts/medcat-trainer-helm/CHANGELOG.md diff --git a/helm-charts/medcat-trainer-helm/Chart.lock b/deployment/charts/medcat-trainer-helm/Chart.lock similarity index 100% rename from helm-charts/medcat-trainer-helm/Chart.lock rename to deployment/charts/medcat-trainer-helm/Chart.lock diff --git a/helm-charts/medcat-trainer-helm/Chart.yaml b/deployment/charts/medcat-trainer-helm/Chart.yaml similarity index 100% rename from helm-charts/medcat-trainer-helm/Chart.yaml rename to deployment/charts/medcat-trainer-helm/Chart.yaml diff --git a/helm-charts/medcat-trainer-helm/README.md b/deployment/charts/medcat-trainer-helm/README.md similarity index 97% rename from helm-charts/medcat-trainer-helm/README.md rename to deployment/charts/medcat-trainer-helm/README.md index c4c7beee..fd3f8979 100644 --- a/helm-charts/medcat-trainer-helm/README.md +++ b/deployment/charts/medcat-trainer-helm/README.md @@ -64,8 +64,9 @@ These features are not yet existing but to be added in future: | autoscaling.maxReplicas | int | `100` | | | autoscaling.minReplicas | int | `1` | | | autoscaling.targetCPUUtilizationPercentage | int | `80` | | -| env | object | `{"CSRF_TRUSTED_ORIGINS":"http://localhost:8080","DB_ENGINE":"postgresql","DB_PORT":"5432","DEBUG":"1","EMAIL_HOST":"mail.cogstack.org","EMAIL_PASS":"to-be-changed","EMAIL_PORT":"465","EMAIL_USER":"example@cogstack.org","ENV":"non-prod","LOAD_NUM_DOC_PAGES":"10","MAX_DATASET_SIZE":"10000","MAX_MEDCAT_MODELS":"2","OPENBLAS_NUM_THREADS":"1","RESUBMIT_ALL_ON_STARTUP":"0","UNIQUE_DOC_NAMES_IN_DATASETS":"True","VITE_USE_OIDC":"0"}` | Add any environment variables here that should be set in the medcat-trainer container | +| env | object | `{"CSRF_TRUSTED_ORIGINS":"http://localhost:8080","DB_ENGINE":"postgresql","DB_PORT":"5432","DEBUG":"1","EMAIL_HOST":"mail.cogstack.org","EMAIL_PASS":"to-be-changed","EMAIL_PORT":"465","EMAIL_USER":"example@cogstack.org","ENV":"non-prod","LOAD_NUM_DOC_PAGES":"10","MAX_DATASET_SIZE":"10000","MAX_MEDCAT_MODELS":"2","OPENBLAS_NUM_THREADS":"1","RESUBMIT_ALL_ON_STARTUP":"0","UNIQUE_DOC_NAMES_IN_DATASETS":"True","UWSGI_MAX_FD":"65536","VITE_USE_OIDC":"0"}` | Add any environment variables here that should be set in the medcat-trainer container | | env.CSRF_TRUSTED_ORIGINS | string | `"http://localhost:8080"` | This sets the CSRF trusted origins for the medcat-trainer container. Change to allow access from other domains | +| env.UWSGI_MAX_FD | string | `"65536"` | Limit uWSGI file descriptors to avoid excessive HTTP router memory allocation. | | envValueFrom | object | `{"K8S_NODE_NAME":{"fieldRef":{"fieldPath":"spec.nodeName"}},"K8S_POD_NAME":{"fieldRef":{"fieldPath":"metadata.name"}},"K8S_POD_NAMESPACE":{"fieldRef":{"fieldPath":"metadata.namespace"}},"K8S_POD_UID":{"fieldRef":{"fieldPath":"metadata.uid"}}}` | Allow setting env values from field/configmap/secret references @default -- Adds K8s downward API values for tracing | | fullnameOverride | string | `""` | | | hostAliases | list | `[]` | Host aliases for the pod | diff --git a/helm-charts/medcat-trainer-helm/README.md.gotmpl b/deployment/charts/medcat-trainer-helm/README.md.gotmpl similarity index 100% rename from helm-charts/medcat-trainer-helm/README.md.gotmpl rename to deployment/charts/medcat-trainer-helm/README.md.gotmpl diff --git a/helm-charts/medcat-trainer-helm/templates/NOTES.txt b/deployment/charts/medcat-trainer-helm/templates/NOTES.txt similarity index 100% rename from helm-charts/medcat-trainer-helm/templates/NOTES.txt rename to deployment/charts/medcat-trainer-helm/templates/NOTES.txt diff --git a/helm-charts/medcat-trainer-helm/templates/_helpers.tpl b/deployment/charts/medcat-trainer-helm/templates/_helpers.tpl similarity index 100% rename from helm-charts/medcat-trainer-helm/templates/_helpers.tpl rename to deployment/charts/medcat-trainer-helm/templates/_helpers.tpl diff --git a/helm-charts/medcat-trainer-helm/templates/hpa.yaml b/deployment/charts/medcat-trainer-helm/templates/hpa.yaml similarity index 100% rename from helm-charts/medcat-trainer-helm/templates/hpa.yaml rename to deployment/charts/medcat-trainer-helm/templates/hpa.yaml diff --git a/helm-charts/medcat-trainer-helm/templates/ingress.yaml b/deployment/charts/medcat-trainer-helm/templates/ingress.yaml similarity index 100% rename from helm-charts/medcat-trainer-helm/templates/ingress.yaml rename to deployment/charts/medcat-trainer-helm/templates/ingress.yaml diff --git a/helm-charts/medcat-trainer-helm/templates/medcat-trainer-configmap.yaml b/deployment/charts/medcat-trainer-helm/templates/medcat-trainer-configmap.yaml similarity index 100% rename from helm-charts/medcat-trainer-helm/templates/medcat-trainer-configmap.yaml rename to deployment/charts/medcat-trainer-helm/templates/medcat-trainer-configmap.yaml diff --git a/helm-charts/medcat-trainer-helm/templates/medcat-trainer-deployment.yaml b/deployment/charts/medcat-trainer-helm/templates/medcat-trainer-deployment.yaml similarity index 100% rename from helm-charts/medcat-trainer-helm/templates/medcat-trainer-deployment.yaml rename to deployment/charts/medcat-trainer-helm/templates/medcat-trainer-deployment.yaml diff --git a/helm-charts/medcat-trainer-helm/templates/medcat-trainer-env-configmap.yaml b/deployment/charts/medcat-trainer-helm/templates/medcat-trainer-env-configmap.yaml similarity index 100% rename from helm-charts/medcat-trainer-helm/templates/medcat-trainer-env-configmap.yaml rename to deployment/charts/medcat-trainer-helm/templates/medcat-trainer-env-configmap.yaml diff --git a/helm-charts/medcat-trainer-helm/templates/medcat-trainer-provisioning-configmap.yaml b/deployment/charts/medcat-trainer-helm/templates/medcat-trainer-provisioning-configmap.yaml similarity index 100% rename from helm-charts/medcat-trainer-helm/templates/medcat-trainer-provisioning-configmap.yaml rename to deployment/charts/medcat-trainer-helm/templates/medcat-trainer-provisioning-configmap.yaml diff --git a/helm-charts/medcat-trainer-helm/templates/medcat-trainer-secret.yaml b/deployment/charts/medcat-trainer-helm/templates/medcat-trainer-secret.yaml similarity index 100% rename from helm-charts/medcat-trainer-helm/templates/medcat-trainer-secret.yaml rename to deployment/charts/medcat-trainer-helm/templates/medcat-trainer-secret.yaml diff --git a/helm-charts/medcat-trainer-helm/templates/nginx-configmap.yaml b/deployment/charts/medcat-trainer-helm/templates/nginx-configmap.yaml similarity index 100% rename from helm-charts/medcat-trainer-helm/templates/nginx-configmap.yaml rename to deployment/charts/medcat-trainer-helm/templates/nginx-configmap.yaml diff --git a/helm-charts/medcat-trainer-helm/templates/pvc.yaml b/deployment/charts/medcat-trainer-helm/templates/pvc.yaml similarity index 100% rename from helm-charts/medcat-trainer-helm/templates/pvc.yaml rename to deployment/charts/medcat-trainer-helm/templates/pvc.yaml diff --git a/helm-charts/medcat-trainer-helm/templates/service.yaml b/deployment/charts/medcat-trainer-helm/templates/service.yaml similarity index 100% rename from helm-charts/medcat-trainer-helm/templates/service.yaml rename to deployment/charts/medcat-trainer-helm/templates/service.yaml diff --git a/helm-charts/medcat-trainer-helm/templates/serviceaccount.yaml b/deployment/charts/medcat-trainer-helm/templates/serviceaccount.yaml similarity index 100% rename from helm-charts/medcat-trainer-helm/templates/serviceaccount.yaml rename to deployment/charts/medcat-trainer-helm/templates/serviceaccount.yaml diff --git a/helm-charts/medcat-trainer-helm/templates/tests/test-connection.yaml b/deployment/charts/medcat-trainer-helm/templates/tests/test-connection.yaml similarity index 100% rename from helm-charts/medcat-trainer-helm/templates/tests/test-connection.yaml rename to deployment/charts/medcat-trainer-helm/templates/tests/test-connection.yaml diff --git a/helm-charts/medcat-trainer-helm/values.yaml b/deployment/charts/medcat-trainer-helm/values.yaml similarity index 99% rename from helm-charts/medcat-trainer-helm/values.yaml rename to deployment/charts/medcat-trainer-helm/values.yaml index c803a5ed..0bad7ffe 100644 --- a/helm-charts/medcat-trainer-helm/values.yaml +++ b/deployment/charts/medcat-trainer-helm/values.yaml @@ -30,6 +30,8 @@ env: OPENBLAS_NUM_THREADS: "1" RESUBMIT_ALL_ON_STARTUP: "0" UNIQUE_DOC_NAMES_IN_DATASETS: "True" + # -- Limit uWSGI file descriptors to avoid excessive HTTP router memory allocation. + UWSGI_MAX_FD: "65536" VITE_USE_OIDC: "0" # TODO: Support custom DB overrides# diff --git a/helm-charts/ocr-service-helm/.helmignore b/deployment/charts/ocr-service-helm/.helmignore similarity index 100% rename from helm-charts/ocr-service-helm/.helmignore rename to deployment/charts/ocr-service-helm/.helmignore diff --git a/helm-charts/ocr-service-helm/CHANGELOG.md b/deployment/charts/ocr-service-helm/CHANGELOG.md similarity index 100% rename from helm-charts/ocr-service-helm/CHANGELOG.md rename to deployment/charts/ocr-service-helm/CHANGELOG.md diff --git a/helm-charts/ocr-service-helm/Chart.yaml b/deployment/charts/ocr-service-helm/Chart.yaml similarity index 100% rename from helm-charts/ocr-service-helm/Chart.yaml rename to deployment/charts/ocr-service-helm/Chart.yaml diff --git a/helm-charts/ocr-service-helm/README.md b/deployment/charts/ocr-service-helm/README.md similarity index 100% rename from helm-charts/ocr-service-helm/README.md rename to deployment/charts/ocr-service-helm/README.md diff --git a/helm-charts/ocr-service-helm/README.md.gotmpl b/deployment/charts/ocr-service-helm/README.md.gotmpl similarity index 100% rename from helm-charts/ocr-service-helm/README.md.gotmpl rename to deployment/charts/ocr-service-helm/README.md.gotmpl diff --git a/helm-charts/ocr-service-helm/templates/NOTES.txt b/deployment/charts/ocr-service-helm/templates/NOTES.txt similarity index 100% rename from helm-charts/ocr-service-helm/templates/NOTES.txt rename to deployment/charts/ocr-service-helm/templates/NOTES.txt diff --git a/helm-charts/ocr-service-helm/templates/_helpers.tpl b/deployment/charts/ocr-service-helm/templates/_helpers.tpl similarity index 100% rename from helm-charts/ocr-service-helm/templates/_helpers.tpl rename to deployment/charts/ocr-service-helm/templates/_helpers.tpl diff --git a/helm-charts/ocr-service-helm/templates/deployment.yaml b/deployment/charts/ocr-service-helm/templates/deployment.yaml similarity index 100% rename from helm-charts/ocr-service-helm/templates/deployment.yaml rename to deployment/charts/ocr-service-helm/templates/deployment.yaml diff --git a/helm-charts/ocr-service-helm/templates/extraManifests.yaml b/deployment/charts/ocr-service-helm/templates/extraManifests.yaml similarity index 100% rename from helm-charts/ocr-service-helm/templates/extraManifests.yaml rename to deployment/charts/ocr-service-helm/templates/extraManifests.yaml diff --git a/helm-charts/ocr-service-helm/templates/hpa.yaml b/deployment/charts/ocr-service-helm/templates/hpa.yaml similarity index 100% rename from helm-charts/ocr-service-helm/templates/hpa.yaml rename to deployment/charts/ocr-service-helm/templates/hpa.yaml diff --git a/helm-charts/ocr-service-helm/templates/httproute.yaml b/deployment/charts/ocr-service-helm/templates/httproute.yaml similarity index 100% rename from helm-charts/ocr-service-helm/templates/httproute.yaml rename to deployment/charts/ocr-service-helm/templates/httproute.yaml diff --git a/helm-charts/ocr-service-helm/templates/ingress.yaml b/deployment/charts/ocr-service-helm/templates/ingress.yaml similarity index 100% rename from helm-charts/ocr-service-helm/templates/ingress.yaml rename to deployment/charts/ocr-service-helm/templates/ingress.yaml diff --git a/helm-charts/ocr-service-helm/templates/service.yaml b/deployment/charts/ocr-service-helm/templates/service.yaml similarity index 100% rename from helm-charts/ocr-service-helm/templates/service.yaml rename to deployment/charts/ocr-service-helm/templates/service.yaml diff --git a/helm-charts/ocr-service-helm/templates/serviceaccount.yaml b/deployment/charts/ocr-service-helm/templates/serviceaccount.yaml similarity index 100% rename from helm-charts/ocr-service-helm/templates/serviceaccount.yaml rename to deployment/charts/ocr-service-helm/templates/serviceaccount.yaml diff --git a/helm-charts/ocr-service-helm/templates/tests/test-connection.yaml b/deployment/charts/ocr-service-helm/templates/tests/test-connection.yaml similarity index 100% rename from helm-charts/ocr-service-helm/templates/tests/test-connection.yaml rename to deployment/charts/ocr-service-helm/templates/tests/test-connection.yaml diff --git a/apps/ocr-service/charts/ocr-service/values-text-only.yaml b/deployment/charts/ocr-service-helm/values-text-only.yaml similarity index 100% rename from apps/ocr-service/charts/ocr-service/values-text-only.yaml rename to deployment/charts/ocr-service-helm/values-text-only.yaml diff --git a/helm-charts/ocr-service-helm/values.yaml b/deployment/charts/ocr-service-helm/values.yaml similarity index 100% rename from helm-charts/ocr-service-helm/values.yaml rename to deployment/charts/ocr-service-helm/values.yaml diff --git a/deployment-examples/README.md b/deployment/examples/README.md similarity index 100% rename from deployment-examples/README.md rename to deployment/examples/README.md diff --git a/deployment-examples/aws-kubernetes/.env.example b/deployment/examples/aws-kubernetes/.env.example similarity index 100% rename from deployment-examples/aws-kubernetes/.env.example rename to deployment/examples/aws-kubernetes/.env.example diff --git a/deployment/examples/aws-kubernetes/.gitignore b/deployment/examples/aws-kubernetes/.gitignore new file mode 100644 index 00000000..53a4bbc3 --- /dev/null +++ b/deployment/examples/aws-kubernetes/.gitignore @@ -0,0 +1,3 @@ + +.env +.DS_Store diff --git a/deployment-examples/aws-kubernetes/README.md b/deployment/examples/aws-kubernetes/README.md similarity index 100% rename from deployment-examples/aws-kubernetes/README.md rename to deployment/examples/aws-kubernetes/README.md diff --git a/deployment-examples/aws-kubernetes/eks-cluster/.terraform.lock.hcl b/deployment/examples/aws-kubernetes/eks-cluster/.terraform.lock.hcl similarity index 100% rename from deployment-examples/aws-kubernetes/eks-cluster/.terraform.lock.hcl rename to deployment/examples/aws-kubernetes/eks-cluster/.terraform.lock.hcl diff --git a/deployment-examples/aws-kubernetes/eks-cluster/eks.tf b/deployment/examples/aws-kubernetes/eks-cluster/eks.tf similarity index 100% rename from deployment-examples/aws-kubernetes/eks-cluster/eks.tf rename to deployment/examples/aws-kubernetes/eks-cluster/eks.tf diff --git a/deployment-examples/aws-kubernetes/eks-cluster/main.tf b/deployment/examples/aws-kubernetes/eks-cluster/main.tf similarity index 100% rename from deployment-examples/aws-kubernetes/eks-cluster/main.tf rename to deployment/examples/aws-kubernetes/eks-cluster/main.tf diff --git a/deployment-examples/aws-kubernetes/eks-cluster/outputs.tf b/deployment/examples/aws-kubernetes/eks-cluster/outputs.tf similarity index 100% rename from deployment-examples/aws-kubernetes/eks-cluster/outputs.tf rename to deployment/examples/aws-kubernetes/eks-cluster/outputs.tf diff --git a/deployment-examples/aws-kubernetes/eks-cluster/provider.tf b/deployment/examples/aws-kubernetes/eks-cluster/provider.tf similarity index 100% rename from deployment-examples/aws-kubernetes/eks-cluster/provider.tf rename to deployment/examples/aws-kubernetes/eks-cluster/provider.tf diff --git a/deployment-examples/aws-kubernetes/eks-cluster/shared-locals.tf b/deployment/examples/aws-kubernetes/eks-cluster/shared-locals.tf similarity index 100% rename from deployment-examples/aws-kubernetes/eks-cluster/shared-locals.tf rename to deployment/examples/aws-kubernetes/eks-cluster/shared-locals.tf diff --git a/deployment-examples/aws-kubernetes/kubernetes-deployment/.terraform.lock.hcl b/deployment/examples/aws-kubernetes/kubernetes-deployment/.terraform.lock.hcl similarity index 100% rename from deployment-examples/aws-kubernetes/kubernetes-deployment/.terraform.lock.hcl rename to deployment/examples/aws-kubernetes/kubernetes-deployment/.terraform.lock.hcl diff --git a/deployment-examples/aws-kubernetes/kubernetes-deployment/main.tf b/deployment/examples/aws-kubernetes/kubernetes-deployment/main.tf similarity index 100% rename from deployment-examples/aws-kubernetes/kubernetes-deployment/main.tf rename to deployment/examples/aws-kubernetes/kubernetes-deployment/main.tf diff --git a/deployment-examples/azure-kubernetes/README.md b/deployment/examples/azure-kubernetes/README.md similarity index 100% rename from deployment-examples/azure-kubernetes/README.md rename to deployment/examples/azure-kubernetes/README.md diff --git a/deployment-examples/azure-kubernetes/aks-cluster/.terraform.lock.hcl b/deployment/examples/azure-kubernetes/aks-cluster/.terraform.lock.hcl similarity index 100% rename from deployment-examples/azure-kubernetes/aks-cluster/.terraform.lock.hcl rename to deployment/examples/azure-kubernetes/aks-cluster/.terraform.lock.hcl diff --git a/deployment-examples/azure-kubernetes/aks-cluster/aks.tf b/deployment/examples/azure-kubernetes/aks-cluster/aks.tf similarity index 100% rename from deployment-examples/azure-kubernetes/aks-cluster/aks.tf rename to deployment/examples/azure-kubernetes/aks-cluster/aks.tf diff --git a/deployment-examples/azure-kubernetes/aks-cluster/main.tf b/deployment/examples/azure-kubernetes/aks-cluster/main.tf similarity index 100% rename from deployment-examples/azure-kubernetes/aks-cluster/main.tf rename to deployment/examples/azure-kubernetes/aks-cluster/main.tf diff --git a/deployment-examples/azure-kubernetes/aks-cluster/output.tf b/deployment/examples/azure-kubernetes/aks-cluster/output.tf similarity index 100% rename from deployment-examples/azure-kubernetes/aks-cluster/output.tf rename to deployment/examples/azure-kubernetes/aks-cluster/output.tf diff --git a/deployment-examples/azure-kubernetes/aks-cluster/provider.tf b/deployment/examples/azure-kubernetes/aks-cluster/provider.tf similarity index 100% rename from deployment-examples/azure-kubernetes/aks-cluster/provider.tf rename to deployment/examples/azure-kubernetes/aks-cluster/provider.tf diff --git a/deployment-examples/azure-kubernetes/aks-cluster/shared-locals.tf b/deployment/examples/azure-kubernetes/aks-cluster/shared-locals.tf similarity index 100% rename from deployment-examples/azure-kubernetes/aks-cluster/shared-locals.tf rename to deployment/examples/azure-kubernetes/aks-cluster/shared-locals.tf diff --git a/deployment-examples/azure-kubernetes/kubernetes-deployment/.terraform.lock.hcl b/deployment/examples/azure-kubernetes/kubernetes-deployment/.terraform.lock.hcl similarity index 100% rename from deployment-examples/azure-kubernetes/kubernetes-deployment/.terraform.lock.hcl rename to deployment/examples/azure-kubernetes/kubernetes-deployment/.terraform.lock.hcl diff --git a/deployment-examples/azure-kubernetes/kubernetes-deployment/main.tf b/deployment/examples/azure-kubernetes/kubernetes-deployment/main.tf similarity index 100% rename from deployment-examples/azure-kubernetes/kubernetes-deployment/main.tf rename to deployment/examples/azure-kubernetes/kubernetes-deployment/main.tf diff --git a/observability/examples/full/alloy/elasticsearch.alloy b/deployment/examples/observability/full/alloy/elasticsearch.alloy similarity index 100% rename from observability/examples/full/alloy/elasticsearch.alloy rename to deployment/examples/observability/full/alloy/elasticsearch.alloy diff --git a/observability/examples/full/alloy/probers/probe-external.yml b/deployment/examples/observability/full/alloy/probers/probe-external.yml similarity index 100% rename from observability/examples/full/alloy/probers/probe-external.yml rename to deployment/examples/observability/full/alloy/probers/probe-external.yml diff --git a/observability/examples/full/alloy/probers/probe-observability.yml b/deployment/examples/observability/full/alloy/probers/probe-observability.yml similarity index 100% rename from observability/examples/full/alloy/probers/probe-observability.yml rename to deployment/examples/observability/full/alloy/probers/probe-observability.yml diff --git a/observability/examples/full/docker-compose.yml b/deployment/examples/observability/full/docker-compose.yml similarity index 100% rename from observability/examples/full/docker-compose.yml rename to deployment/examples/observability/full/docker-compose.yml diff --git a/observability/examples/full/exporters.docker-compose.yml b/deployment/examples/observability/full/exporters.docker-compose.yml similarity index 100% rename from observability/examples/full/exporters.docker-compose.yml rename to deployment/examples/observability/full/exporters.docker-compose.yml diff --git a/observability/examples/full/exporters.elastic.docker-compose.yml b/deployment/examples/observability/full/exporters.elastic.docker-compose.yml similarity index 100% rename from observability/examples/full/exporters.elastic.docker-compose.yml rename to deployment/examples/observability/full/exporters.elastic.docker-compose.yml diff --git a/observability/examples/full/full-quickstart.sh b/deployment/examples/observability/full/full-quickstart.sh similarity index 82% rename from observability/examples/full/full-quickstart.sh rename to deployment/examples/observability/full/full-quickstart.sh index d3739321..c96ea72b 100644 --- a/observability/examples/full/full-quickstart.sh +++ b/deployment/examples/observability/full/full-quickstart.sh @@ -1,9 +1,11 @@ #!/bin/bash set -e +OBSERVABILITY_BASE_URL="${OBSERVABILITY_BASE_URL:-https://raw.githubusercontent.com/CogStack/cogstack-platform/main/deployment/examples/observability}" + download_to() { local path="$1" - local url="https://raw.githubusercontent.com/CogStack/cogstack-platform-toolkit/main/observability/examples/full/${path}" + local url="${OBSERVABILITY_BASE_URL}/full/${path}" echo "Downloading ${path} from ${url}" mkdir -p "$(dirname "$path")" diff --git a/observability/examples/full/prometheus/scrape-configs/exporters/exporters.yml b/deployment/examples/observability/full/prometheus/scrape-configs/exporters/exporters.yml similarity index 100% rename from observability/examples/full/prometheus/scrape-configs/exporters/exporters.yml rename to deployment/examples/observability/full/prometheus/scrape-configs/exporters/exporters.yml diff --git a/observability/examples/full/prometheus/scrape-configs/recording-rules/slo.yml b/deployment/examples/observability/full/prometheus/scrape-configs/recording-rules/slo.yml similarity index 100% rename from observability/examples/full/prometheus/scrape-configs/recording-rules/slo.yml rename to deployment/examples/observability/full/prometheus/scrape-configs/recording-rules/slo.yml diff --git a/observability/examples/simple/alloy/probers/probe-observability.yml b/deployment/examples/observability/simple/alloy/probers/probe-observability.yml similarity index 100% rename from observability/examples/simple/alloy/probers/probe-observability.yml rename to deployment/examples/observability/simple/alloy/probers/probe-observability.yml diff --git a/observability/examples/simple/docker-compose.yml b/deployment/examples/observability/simple/docker-compose.yml similarity index 100% rename from observability/examples/simple/docker-compose.yml rename to deployment/examples/observability/simple/docker-compose.yml diff --git a/observability/examples/simple/quickstart.sh b/deployment/examples/observability/simple/quickstart.sh similarity index 61% rename from observability/examples/simple/quickstart.sh rename to deployment/examples/observability/simple/quickstart.sh index 8d38c057..29fac19c 100644 --- a/observability/examples/simple/quickstart.sh +++ b/deployment/examples/observability/simple/quickstart.sh @@ -1,16 +1,18 @@ #!/bin/bash set -e +OBSERVABILITY_BASE_URL="${OBSERVABILITY_BASE_URL:-https://raw.githubusercontent.com/CogStack/cogstack-platform/main/deployment/examples/observability}" + mkdir -p observability-simple/alloy/probers cd observability-simple echo "Downloading docker-compose.yml..." curl -fsSL -o docker-compose.yml \ - https://raw.githubusercontent.com/CogStack/cogstack-platform-toolkit/main/observability/examples/simple/docker-compose.yml + "${OBSERVABILITY_BASE_URL}/simple/docker-compose.yml" echo "Downloading probe-simple.yml into alloy/probers/..." curl -fsSL -o alloy/probers/probe-observability.yml \ - https://raw.githubusercontent.com/CogStack/cogstack-platform-toolkit/main/observability/examples/simple/alloy/probers/probe-observability.yml + "${OBSERVABILITY_BASE_URL}/simple/alloy/probers/probe-observability.yml" echo "Setup complete in observability-simple/" diff --git a/observability/test/health-check.py b/deployment/examples/observability/test/health-check.py similarity index 100% rename from observability/test/health-check.py rename to deployment/examples/observability/test/health-check.py diff --git a/observability/test/requirements.txt b/deployment/examples/observability/test/requirements.txt similarity index 100% rename from observability/test/requirements.txt rename to deployment/examples/observability/test/requirements.txt diff --git a/observability/test/test-quickstart.sh b/deployment/examples/observability/test/test-quickstart.sh similarity index 86% rename from observability/test/test-quickstart.sh rename to deployment/examples/observability/test/test-quickstart.sh index 4c57a3b7..fa87621f 100644 --- a/observability/test/test-quickstart.sh +++ b/deployment/examples/observability/test/test-quickstart.sh @@ -6,12 +6,12 @@ echo "๐Ÿš€ Starting deployment test..." # Run the simple quickstart script echo "๐Ÿ“ฆ Running quickstart..." -cd ${SCRIPT_DIR}/../examples/simple/ +cd ${SCRIPT_DIR}/../simple/ bash ./quickstart.sh # Run the health check echo "๐Ÿ” Running health check..." -python -u ../../test/health-check.py +python -u ../test/health-check.py # Check if health check was successful if [ $? -eq 0 ]; then @@ -26,12 +26,12 @@ fi # Run the quickstart script echo "๐Ÿ“ฆ Running full quickstart..." -cd ${SCRIPT_DIR}/../examples/full/ +cd ${SCRIPT_DIR}/../full/ bash ./full-quickstart.sh # Run the health check echo "๐Ÿ” Running health check..." -python -u ../../test/health-check.py +python -u ../test/health-check.py # Check if health check was successful if [ $? -eq 0 ]; then diff --git a/deployment-examples/openstack-docker/.terraform.lock.hcl b/deployment/examples/openstack-docker/.terraform.lock.hcl similarity index 100% rename from deployment-examples/openstack-docker/.terraform.lock.hcl rename to deployment/examples/openstack-docker/.terraform.lock.hcl diff --git a/deployment-examples/openstack-docker/README.md b/deployment/examples/openstack-docker/README.md similarity index 100% rename from deployment-examples/openstack-docker/README.md rename to deployment/examples/openstack-docker/README.md diff --git a/deployment-examples/openstack-docker/docker-deployment/.terraform.lock.hcl b/deployment/examples/openstack-docker/docker-deployment/.terraform.lock.hcl similarity index 100% rename from deployment-examples/openstack-docker/docker-deployment/.terraform.lock.hcl rename to deployment/examples/openstack-docker/docker-deployment/.terraform.lock.hcl diff --git a/deployment-examples/openstack-docker/docker-deployment/main.tf b/deployment/examples/openstack-docker/docker-deployment/main.tf similarity index 100% rename from deployment-examples/openstack-docker/docker-deployment/main.tf rename to deployment/examples/openstack-docker/docker-deployment/main.tf diff --git a/deployment-examples/openstack-docker/docker-deployment/outputs.tf b/deployment/examples/openstack-docker/docker-deployment/outputs.tf similarity index 100% rename from deployment-examples/openstack-docker/docker-deployment/outputs.tf rename to deployment/examples/openstack-docker/docker-deployment/outputs.tf diff --git a/deployment-examples/openstack-docker/docker-deployment/providers.tf b/deployment/examples/openstack-docker/docker-deployment/providers.tf similarity index 100% rename from deployment-examples/openstack-docker/docker-deployment/providers.tf rename to deployment/examples/openstack-docker/docker-deployment/providers.tf diff --git a/deployment-examples/openstack-docker/docker-deployment/terraform.tfvars.example b/deployment/examples/openstack-docker/docker-deployment/terraform.tfvars.example similarity index 100% rename from deployment-examples/openstack-docker/docker-deployment/terraform.tfvars.example rename to deployment/examples/openstack-docker/docker-deployment/terraform.tfvars.example diff --git a/deployment-examples/openstack-docker/docker-deployment/variables.tf b/deployment/examples/openstack-docker/docker-deployment/variables.tf similarity index 100% rename from deployment-examples/openstack-docker/docker-deployment/variables.tf rename to deployment/examples/openstack-docker/docker-deployment/variables.tf diff --git a/deployment-examples/openstack-docker/openstack-vms/.terraform.lock.hcl b/deployment/examples/openstack-docker/openstack-vms/.terraform.lock.hcl similarity index 100% rename from deployment-examples/openstack-docker/openstack-vms/.terraform.lock.hcl rename to deployment/examples/openstack-docker/openstack-vms/.terraform.lock.hcl diff --git a/deployment-examples/openstack-docker/openstack-vms/main.tf b/deployment/examples/openstack-docker/openstack-vms/main.tf similarity index 100% rename from deployment-examples/openstack-docker/openstack-vms/main.tf rename to deployment/examples/openstack-docker/openstack-vms/main.tf diff --git a/deployment-examples/openstack-docker/openstack-vms/outputs.tf b/deployment/examples/openstack-docker/openstack-vms/outputs.tf similarity index 100% rename from deployment-examples/openstack-docker/openstack-vms/outputs.tf rename to deployment/examples/openstack-docker/openstack-vms/outputs.tf diff --git a/deployment-examples/openstack-docker/openstack-vms/providers.tf b/deployment/examples/openstack-docker/openstack-vms/providers.tf similarity index 100% rename from deployment-examples/openstack-docker/openstack-vms/providers.tf rename to deployment/examples/openstack-docker/openstack-vms/providers.tf diff --git a/deployment-examples/openstack-docker/openstack-vms/terraform.tfvars.example b/deployment/examples/openstack-docker/openstack-vms/terraform.tfvars.example similarity index 100% rename from deployment-examples/openstack-docker/openstack-vms/terraform.tfvars.example rename to deployment/examples/openstack-docker/openstack-vms/terraform.tfvars.example diff --git a/deployment-examples/openstack-docker/openstack-vms/variables.tf b/deployment/examples/openstack-docker/openstack-vms/variables.tf similarity index 100% rename from deployment-examples/openstack-docker/openstack-vms/variables.tf rename to deployment/examples/openstack-docker/openstack-vms/variables.tf diff --git a/deployment-examples/openstack-kubernetes/.terraform.lock.hcl b/deployment/examples/openstack-kubernetes/.terraform.lock.hcl similarity index 100% rename from deployment-examples/openstack-kubernetes/.terraform.lock.hcl rename to deployment/examples/openstack-kubernetes/.terraform.lock.hcl diff --git a/deployment-examples/openstack-kubernetes/README.md b/deployment/examples/openstack-kubernetes/README.md similarity index 100% rename from deployment-examples/openstack-kubernetes/README.md rename to deployment/examples/openstack-kubernetes/README.md diff --git a/deployment-examples/openstack-kubernetes/k3s-cluster/.terraform.lock.hcl b/deployment/examples/openstack-kubernetes/k3s-cluster/.terraform.lock.hcl similarity index 100% rename from deployment-examples/openstack-kubernetes/k3s-cluster/.terraform.lock.hcl rename to deployment/examples/openstack-kubernetes/k3s-cluster/.terraform.lock.hcl diff --git a/deployment-examples/openstack-kubernetes/k3s-cluster/main.tf b/deployment/examples/openstack-kubernetes/k3s-cluster/main.tf similarity index 100% rename from deployment-examples/openstack-kubernetes/k3s-cluster/main.tf rename to deployment/examples/openstack-kubernetes/k3s-cluster/main.tf diff --git a/deployment-examples/openstack-kubernetes/k3s-cluster/outputs.tf b/deployment/examples/openstack-kubernetes/k3s-cluster/outputs.tf similarity index 100% rename from deployment-examples/openstack-kubernetes/k3s-cluster/outputs.tf rename to deployment/examples/openstack-kubernetes/k3s-cluster/outputs.tf diff --git a/deployment-examples/openstack-kubernetes/k3s-cluster/providers.tf b/deployment/examples/openstack-kubernetes/k3s-cluster/providers.tf similarity index 100% rename from deployment-examples/openstack-kubernetes/k3s-cluster/providers.tf rename to deployment/examples/openstack-kubernetes/k3s-cluster/providers.tf diff --git a/deployment-examples/openstack-kubernetes/k3s-cluster/terraform.tfvars.example b/deployment/examples/openstack-kubernetes/k3s-cluster/terraform.tfvars.example similarity index 100% rename from deployment-examples/openstack-kubernetes/k3s-cluster/terraform.tfvars.example rename to deployment/examples/openstack-kubernetes/k3s-cluster/terraform.tfvars.example diff --git a/deployment-examples/openstack-kubernetes/k3s-cluster/variables.tf b/deployment/examples/openstack-kubernetes/k3s-cluster/variables.tf similarity index 100% rename from deployment-examples/openstack-kubernetes/k3s-cluster/variables.tf rename to deployment/examples/openstack-kubernetes/k3s-cluster/variables.tf diff --git a/deployment-examples/openstack-kubernetes/kubernetes-deployment/.terraform.lock.hcl b/deployment/examples/openstack-kubernetes/kubernetes-deployment/.terraform.lock.hcl similarity index 100% rename from deployment-examples/openstack-kubernetes/kubernetes-deployment/.terraform.lock.hcl rename to deployment/examples/openstack-kubernetes/kubernetes-deployment/.terraform.lock.hcl diff --git a/deployment-examples/openstack-kubernetes/kubernetes-deployment/dashboard.tf b/deployment/examples/openstack-kubernetes/kubernetes-deployment/dashboard.tf similarity index 100% rename from deployment-examples/openstack-kubernetes/kubernetes-deployment/dashboard.tf rename to deployment/examples/openstack-kubernetes/kubernetes-deployment/dashboard.tf diff --git a/deployment-examples/openstack-kubernetes/kubernetes-deployment/ingress.yml b/deployment/examples/openstack-kubernetes/kubernetes-deployment/ingress.yml similarity index 100% rename from deployment-examples/openstack-kubernetes/kubernetes-deployment/ingress.yml rename to deployment/examples/openstack-kubernetes/kubernetes-deployment/ingress.yml diff --git a/deployment-examples/openstack-kubernetes/kubernetes-deployment/main.tf b/deployment/examples/openstack-kubernetes/kubernetes-deployment/main.tf similarity index 100% rename from deployment-examples/openstack-kubernetes/kubernetes-deployment/main.tf rename to deployment/examples/openstack-kubernetes/kubernetes-deployment/main.tf diff --git a/deployment-examples/openstack-kubernetes/kubernetes-deployment/output.tf b/deployment/examples/openstack-kubernetes/kubernetes-deployment/output.tf similarity index 100% rename from deployment-examples/openstack-kubernetes/kubernetes-deployment/output.tf rename to deployment/examples/openstack-kubernetes/kubernetes-deployment/output.tf diff --git a/deployment-examples/openstack-kubernetes/kubernetes-deployment/variables.tf b/deployment/examples/openstack-kubernetes/kubernetes-deployment/variables.tf similarity index 100% rename from deployment-examples/openstack-kubernetes/kubernetes-deployment/variables.tf rename to deployment/examples/openstack-kubernetes/kubernetes-deployment/variables.tf diff --git a/terraform-modules/README.md b/deployment/terraform/README.md similarity index 100% rename from terraform-modules/README.md rename to deployment/terraform/README.md diff --git a/terraform-modules/cogstack-docker-services/README.md b/deployment/terraform/cogstack-docker-services/README.md similarity index 100% rename from terraform-modules/cogstack-docker-services/README.md rename to deployment/terraform/cogstack-docker-services/README.md diff --git a/terraform-modules/cogstack-docker-services/ansible.tf b/deployment/terraform/cogstack-docker-services/ansible.tf similarity index 100% rename from terraform-modules/cogstack-docker-services/ansible.tf rename to deployment/terraform/cogstack-docker-services/ansible.tf diff --git a/terraform-modules/cogstack-docker-services/ansible/deploy-internal.yml b/deployment/terraform/cogstack-docker-services/ansible/deploy-internal.yml similarity index 100% rename from terraform-modules/cogstack-docker-services/ansible/deploy-internal.yml rename to deployment/terraform/cogstack-docker-services/ansible/deploy-internal.yml diff --git a/terraform-modules/cogstack-docker-services/checks.tf b/deployment/terraform/cogstack-docker-services/checks.tf similarity index 100% rename from terraform-modules/cogstack-docker-services/checks.tf rename to deployment/terraform/cogstack-docker-services/checks.tf diff --git a/terraform-modules/cogstack-docker-services/environments.tf b/deployment/terraform/cogstack-docker-services/environments.tf similarity index 100% rename from terraform-modules/cogstack-docker-services/environments.tf rename to deployment/terraform/cogstack-docker-services/environments.tf diff --git a/terraform-modules/cogstack-docker-services/observability.tf b/deployment/terraform/cogstack-docker-services/observability.tf similarity index 100% rename from terraform-modules/cogstack-docker-services/observability.tf rename to deployment/terraform/cogstack-docker-services/observability.tf diff --git a/terraform-modules/cogstack-docker-services/outputs.tf b/deployment/terraform/cogstack-docker-services/outputs.tf similarity index 100% rename from terraform-modules/cogstack-docker-services/outputs.tf rename to deployment/terraform/cogstack-docker-services/outputs.tf diff --git a/terraform-modules/cogstack-docker-services/providers.tf b/deployment/terraform/cogstack-docker-services/providers.tf similarity index 100% rename from terraform-modules/cogstack-docker-services/providers.tf rename to deployment/terraform/cogstack-docker-services/providers.tf diff --git a/terraform-modules/cogstack-docker-services/resources/config/observability/alloy/elasticsearch.alloy b/deployment/terraform/cogstack-docker-services/resources/config/observability/alloy/elasticsearch.alloy similarity index 100% rename from terraform-modules/cogstack-docker-services/resources/config/observability/alloy/elasticsearch.alloy rename to deployment/terraform/cogstack-docker-services/resources/config/observability/alloy/elasticsearch.alloy diff --git a/terraform-modules/cogstack-docker-services/resources/config/observability/alloy/probers/probe.cogstack.yml.tmpl b/deployment/terraform/cogstack-docker-services/resources/config/observability/alloy/probers/probe.cogstack.yml.tmpl similarity index 100% rename from terraform-modules/cogstack-docker-services/resources/config/observability/alloy/probers/probe.cogstack.yml.tmpl rename to deployment/terraform/cogstack-docker-services/resources/config/observability/alloy/probers/probe.cogstack.yml.tmpl diff --git a/terraform-modules/cogstack-docker-services/resources/config/observability/alloy/probers/probe.observability.yml.tmpl b/deployment/terraform/cogstack-docker-services/resources/config/observability/alloy/probers/probe.observability.yml.tmpl similarity index 100% rename from terraform-modules/cogstack-docker-services/resources/config/observability/alloy/probers/probe.observability.yml.tmpl rename to deployment/terraform/cogstack-docker-services/resources/config/observability/alloy/probers/probe.observability.yml.tmpl diff --git a/terraform-modules/cogstack-docker-services/resources/config/observability/exporters.docker-compose.yml b/deployment/terraform/cogstack-docker-services/resources/config/observability/exporters.docker-compose.yml similarity index 100% rename from terraform-modules/cogstack-docker-services/resources/config/observability/exporters.docker-compose.yml rename to deployment/terraform/cogstack-docker-services/resources/config/observability/exporters.docker-compose.yml diff --git a/terraform-modules/cogstack-docker-services/resources/config/observability/exporters.elasticsearch.docker-compose.yml b/deployment/terraform/cogstack-docker-services/resources/config/observability/exporters.elasticsearch.docker-compose.yml similarity index 100% rename from terraform-modules/cogstack-docker-services/resources/config/observability/exporters.elasticsearch.docker-compose.yml rename to deployment/terraform/cogstack-docker-services/resources/config/observability/exporters.elasticsearch.docker-compose.yml diff --git a/terraform-modules/cogstack-docker-services/resources/config/observability/observability.docker-compose.yml b/deployment/terraform/cogstack-docker-services/resources/config/observability/observability.docker-compose.yml similarity index 100% rename from terraform-modules/cogstack-docker-services/resources/config/observability/observability.docker-compose.yml rename to deployment/terraform/cogstack-docker-services/resources/config/observability/observability.docker-compose.yml diff --git a/terraform-modules/cogstack-docker-services/resources/config/observability/prometheus/recording-rules/slo.yml b/deployment/terraform/cogstack-docker-services/resources/config/observability/prometheus/recording-rules/slo.yml similarity index 100% rename from terraform-modules/cogstack-docker-services/resources/config/observability/prometheus/recording-rules/slo.yml rename to deployment/terraform/cogstack-docker-services/resources/config/observability/prometheus/recording-rules/slo.yml diff --git a/terraform-modules/cogstack-docker-services/resources/medcat-service.docker-compose.yml b/deployment/terraform/cogstack-docker-services/resources/medcat-service.docker-compose.yml similarity index 100% rename from terraform-modules/cogstack-docker-services/resources/medcat-service.docker-compose.yml rename to deployment/terraform/cogstack-docker-services/resources/medcat-service.docker-compose.yml diff --git a/terraform-modules/cogstack-docker-services/services.tf b/deployment/terraform/cogstack-docker-services/services.tf similarity index 100% rename from terraform-modules/cogstack-docker-services/services.tf rename to deployment/terraform/cogstack-docker-services/services.tf diff --git a/terraform-modules/cogstack-docker-services/shared-locals.tf b/deployment/terraform/cogstack-docker-services/shared-locals.tf similarity index 100% rename from terraform-modules/cogstack-docker-services/shared-locals.tf rename to deployment/terraform/cogstack-docker-services/shared-locals.tf diff --git a/terraform-modules/cogstack-docker-services/variables.tf b/deployment/terraform/cogstack-docker-services/variables.tf similarity index 100% rename from terraform-modules/cogstack-docker-services/variables.tf rename to deployment/terraform/cogstack-docker-services/variables.tf diff --git a/terraform-modules/cogstack-helm-services/README.md b/deployment/terraform/cogstack-helm-services/README.md similarity index 100% rename from terraform-modules/cogstack-helm-services/README.md rename to deployment/terraform/cogstack-helm-services/README.md diff --git a/terraform-modules/cogstack-helm-services/checks.tf b/deployment/terraform/cogstack-helm-services/checks.tf similarity index 100% rename from terraform-modules/cogstack-helm-services/checks.tf rename to deployment/terraform/cogstack-helm-services/checks.tf diff --git a/terraform-modules/cogstack-helm-services/main.tf b/deployment/terraform/cogstack-helm-services/main.tf similarity index 84% rename from terraform-modules/cogstack-helm-services/main.tf rename to deployment/terraform/cogstack-helm-services/main.tf index 2dbc0279..863a138a 100644 --- a/terraform-modules/cogstack-helm-services/main.tf +++ b/deployment/terraform/cogstack-helm-services/main.tf @@ -17,7 +17,7 @@ EOT } resource "helm_release" "medcat-service" { name = "medcat-service-terraform" - chart = "${path.module}/../../../kubernetes/charts/medcat-service-helm" + chart = "${path.module}/../../charts/medcat-service-helm" timeout = 600 atomic = true force_update = true @@ -29,7 +29,7 @@ resource "helm_release" "medcat-service" { data "helm_template" "medcat-service" { name = "medcat-service-terraform" - chart = "${path.module}/../../../kubernetes/charts/medcat-service-helm" + chart = "${path.module}/../../charts/medcat-service-helm" timeout = 600 atomic = true diff --git a/terraform-modules/cogstack-helm-services/outputs.tf b/deployment/terraform/cogstack-helm-services/outputs.tf similarity index 100% rename from terraform-modules/cogstack-helm-services/outputs.tf rename to deployment/terraform/cogstack-helm-services/outputs.tf diff --git a/terraform-modules/cogstack-helm-services/providers.tf b/deployment/terraform/cogstack-helm-services/providers.tf similarity index 100% rename from terraform-modules/cogstack-helm-services/providers.tf rename to deployment/terraform/cogstack-helm-services/providers.tf diff --git a/terraform-modules/cogstack-helm-services/shared-locals.tf b/deployment/terraform/cogstack-helm-services/shared-locals.tf similarity index 100% rename from terraform-modules/cogstack-helm-services/shared-locals.tf rename to deployment/terraform/cogstack-helm-services/shared-locals.tf diff --git a/terraform-modules/cogstack-helm-services/variables.tf b/deployment/terraform/cogstack-helm-services/variables.tf similarity index 100% rename from terraform-modules/cogstack-helm-services/variables.tf rename to deployment/terraform/cogstack-helm-services/variables.tf diff --git a/terraform-modules/openstack-cogstack-infra/README.md b/deployment/terraform/openstack-cogstack-infra/README.md similarity index 100% rename from terraform-modules/openstack-cogstack-infra/README.md rename to deployment/terraform/openstack-cogstack-infra/README.md diff --git a/terraform-modules/openstack-cogstack-infra/cloud-init-controller.yaml b/deployment/terraform/openstack-cogstack-infra/cloud-init-controller.yaml similarity index 100% rename from terraform-modules/openstack-cogstack-infra/cloud-init-controller.yaml rename to deployment/terraform/openstack-cogstack-infra/cloud-init-controller.yaml diff --git a/terraform-modules/openstack-cogstack-infra/cloud-init.yaml b/deployment/terraform/openstack-cogstack-infra/cloud-init.yaml similarity index 100% rename from terraform-modules/openstack-cogstack-infra/cloud-init.yaml rename to deployment/terraform/openstack-cogstack-infra/cloud-init.yaml diff --git a/terraform-modules/openstack-cogstack-infra/compute-keypair.tf b/deployment/terraform/openstack-cogstack-infra/compute-keypair.tf similarity index 100% rename from terraform-modules/openstack-cogstack-infra/compute-keypair.tf rename to deployment/terraform/openstack-cogstack-infra/compute-keypair.tf diff --git a/terraform-modules/openstack-cogstack-infra/compute.tf b/deployment/terraform/openstack-cogstack-infra/compute.tf similarity index 100% rename from terraform-modules/openstack-cogstack-infra/compute.tf rename to deployment/terraform/openstack-cogstack-infra/compute.tf diff --git a/terraform-modules/openstack-cogstack-infra/networking.tf b/deployment/terraform/openstack-cogstack-infra/networking.tf similarity index 100% rename from terraform-modules/openstack-cogstack-infra/networking.tf rename to deployment/terraform/openstack-cogstack-infra/networking.tf diff --git a/terraform-modules/openstack-cogstack-infra/outputs.tf b/deployment/terraform/openstack-cogstack-infra/outputs.tf similarity index 100% rename from terraform-modules/openstack-cogstack-infra/outputs.tf rename to deployment/terraform/openstack-cogstack-infra/outputs.tf diff --git a/terraform-modules/openstack-cogstack-infra/providers.tf b/deployment/terraform/openstack-cogstack-infra/providers.tf similarity index 100% rename from terraform-modules/openstack-cogstack-infra/providers.tf rename to deployment/terraform/openstack-cogstack-infra/providers.tf diff --git a/terraform-modules/openstack-cogstack-infra/shared-locals.tf b/deployment/terraform/openstack-cogstack-infra/shared-locals.tf similarity index 100% rename from terraform-modules/openstack-cogstack-infra/shared-locals.tf rename to deployment/terraform/openstack-cogstack-infra/shared-locals.tf diff --git a/terraform-modules/openstack-cogstack-infra/variables.tf b/deployment/terraform/openstack-cogstack-infra/variables.tf similarity index 100% rename from terraform-modules/openstack-cogstack-infra/variables.tf rename to deployment/terraform/openstack-cogstack-infra/variables.tf diff --git a/terraform-modules/openstack-kubernetes-k3s/.terraform-docs.yml b/deployment/terraform/openstack-kubernetes-k3s/.terraform-docs.yml similarity index 100% rename from terraform-modules/openstack-kubernetes-k3s/.terraform-docs.yml rename to deployment/terraform/openstack-kubernetes-k3s/.terraform-docs.yml diff --git a/terraform-modules/openstack-kubernetes-k3s/CHANGELOG.md b/deployment/terraform/openstack-kubernetes-k3s/CHANGELOG.md similarity index 100% rename from terraform-modules/openstack-kubernetes-k3s/CHANGELOG.md rename to deployment/terraform/openstack-kubernetes-k3s/CHANGELOG.md diff --git a/terraform-modules/openstack-kubernetes-k3s/README.md b/deployment/terraform/openstack-kubernetes-k3s/README.md similarity index 97% rename from terraform-modules/openstack-kubernetes-k3s/README.md rename to deployment/terraform/openstack-kubernetes-k3s/README.md index c25be9b3..fe6d074d 100644 --- a/terraform-modules/openstack-kubernetes-k3s/README.md +++ b/deployment/terraform/openstack-kubernetes-k3s/README.md @@ -169,6 +169,6 @@ When using a non-default network, ensure the controller host has a floating IP s ## Contributing -The source for this module lives in [CogStack/cogstack-platform](https://github.com/CogStack/cogstack-platform) at [`terraform-modules/openstack-kubernetes-k3s`](https://github.com/CogStack/cogstack-platform/tree/main/terraform-modules/openstack-kubernetes-k3s). Contribute by opening pull requests or forks against that repository, with your changes in that directory. +The source for this module lives in [CogStack/cogstack-platform](https://github.com/CogStack/cogstack-platform) at [`deployment/terraform/openstack-kubernetes-k3s`](https://github.com/CogStack/cogstack-platform/tree/main/deployment/terraform/openstack-kubernetes-k3s). Contribute by opening pull requests or forks against that repository, with your changes in that directory. [CogStack/terraform-openstack-kubernetes-k3s](https://github.com/CogStack/terraform-openstack-kubernetes-k3s) is a read-only mirror. When a tag is created in cogstack-platform as `terraform-modules/openstack-kubernetes-k3s-v*.*.*` all the files will be synced accross. diff --git a/terraform-modules/openstack-kubernetes-k3s/cloud-init-k3s-agent.yaml b/deployment/terraform/openstack-kubernetes-k3s/cloud-init-k3s-agent.yaml similarity index 100% rename from terraform-modules/openstack-kubernetes-k3s/cloud-init-k3s-agent.yaml rename to deployment/terraform/openstack-kubernetes-k3s/cloud-init-k3s-agent.yaml diff --git a/terraform-modules/openstack-kubernetes-k3s/cloud-init-k3s-server.yaml b/deployment/terraform/openstack-kubernetes-k3s/cloud-init-k3s-server.yaml similarity index 100% rename from terraform-modules/openstack-kubernetes-k3s/cloud-init-k3s-server.yaml rename to deployment/terraform/openstack-kubernetes-k3s/cloud-init-k3s-server.yaml diff --git a/terraform-modules/openstack-kubernetes-k3s/compute-keypair.tf b/deployment/terraform/openstack-kubernetes-k3s/compute-keypair.tf similarity index 100% rename from terraform-modules/openstack-kubernetes-k3s/compute-keypair.tf rename to deployment/terraform/openstack-kubernetes-k3s/compute-keypair.tf diff --git a/terraform-modules/openstack-kubernetes-k3s/compute.tf b/deployment/terraform/openstack-kubernetes-k3s/compute.tf similarity index 100% rename from terraform-modules/openstack-kubernetes-k3s/compute.tf rename to deployment/terraform/openstack-kubernetes-k3s/compute.tf diff --git a/terraform-modules/openstack-kubernetes-k3s/examples/floating-ips/main.tf b/deployment/terraform/openstack-kubernetes-k3s/examples/floating-ips/main.tf similarity index 100% rename from terraform-modules/openstack-kubernetes-k3s/examples/floating-ips/main.tf rename to deployment/terraform/openstack-kubernetes-k3s/examples/floating-ips/main.tf diff --git a/terraform-modules/openstack-kubernetes-k3s/examples/floating-ips/providers.tf b/deployment/terraform/openstack-kubernetes-k3s/examples/floating-ips/providers.tf similarity index 100% rename from terraform-modules/openstack-kubernetes-k3s/examples/floating-ips/providers.tf rename to deployment/terraform/openstack-kubernetes-k3s/examples/floating-ips/providers.tf diff --git a/terraform-modules/openstack-kubernetes-k3s/examples/minimal/main.tf b/deployment/terraform/openstack-kubernetes-k3s/examples/minimal/main.tf similarity index 100% rename from terraform-modules/openstack-kubernetes-k3s/examples/minimal/main.tf rename to deployment/terraform/openstack-kubernetes-k3s/examples/minimal/main.tf diff --git a/terraform-modules/openstack-kubernetes-k3s/examples/minimal/providers.tf b/deployment/terraform/openstack-kubernetes-k3s/examples/minimal/providers.tf similarity index 100% rename from terraform-modules/openstack-kubernetes-k3s/examples/minimal/providers.tf rename to deployment/terraform/openstack-kubernetes-k3s/examples/minimal/providers.tf diff --git a/terraform-modules/openstack-kubernetes-k3s/kubeconfig-extraction.tf b/deployment/terraform/openstack-kubernetes-k3s/kubeconfig-extraction.tf similarity index 100% rename from terraform-modules/openstack-kubernetes-k3s/kubeconfig-extraction.tf rename to deployment/terraform/openstack-kubernetes-k3s/kubeconfig-extraction.tf diff --git a/terraform-modules/openstack-kubernetes-k3s/networking.tf b/deployment/terraform/openstack-kubernetes-k3s/networking.tf similarity index 100% rename from terraform-modules/openstack-kubernetes-k3s/networking.tf rename to deployment/terraform/openstack-kubernetes-k3s/networking.tf diff --git a/terraform-modules/openstack-kubernetes-k3s/outputs.tf b/deployment/terraform/openstack-kubernetes-k3s/outputs.tf similarity index 100% rename from terraform-modules/openstack-kubernetes-k3s/outputs.tf rename to deployment/terraform/openstack-kubernetes-k3s/outputs.tf diff --git a/terraform-modules/openstack-kubernetes-k3s/providers.tf b/deployment/terraform/openstack-kubernetes-k3s/providers.tf similarity index 100% rename from terraform-modules/openstack-kubernetes-k3s/providers.tf rename to deployment/terraform/openstack-kubernetes-k3s/providers.tf diff --git a/terraform-modules/openstack-kubernetes-k3s/shared-locals.tf b/deployment/terraform/openstack-kubernetes-k3s/shared-locals.tf similarity index 100% rename from terraform-modules/openstack-kubernetes-k3s/shared-locals.tf rename to deployment/terraform/openstack-kubernetes-k3s/shared-locals.tf diff --git a/terraform-modules/openstack-kubernetes-k3s/tests/compute.tftest.hcl b/deployment/terraform/openstack-kubernetes-k3s/tests/compute.tftest.hcl similarity index 100% rename from terraform-modules/openstack-kubernetes-k3s/tests/compute.tftest.hcl rename to deployment/terraform/openstack-kubernetes-k3s/tests/compute.tftest.hcl diff --git a/terraform-modules/openstack-kubernetes-k3s/tests/fixtures/fake_key b/deployment/terraform/openstack-kubernetes-k3s/tests/fixtures/fake_key similarity index 100% rename from terraform-modules/openstack-kubernetes-k3s/tests/fixtures/fake_key rename to deployment/terraform/openstack-kubernetes-k3s/tests/fixtures/fake_key diff --git a/terraform-modules/openstack-kubernetes-k3s/tests/fixtures/fake_key.pub b/deployment/terraform/openstack-kubernetes-k3s/tests/fixtures/fake_key.pub similarity index 100% rename from terraform-modules/openstack-kubernetes-k3s/tests/fixtures/fake_key.pub rename to deployment/terraform/openstack-kubernetes-k3s/tests/fixtures/fake_key.pub diff --git a/terraform-modules/openstack-kubernetes-k3s/variables.tf b/deployment/terraform/openstack-kubernetes-k3s/variables.tf similarity index 100% rename from terraform-modules/openstack-kubernetes-k3s/variables.tf rename to deployment/terraform/openstack-kubernetes-k3s/variables.tf diff --git a/docs/.gitignore b/docs/.gitignore index 1320f90e..f4d441dc 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1 +1,2 @@ site +.DS_Store diff --git a/docs/docs/cogstack-ce/reference.md b/docs/docs/cogstack-ce/reference.md index d6fe15eb..97dfc18e 100644 --- a/docs/docs/cogstack-ce/reference.md +++ b/docs/docs/cogstack-ce/reference.md @@ -67,7 +67,7 @@ On install, the CogStack CE provisioner: - Loads example documents - Imports premade dashboards -The dashboards and data used here were first defined in [cogstack-dashboards-demo](https://github.com/CogStack/cogstack-platform/tree/main/cogstack-dashboards-demo). +The dashboards and data used here were first defined in [cogstack-dashboards-demo](https://github.com/CogStack/cogstack-platform/tree/main/apps/cogstack-dashboards-demo). ## Architecture Details diff --git a/docs/docs/platform/deployment/examples/aws-kubernetes-eks.md b/docs/docs/platform/deployment/examples/aws-kubernetes-eks.md index fca15f30..95e2ac94 100644 --- a/docs/docs/platform/deployment/examples/aws-kubernetes-eks.md +++ b/docs/docs/platform/deployment/examples/aws-kubernetes-eks.md @@ -23,7 +23,7 @@ Deployment through terraform is carried out through two terraform commands, to h ### 1. Get the configuration files -All you need to do is get the Terraform files that have been preconfigured for this example (the ZIP contains every `deployment-examples` tree; use the `aws-kubernetes` folder for this guide). +All you need to do is get the Terraform files that have been preconfigured for this example (the ZIP contains every `deployment/examples` tree; use the `aws-kubernetes` folder for this guide). [Download all deployment examples (ZIP)](../../../assets/downloads/deployment-examples.zip){ .md-button } diff --git a/docs/docs/platform/deployment/examples/azure-kubernetes-aks.md b/docs/docs/platform/deployment/examples/azure-kubernetes-aks.md index 48f6b51a..2baf6200 100644 --- a/docs/docs/platform/deployment/examples/azure-kubernetes-aks.md +++ b/docs/docs/platform/deployment/examples/azure-kubernetes-aks.md @@ -33,7 +33,7 @@ Deployment through terraform is carried out through two terraform commands, to h ### 1. Get the configuration files -All you need to do is get the Terraform files that have been preconfigured for this example (this download includes every `deployment-examples` tree; use the `azure-kubernetes` folder for this guide). +All you need to do is get the Terraform files that have been preconfigured for this example (this download includes every `deployment/examples` tree; use the `azure-kubernetes` folder for this guide). [Download all deployment examples (ZIP)](../../../assets/downloads/deployment-examples.zip){ .md-button } diff --git a/docs/docs/platform/deployment/examples/openstack-docker.md b/docs/docs/platform/deployment/examples/openstack-docker.md index d1a2ec75..91d72943 100644 --- a/docs/docs/platform/deployment/examples/openstack-docker.md +++ b/docs/docs/platform/deployment/examples/openstack-docker.md @@ -27,7 +27,7 @@ This example: ### 1. Get the configuration files -Get the Terraform files for this example (the ZIP contains all `deployment-examples`; use the `openstack-docker` folder for this guide). +Get the Terraform files for this example (the ZIP contains all `deployment/examples`; use the `openstack-docker` folder for this guide). [Download all deployment examples (ZIP)](../../../assets/downloads/deployment-examples.zip){ .md-button } diff --git a/docs/docs/platform/deployment/examples/openstack-kubernetes-k3s.md b/docs/docs/platform/deployment/examples/openstack-kubernetes-k3s.md index fe513e97..d1c5ee4e 100644 --- a/docs/docs/platform/deployment/examples/openstack-kubernetes-k3s.md +++ b/docs/docs/platform/deployment/examples/openstack-kubernetes-k3s.md @@ -24,7 +24,7 @@ This example: ### 1. Get the configuration files -Get the Terraform files for this example (the ZIP contains all `deployment-examples`; use the `openstack-kubernetes` folder for this guide). +Get the Terraform files for this example (the ZIP contains all `deployment/examples`; use the `openstack-kubernetes` folder for this guide). [Download all deployment examples (ZIP)](../../../assets/downloads/deployment-examples.zip){ .md-button } diff --git a/docs/docs/platform/deployment/reference/terraform/terraform-openstack-kubernetes-k3s.md b/docs/docs/platform/deployment/reference/terraform/terraform-openstack-kubernetes-k3s.md index f2b0c968..6a12455c 100644 --- a/docs/docs/platform/deployment/reference/terraform/terraform-openstack-kubernetes-k3s.md +++ b/docs/docs/platform/deployment/reference/terraform/terraform-openstack-kubernetes-k3s.md @@ -16,6 +16,6 @@ The module is published to the Terraform Registry: Source code lives in this repository: -- [terraform-modules/openstack-kubernetes-k3s](https://github.com/CogStack/cogstack-platform/tree/main/terraform-modules/openstack-kubernetes-k3s) +- [deployment/terraform/openstack-kubernetes-k3s](https://github.com/CogStack/cogstack-platform/tree/main/deployment/terraform/openstack-kubernetes-k3s) For a full CogStack platform deployment that uses this module, see the [OpenStack Kubernetes K3s example](../../examples/openstack-kubernetes-k3s.md). diff --git a/docs/docs/platform/observability/get-started/quickstart.md b/docs/docs/platform/observability/get-started/quickstart.md index 8c449065..53a8734d 100644 --- a/docs/docs/platform/observability/get-started/quickstart.md +++ b/docs/docs/platform/observability/get-started/quickstart.md @@ -16,7 +16,7 @@ After completing these steps, you will have a full observability stack running l Run this quickstart script to setup the project ```bash -curl https://raw.githubusercontent.com/CogStack/cogstack-platform-toolkit/85029d135b5bacfb473b638d82e45021ee67781a/observability/examples/simple/quickstart.sh | bash +curl https://raw.githubusercontent.com/CogStack/cogstack-platform/main/deployment/examples/observability/simple/quickstart.sh | bash ``` Now go to "http://localhost/grafana" to see the dashboards diff --git a/docs/docs/platform/observability/reference/project-details.md b/docs/docs/platform/observability/reference/project-details.md index 53eb7722..e8916fc6 100644 --- a/docs/docs/platform/observability/reference/project-details.md +++ b/docs/docs/platform/observability/reference/project-details.md @@ -1,4 +1,6 @@ # Further Project Details +- [Image definitions and bundled configuration](https://github.com/CogStack/cogstack-platform/tree/main/apps/observability) +- [Deployment examples and quickstart smoke tests](https://github.com/CogStack/cogstack-platform/tree/main/deployment/examples/observability) - [Quickstart Manual](quickstart-manual.md) diff --git a/docs/docs/platform/observability/reference/quickstart-manual.md b/docs/docs/platform/observability/reference/quickstart-manual.md index 563eec3c..d3e4d44a 100644 --- a/docs/docs/platform/observability/reference/quickstart-manual.md +++ b/docs/docs/platform/observability/reference/quickstart-manual.md @@ -11,8 +11,8 @@ mkdir -p observability-simple/alloy/probers Download these two files, and place in the right folder -- [docker-compose.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform-toolkit/85029d135b5bacfb473b638d82e45021ee67781a/observability/examples/simple/docker-compose.yml) in observability-simple/ -- [probe-observability.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform-toolkit/85029d135b5bacfb473b638d82e45021ee67781a/observability/examples/simple/alloy/probers/probe-observability.yml) into observability-simple/alloy/probers +- [docker-compose.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform/main/deployment/examples/observability/simple/docker-compose.yml) in observability-simple/ +- [probe-observability.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform/main/deployment/examples/observability/simple/alloy/probers/probe-observability.yml) into observability-simple/alloy/probers ### Step 2: Start the stack diff --git a/docs/docs/platform/observability/setup/production-setup.md b/docs/docs/platform/observability/setup/production-setup.md index 98652363..7e66157b 100644 --- a/docs/docs/platform/observability/setup/production-setup.md +++ b/docs/docs/platform/observability/setup/production-setup.md @@ -18,7 +18,7 @@ We will run the stack and then: Run: ```bash -curl https://raw.githubusercontent.com/CogStack/cogstack-platform-toolkit/85029d135b5bacfb473b638d82e45021ee67781a/observability/examples/full/full-quickstart.sh | bash +curl https://raw.githubusercontent.com/CogStack/cogstack-platform/main/deployment/examples/observability/full/full-quickstart.sh | bash ``` This script will setup all the folder structure, and download all the relevant files. @@ -28,16 +28,16 @@ The script automates making folders, and downloading these files: Downloads the example docker compose files: -- [docker-compose.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform-toolkit/85029d135b5bacfb473b638d82e45021ee67781a/observability/examples/full/docker-compose.yml) -- [exporters.docker-compose.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform-toolkit/85029d135b5bacfb473b638d82e45021ee67781a/observability/examples/full/exporters.docker-compose.yml) -- [exporters.elastic.docker-compose.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform-toolkit/85029d135b5bacfb473b638d82e45021ee67781a/observability/examples/full/exporters.elastic.docker-compose.yml) +- [docker-compose.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform/main/deployment/examples/observability/full/docker-compose.yml) +- [exporters.docker-compose.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform/main/deployment/examples/observability/full/exporters.docker-compose.yml) +- [exporters.elastic.docker-compose.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform/main/deployment/examples/observability/full/exporters.elastic.docker-compose.yml) Downloads the configurations: -- [alloy/probers/probe-external.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform-toolkit/85029d135b5bacfb473b638d82e45021ee67781a/observability/examples/full/alloy/probers/probe-external.yml) -- [alloy/probers/probe-observability.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform-toolkit/85029d135b5bacfb473b638d82e45021ee67781a/observability/examples/full/alloy/probers/probe-observability.yml) -- [prometheus/scrape-configs/exporters/exporters.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform-toolkit/85029d135b5bacfb473b638d82e45021ee67781a/observability/examples/full/prometheus/scrape-configs/exporters/exporters.yml) -- [prometheus/scrape-configs/recording-rules/slo.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform-toolkit/85029d135b5bacfb473b638d82e45021ee67781a/observability/examples/full/prometheus/scrape-configs/recording-rules/slo.yml) +- [alloy/probers/probe-external.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform/main/deployment/examples/observability/full/alloy/probers/probe-external.yml) +- [alloy/probers/probe-observability.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform/main/deployment/examples/observability/full/alloy/probers/probe-observability.yml) +- [prometheus/scrape-configs/exporters/exporters.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform/main/deployment/examples/observability/full/prometheus/scrape-configs/exporters/exporters.yml) +- [prometheus/scrape-configs/recording-rules/slo.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform/main/deployment/examples/observability/full/prometheus/scrape-configs/recording-rules/slo.yml) @@ -89,7 +89,7 @@ This is probably the hardest step: You will actually need to know what is runnin ## Step 5: Run Grafana Alloy on every VM The Grafana Alloy image needs to be run on each VM that you want to get information from. -Use the example docker compose file in [exporters.docker-compose.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform-toolkit/85029d135b5bacfb473b638d82e45021ee67781a/observability/examples/full/exporters.docker-compose.yml) which will start up alloy and get metrics +Use the example docker compose file in [exporters.docker-compose.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform/main/deployment/examples/observability/full/exporters.docker-compose.yml) which will start up alloy and get metrics ``` docker compose -f exporters.docker-compose.yml up -d diff --git a/docs/docs/platform/observability/setup/telemetry.md b/docs/docs/platform/observability/setup/telemetry.md index a68f4333..1e673605 100644 --- a/docs/docs/platform/observability/setup/telemetry.md +++ b/docs/docs/platform/observability/setup/telemetry.md @@ -16,7 +16,7 @@ We have to run Grafana Alloy on every single VM to get telemetry. Alloy is setup to push metrics to a central prometheus instance. -- Copy this docker compose file: [exporters.docker-compose.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform-toolkit/85029d135b5bacfb473b638d82e45021ee67781a/observability/examples/full/exporters.docker-compose.yml) +- Copy this docker compose file: [exporters.docker-compose.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform/main/deployment/examples/observability/full/exporters.docker-compose.yml) - Edit the environment variables to point to your prometheus URL: ```yaml @@ -34,8 +34,8 @@ Now you have the setup, you will have to run this on every VM you want metrics f ### Elastic Search Metrics To get elasticsearch metrics we have to mount an alloy config file into the image. -- Copy this docker compose file: [exporters.elastic.docker-compose.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform-toolkit/85029d135b5bacfb473b638d82e45021ee67781a/observability/examples/full/exporters.elastic.docker-compose.yml) -- Copy this configuration file [elasticsearch.alloy](https://raw.githubusercontent.com/CogStack/cogstack-platform-toolkit/85029d135b5bacfb473b638d82e45021ee67781a/observability/examples/full/alloy/elasticsearch.alloy) into `alloy/elasticsearch.alloy` +- Copy this docker compose file: [exporters.elastic.docker-compose.yml](https://raw.githubusercontent.com/CogStack/cogstack-platform/main/deployment/examples/observability/full/exporters.elastic.docker-compose.yml) +- Copy this configuration file [elasticsearch.alloy](https://raw.githubusercontent.com/CogStack/cogstack-platform/main/deployment/examples/observability/full/alloy/elasticsearch.alloy) into `alloy/elasticsearch.alloy` In the docker compose file, we can see there are two changes to the usual exporter: diff --git a/docs/main.py b/docs/main.py index 962965a3..1bc0264d 100644 --- a/docs/main.py +++ b/docs/main.py @@ -31,13 +31,13 @@ def embed_all_files_in_directory_as_snippets( """ Emit pymdownx **tabbed** blocks with **snippets** for every matching file under a directory. - ``folder`` is relative to the repo ``deployment-examples/`` directory. Snippet paths match - that layout; ensure ``pymdownx.snippets`` ``base_path`` includes ``../deployment-examples``. + ``folder`` is relative to the repo ``deployment/examples/`` directory. Snippet paths match + that layout; ensure ``pymdownx.snippets`` ``base_path`` includes ``../deployment/examples``. ``patterns`` is a comma-separated list of globs matched against the **basename** (e.g. ``*.tf`` or ``*`` for every file). Hidden files (names starting with ``.``) are skipped. """ - root = repo_root / "deployment-examples" / folder + root = repo_root / "deployment" / "examples" / folder if not root.is_dir(): raise FileNotFoundError( f"embed_all_files_in_directory_as_snippets: not a directory: {root}" @@ -60,7 +60,7 @@ def include_file(path: Path) -> bool: return "_No matching files found._" blocks: list[str] = [] - deploy_root = repo_root / "deployment-examples" + deploy_root = repo_root / "deployment" / "examples" for path in paths: rel = path.relative_to(deploy_root).as_posix() title = path.relative_to(root).as_posix() diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index f0442274..2652dd8e 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -156,8 +156,8 @@ markdown_extensions: check_paths: true base_path: - docs - - ../deployment-examples - - deployment-examples + - ../deployment/examples + - deployment/examples - pymdownx.tabbed: alternate_style: true - pymdownx.emoji: diff --git a/docs/scripts/copy_files_from_repo.py b/docs/scripts/copy_files_from_repo.py index 5cf76377..8a9de9fb 100644 --- a/docs/scripts/copy_files_from_repo.py +++ b/docs/scripts/copy_files_from_repo.py @@ -22,15 +22,15 @@ # Add more entries here to copy additional static files into documentation. COPY_SPECS = [ { - "sourceFilePath": "helm-charts/cogstack-jupyterhub-helm/examples/medcat-service-tutorial.ipynb", + "sourceFilePath": "deployment/charts/cogstack-jupyterhub-helm/examples/medcat-service-tutorial.ipynb", "outputFilePath": "platform/cogstack-ai/medcat-service-tutorial.ipynb", }, { - "sourceFilePath": "helm-charts/cogstack-jupyterhub-helm/examples/medcat-opensearch-e2e.ipynb", + "sourceFilePath": "deployment/charts/cogstack-jupyterhub-helm/examples/medcat-opensearch-e2e.ipynb", "outputFilePath": "cogstack-ce/tutorial/medcat-opensearch-e2e.ipynb", }, { - "sourceFilePath": "helm-charts/cogstack-jupyterhub-helm/examples/ocr-service-tutorial.ipynb", + "sourceFilePath": "deployment/charts/cogstack-jupyterhub-helm/examples/ocr-service-tutorial.ipynb", "outputFilePath": "data-engineering/ocr-service-tutorial.ipynb", }, ] diff --git a/docs/scripts/gen_helm_readme.py b/docs/scripts/gen_helm_readme.py index 0eb6bf58..9b0423e0 100644 --- a/docs/scripts/gen_helm_readme.py +++ b/docs/scripts/gen_helm_readme.py @@ -3,7 +3,7 @@ """ mkdocs-gen-files generator. -This script copies each Helm chart's `helm-charts//README.md` into the +This script copies each Helm chart's `deployment/charts//README.md` into the MkDocs documentation build output so it can be referenced from `mkdocs.yml`. Output filename format: @@ -16,14 +16,14 @@ REPO_ROOT = Path(__file__).resolve().parents[2] -HELM_CHARTS_DIR = REPO_ROOT / "helm-charts" +HELM_CHARTS_DIR = REPO_ROOT / "deployment" / "charts" # Output path is relative to MkDocs' `docs_dir` (configured in docs/mkdocs.yml). OUTPUT_DIR = Path("platform/deployment/helm/charts") def main() -> None: - """Generate MkDocs markdown pages for all Helm charts found in `helm-charts/`.""" + """Generate MkDocs markdown pages for all Helm charts found in `deployment/charts/`.""" for chart_dir in sorted(HELM_CHARTS_DIR.iterdir(), key=lambda p: p.name): if not chart_dir.is_dir(): continue diff --git a/docs/scripts/zip_deployment_examples.py b/docs/scripts/zip_deployment_examples.py index 044bc9de..3739b793 100644 --- a/docs/scripts/zip_deployment_examples.py +++ b/docs/scripts/zip_deployment_examples.py @@ -22,7 +22,7 @@ ZIP_SPECS = [ { - "sourceFolderPath": "deployment-examples", + "sourceFolderPath": "deployment/examples", "outputZipPath": "assets/downloads/deployment-examples.zip", }, ] @@ -38,7 +38,7 @@ def main() -> None: if not source_dir.is_dir(): raise FileNotFoundError(f"Source directory not found: {source_dir}") - root_name = source_dir.name + root_name = Path(output_rel).stem buf = io.BytesIO() with zipfile.ZipFile(buf, "w", zipfile.ZIP_DEFLATED) as zf: for path in sorted(source_dir.rglob("*"), key=lambda p: p.as_posix()): diff --git a/helm-charts/ocr-service-helm/values-text-only.yaml b/helm-charts/ocr-service-helm/values-text-only.yaml deleted file mode 100644 index c66edeae..00000000 --- a/helm-charts/ocr-service-helm/values-text-only.yaml +++ /dev/null @@ -1,2 +0,0 @@ -env: - OCR_SERVICE_OPERATION_MODE: "NO_OCR" diff --git a/release-please-config.json b/release-please-config.json index 41b12573..ab78fd07 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -18,7 +18,7 @@ "bootstrap-sha": "07501a49fcf25b639443cd53b39d88c7a1f092e9", "separate-pull-requests": true, "packages": { - "helm-charts/medcat-trainer-helm": { + "deployment/charts/medcat-trainer-helm": { "release-type": "helm", "component": "helm-charts/medcat-trainer-helm", "changelog-path": "CHANGELOG.md", @@ -34,7 +34,7 @@ { "type": "revert", "section": "Reverts" } ] }, - "helm-charts/medcat-service-helm": { + "deployment/charts/medcat-service-helm": { "release-type": "helm", "component": "helm-charts/medcat-service-helm", "changelog-path": "CHANGELOG.md", @@ -50,7 +50,7 @@ { "type": "revert", "section": "Reverts" } ] }, - "helm-charts/cogstack-ce-helm": { + "deployment/charts/cogstack-ce-helm": { "release-type": "helm", "component": "helm-charts/cogstack-ce-helm", "changelog-path": "CHANGELOG.md", @@ -66,7 +66,7 @@ { "type": "revert", "section": "Reverts" } ] }, - "helm-charts/cogstack-cohorter-helm": { + "deployment/charts/cogstack-cohorter-helm": { "release-type": "helm", "component": "helm-charts/cogstack-cohorter-helm", "changelog-path": "CHANGELOG.md", @@ -82,7 +82,7 @@ { "type": "revert", "section": "Reverts" } ] }, - "helm-charts/cogstack-observability-helm": { + "deployment/charts/cogstack-observability-helm": { "release-type": "helm", "component": "helm-charts/cogstack-observability-helm", "changelog-path": "CHANGELOG.md", @@ -98,7 +98,7 @@ { "type": "revert", "section": "Reverts" } ] }, - "helm-charts/cogstack-jupyterhub-helm": { + "deployment/charts/cogstack-jupyterhub-helm": { "release-type": "helm", "component": "helm-charts/cogstack-jupyterhub-helm", "changelog-path": "CHANGELOG.md", @@ -114,7 +114,7 @@ { "type": "revert", "section": "Reverts" } ] }, - "helm-charts/ocr-service-helm": { + "deployment/charts/ocr-service-helm": { "release-type": "helm", "component": "helm-charts/ocr-service-helm", "initial-version": "0.1.0", @@ -131,7 +131,7 @@ { "type": "revert", "section": "Reverts" } ] }, - "terraform-modules/openstack-kubernetes-k3s": { + "deployment/terraform/openstack-kubernetes-k3s": { "release-type": "simple", "component": "terraform-modules/openstack-kubernetes-k3s", "initial-version": "0.1.0",