Skip to main content

CI

Using RemotiveTopology in a CI environment

When running RemotiveTopology in a CI (Continuous Integration) environment, avoid using personal tokens. Instead, use a service account to ensure secure and maintainable access.

To create a service account, you must be an administrator of the relevant cloud project. If you created a personal account to evaluate RemotiveCloud or RemotiveTopology, you are automatically the administrator of that personal project.

You can create a service account in the RemotiveCloud console or by using RemotiveCli. In order to run RemotiveTopology, grant the RemotiveTopology Executor role to the service account.

To create the service account in the CLI:

# Check your project name
remotive cloud projects list
# Create the service account
remotive cloud service-accounts create <service account name> --role org/topologyRunner --project <project id>

Before using your service account to run RemotiveTopology, a token must be created. It's also necessary to know the id of the RemotiveCloud organization. You can use RemotiveCli to do this:

# Create the access token for the service account
remotive cloud service-accounts tokens create --service-account <service account name> --project <project id>
# Find the email of the service account
remotive cloud service-accounts list --project=<project id>
# Print the access token for the service account
remotive cloud auth print-access-token --account <email for service account>

# Find the uid of the organization
remotive cloud organizations list

With this information, the following environment variables can be used to handle access to RemotiveCloud and validation of the RemotiveTopology subscription

  • REMOTIVE_CLOUD_AUTH_TOKEN - Provides an authentication token.
  • REMOTIVE_CLOUD_ORGANIZATION - Provides your RemotiveCloud organization.

RemotiveCLI provides more commands to handle service accounts and tokens. More information can be found in the Service Accounts section in the RemotiveCLI documentation.