0.1.3 • Published 5 years ago

idyl v0.1.3

Weekly downloads
2
License
MPL-2.0
Repository
github
Last release
5 years ago

Idyl CLI

idyl is a CLI tool for working with the CloudAPI for Idyl Cloud. CloudAPI is a RESTful API for end-users of the cloud to manage their accounts, instances, networks, images, and to inquire other relevant details. CloudAPI provides a single view of docker containers, infrastructure containers and hardware virtual machines available in Idyl Cloud.

The idyl CLI is currently in beta

Setup

Pre-requisites

Before you can use the CLI you'll need:

  • An account on Idyl Cloud
  • Your SSH public key uploaded to Idyl Cloud which is used to identify and securely access containers and other resources in Idyl)

API endpoint

Each datacenter has a single CloudAPI endpoint. For evaluation users, the Idyl CloudAPI endpoint is https://cloudapi.eval0.idyl.tech.

Installation

Install node.js, then:

npm install -g idyl

Verify that it is installed and on your PATH:

idyl --version

output

Idyl CLI 7.0.1
https://github.com/Idyl-Technologies/idyl-cli

idyl-cli differences with node-smartdc

  • There is a single idyl command instead of a number of sdc-* commands.
  • IDYL_* environment variables are preferred to the SDC_* environment variables. However the SDC_* envvars are still supported.
  • Node-smartdc still has more complete coverage of the Idyl CloudAPI. However, idyl is catching up and is much more friendly to use.

Development Hooks

Before commiting be sure to, at least:

make check      # lint and style checks
make test-unit  # run unit tests

A good way to do that is to install the stock pre-commit hook in your clone via:

make git-hooks

Also please run the full (longer) test suite (make test). See the next section.

Test suite

idyl-cli has both unit tests (make test-unit) and integration tests (make test-integration). Integration tests require a config file, by default at "test/config.json". For example:

$ cat test/config.json
{
    "profileName": "east3b",
    "allowWriteActions": true,
    "image": "minimal-64",
    "package": "g4-highcpu-128M",
    "resizePackage": "g4-highcpu-256M"
}

See "test/config.json.sample" for a description of all config vars. Minimally just a "profileName" or "profile" is required.

Warning: Running the integration tests will create resources and could incur costs if running against a public cloud.

Run all tests:

make test

You can use IDYL_TEST_CONFIG to override the test file, e.g.:

$ cat test/coal.json
{
    "profileName": "coal",
    "allowWriteActions": true
}
$ IDYL_TEST_CONFIG=test/coal.json make test

where "coal" here refers to a development Idyl (a.k.a SDC) "Cloud On A Laptop" standup.

License

MPL 2.0