CloudHook Migration

CloudHook Migration

Step 1) Launching EC2:

  • Login to AWS
  • Go to https://console.aws.amazon.com/ec2/
  • Make sure to select your region as US East (N. Virginia) on the top right corner
  • Select the AMIs section on the Left
  • Apply the following filters:
    • From drop down, select Public images
    • Platform: CentOS
    • AMI ID: ami-02e684256c85a65af
    • A screenshot of a social media post Description automatically generated

(If S3 bucket is in N. Virginia, please continue. If not, jump to S3 in other regions section)

  • Select the AMI and click the launch button.
  • Choose instance Type: Select t3a.medium
  • Configure Instance Details:
    • Number of instances: 1
    • Network: Select which VPC you want to use. Defaults VPC also will work.
    • Subnet: Choose accordingly.
    • Can leave defaults for rest of the options.
  • Storage: Defaults to 510 GB. Change if needed.
  • Add Tags: Click Add Tag, Key: Name, Value: <give a name as you need>
  • Configure Security Groups: Select as needed. Make sure SSH is opened.
  • Review and Launch
READ ALSO
What is DevOps? Introduction to DevOps 8

(S3 in other regions section)

  • First, we have to copy the AMI from N. Virginia to whatever region we need.
    • Select the AMI
    • Dropdown Actions, select Copy AMI
    • Destination region: Select where you S3 bucket is. [EX: US West (N. California)]
    • Click Copy AMI
  • Switch to the S3 region from the top right corner
  • Select AMIs section on the left
  • Select Private images. Clear all filters if any. You should see the copied AMI.
  • Select the AMI and click the launch button.
  • Choose instance Type: Select t3a.medium
  • Configure Instance Details:
    • Number of instances: 1
    • Network: Select which VPC you want to use. Defaults VPC also will work.
    • Subnet: Choose accordingly.
    • Can leave defaults for rest of the options.
  • Storage: Defaults to 510 GB. Change if needed.
  • Add Tags: Click Add Tag, Key: Name, Value: <give a name as you need>
  • Configure Security Groups: Select as needed. Make sure SSH is opened.
  • Review and Launch
  • When asked for Key: Select the key if you already have one. If not, select create new key. Make sure you have .pem key in your local workstation.
READ ALSO
AWS Report

Step 2) Connect to EC2 VM:

  • Go to https://console.aws.amazon.com/ec2/
  • Select Instances from the Left.
  • Look for the newly created instance.
  • Select the instance. once the Status Checks are 2/2, click Connect on the top.
  • Copy the entire line under Example: it will looks like
    • ssh -i “<your key name>.pem” root@ec2-34-239-153-33.compute-1.amazonaws.com.
  • Open your terminal, CD to where you .pem file is and paste the above copied line and hit Enter.
  • You should be connected to the Instance.

Step 3) Pre Migration Checks:

  • Check whether time is correct by using the following Command:

~ date

    • If timezone is different,
      • ~ timedatectl list-timezones
      • ~ timedatectl set-timezone [TIMEZONE]
    • Reboot the machine
  • Check docker service is running or not
READ ALSO
Kubernetes interview questions 4

~ sudo service docker status

Step 4) Run the Migration Script:

  • Cd /root
  • Run the migration script called migrate_s3_on_rh7.sh and give the required input data

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.