Skip to content

Drill4J/kubernetes-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drill4J - deploy using Helm or Kubernetes

This repository describes how to deploy Drill4J core services using either Helm or Kubernetes.

Deployment with Helm Chart

IMPORTANT: once you are done with this section, make sure to follow post-deployment instructions to finalize setup

  1. Package Helm chart

    cd helm
    helm package .
    # ./drill-chart-0.9.0.tgz must appear in ./helm directory  
  2. Option #1 - deploy using existing secret storage

    helm install drill ./drill-chart-0.9.0.tgz \
    	--set secrets.dbSecret=my-db-secrets \
    	--set postgresql.auth.existingSecret=my-db-secrets

    Secret storage must contain following keys: "db-username" and "db-password". For example (if creating secrets with kubectl):

    kubectl create secret generic my-db-secrets --from-literal=db-username=postgres1 --from-literal=db-password=123456

    You can also override defaults key names by:

    helm install drill ./drill-chart-0.9.0.tgz \
    	--set secrets.dbSecret=my-db-secrets \
    	--set secrets.dbUsernameKey=someOtherKeyForUsername \
    	--set secrets.dbPasswordKey=someOtherKeyForPassword \
    
    	--set postgresql.auth.existingSecret=my-db-secrets \
    	--set postgresql.auth.secretKeys.adminPasswordKey=someOtherKeyForPassword \
    	--set postgresql.auth.secretKeys.userPasswordKey=someOtherKeyForPassword
  3. Option #2 - deploy using default secrets storage. Recommended only for development purposes

    helm install drill ./drill-chart-0.9.0.tgz --set secrets.create=true

    See default values for username and password in ./helm/values.yaml secrets: section

Post-deployment setup for deployment with Helm

  1. Navigate to Metabase's Admin Panel, open "General" tab (/metabase/admin/settings/general) and set SITE URL to http://*your host*/metabase (e.g. http://localhost/metabase for local deployment)

  2. Navigate to Databases tab (/metabase/admin/databases), click on Drill4J_PostgreSQL_DB and update the following values:

    # db host
    drill-postgresql
    # database name
    db-drill
    # port
    5432
    # also update username and password

    Click the "Save changes" button at the bottom of the page

Deployment with Kubernetes configuration files

IMPORTANT: once you are done with this section, make sure to follow post-deployment instructions to finalize setup

  1. Install resources

    # Execute commands below one by one
    # Check container logs to ensure the corresponding component is available before proceeding to the next one
    # Admin and Metabase containers are dependant on PostgreSQL and will crash otherwise
    helm install my-postgres bitnami/postgresql -f postgres.values.yaml;
    kubectl apply -f ./config-map.yaml;
    kubectl apply -f ./admin.yaml;
    kubectl apply -f ./ui.yaml;
    kubectl apply -f ./metabase.yaml;
    kubectl apply -f ./ingress.yaml;

Post-deployment setup for deployment with Kubernetes

  1. Configure Metabase following this instruction

  2. Update DRILL_UI_BASE_URL in config-map.yaml to point to your host.

    • change the value in config-map.yaml (e.g. my.actual.host/ui)
    • execute kubectl apply -f config-map.yaml
    • restart admin deployment (that is required for admin to provide correct links in metrics reports)

Local Deployment with Minikube

  1. See DEVELOPMENT.md for prerequisites and development instructions

  2. For Minikube: make sure to launch minikube first and enable Ingress addon

    	# Launch minikube
    	minikube start
    	# Enable Ingress
    	minikube addons enable ingress
    	# Launch dashboard to inspect state of containers and logs
    	minikube dashboard
    	# run with elevated shell (admin privileges) 
    	# keep terminal open
    	minikube tunnel
  3. Deploy necessary components using either Helm chart or Kubernetes config files

  4. You should now have PostgreSQL, Drill4J API, Drill4J UI and Metabase Dashboards running. There are a few configuration steps left ahead.

    Default paths configured are:

    DB is only accessible from within cluster by default. Configure additional service if needed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors