Skip to content

Overview

Overview

In this self-paced exercise, you will setup and use Environment Manager to build and manage resources in AWS. These resources will be controlled as two environments through the controller.

Environment Manager enables a self-service model for Development and DevOps teams (Admins) to create environments while giving enough control to the central Ops, SRE and Platform teams (End Users) to enforce security, cost, governance guardrails and standardization.

In this exercise, the environment resources that will be created in AWS are defined in Terraform that are stored in a Git repository. Two separate environments will be created. The first environment will consist of a VPC and a security group. The second environment will consist of a RDS Postgres database. The second environment will use the resources created from the first environment. In this exercise, it is intended that Environment 1 (VPC and Security Group) is created by the platform team as these resources can be shared by multiple end users. Environment 2 (RDS) which uses the shared resources from Environment 1, would then be created by an end user via self-service.

The following AWS resources will be created in this exercise:

  • VPC
  • Security Group
  • RDS Database

Environment Diagram

This exercise is expected to take ~60 minutes to complete.

A setup script will be used to assist in setting up the pre-requisites for this guide. The setup script wil perform the following actions:

  • Create a repository in the controller
  • Create a Secret Sealer in the controller
  • Create a GitOps Agent that will run on the machine where the setup script is executed from
  • Create a GitOps System-Sync pipeline in the controller that will be used to sync resources between the controller and the forked Git repository

Important

Watch a live end-to-end demonstration of this guide in the video below.

The sequence diagram below illustrates the steps you will experience at a high level.

Important

Either the Environment Template User or the Infra Admin can perform the deploy/destroy operations on an environment.

sequenceDiagram
    autonumber
    participant admin as Platform Team
    participant rafay as Rafay
    participant user as Developer


    rect rgb(191, 223, 255)
    Note over admin,rafay: Setup Environment Template
    admin->>admin: Clone Git Repo
    admin->>rafay: Setup Env Manager <br>Resources
    admin->>rafay: Input Cloud Credentials
    admin->>rafay: Update Resource templates
    admin->>rafay: Create Environment Template for Environment 1 (VPC and Security Group)
    admin->>rafay: Deploy Environment 1 (VPC and Security Group)
    admin->>rafay: Create Environment Template for Environment 2 using output from Environment 1 (RDS Database)
    end

    rect rgb(191, 223, 255)
    Note over rafay,user: Provision & Use Environment
    user->>rafay: Deploy Environment 2 from template
    user->>rafay: Use Environment
    user->>rafay: Destroy Environment
    end

What Will You Do by Part

Part What will you do?
1 Setup and Configure Environment Manager
2 Developer Self-Service of a AWS environment

Assumptions

  • You have access to a AWS Account
  • You have access to a Mac or Linux machine
  • You have a Git client on your machine that is setup for push/pull
  • You have Docker installed on your machine