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 documentation is found here.

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

The documentation assumes 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>

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 current active and inactive Datomic systems on the sourced or specified account.

datomic cloud list-systems

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 for e.g. connection loss after laptop sleep), you will need to restart it.

    datomic client access <system>
    

    Opens a SOCKS proxy to the access gateway in the system for Datomic client access.

    • --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 monitor the status of the access gateway in the AWS EC2 Management Console. The access gateway is named SystemName-bastion.

  • 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>

disable

Disable the access gateway, setting the ASG to 0.

disable requires a single argument: system-name

datomic gateway disable <system>

restart

Restarts the analytics support on the access gateway.

restart requires a single argument: system-name

datomic gateway restart <system>

Solo

solo manages the ASG for a Datomic solo instance.

solo commands require 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