Make sure you have these things installed before moving forward:
- Before doing anything, go to https://dashboard.clerk.com/apps/app_2NxxGlmiAzGOwDTIzbObk4cxIOA/instances/ins_2NxxGsVFc3ddBxfVeJ4R55w1lTG/api-keys, copy the CLERK_SECRET_KEY, and add it into the justfile in the root.
- If ur on mac, you may need to stop any running postgres instances on port
5432
withbrew services stop postgresql
g - Make sure you have your docker daemon running
- Confirm that ports
8080
,6000
, and8081
are free and nothing is running on them
just dbs-start
The below command will run + watch the tembo operator (if you make any changes inside of
./tembo-operator
it will re-build the binary). It will also create a kind cluster + worker in docker.
just watch-operator
Does the same thing as the operator, but for conductor
just watch-conductor
The below command will run the control-plane's latest image(s) (cp-webserver + cp-service) on
quay.io
(won't watch for any local changes). It will also run in the background so if you want to see logs you will have to rundocker logs <your-container-id>
just watch-control-plane
Grab a authorization token from dev using the cloud.cdb-dev.com/generate-jwt
route in mahout and also an organization id from the Clerk development environment on https://dashboard.clerk.com. Then run the following curl
command to hit the control-plane webserver on http://localhost:8080 to create a new db instance:
curl -X POST \
http://localhost:8080/api/v1/orgs/<your-clerk-org-id>/instances \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN_HERE" \
-d '{
"cpu": 1,
"environment": "dev",
"instance_name": "test-db",
"memory": "4Gi",
"stack_type": "Standard",
"storage": "10Gi"
}'
- Check your kind cluster to see if the db pod is running with
kubectl get pods --all-namespaces
orkubectl get pods
when ur in the correct namespace (it should be named something likeorg-your-org-name-inst-test-db
) - You can then
psql
into your new instance withpsql "postgres://postgres:$(kubectl get secrets -o json org-your-org-name-inst-test-db-connection | jq -r '.data.password' | base64 --decode)@org-your-org-name-inst-test-db.local.tembo-development.com:5432?sslmode=require