Self Service Environments on AWS - Rafay Product Documentation

Setup

What Will You Do

This is Part 1 of the self-paced quick start exercise. In this part, you will use the Infra Admin persona to setup and configure the needed resources to use Environment Manager.


Step 1: Import Template

In this step, you will use the Loader Utility to import the Environment Manager templates needed for this environment. This process will also setup a System Sync pipeline which will be used to create environment templates.


Step 2: Configure Environment Contexts

In this step, you will configure an environment context in the controller with your AWS account details. These account details will be used by Environment Manager to interact with your cloud account.

Important

The Rafay agent automatically writes back the environment variables to Git. The resources (esp. secrets) you identify as sensitive will be automatically encrypted using a secret sealer before being synced to your Git repo.


Step 3: Configure Resource Template Variables

In this step, you will update the resource template for the AWS security group resource. You will be updating specific variables in the resource template to use expressions. The expressions will use the output of the VPC resource template when used together in the same environment template.

[\
    {\
        "from_port": 1433,\
        "to_port": 1433,\
        "protocol": "tcp",\
        "description": "SqlServer access from within VPC",\
        "cidr_blocks": "$(resource[\"rafay-aws-vpc\"].output.vpc_cidr_block.value)$"\
    }\
]

Step 4: Create VPC and Security Group Environment Template

In this step, you will use the System Sync pipeline to create an environment template for the the VPC and security group environment.

apiVersion: eaas.envmgmt.io/v1
kind: EnvironmentTemplate
metadata:
  name: vpc-and-security-group
  project: UPDATE_ME
  description: Create a VPC and Security Group in AWS
  displayName: AWS VPC and Security Group
spec:
  iconURL: https://cdn2.iconfinder.com/data/icons/amazon-aws-stencils/100/Non-Service_Specific_copy_Virtual_Private_CLoud_-512.png
  readme: "## Introduction\n\nUsers can use this template\n  to create a VPC and Security Group in AWS \n\n---\n\n##\n  What does this do behind the scenes? \n\nThis template will perform the following\n  in a sequence: \n\n1. Create a new VPC in AWS using the name of the environment \n2. Create a Security Group within the VPC using the name of the environment\n \n\n---\n\n## Defaults and Overrides \nUnless specified, the\n  new VPC will be created with the default settings for the AWS region and subnets.  The subnets include private, public and database subnet groups\n  Users have the option to override the defaults with alternative options. See the input variables section below for complete details. "
  resources:
  - kind: resourcetemplate
    name: rafay-aws-vpc
    resourceOptions:
      version: v1
    type: dynamic
  - dependsOn:
    - name: rafay-aws-vpc
    kind: resourcetemplate
    name: rafay-aws-security-group
    resourceOptions:
      version: v2
    type: dynamic
  variables:
  - name: region
    options:
      override:
        type: allowed
      required: true
    value: us-west-2
    valueType: text
  - name: azs
    options:
      override:
        type: allowed
      required: true
    value: '[