tapis-project / pods_service

Network Accessible Pods API.
https://tapis.readthedocs.io/en/latest/technical/pods.html
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link
kubernetes tacc

Tapis Pods Service

live-docs docs Docker Image Version (latest by date)

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.

How to use.

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.

Minikube installation

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.

Steps:

  1. Install minikube
  2. Install kubectl system wide

Makefile

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.

Explanation of what's happening during 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).

Dev Containers

You can use dev containers with Minikube with the Makefile!

Steps:

Acknowledgement

This work has been funded by grants from the National Science Foundation, including the ICICLE AI Institute (OAC 2112606) and Tapis (OAC 1931439).