Basic Use of c4
Exasol Deployment Tool (c4) is a command-line interface for creating and managing Exasol deployments. This section describes the most common use cases with c4.
To get general help for c4, use
c4 --help. To get help for a specific command, use
c4 <command> --help.
The configuration parameters for c4 can be specified in a configuration file and/or on the command line when creating a deployment. For more information on how to specify parameters, see Parameters in c4.
For a description of the c4 parameters that are specific to AWS deployments, see Configure c4 for AWS.
To list all your deployments in the currently specified AWS region, use
$ c4 ps
N PLAY_ID NODE MEDIUM INSTANCE EXTERNAL_IP INTERNAL_IP STAGE STATE UPTIME TTL
┌─ 1 3a4a7d8d 10 awscf c5d.large 203.0.113.10 10.0.0.10 c running 04:35:15 +∞
│ 1 3a4a7d8d 11 awscf c5d.2xlarge 203.0.113.11 10.0.0.11 d running 04:35:16 +∞
│ 1 3a4a7d8d 12 awscf c5d.2xlarge 203.0.113.12 10.0.0.11 d running 04:35:16 +∞
└─ 1 3a4a7d8d 13 awscf c5d.2xlarge 203.0.113.13 10.0.0.13 d running 04:35:15 +∞
c4 ps shows the deployments in the region specified in the
CCC_AWS_REGION parameter. To quickly view deployments in other regions, you can specify a different region in the command. For example:
CCC_AWS_REGION=eu-central-1 c4 ps.
The following information is displayed for each node and deployment:
|N||Deployment number in the ps table|
|PLAY_ID||Unique identifier for the deployment|
|NODE||Node ID (if available)|
|MEDIUM||Medium where the deployment was started (awscf = AWS CloudFormation)|
|INSTANCE||Instance type for the node|
|EXTERNAL_IP||External IP address|
|INTERNAL_IP||Internal IP address|
|STAGE||Current deployment stage of the node, see Deployment Stage|
|STATE||Current state of the node, see Node State|
|UPTIME||Time lapsed since the node was created|
|TTL||Time for the deployment to live (
During creation and/or startup, each node goes through the following deployment stages:
|creating||Node is being created.|
|pending||Node is preparing to enter the running state.|
|running||Node is running at the indicated stage, see Deployment Stage|
|stopped||Node is shut down and cannot be used.|
|rollingback||Node creation failed and is rolling back.|
The previous deployment operation succeeded.
This node state does not indicate that the node is running, only that the last operation (rollingback) succeeded.
|failed||The previous deployment operation failed.|
For more details about the c4 ps command, use
c4 ps --help.
To connect to a deployment, use
c4 connect -t <NUM>[.<NODE>][/<SUBSYSTEM>] where
<NUM> is the deployment number N shown in c4 ps,
<NODE> is the node ID NODE, and
SUBSYSTEM is the subsystem to connect to.
||Connect to EXAClusterOS on the target instance||
c4 connect -t 1/cos
c4 connect -t 1.12/cos
||Connect to the host Linux OS on the target instance||
c4 connect -t 1/host
c4 connect -t 1.12/host
||Connect to the database on the target instance. When the database is online, not specifying a subsystem opens an SQL Client connecting to the Database||
c4 connect -t 1
c4 connect -t 1/db
c4 connect -t 1.12/db
Connecting to a target during a deployment will show the logs for that deployment.
For more details about the c4 connect command, use
c4 connect --help.
To disconnect from the deployment, use Control+D.
Refresh MFA Token
If your organization uses MFA, you may need to refresh your AWS token occasionally. To refresh your token, use
c4 aws token -f. You will be asked to enter your MFA token and can see the expiration date after the token is entered.
To start all nodes of a deployment, use
c4 up <PLAY_ID>. You can also specify only starting certain nodes in the deployment with the
--nodes option. For example,
c4 up --nodes 10 abc123 starts the node 10 in deployment
abc123. This command can be used to start all nodes when the database access node is offline.
c4 up is the equivalent of starting
To stop all nodes of a deployment, use
c4 down <PLAY_ID>. You can also specify only stopping certain nodes in the deployment with the
--nodes option. For example,
c4 down --nodes 10 abc123 stops the node 10 in deployment
abc123. This command can be used to stop the access node in a deployment.
To prevent a risk of data loss, always stop the database before using
c4 down. This command is the equivalent of stopping