Launchpad
This is your launchpad that comes with a variety of applications waiting to run on your kubernetes cluster with a single click.
Development setup
Prerequisites
- Make (on mac via homebrew: brew install make)
- Docker
- DockerCompose
- A functioning Kubernetes cluster (
~/.kube/config
is used with current context by default)
Minikube Cluster Setup
# If you're on MBP M1 follow installation steps below OR
# follow instructions for other platforms @
# https://minikube.sigs.k8s.io/docs/start/
# Install minikube binariess (M1)
$ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-arm64
$ sudo install minikube-darwin-arm64 /usr/local/bin/minikube
# Start minikube cluster
$ minikube start
# Open a terminal tab and run following to start proxy access to services.
$ minikube tunnel
# Minikube comes with a nice dashboard that lets you see the state of cluster intuitively.
$ minikube dashboard --url
๐ค Verifying dashboard health ...
๐ Launching proxy ...
๐ค Verifying proxy health ...
URL: http://127.0.0.1:57298/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/
Pretty Easy!
Project Installation
Launchpad runs the following service containers:
- web server
- celery
- celery beat
- redis
- postgres
One liner installation script
source <(curl -s https://raw.githubusercontent.com/Qubad786/launchpad/master/install.sh)
# Now, http://localhost:8080/swagger should have the development server running.
Admin Panel
Django admin is running at: http://localhost:8080/admin, You can use following credentials to login:
Username: admin
Password: admin
Swagger API Docs
Swagger API docs are located at http://localhost:8080/swagger, you should be able to try some APIs there.
Debug
Django Debug Toolbar @ http://localhost:8080/__debug__
Useful make targets
# start services
make up
# start services in detached mode
make up-d
# restart the service containers
make restart
# see web logs
make logs
# see celery logs
make clogs
# attach to python shell
make shell
# ssh into web service container
make ssh
# ssh into celery service container
make cssh
# generate migrations
make migrations
# apply migrations
make migrate
# install requirements
make requirements
# run tests
make test
# run lint i.e. flake8
make flake8
# stop services
make stop
# remove service containers
make down