Sandbox
Instructions for managing a dbnl Sandbox deployment.
Was this helpful?
Instructions for managing a dbnl Sandbox deployment.
Was this helpful?
The dbnl sandbox deployment bundles all of the dbnl services and dependencies into a single self-contained Docker container. This container replicates a full scale dbnl deployment by creating a Kubernetes cluster in the container and using Helm to deploy the dbnl platform and its dependencies (postgresql, redis and minio).
The sandbox deployment is not suitable for production environments.
Install .
Install , the dbnl CLI and Python SDK.
Within the sandbox container, is used in conjunction with to schedule the containers for the dbnl platform and its dependencies.
The sandbox container needs access to the following two registries to pull the containers for the dbnl platform and its dependencies.
us-docker.pkg.dev
docker.io
The sandbox container needs sufficient memory and disk space to schedule the k3d cluster and the containers for the dbnl platform and its dependencies.
The dbnl sandbox image and the dbnl platform images are stored in a private registry. For access, .
Although the sandbox image can be deployed manually using Docker, we recommend using the dbnl CLI to manage the sandbox container. For more details on the sandbox CLI options, run:
To start the dbnl Sandbox, run:
This will start the sandbox in a Docker container named dbnl-sandbox
. It will also create a Docker volume of the same name to persist data beyond the lifetime of the sandbox container.
To stop the dbnl sandbox, run:
This will stop and remove the sandbox container. It does not remove the Docker volume and the next time the sandbox is started, it will remount the existing volume, persisting the data beyond the lifetime of the Sandbox container.
To get the status of the dbnl sandbox, run:
To tail the dbnl sandbox logs, run:
To execute a command in the dbnl sandbox, run:
This will execute COMMAND
within the dbnl sandbox container. This is a useful tool for debugging the state of the containers running within the sandbox containers. For example:
To get a list of all Kubernetes resources, run:
To get the logs for a particular pod, run:
This is an irreversible action. All the sandbox data will be lost forever.
To delete the sandbox data, run:
The sandbox deployment uses username and password authentication with a single user. The user credentials are:
Username: admin
Password: password
The sandbox persists data in a Docker volume named dbnl-sandbox
. This volume is persisted even if the sandbox is stopped, making it possible to later resume the sandbox without losing data.
If deploying and hosting the sandbox on a remote host, such as on EC2 or Compute Engine, the sandbox --base-url
option needs to be set on start
.
For example, if hosting the sandbox on http://example.com:8080
, the sandbox needs to be started with:
Once ready, the dbnl UI will be accessible at .
To use the dbnl Sandbox, set your API URL to , either through or through the .
This will tail the logs from the container. This does not include the logs from the services that run on the Kubernetes cluster within the container. For this, you will need to use the .