csc-cora-cli

Node.js CI Node.js Package

Prerequisites

AWS credentials/roles

Cora CLI communicates with the backend via an API that requires authentication via AWS IAM. You need credentials that are allowed to assume the required roles for that. Please contact CSC if you have not received credentials yet.

See configure for any further details about how to configure cora with your personal credentials.

node.js

Cora is based on Node.js, so you need to install the Node.js runtime on your local machine.

To check if your machine has already installed Node.js, open the terminal you want to run cora in and type node --version. This command should return the Node.js version currently installed, like: v16.5.0.

If you receive an error message please install Node.js. We recommend installing the LTS version.

Installation

At the moment the only way to install cora is via a tarball archive package.

Use packaged tarball

To install cora via the tarball package, download the .tgz-file and install it via npm install -g csc-cora-cli-<version>.tgz

To check, if cora was installed correctly just type cora --version. You should now see coras installed version, e.g. 1.0.0

Overview

Currently supported functions are:

Synopsis

    cora <command> <subcommand> [parameters]
    [--help] 
    [--version] 
    [--json] 
    [--file <filename>] 

Global Options

--help (boolean)

Shows help to a specific command.

--version (boolean)

Shows the current cora version.

--json (boolean)

Use JSON as output format. (Default: YAML)

--file (string)

Define a file for output instead of console output. (optional)

Configure

Overview

Cora needs authorization to communicate with its backend. After you received your credentials from CSC, you must store these using cora configure.

Synopsis

    cora configure [--delete]

Options

--delete (boolean)

Delete stored credentials.

Example

Upgrade

Overview

Cora can be used to upgrade itself to the latest published version.

Synopsis

    cora upgrade

Analytics service

Overview

Cora makes it possible to manage Analytics workloads via cli.

create

Overview

Create a new workload for an on-premise customer.

Synopsis

    cora analytics create 
    --name <workload_name>
    --tenant-id <tenant-id>
    [--stage <stage>]
    [--use-case <use-case>]
    [--dev]

Options

--name (string)

Name of the customer / workload.

--tenant-id (string)

The tenant id as per customer list. Must be a number of 5 or 8 digits.

--stage (string)

Define workload stage. Can be PROD or TEST. (optional - PROD is default)

--use-case (string)

Define use-case identifier. (optional)

--dev (boolean)

Determines to register as a development workload. Uses different cross account role. (optional)

Example

Files service

Overview

With Cora you can list previously uploaded files and create signed, expiring urls to provide these files to customers, e.g. to distribute a specific version of the tts performance suite.

create-collection

Overview

Create a new collection that can contain objects to distribute. A collection has a short identifier (only alpha-numeric symbols) of your choice.

The display name is a title or description to distribute to customers.

Synopsis

    cora files create-collection <identifier> 
    --display-name <display-name>
    [--dev]

Options

--display-name (string)

Define the display name for the collection.

--dev (boolean)

Flag to create the collection in the dev source bucket.

Example

upload

Overview

Upload files to a collection using a glob file pattern.

Synopsis

    cora files <files...> 
    --collection <collection-identifier>
    [--dev]

Options

--collection (string)

Collection to upload file(s) to.

--dev (boolean)

Flag to upload files to a collection in the dev source bucket.

Example

list-collections

Overview

List all collections in storage bucket.

Synopsis

    cora files list-collections 
    [--dev]

Options

--dev (boolean)

Flag to list collections from dev source bucket.

Example

ls

Overview

List objects in specific collection.

Synopsis

    cora files ls <collection-identifier>
    [--dev]

Options

--dev (boolean)

Flag to list files from a collection in dev source bucket.

Example

sign

Overview

Get signed download URLs.

Synopsis

    cora files sign 
    --keys <key1 key2 ...> | --interactive
    [--dev]

Options

--keys (array)

Get signed URLs for the desired keys. Must be defined if not using the interactive or collections mode.

--collections (array)

Get signed URLs for all objects in the desired collections. Must be defined if not using the interactive or keys mode.

--interactive (boolean)

Use interactive mode instead of defining the object keys. Must be defined if not providing keys.

--dev (boolean)

Flag to list files from dev source bucket.

Examples

Sign keys

Sign collections

Sign interactively

ttsps service

Overview

With Cora you can perform administrative tasks on environments running in the tts cloud.

export-logs

Overview

Export logs of a ttsps cloud environment and download as zip archive.

Synopsis

    cora ttsps export-logs 
    --tenant-id <tenant-id>
    [--stage <stage>]
    [--use-case <use-case-1 use-case-2 ...>]
    [--since <since date expression>]
    [--until <until date expression>]
    [--url]
    [--dev]

Options

--tenant-id (string)

The tenant id as per customer list. Must be a number of 5 or 8 digits.

--stage (string)

Define workload stage. Can be PROD or TEST. (optional - PROD is default)

--use-case (array)

Define use-case identifiers. (optional - [author, enduser] is default)

--since (string)

