Skip to content

chore: localdev - switch to MongoDB Kubernetes Operator#51

Merged
bodom0015 merged 20 commits intodevelopfrom
switch-to-mdbc
Feb 17, 2026
Merged

chore: localdev - switch to MongoDB Kubernetes Operator#51
bodom0015 merged 20 commits intodevelopfrom
switch-to-mdbc

Conversation

@bodom0015
Copy link
Copy Markdown
Member

@bodom0015 bodom0015 commented Feb 16, 2026

Problem

  • chosen image tag for nfs-server-provisioner no longer exists - need to update to a newer version
  • chosen dnsmasq image does not support arm64 - need to find a working replacement + config for wildcard DNS
  • bitnami registry is no longer a free resource
  • bitnami images do not support arm64 (Apple Silicon)
  • MongoDB is needed for our application, but currently uses a bitnami Docker image
  • We need a local test harness to play around with, but this amd64 image will not run cross platform

We have already updated our docker autobuilds for the apiserver and webui to produce arm64 images, but we still need a solution for MongoDB

Approach

How to Test

Prerequisites (requires Docker Desktop)

  • Deploy a local Kubernetes cluster using kubeadm or kind
    • For macOS or Windows, simply enable Kubernetes in the Settings of Docker Desktop 👍 easy!
    • For Linux where Docker Desktop isn't an option, you can use kind to deploy single node cluster for testing: kind create cluster --config .kind.with.hostpath.yml
  • dnsmasq for wildcard DNS resolution locally (docker compose -f dnsmasq.compose.yml up -d) needs more testing
    • alternatively, you can manipulate /etc/hosts to emulate this behavior for small-scale testing:
# One entry for your root domain
127.0.0.1 kubernetes.docker.internal
# One entry for each workbench app/service that you need to access, for example:
127.0.0.1 testlocalhost-s72299-toolmanager.kubernetes.docker.internal

Install + Startup (requires Kubernetes cluster + Volume Provisioner)

  1. Checkout this branch locally, remove any existing local Workbench instance: make clean_all
  2. Bring up Workbench: make dev
    • You should see the following steps are performed:
      • Helm repos are updated + dependency Helm charts are fetched
      • Backend + Frontend source code is cloned locally, if it is not already present
      • Frontend source code is bundled up via yarn
      • Source code / built bundles are mounted into running containers, allowing for live development (though there may be a slight delay for frontend to re-compile after each change - see container logs for details)
      • MongoDB is deployed and a workbench:workbench user is created for the ndslabs database
      • Keycloak + PostgreSQL are deployed for user management, workbench-dev Realm is created automatically
      • OAuth2 Proxy + Redis are deployed, connected to Keycloak
      • NGINX Ingress Controller is deployed (but this may eventually be replaced with Traefik, see [WIP] feat: prefer traefik for localdev #48)
      • Backend is deployed, connected to MongoDB + OAuth2 Proxy + Kubernetes API
      • Frontend is deployed, connected to Backend + OAuth2 Proxy
  3. Wait for all pieces of the application to be Running or Completed: make status

Signup + Login (requires Keycloak + OAuth2 Proxy)

  1. Navigate to https://kubernetes.docker.internal to access the Workbench WebUI
  2. Click Log In
    • You should be brought to the Keycloak login screen
  3. At the bottom, click "Register"
    • You should be brought to the new user signup form
  4. Fill out the form to create a new local test user on the workbench-dev realm. For example:
    • First Name: Test
    • Last Name: User
    • Username: test
    • Email: test@localhost
    • Password: asdf1234
    • Confirm Password: asdf1234
  5. Submit the form to sign into the Workbench as this user
    • You should be brought to an empty applications dashboard
    • You should see your test email appear at the top-right
    • You should see a prompt linking you to the catalog to add an application

AppSpecs + UserApps (requires DNS manipulation)

  1. Click on the "All Apps" link to access the catalog
    • You should see many applications are listed in the catalog - these are called AppSpecs
    • You should see that the first application listed in the catalog is the "Analysis Toolbox" - this is our simplest test application
  2. Click the (+) button to add an instance on the "Analysis Toolbox" app
    • You should be brought back to the application dashboard, but you should now see your own personal copy of this application is listed here - these are called UserApps
    • You should see a Launch button (rocket icon) for this app
  3. Click the Launch button
    • You should see the application display turns yellow and indicates that it is working in the background
    • You should see a new Pod now appears via make status
  4. Wait for the application to finish launching (it shouldn't take longer than ~1 minute)
    • you should see the application display turns green and indicates that it now offers a clickable link - this allows you to access the running application

@bodom0015 bodom0015 merged commit cbc70e9 into develop Feb 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant