VM-based Setup on AWS
  • 26 Oct 2023
  • 2 Minutes to read
  • Dark
    Light
  • PDF

VM-based Setup on AWS

  • Dark
    Light
  • PDF

Article summary

About this Article
This article provides environment setup steps for deploying VSP on AWS EC2 VM.


Pre-requisites

Two EC2 machines are required for VSP – one for VSP CMS and (Optional - Remote AE only) one for VSP AE.

The pre-requisites for VSP installation:

  1. EC2 machine with:
    1. Docker
    2. Docker Compose
    3. Network Security Group with the list of ports utilized by VSP components. Refer to the VM article for information on the ports


RHEL 7

EC2 Machine Creation

  1. Access the AWS Dashboard: https://console.aws.amazon.com/ec2 using valid credentials
  2. Navigate to EC2 > Instances > Launch an instance. Provide an appropriate Name
  3. Under the Quick Start tab, Follow the below steps to select the appropriate AMI:
    1. Click Browse more AMIsSearch for Redhat 7 and click the results in AWS Marketplace AMIs
    2. Select the below AMI
  4. Select Instance type as required for CMS. Example: r6i.2xlarge
  5. Click Create new key pair if required for authentication credentials
  6. Configure the Storage information as required and click Launch instance
  7. Once the newly created instance is up and running, configure firewall rules as described below:
    1. Select the launched Instance
    2. Click Security groups
    3. Select Inbound rules and click Edit inbound rules
    4. Create the required rules and click Save rules


Installation

  1. Log in to the two newly created machines using SSH and install Docker and Docker Compose using the commands below:
    sudo su
    subscription-manager register --username <username> --password <password> --auto-attach  #Register the machine with the Red Hat subscription to download dependencies
    yum update
    subscription-manager repos --enable=rhel-7-server-rpms --enable=rhel-7-server-extras-rpms --enable=rhel-7-server-optional-rpms
    yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 
    yum install -y yum-utils device-mapper-persistent-data lvm2
    yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
    yum install docker-ce 
    systemctl enable --now docker.service
    curl -L "https://github.com/docker/compose/releases/download/1.29.x/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    chmod +x /usr/local/bin/docker-compose
    mv /usr/local/bin/docker-compose /usr/bin/
    
  2. Verification: Execute the commands below to verify the Docker and Docker Compose versions:
    docker version
    docker-compose version
    

Amazon Linux 2

EC2 Machine Creation

  1. Access the AWS Dashboard: https://console.aws.amazon.com/ec2 using valid credentials
  2. Navigate to EC2 > Instances > Launch an instance. Provide an appropriate Name
  3. Under the Quick Start tab, select Amazon Linux 2 as the AMI
  4. Select Instance type as required for CMS. Example: r6i.2xlarge
  5. Click Create new key pair if required for authentication credentials
  6. Configure the Storage information as required and click Launch instance
  7. Once the newly created instance is up and running, configure firewall rules as described below:
    1. Select the launched Instance
    2. Click Security groups
    3. Select Inbound rules and click Edit inbound rules
    4. Create the required rules and click Save rules


Installation

  1. Log in to the two newly created machines using SSH and install Docker and Docker Compose using the commands below:
    sudo su
    yum update
    yum install docker
    curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o docker-compose
    chmod +x docker-compose
    mv docker-compose /usr/bin/
    
  2. Verification: Execute the commands below to verify the Docker and Docker Compose versions:
    docker version
    docker-compose version
    


Was this article helpful?

What's Next