TritonDataCenter / sdc-imgapi-cli

SDC CLI client for working with an IMGAPI repository
Mozilla Public License 2.0
3 stars 6 forks source link

sdc-imgapi-cli

This repository is part of the Triton Data Center project. See the contribution guidelines and general documentation at the main Triton project page.

This repository provides a number of CLIs interacting with a Triton IMGAPI instance. There are typically three IMGAPI instances with which we interact:

  1. https://images.smartos.org The central repository of vetted images for using in Triton DataCenters and SmartOS machines. The images-imgadm tool is made for this.
  2. https://updates.tritondatacenter.com The repository of Triton provided images for updating components of Triton Data Center itself. The updates-imgadm tool is made for this.
  3. The IMGAPI service running inside a Triton DataCenter on the (private) "admin" network for operators of that DC. The sdc-imgadm tool is made for this.

All the *-imgadm tools are similar, differing only in basic config such as which endpoint URL, where to gather config, whether the IMGAPI uses auth (#1 and #2 do, #3 does not), etc. updates-imgadm and images-imgadm can be used from any machine (i.e. they do not have to be run from a Triton DC headnode global zone). sdc-imgadm is typically just for running in a Triton DC headnode global or 'sdc0' zone. There is also a general imgapi-cli command that can be used for other IMGAPI endpoints, or for development and testing.

Note that these *-imgadm tools are distinct from imgadm(1m). imgadm is part of SmartOS itself and manages Triton images in a SmartOS server's zpool. It imports images from IMGAPI repositories (such as the 3 listed above).

Installation

The *-imgadm tools can be installed like so:

npm install -g git+https://github.com/TritonDataCenter/sdc-imgapi-cli.git

If you are a Triton DC operator these tools will already be setup for use in the headnode GZ and the headnode 'sdc0' zone.

Development

Typically sdc-imgapi-cli development on a local Triton COAL instance is done by: