Stop jobs
In this tutorial, you will learn how to stop running jobs.
Create a docker compose file
Create a file named docker-compose.yml
describing the service being deployed:
cat > docker-compose.yml <<EOF
services:
echo-server:
image: marlinorg/oyster-cvm-tutorials-echo-server
network_mode: host
restart: unless-stopped
EOF
Deploy an enclave
Deploy an enclave using:
# Replace <key> with private key of the wallet
oyster-cvm deploy --wallet-private-key <key> --duration-in-minutes 15 --docker-compose docker-compose.yml
Make a note of the job id from the logs.
Use the list command to verify that the enclave is running:
# Replace <address> with your wallet address
oyster-cvm list --address <address>
Stop the enclave
Run
# Replace <key> with private key of the wallet
# Replace <job_id> with job id of the deployed enclave
oyster-cvm stop --wallet-private-key <key> --job-id <job_id>
to stop the job. Stopping a job is currently a two-step process, hence the long wait time. It will soon move to an instant one-step process.
Use the list command again:
# Replace <address> with your wallet address
oyster-cvm list --address <address>
Do you see any changes?