Facets CLI v1.0.9 [not supported]
Note: Please note that this version will no longer be supported. We recommend upgrading to the latest version of Facets CTL. Refer to the latest version of the Facets CLI documentation.
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
facetsctl helpThis 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
| Flag | Required | What does it do? |
|---|---|---|
-n, --nested-commands | No | Defines if all nested commands should be included in the output. |
facetsctl login
facetsctl loginThis command allows the user to log in to the Facets Control Plane.
$ facetsctl login -u <value> -t <value> -c <value>FLAGS
| Flag | Required | What does it do? |
|---|---|---|
-c, --cp-url = <value> | Yes | Defines the URL of the Control plane |
-t, --access-token = <value> | Yes | Defines the personal token generated for the user |
-u, --username = <value> | Yes | Defines the username of the user |
facetsctl register
facetsctl registerRegister docker images from an external repository into the Facets Control Plane.
$ facetsctl register -i <value> -s <value> -e <value> --git-ref <value> [-d <value>]
[--registry <value>] [--registration-type CLUSTER|RELEASE_STREAM]
[--blueprint-name <value>] [--debug <value>]FLAGS
Flag | Required | What does it do? |
|---|---|---|
| No | Defines the description of the build if any. |
| Yes | Defines the external identifier for the artifact. |
| Yes | Defines the docker image URL in the external registry. |
| Yes | Defines the name of the CI Integration for which the artifact needs to be registered. |
| No | Defines the Blueprint name in which the CI Integration will be created if not present already. |
| Yes | Defines the git ref provided in CI Rule. |
| No | Defines the mode of registration for CI integration. |
| No | Defines the artifactory where the image will be pushed. |
| No | Defines if you want to view the original error message thrown. |
facetsctl register by env
facetsctl register by envRegister already pushed images from the external repository to the Facets Control Plane using the environment name.
$ facetsctl register-by-env -i <value> -s <value> -e <value> --environment-name <value>
--blueprint-name <value> [-d <value>] [--registry <value>] [--debug <value>]FLAGS
| Flag | Required | What does it do? |
|---|---|---|
-d, --description=<value> | No | Defines the description of the build if any. |
-e, --external-id=<value> | Yes | Defines the external identifier for the artifact. |
-i, --docker-image=<value> | Yes | Defines the docker image URL in the external registry. |
-s, --service=<value> | Yes | Defines the name of the CI integration for which the artifact needs to be registered. |
--blueprint-name=<value> | Yes | Defines the Blueprint name in which the given environment is present. |
--debug=<value> | No | Defines if you want to view the original error message thrown. [default: false] |
--environment-name=<value> | Yes | Defines the environment name in which the artifact will be registered. |
--registry=<value> | No | Defines the artifactory where the images will be pushed. |
facetsctl register by releasestream
facetsctl register by releasestreamRegister already pushed images from the external repository to the Facets control plane through the release stream.
$ facetsctl register-by-releasestream -i <value> -s <value> -e <value> --release-stream <value>
[-d <value>] [--registry <value>] [--blueprint-name <value>] [--debug <value>]| Flag | Required | What does it do? |
|---|---|---|
-d, --description=<value> | No | Defines the description of the build if any. |
-e, --external-id=<value> | Yes | Defines the external identifier for the artifact. |
-i, --docker-image=<value> | Yes | Defines the docker image URL in the external registry. |
-s, --service=<value> | Yes | Defines the name of the CI integration for which the artifact needs to be registered. |
--blueprint-name=<value> | Yes | Defines the Blueprint name in which the given environment is present. |
--debug=<value> | No | Defines if you want to view the original error message thrown. [default: false] |
--release-stream=<value> | Yes | Defines the git ref provided in CI Rule. |
--registry=<value> | No | Defines the artifactory where the images will be pushed. |
facetsctl push
facetsctl pushThe following command enables users to push new docker artifacts to specific release streams or environments in the Facets Control Plane:
$ facetsctl push -i <value> -a <value> --registration-type CLUSTER|RELEASE_STREAM --registration-value
<value> -e <value> [-d <value>] [--artifactory <value>]The following command can be used to push an image to Facets and leverage the benefits of CI Rules for automatic classification:
$ facetsctl push --ci <ci_integration_name> --image <docker_image_name> --git-ref
<git reference> -e <external_id_here> -d <your_build_description> --artifactory defaultFLAGS
Flag | Required | What does it do? |
|---|---|---|
| Yes | Defines the name of the artifact as mentioned in the Blueprint. |
| No | Defines the description of the build, if any. |
| Yes | Defines the external identifier for the artifact. |
| Yes | Defines the image location. |
| No | Defines the artifactory where the image will be pushed. |
| Yes | Defines the mode of registration. |
| Yes | Defines the value for release stream or cluster id, based on mode of registration. |
facetsctl refresh
facetsctl refreshThis command will refresh the Kubernetes credentials for the user in the specified environment.
facetsctl refresh -e <value>
#or
facetsctl refresh --blueprint-name <value> --environment-name <value>FLAGS
| Flag | Required? | What does it do? |
|---|---|---|
-e, --environment-id | Yes | Defines the unique ID for the environment. |
--blueprint-name | Yes | Defines the unique name of the defined blueprint. |
--environment-name | Yes | Defines the name of the environment in the defined blueprint. |
facetsctl download-kubeconfig
facetsctl download-kubeconfigThis command can be used to download kubeconfig files for an Environment. You can either download it using the environment ID or retrieve it by specifying the blueprint name and environment name.
$ facetsctl download-kubeconfig -e <value>
#or
$ facetsctl download-kubeconfig --environment-name <value> --blueprint-name ‹value>FLAGS
| Flag | Required | What does it do? |
|---|---|---|
-e, --environment-id | Yes | Defines the Environment ID for downloading kubeconfig. |
--environment-name | Yes | Defines the Environment name for downloading kubeconfig. |
--blueprint-name | Yes | Defines the Blueprint name using which environment was launched. |
facetsctl upload
facetsctl uploadThis command can be used to upload any type of application build file to the Facets Control Plane.
$ 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
Flag | Required | What does it do? |
|---|---|---|
| Yes | Defines the name of the artifact-ci as mentioned in resource spec. |
| No | Defines the description of the build if any. |
| Yes | Defines the external identifier for CI Integration. |
| Yes | Defines the path to the application build file (e.g., WAR, JAR, ZIP) on your local system. |
| No | Defines the name of the blueprint where the CI integration will be created. |
| No | See original error message thrown [default: false] |
| No | Defines the Git ref provided in CI Rule. |
| No | Defines the mode of registration. |
| No | Defines the value for the release stream or cluster ID based on the Registration mode. |
Facets CLI version v1.0.9
For Mac Os
| Type | Architecture | Download link |
|---|---|---|
| Gzip | 64-bit | facetsctl-darwin-x64.tar.gz |
| XZ | 64-bit | facetsctl-darwin-x64.tar.xz |
| Gzip | ARM64 | facetscti-darwin-arm64.tar.gz |
| XZ | ARM64 | facetsctI-darwin-arm64.tar.xz |
For Linux
| Type | Architecture | Download link |
|---|---|---|
| Gzip | 64-bit | facetsctl-linux-x64.tar.gz |
| XZ | 64-bit | facetsctI-linux-×64.tar.xz |
| Gzip | ARM | facetsctl-linux-arm.tar.gz |
| XZ | ARM | facetscti-linux-arm.tar.xz |
For Windows
| Type | Architecture | Download link |
|---|---|---|
| Gzip | 64-bit | facetsctl-win32-x64.tar.gz |
| XZ | 64-bit | facetsctl-win32-x64.tar.xz |
| Gzip | 32-bit | facetsctI-win32-x86.tar.gz |
| XZ | 32-bit | facetsctI-win32-x86.tar.xz |
Updated 5 months ago