Service to allow for easy deployment and use of databases. Able to import and export data from live databases. WIP. Better docs in the future.
This repository, it's Makefile, and any scripts expects an installed and running instance of Minikube along with a true install of kubectl. This allows for deployment templating, deployment, and cleaning up along with some dev tools and special operations using the variables located in the makefile.
Our local development environment relies on running everything using Minikube. The minikube installation guide is below. Additionally, we want to use kubectl to manage the minikube instance. Note: Minikube does have a kubectl instance, we want a system wide kubectl though, so that guide is below.
snap install kubectl --classic
is the simplest method if it is available to you.This repository relies on a Makefile to build, deploy, template, and delete everything.
The Makefile has a make help
target, along with a make vars
target to explain targets and vars set automatically.
To change a particular variable, please go into Makefile
and make the change by hand.
You must go into the Makefile and provide the service_password variable.
# Get all commands and descriptions with:
cd /pods_service
make help
Generally devs will use make clean up
over and over again. This will clean up dir and pods, build image, and deploy with minikube.
up
.The Makefile up
target is the most complex. This is a light explainer.
up
takes the deploymentTemplate directory, copies it, replaces (with sed) variables using the Makefile variables (such as image tag, k8 namespace, service_password).
Once the new deployment directory is created. We then run ./burnup
, which starts the following pods: api
, health
, spawner
, postgres
, traefik
, rabbitmq
.
The api
pod contains the server and also initializes the postgres database (using an alembic migration) and rabbitmq (using rabbitmqadmin script).
You can use dev containers with Minikube with the Makefile!
Steps:
DEV_TOOLS
to true in the Makefile will:{minikube}/pods_service
to the pods-api
pod. Meaning you can work with persistent changes in the repo.
pods_service/service
-> /home/tapis/service
pods_service/entry.sh
-> /home/tapis/entry.sh
pods_service/alembic
-> home/tapis/alembic
minikube mount --uid=4872 --gid=4872 --msize=1048576000 /home/user/repodir/pods_service:/pods_service
This work has been funded by grants from the National Science Foundation, including the ICICLE AI Institute (OAC 2112606) and Tapis (OAC 1931439).