A remote environment facilitator for Agent Substrate. It provisions isolated execution environments and can execute commands remotely including interactive commands.
# Create an environment
$ substrate-envctl create --template "myenv-04" --id "workspace-dev-01" -n "test-namespace"
# Execute a command inside the environment
$ substrate-envctl exec "workspace-dev-01" date
# Delete the environment
$ substrate-envctl rm "workspace-dev-01"Note
Concurrent executions (exec) are allowed on the same environment. It is the client's responsibility to handle any synchronization if required.
The CLI tool (substrate-envctl) defaults to connecting to localhost:50051.
This target address can be overridden by:
- Setting the
SUBSTRATE_ENVIRONMENT_ADDRenvironment variable. - Providing the
--addrflag (e.g.--addr localhost:50051).
Important
You must have Agent Substrate installed on your Kubernetes cluster before deploying this service.
To deploy the environment service daemon to a Kubernetes cluster:
# Apply the deployment and service manifests
$ kubectl apply -f manifests/To access the gRPC service locally, use kubectl port-forward (recommended for gRPC traffic):
# Port-forward the service to localhost:50051
$ kubectl port-forward svc/substrate-env 50051:50051Once the port-forward is running, configure substrate-envctl to connect to it:
$ export SUBSTRATE_ENVIRONMENT_ADDR=localhost:50051
$ substrate-envctl create --template "myenv-04"