anjuna-nitro-cli terminate-enclave

Terminates an enclave.

SYNOPSIS

anjuna-nitro-cli terminate-enclave [--all | --enclave-id <enclave-id>] [--grace-period=N | --force]

DESCRIPTION

Terminate an enclave that is running.

When issuing the terminate-enclave option, the Anjuna Runtime will first send a SIGTERM signal to the main process inside the enclave, allowing it to do any needed termination activities to allow for a graceful termination before exiting. The main process has a grace period of 30 seconds for the termination activities. After the main process exits or the grace period expires, the Anjuna Runtime will perform any remaining termination activities and then terminate the enclave. If the grace period expires before the enclave finishes its termination activities, a message displays indicating that a forceful termination occurred due to the expiration of the grace period.

You can also define a specific grace period other than 30 seconds or decide to terminate the enclave immediately. This is described in the OPTIONS section below.

When destroying an Anjuna Enclave Pod in K8s, the same flow and behavior will take place. Refer to Destroying the EKS Cluster for more information.

At this time, AWS allows only one enclave per AWS Nitro-based EC2 instance. In the future when more than one enclave per AWS Nitro-based EC2 instance is allowed, you can provide parameters to uniquely identify an enclave when more than one enclave exists.

OPTIONS

USAGE:
      anjuna-nitro-cli terminate-enclave [FLAGS] [OPTIONS]

FLAGS:
      --all      Terminate all running enclave instances belonging to the current user
      --force    Force enclave termination immediately
  -h, --help     Prints help information

OPTIONS:
      --enclave-id <enclave-id>        Enclave ID, used to uniquely identify an enclave
      --enclave-name <enclave-name>    Enclave name, used to uniquely identify an enclave
      --grace-period <grace-period>    Termination grace period before forcing termination

EXIT STATUS

  • 0 on success

  • > 0 on error

EXAMPLES

To terminate the single running enclave:

$ anjuna-nitro-cli terminate-enclave

To terminate all running enclaves:

$ anjuna-nitro-cli terminate-enclave --all

To terminate a specific enclave by ID:

$ anjuna-nitro-cli terminate-enclave --enclave-id i-0f2c4b721470e92c4-enc1776bc0278e90b9

To terminate the single running enclave with a 45-second grace period instead of the default 30:

$ anjuna-nitro-cli terminate-enclave --grace-period=45

To terminate the single running enclave with no grace period:

$ anjuna-nitro-cli terminate-enclave --force


To retrieve the enclave-id of the currently running enclave, you can use the following command:

$ anjuna-nitro-cli describe-enclaves | jq -r .[0].EnclaveID

Using this command, you can view the console output of the currently running enclave with the following command:

$ anjuna-nitro-cli console --enclave-id $(anjuna-nitro-cli describe-enclaves | jq -r .[0].EnclaveID)