Skip to content

KOP Airgap - Installation

Here are the detailed instructions for installation of Rafay Controller in EKS environments using terraform.

Download Rafay controller Terraform package

  • Click here to download the controller installation package to the instance

  • From your home directory, untar the package using the command below

tar -xf rafay-eks-terraform*.tar.gz && cd ~/eks-terraform

  • After downloading the terraform package, update your configuration in terraform.tfvars in the eks-terraform directory.
region = "us-west-2"  ## <”update with aws region”>
domain_name   = "example.com" <update with route53 zone domain name>
cert_acm        = "" < “update with ACM certificate arn” >

#####---RDS variables----------####
rds_identifier    = "" <”database name”>
ds_instance_class    = "db.m6g.4xlarge" <update with database instance class>
rds_allocated_storage      = 300 <update storage for RDS>
rds_engine                 = "postgres"
rds_engine_version         = "13.3"
rds_backup_retention_period = 7 <retention period for RDS>
rds_username               = "" <RDS master name>
rds_password           = "" <RDS master password>
rds_db_name              = "" <RDS database name>
#####-------EKS variables-------####
cluster_name    = "" <EKS cluster name>
cluster_version = "1.21" <EKS cluster version>
root_volume_type = ""
node_name                     = "" <worker node names>
instance_type                 = "" <node instance type>
asg_desired_capacity          = 1
#####-----VPC  variables---------####
vpc_name                 = "" <vpc name>
cidr                 = "" <vpc cidr>
cidr_blocks          = ["", "0.0.0.0/0"] <update cidr_blocks for  security groups>
azs                  = ["us-west-2a", "us-west-2b", "us-west-2c"] <availability zones for eks cluster nodes to be created>
private_subnets      = ["", "", ""] <update with cidr for private subnets>

public_subnets       = ["", "", ""] <update with cidr for public subnets>

path  = "<local path>/terraform_EKS/controller-through-terraform" ##-- The path should be changed to your local path as (/home/centos) or (/home/ubuntu)--##

Run Terraform commands

  • Initialize the terraform code and download required providers and versions

terraform init

  • Create a plan of what resources are going to be executed in the AWS console

terraform plan

  • Apply and create infrastructure to bring up the Rafay controller

terraform apply


Backup and Restore of the controller

When taking backup, ensure that clusters are provisioned and nothing is in-progress. Follow the below steps to restore the current db with a new controller.

  1. Take a snapshot of the current DB using AWS console, navigate to snapshots section under RDS and click Take snapshot

BareMetal

Wait until the status of the snapshot becomes available.

  1. Once it's available, select the newly created snapshot and click the action at the top and select restore snapshot

BareMetal

  1. In the restore snapshot page, let the DB engine PostgreSQL and provide the unique value for DB instance identifier under settings
  2. Let the settings of Availability and durability be as default
  3. Under connectivity choose the existing VPC and subnet groups.Set the public access to public if you want to access the DB from outside world
  4. Create a new VPC security group as shown below

BareMetal

  1. Select DB class as db.m6g.4xlarge under DB instance standard classes
  2. Choose the DB authentication as password authentication and click on restore database
  3. Create a new controller by updating the details of new RDS (Created in step 1) under the RDS variables section of terraform.tfvars, keep the config variables the same as old controller configuration, and change everything else except RDS and config variables
  4. Set below variables under config variables as suggested:
velero-restore - true
restore_rds  = false
most_recent  = true
  1. Set below variables under RDS variables as suggested: create_s3_velero = false

  2. Configure below things in main.tf Change the key of S3 bucket

  3. Set Count=0 under RDS module so that RDS module won’t be executed and new RDS will not be created as we have already created new RDS and restored it manually

  4. Under the RADM application module, configure rds_hostname and rds_port with the name which was specified while restoring the RDS
  5. Under the RDS Restore module configure the db_instance_identifier with an old RDS name
  6. Once all the above configurations are done, run terraform apply