Env Exec

Velocity's Env Exec feature allows you to run a standalone shell command, or to open a terminal, inside of a running container for troubleshooting and debugging Velocity Services during runtime.

Run a shell command inside a container

For example, the following command will list files and directories in the root of the running container.
veloctl env exec -s <service> — ls

Open a terminal inside the container

To open a terminal inside of a Velocity Service's running container, you can run the following:
veloctl env exec -s <service> -t -- /bin/sh

Env Exec Script

Additionally, with Velocity's Env Exec-Script feature, you can run a predefined script in a running container by adding the script name and command to your .velocity.yaml config.
version: 1
description: prints mongodb url
command: sh
- -c
- env | grep MONGODB_URL
description: run sanity test
command: ./
With the above exec configuration added to your .velocity.yaml file, you can run either of the following commands in the analytics Velocity Service during runtime:
veloctl env exec-script -s analytics get-mongodb-url
veloctl env exec-script -s analytics my-test
Note: in order to run the my-test script as shown above, the script must be included in the container image.