Using KaaS CLI
Step-by-step Guidance on Using the Tool
Last updated
Step-by-step Guidance on Using the Tool
Last updated
This guide provides step-by-step instructions on how to use KaaS. You can use KaaS in two ways: as an authorized user or by providing a token. As an authorized user, you can simplify command execution and avoid specifying a token flag. To access someone else's project, you'll need to be a part of the same KaaS organization or Vault.
You can refer to Authentification Using Device Flow for the detailed guide on how to authenticate using CLI and github device flow.
Providing token allows you to skip authentication flow and have same level of access as authenticated users. To create and use a token for accessing the KaaS CLI, follow these steps:
Create a Token:
Go to the .
Click on Profile
picture in right top corner
Click on the Access Tokens
button in the drop-down menu.
Create a new token and copy the Key
.
Obtain Organization Name and Vault Name:
Go to the .
Click the desired organization.
And click on a Vault.
Copy the vault name with organization name. It has format:
Refered to as Vault Spec: organization-name/vault-name
Use the Token:
Replace xxx
with your actual token from previous steps.
Replace organization-name/vault-name
with names from the previous step
Replace tag
- with short identifier
Use the following command for uploading:
For downloading, use:
Using Environment Variables for Authentication
To simplify the authentication process, the KaaS CLI tool allows using environment variables to store authentication credentials. Alternatively, you can use Device login. Below are the steps to configure and use environment variables for authentication:
Setting Up Environment Variables:
You need to set up the following environment variables in your operating system:
KAAS_SERVER_URL
: The URL of the KaaS server (for development and testing).
KAAS_DIRECTORY
: The directory path for KaaS configurations. Default is /out
.
KAAS_ORG_VAULT
: The organization vault identifier for KaaS in the format orgname/vaultname
.
Example:
On Windows:
On Linux/macOS:
Using Environment Variables in the CLI Tool:
The CLI tool will automatically read the values of KAAS_SERVER_URL
, KAAS_DIRECTORY
, KAAS_TOKEN
, and KAAS_ORG_VAULT
from the environment variables. You do not need to pass these values explicitly each time you run a command.
Example Command:
In this example, the CLI tool will authenticate using the credentials stored in the environment variables.
Verifying Environment Variable Setup:
You can verify that the environment variables are set correctly by running the following commands:
On Windows:
On Linux/macOS:
KAAS_TOKEN
: The Token for accessing KaaS services. Can be obtained .