A date expression marking the earliest date to export logs from, which may be descriptive, "today at 8h" (default is "yesterday")

--until (string)

A date expression marking the latest date to export logs from, which may be descriptive, like "two weeks ago" (default is "tomorrow")

--url (boolean)

Determines whether only a download url should be displayed instead of downloading the export file. (optional)

--dev (boolean)

Determines to use development environment. Uses different cross account role. (optional)

Examples

Export logs with defaults

Export logs from PROD stage and use-cases author, enduser since yesterday.
Downloads export file.

cora ttsps export-logs --tenant-id 12345

Export logs from TEST stage in timerange

cora ttsps export-logs --tenant-id 12345 --stage TEST --since "6 days ago" --until "yestarday at 16:00"

Export logs from PROD enduser of last week without downloading

cora ttsps export-logs --tenant-id 12345 --stage PROD --since "last week" --url

Limitations

Currently, the export of logs over a longer timerange (like two weeks) might result in an error,
due to timeouts or memory limitations in the backend. This usually occurs, if the log level is set to
a disproportionate value, like DEBUG or TRACE.

get-config-files

Overview

Download config files of a ttsps cloud environment. Either choose predefined sets of config files for
one or more use-cases or select specific files to download.

Synopsis

    cora ttsps get-config-files 
    --tenant-id <tenant-id>
    [--stage <stage>]
    [--use-case <use-case-1 use-case-2 ...>]
    [--files <key1, key2, ...>]
    [--zip]
    [--dev]

Options

--tenant-id (string)

The tenant id as per customer list. Must be a number of 5 or 8 digits.

--stage (string)

Define workload stage. Can be PROD or TEST. (optional - PROD is default)

--use-case (array)

Define use-case identifiers. (optional - [author, enduser] is default)

--files (array)

List of custom S3 keys. (optional)

--zip (boolean)

Determines whether files should be packaged into zip. (optional, default is true)

--dev (boolean)

Determines to use development environment. Uses different cross account role. (optional)

Examples

Get config files of author component

cora ttsps get-config-files --tenant-id 12345 --stage PROD --use-case author

Get specific config files without zipping

cora ttsps get-config-files --tenant-id 12345 --files "PROD/ttps-pro-cloud.ttlk" --zip false

get-customizing

Overview

Download customizings of a ttsps cloud environment.

Synopsis

    cora ttsps get-customizing
    --tenant-id <tenant-id>
    [--stage <stage>]
    [--use-case <use-case-1 use-case-2 ...>]
    [--files <key1, key2, ...>]
    [--url]
    [--dev]

Options

--tenant-id (string)

The tenant id as per customer list. Must be a number of 5 or 8 digits.

--stage (string)

Define workload stage. Can be PROD or TEST. (optional - PROD is default)

--use-case (array)

Define use-case identifiers. (optional - [enduser] is default)

--url (boolean)

Determines whether only a download url should be displayed instead of downloading the export file. (optional)

--dev (boolean)

Determines to use development environment. Uses different cross account role. (optional)

Examples

Get customizing of enduser component

cora ttsps get-config-files --tenant-id 12345

Get customizing of TEST author component

cora ttsps get-config-files --tenant-id 12345 --stage TEST --use-case author

refresh-instances

Overview

Initiates an instance refresh for one or more use-cases of a ttsps cloud environment
(i.e. gracefully replaces the running instances, if possible without downtime).
May be scheduled to start at a given time.

Synopsis

    cora ttsps refresh-instances
    --tenant-id <tenant-id>
    [--stage <stage>]
    [--use-case <use-case-1 use-case-2 ...>]
    [--schedule <date expression>]
    [--dev]

Options

--tenant-id (string)

The tenant id as per customer list. Must be a number of 5 or 8 digits.

--stage (string)

Define workload stage. Can be PROD or TEST. (optional - PROD is default)

--use-case (array)

Define use-case identifiers. (optional - [author, enduser] is default)

--schedule (string)

A date expression, which might be descriptive, like "tomorrow at 11pm". (optional)

--dev (boolean)

Determines to use development environment. Uses different cross account role. (optional)

Examples

Refresh instances of PROD stage

cora ttsps refresh-instances --tenant-id 12345 --stage PROD

Schedule Instance Refresh of TEST stage

cora ttsps refresh-instances --tenant-id 12345 --stage "TEST" --schedule "today at 23:00"

Developer Portal service

(alpha! - dev stage only)

Overview

Cora works seamlessly with the tts developer portal to manage the projects documentations.

update

Overview

Update the documentation for a specific project.

Synopsis

    cora devportal update 
    --project-id <project-id>
    --title <title>
    --zip-file <path to the zip file>
    [--dev]

Options

--project-id (string)

Unique project id.

--title (string)

A describing title of the project. Used as link caption.

--zip-file (string)

Path to the zip file contating the documentation. Must have index.html as entry file.

--dev (boolean)

Determines to use the dev stage. Uses different cross account role. (optional)

License

see LICENSE.md