Facets CLI

Learn how to use facetsctl Command Line Tool

This documentation provides a quick reference guide for using the facetsctl CLI tool. It's an easy-to-use alternative to Facets APIs that allows users to push new docker artifacts to the Facets Control Plane and refresh Kubernetes credentials for the user in a specified environment.

NPM Page

You can view and download the latest facetsctl package from its NPM page.

Commands

facetsctl provides the following commands for users.

facetsctl help

This command displays the help for facetsctl. You can use it to get information about a specific command by providing the command name as an argument.

ARGUMENTS
COMMAND: Command to show help for.

FLAGS

FlagRequiredWhat does it do?
-n, --nested-commandsNoDefines if all nested commands should be included in the output.

facetsctl login

This command allows the user to log in to the Facets Control Plane.

$ facetsctl login -u <value> -t <value> -c <value>

FLAGS

FlagRequiredWhat does it do?
-c, --cp-url = <value>YesDefines the URL of the Control plane
-t, --access-token = <value>YesDefines the personal token generated for the user
-u, --username = <value>YesDefines the username of the user

facetsctl push

This command will let users push new docker artifacts to the Facets Control Plane.

$ facetsctl push -i <value> -a <value> --registration-type CLUSTER|RELEASE_STREAM --registration-value  
    <value> -e <value> [-d <value>] [--artifactory <value>]

FLAGS

FlagRequiredWhat does it do?
-a, --artifact-name = <value>YesDefines the name of the artifact as mentioned in blueprint
-d, --description = <value>NoDefines the description of the build, if any
-e, --external-id = <value>YesDefines the external identifier for the artifact
-i, --docker-image = <value>YesDefines the image location.
Used as <IMAGE:TAG>.
--artifactory = <value>NoDefines the artifactory where the image will be pushed.
--registration-type = <option>YesDefines the mode of registration.
Used as <options: CLUSTER|RELEASE_STREAM>.
--registration-value = <value>YesDefines the value for release stream or cluster id, based on mode of registration.

facetsctl refresh

This command will refresh the Kubernetes credentials for the user in the specified environment.

facetsctl refresh --cluster-id <value> 
#or 
facetsctl refresh --blueprint-name <value> --cluster-name <value>

FLAGS

FlagRequired?What does it do?
--cluster-idYesDefines the unique id for the environment.
--blueprint-nameYesDefines the unique name of the defined blueprint.
--cluster-nameYesDefines the name of the environment in the defined blueprint.

Facets CLI version v1.0.5

For Mac Os

For Linux

For Windows