«

CLI Tools

Table of Contents

General Usage

The Datomic CLI tool is distributed as a zip file containing a single program. Download the latest version of the tool from the releases page and check the documentation on this page.

Datomic utilizes the sourced or specified AWS Credentials to operate or retrieve information about your Datomic system.

The instructions here assume that you have AWS administrator permissions.

Information about the command can be seen using the help command after the specific command or sub-command:

  • datomic cloud help
  • datomic cloud list-systems help

Supplied options are passed after the required information for the command.

General Options

Most commands support the following options:

  • -h or --help - Specify <command> help for help about a command
  • -p or --profile - named AWS credentials to use for accessing the AWS account
  • -r or --region - AWS region of the Datomic system

Log

List

Queries the supplied Datomic Compute Group for logs.

Log requires one argument, a compute-group-name:

datomic log list <compute-group>
  • -f or --filter - alerts by default or all if specified.
  • -t or --tod - logs from the specified time provided as a Clojure #inst literal to the value of --minutes-back. Defaults to the current time.
  • -m or --minutes-back - logs from --tod to an integer number of minutes in the past. Defaults to 20 minutes.
  • -i or --instance-id - Limit log results to EC2 instances with this prefix.
  • General options.

Detail

Returns the details of a specific log. Returns a JSON array.

Detail requires two arguments, a compute-group-name and a message-id supplied to -m:

datomic log detail <compute-group> -m <message-id>
  • -m or --msg - message id (provided by log list command)
  • -i or --instance-id - only show logs from compute groups with a prefix matching the supplied string
  • General options

System

List-instances

List-instances displays the EC2 instances, with their instance-id and current status, that are utilized by the supplied system-name:

datomic system list-instances <system>

General options.

Describe-groups

Describe-groups displays information about the compute groups of the supplied Datomic Cloud system:

datomic system describe-groups <system>

A JSON array of compute group information is returned:

[{"name": "<group-name>",
  "type": "<group-type>",
  "endpoints":
  [{"type": "<endpoint-type>",
    "api-gateway-endpoint": "<endpoint-address>",
    "api-gateway-id":" <gateway-id>",
    "api-gateway-name": "<gateway-name>"},
   ...],
  "cft-version": "<cloudformation-version>",
  "cloud-version": "<cloud-version>"},
 ...]

Cloud

List-systems

Lists all currently active and inactive Datomic systems on the sourced or specified account.

datomic cloud list-systems

General options.

Legacy

This section only applies to Datomic 781-9041 and lower.

Client

The client commands use ssh to allow connections from outside the Datomic VPC through the access gateway to a Datomic system.

client commands requires a single argument: system-name.

Access

The access uses ssh to allow connections from outside the Datomic VPC to the access gateway to a Datomic system.

The access script continues to run once launched. If the script terminates (as it might e.g. connection loss after laptop sleep), you will need to restart it.

datomic client access <system>

The command above opens a SOCKS proxy to the access gateway in the system for Datomic client access. Note that:

  • --port - local port to use for forwarding. Default 8192.
  • --ssho - pass ssh configuration options as if using ssh -o <option>.
  • General options.

Gateway

The access gateway runs inside a Datomic system's private VPC. It acts as an entry point for Client API and analytics connections from outside the VPC.

While the gateway runs automatically based on your CloudFormation template, there are some situations where you may want to explicitly control it:

  • You can start or stop the gateway to control access or EC2 instance costs
  • You can restart the gateway to recover from a process failure
  • You can restart the gateway to pick up new analytics catalog settings

You can also monitor the status of the access gateway in the AWS EC2 Management Console. The access gateway is named SystemName-bastion. Note that:

  • When the Instance State is running, the access gateway is available for use.
  • An Instance State of terminated indicates the access gateway has terminated. You will incur no future charges for that instance.

Enable

Enable the access gateway, setting the ASG to 1.

Enable requires a single argument, system-name:

datomic gateway enable <system>

General options.

Disable

Disable the access gateway, setting the ASG to 0.

Disable requires a single argument, system-name:

datomic gateway disable <system>

General options.

Restart

Restarts the analytics support on the access gateway.

Restart requires a single argument, system-name:

datomic gateway restart <system>

General options.

Solo

Solo manages the ASG for a Datomic solo instance.

Solo commands requires a single argument, system-name.

Up

Sets the ASG for the specified Datomic solo system to 1:

datomic solo up <system> 
  • --wait - Wait until the command against the instances has finished
  • General options

Down

Sets the ASG for the specified Datomic solo system to 0:

datomic solo down <system> 
  • --wait - Wait until the command against the instances has finished
  • General options

Reset

Terminates the Datomic solo system node and access gateway, which allows the ASG to start new instances:

datomic solo reset <system> 
  • --wait - Wait until the command against the instances has finished.
  • General Options

Analytics

Tools for utilizing Datomic analytics.

Access

Access uses SSH to allow connections from outside the Datomic VPC through the access gateway to a Datomic system for analytics support.

Access requires a single argument, system-name:

datomic analytics access <system> 
  • --port - local port to use for forwarding. Default 8989.
  • --ssho - pass ssh configuration options as if using ssh -o <option>.
  • General options.

Sync

Sync syncs your local configuration directory to the Datomic system's analytics configuration.

Sync requires two arguments, system-name and your local configuration directory:

datomic analytics sync <system> <directory>
  • -q or --query-group - Datomic Query Group to target for sync (defaults to the primary compute group)
  • General options