UNPKG

@facets-cloud/facetsctl

Version:
297 lines (223 loc) 11.7 kB
<!-- toc --> * [Configuration](#configuration) * [System requirements](#system-requirements) * [Usage](#usage) * [Commands](#commands) <!-- tocstop --> # Configuration `facetsctl` requires a connection to docker for all actions involving docker. Ensure that you have docker running on the system where `facetsctl` is running. # System requirements Supported node versions: >= 12.0.0 # Usage <!-- usage --> ```sh-session $ npm install -g @facets-cloud/facetsctl $ facetsctl COMMAND running command... $ facetsctl (--version) @facets-cloud/facetsctl/1.0.12 linux-x64 node-v20.19.4 $ facetsctl --help [COMMAND] USAGE $ facetsctl COMMAND ... ``` <!-- usagestop --> # Commands <!-- commands --> * [`facetsctl download-kubeconfig`](#facetsctl-download-kubeconfig) * [`facetsctl generate-config CONFIG-FILE`](#facetsctl-generate-config-config-file) * [`facetsctl help [COMMAND]`](#facetsctl-help-command) * [`facetsctl login`](#facetsctl-login) * [`facetsctl push`](#facetsctl-push) * [`facetsctl refresh`](#facetsctl-refresh) * [`facetsctl register`](#facetsctl-register) * [`facetsctl register-by-env`](#facetsctl-register-by-env) * [`facetsctl register-by-release-stream`](#facetsctl-register-by-release-stream) * [`facetsctl upload`](#facetsctl-upload) ## `facetsctl download-kubeconfig` Download your kubeconfig file for an environment. Kubeconfig can be downloaded using either an environment id or a combination of blueprint name and environment name. ``` USAGE $ facetsctl download-kubeconfig [-e <value> | --environment-name <value> | --blueprint-name <value>] FLAGS -e, --environment-id=<value> Environment id for downloading kubeconfig --blueprint-name=<value> Blueprint name using which environment was launched --environment-name=<value> Environment name for downloading kubeconfig DESCRIPTION Download your kubeconfig file for an environment. Kubeconfig can be downloaded using either an environment id or a combination of blueprint name and environment name. EXAMPLES $ facetsctl download-kubeconfig ``` _See code: [src/commands/download-kubeconfig.ts](https://github.com/facets-cloud/facetsctl/blob/v1.0.12/src/commands/download-kubeconfig.ts)_ ## `facetsctl generate-config CONFIG-FILE` Convert a JSON, YAML, or properties file of a springboot application to a Facets Application JSON env section ``` USAGE $ facetsctl generate-config CONFIG-FILE ARGUMENTS CONFIG-FILE The JSON, YAML, or properties file to convert DESCRIPTION Convert a JSON, YAML, or properties file of a springboot application to a Facets Application JSON env section ``` _See code: [src/commands/generate-config.ts](https://github.com/facets-cloud/facetsctl/blob/v1.0.12/src/commands/generate-config.ts)_ ## `facetsctl help [COMMAND]` Display help for facetsctl. ``` USAGE $ facetsctl help [COMMAND] [-n] ARGUMENTS COMMAND Command to show help for. FLAGS -n, --nested-commands Include all nested commands in the output. DESCRIPTION Display help for facetsctl. ``` _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.1.12/src/commands/help.ts)_ ## `facetsctl login` Login to Facets control plane ``` USAGE $ facetsctl login -u <value> -t <value> -c <value> [--debug <value>] FLAGS -c, --cp-url=<value> (required) URL of the Control plane -t, --access-token=<value> (required) Personal token generated for the user -u, --username=<value> (required) username of the user --debug=<value> [default: false] See original error message thrown DESCRIPTION Login to Facets control plane EXAMPLES $ facetsctl login ``` _See code: [src/commands/login.ts](https://github.com/facets-cloud/facetsctl/blob/v1.0.12/src/commands/login.ts)_ ## `facetsctl push` Post new docker artifacts to the facets control plane ``` USAGE $ facetsctl push -i <value> -a <value> -e <value> [--registration-type CLUSTER|RELEASE_STREAM] [--registration-value <value>] [-d <value>] [--artifactory <value>] [--debug <value>] [--git-ref <value>] FLAGS -a, --artifact-name=<value> (required) name of the artifact as mentioned in blueprint -d, --description=<value> description of the build if any -e, --external-id=<value> (required) external identifier for artifact -i, --docker-image=<value> (required) image location <IMAGE:TAG> --artifactory=<value> artifactory where image will be pushed --debug=<value> [default: false] See original error message thrown --git-ref=<value> Git ref provided in CI Rule --registration-type=<option> mode of registration <options: CLUSTER|RELEASE_STREAM> --registration-value=<value> value for release stream or cluster id, based on mode of registration DESCRIPTION Post new docker artifacts to the facets control plane EXAMPLES $ facetsctl push ``` _See code: [src/commands/push.ts](https://github.com/facets-cloud/facetsctl/blob/v1.0.12/src/commands/push.ts)_ ## `facetsctl refresh` Refresh your k8s credentials for an environment. Credentials can be refreshed using either an environment id or a combination of blueprint name and environment name. ``` USAGE $ facetsctl refresh [-e <value> | --environment-name <value> | --blueprint-name <value>] FLAGS -e, --environment-id=<value> Environment id for credentials needs to be refreshed --blueprint-name=<value> Blueprint name using which environment was launched --environment-name=<value> Environment Name for credentials needs to be refreshed DESCRIPTION Refresh your k8s credentials for an environment. Credentials can be refreshed using either an environment id or a combination of blueprint name and environment name. EXAMPLES $ facetsctl refresh ``` _See code: [src/commands/refresh.ts](https://github.com/facets-cloud/facetsctl/blob/v1.0.12/src/commands/refresh.ts)_ ## `facetsctl register` Register already pushed images from external repository to facets control plane ``` USAGE $ facetsctl register -i <value> -s <value> -e <value> --git-ref <value> [-d <value>] [--registry <value>] [--registration-type ENVIRONMENT|RELEASE_STREAM] [--blueprint-name <value>] [--debug <value>] FLAGS -d, --description=<value> description of the build if any -e, --external-id=<value> (required) external identifier for artifact -i, --docker-image=<value> (required) docker image URL in the external registry -s, --service=<value> (required) name of the CI integration for which the artifact needs to be registered --blueprint-name=<value> blueprint name in which CI Integration will be created if not present already --debug=<value> [default: false] see original error message thrown --git-ref=<value> (required) git ref provided in CI Rule --registration-type=<option> mode of registration for CI integration <options: ENVIRONMENT|RELEASE_STREAM> --registry=<value> artifactory where image will be pushed DESCRIPTION Register already pushed images from external repository to facets control plane EXAMPLES $ facetsctl register ``` _See code: [src/commands/register.ts](https://github.com/facets-cloud/facetsctl/blob/v1.0.12/src/commands/register.ts)_ ## `facetsctl register-by-env` Register already pushed images from external repository to facets control plane through environment name. ``` USAGE $ facetsctl register-by-env -i <value> -s <value> -e <value> [-d <value>] [--registry <value>] [--environment-id <value> | [--environment-name <value> --blueprint-name <value>] | ] [--debug <value>] FLAGS -d, --description=<value> description of the build if any -e, --external-id=<value> (required) external identifier for artifact -i, --docker-image=<value> (required) docker image URL in the external registry -s, --service=<value> (required) name of the CI integration for which the artifact needs to be registered --blueprint-name=<value> blueprint name in which given environment is present --debug=<value> [default: false] see original error message thrown --environment-id=<value> environment id in which the artifact will be registered --environment-name=<value> environment name in which the artifact will be registered --registry=<value> artifactory where image will be pushed DESCRIPTION Register already pushed images from external repository to facets control plane through environment name. EXAMPLES $ facetsctl register-by-env ``` _See code: [src/commands/register-by-env.ts](https://github.com/facets-cloud/facetsctl/blob/v1.0.12/src/commands/register-by-env.ts)_ ## `facetsctl register-by-release-stream` Register already pushed images from external repository to facets control plane through release stream. ``` USAGE $ facetsctl register-by-release-stream -i <value> -s <value> -e <value> --release-stream <value> [-d <value>] [--registry <value>] [--blueprint-name <value>] [--debug <value>] FLAGS -d, --description=<value> description of the build if any -e, --external-id=<value> (required) external identifier for artifact -i, --docker-image=<value> (required) docker image URL in the external registry -s, --service=<value> (required) name of the CI integration for which the artifact needs to be registered --blueprint-name=<value> blueprint name in which CI Integration will be created if not present already --debug=<value> [default: false] see original error message thrown --registry=<value> artifactory where image will be pushed --release-stream=<value> (required) name of the release stream DESCRIPTION Register already pushed images from external repository to facets control plane through release stream. EXAMPLES $ facetsctl register-by-release-stream ``` _See code: [src/commands/register-by-release-stream.ts](https://github.com/facets-cloud/facetsctl/blob/v1.0.12/src/commands/register-by-release-stream.ts)_ ## `facetsctl upload` Upload any type of application build file to the Facets Control Plane ``` USAGE $ facetsctl upload -p <value> -a <value> -e <value> [--registration-type ENVIRONMENT|RELEASE_STREAM] [--registration-value <value>] [--git-ref <value>] [--blueprint-name <value>] [-d <value>] [--debug <value>] FLAGS -a, --artifact-name=<value> (required) name of the artifact-ci as mentioned in resource spec. If the CI integration is already created, provide its name. If not, additionally provide blueprint name and the registration type using respective flags.' -d, --description=<value> description of the build if any -e, --external-id=<value> (required) external identifier for CI Integration -p, --file-path=<value> (required) path to the application build file (e.g., WAR, JAR, ZIP) on your local system --blueprint-name=<value> name of the blueprint where the CI integration will be created. --debug=<value> [default: false] See original error message thrown --git-ref=<value> Git ref provided in CI Rule --registration-type=<option> mode of registration <options: ENVIRONMENT|RELEASE_STREAM> --registration-value=<value> value for release stream or cluster id, based on mode of registration DESCRIPTION Upload any type of application build file to the Facets Control Plane EXAMPLES $ facetsctl upload ``` _See code: [src/commands/upload.ts](https://github.com/facets-cloud/facetsctl/blob/v1.0.12/src/commands/upload.ts)_ <!-- commandsstop -->