Environment Manager - Loader Utility - Rafay Product Documentation

Loader Utility

The purpose of the loader utility is to assist in loading Environment Manager resources into an organization. The loader utility can be found here.

The loader utility is composed of the following main components:

The utility has two modes of operation. The first mode uses the Environment Manager public repository and the second mode uses a user defined private repository to load the Environment Manager templates into the organization.

Public Repository

If using the Environment Manager public repository to load templates, the backing IaC for the templates cannot be modified as the IaC is stored in a public repository.

Private Repository

If using a private repository to load templates, the backing IaC for the templates can be modified. Also, since this is a private repository, a System Sync pipeline will be automatically created to allow for bidirectional synchronization of the Environment Manager resources to the private Git repository.


Step 1: Install Prerequisites

The following tools will need to be installed on the machine running the utility.

Install RCTL

The RCTL CLI allows you to programmatically interact with the controller enabling users to construct sophisticated automation workflows.


Step 2: Import Git Repository

This step is only required if you will be using a private repository. A private repository will first need to be created by importing the Environment Manager public repository into your GitHub account. The imported repository will contain the contents of the Environment Manager public repository. A GitOps System Sync pipeline will be created later in this guide which will be triggered by commits to this repository.

Note that the Rafay agent automatically writes back changes to Git if you make any changes to the resources via the web console or other supported interfaces.

Important

We recommend that users DO NOT use public Git repositories to avoid accidental exposure of sensitive data in your Git repository.


Step 3: Clone Git Repository

In this step, you will clone a Git repository to your local machine to simplify interacting with the repository.

git clone <Repository URL>

Step 4: Configure Environment Parameters

In this step, you will configure a values file that will then be used by the loader utility.

Important

Be sure to uncomment any of the directories for the templates that are intended to be loaded into the organization.

Note The following parameters only need to be configured if isPrivateRepo is set to true: userName, token, endPoint, branch and path

Create GitHub Token

If needed, create a Personal Access Token in Github to allow access to the GitHub repository.


Step 5: Run Utility

In this step, you will run the utility which will assist in creating the resources for this guide.

The script will begin to run and create the resources in the organization.

Note If you choose to use a private repository, the script will provide webhook details at the end of the output. Use these webhook details in the next step.


Step 6: Setup GitHub Webhook

This step is only required if you will be using a private repository. In this step, you will configure your repository webhook. The webhook will be used to trigger the System-Sync pipeline in the controller.