Skip to content

Config

The RCTL utility needs to be initialized with credentials and other information before it can interact with the Controller. At a given time, RCTL can be initialized with only one configuration. It can always be reinitialized if it needs to be bound to a different Org/Tenant.

At a given time, RCTL can be initialized with only one configuration. Note that the RBAC associated with the user's credentials is automatically enforced.


Initialize

RCTL supports both a "config file" as well as "dynamic config" model. The latter is well suited for automation pipelines where the configuration is provided dynamically and there is no need to permanently bind RCTL to an Org or Project.

Config File

  • Navigate to the "My Tools" page in the Web Console
  • Click on Download CLI Config to download the configuration file.
  • Save the configuration file on your system

CLI Tools Page

Warning

A new configuration file is dynamically generated everytime the download button is clicked. To delete older credentials in the config, click on Manage Keys to identify keys not in use and delete them.

./rctl config init <full path to config file>

ENV Variables

Automation tools and pipelines can dynamically provide the required RCTL configuration via ENV variables instead of a configuration file. You can generate and access your API key and secret using instructions here.

RCTL_REST_ENDPOINT="console.rafay.dev"
RCTL_OPS_ENDPOINT="console.rafay.dev"
RCTL_API_KEY="xxxxxxxx"
RCTL_API_SECRET="yyyyyyyyyyyyyyyyyyyy"
RCTL_PROJECT="defaultproject"

Note

If configured, ENV variables will take precedence over a config file.


View Config

You can view the current configuration for RCTL by using the "config show" command.

./rctl config show

Profile:                                                                    prod
REST Endpoint:                                                 console.rafay.dev
OPS Endpoint:                                                      ops.rafay.dev
API Key:                                                            <Masked>
API Secret:                                                         <Masked>
Project:                                                          defaultproject

Projects

Projects are a way to implement multi tenancy within an Organization and implement true isolation boundaries. Read more about Projects.

Note

Creation and Deletion of Projects are privileged operations. This is typically performed by an Org Admin using the Web Console because RBAC assignments also need to be implemented along with this.


Default Project

By default, the RCTL config points to the "defaultproject". You can verify this by viewing the config.

rctl config show

Set Project

If you are using a custom project, ensure that you set the project context before you can perform operations in this project. For example, to set the project context to a project called "Demo"

rctl config set project Demo

Once the project context has been successfully set, ensure you verify this in your local config file.

Note

The name of the project is case-sensitive