This demo showcases how Rig helps with managing databases. Specifically it showcases Rig operating with a MongoDB database. See here for a more comprehensive walkthrough of the demo.
Rig is an open-source cloud development platform for Kubernetes. It features simple-to-use Capsule for Application deployments and batteries-included Modules for Auth, User-management, Storage and Databases.
Rig must be running either locally in Docker or on a Kubernetes cluster. You can refer to this guide to learn how to install Rig.
To run the demo locally, follow these steps:
rig database create --name our_db --type mongo
rig database create-credentials
And write our_db
once it prompts for the DB identifier.
Store the clientID
and secret
it outputs somewhere you can access later.
git clone [email protected]:rigdev/database-demo.git
cd database-demo
docker build -t database-demo .
rig capsule create --name database-demo
rig capsule create-build database-demo --image --database-demo --deploy
rig capsule config database-demo --add-credentials
Also add credentials to the database we created and copy the secret
rig database create-credentials our_db
From the dashboard under the settings
tab for your capsule, set the following environment variables from which the demo expects to read database name and credentials
Network
in your capsule's dashboard
You should now be able to access the endpoints which the capsule implements on localhost:3333/