Migrating Instances in AWS using the Migrator Tool

Symptoms

As per the release of SoftNAS 5 it'll be a requirement to migrate all pre-versions to the latest release since a 1 click-upgrade isn't supported. The newly-created AWS migrator script will assist in the migration process.

Purpose

This article covers the basic required steps and key considerations to migrate an HA pair, replication pair or a single instance in AWS within the same VPC.

Resolution

Below is a detailed outlined step by step guide and the requirements involved in migrating an existing AWS SoftNAS instances to new instances using the migrator script;

Step-by-step guide

Note: The Script requires the Python3 installed and enabled in your environment on the SoftNAS Primary node in case in an HA pair and also requires the boto3 and requests packages installed.


Script Requirements;

      1. Install Python3 using the below command;

          # 'yum install -y rh-python36'

          


     2. Enable python36 using the below command;

           'source /opt/rh/rh-python36/enable'

See below image;

        

     

2. Install pip3 using the below command;

      #   'pip3 install --upgrade pip'

See below image;

     

           

     

3. Install boto3 running the below;

       # 'pip3 install boto3 requests'


See below image;


4.  Download the script from To be posted soon and upload it to the SoftNAS instance (Source node in an HA or replication pair) and give it an executable permission using the below command

      # chmod +x aws_migrator3.2.py


5. Run the script using the following arguments and provide the instance's password, see below example 

     # ./aws_migrator3.2.py --ha True --replication True --ami_id ami-123456gtuh --vip 1.2.3.4


Note: In an HA pair you'll need to specify both the HA and replication arguments and if you wish to change the AMI and the VIP you'll need to add that too if not it'll use your default settings.

6.  The IAM role attached to the instance will need some additional privileges;

     a.  The ability to deploy a clone instance of itself;

         "ec2:RunInstances"    

     

    b.  The ability to assign a new IAM role to the instance it deploys;

         "iam:PassRole",


Note: Adding the above permissions to your existing IAM role assign to the existing SoftNAS instances is a requirement