12. Test Application

1. Test the applications post migration. Open the following URL using Chrome.

application URL
Wordpress http://wordpress-web.onpremsim.env/
OFBiz ERP https://ofbiz-web.onpremsim.env:8443/accounting

This is a simple test, just check if both application webpages show up.

2. Open CMD.EXE (Windows Command Prompt) and ping all the servers below. Please notice they are located now in the target cloud VPC using the CIDR 10.0.1.0/24.

hostname
wordpress-web
wordpress-db
ofbiz-web
ofbiz-db

If any of the apps doesn’t work, and you are still getting 192.168.1.x IP address, this is usually because the post launch script not executed successfully. To fix this, use the following steps:

Note: Do the following only if the app does not work and IP address is still 192.168.1.x

  1. Go to EC2 console, find the new 10.0.1.X IP address for the problematic instance

  2. SSH to the target instance using Putty on the desktop

  3. Login to the target instance with the same Linux user name and password.

    Username Password
    user AWSmid20
  4. Run the following command to update DNS server:

    #!/bin/sh
    ADDR=`hostname -I`
    HOST=`hostname`
    sudo touch /tmp/nsupdate.txt
    sudo chmod 666 /tmp/nsupdate.txt
    echo "server dns.onpremsim.env" > /tmp/nsupdate.txt
    echo "update delete $HOST A" >> /tmp/nsupdate.txt
    echo "update add $HOST 86400 A $ADDR" >> /tmp/nsupdate.txt
    echo "update delete $HOST PTR" >> /tmp/nsupdate.txt
    echo "update add $HOST 86400 PTR $ADDR" >> /tmp/nsupdate.txt
    echo "send" >> /tmp/nsupdate.txt
    sudo nsupdate /tmp/nsupdate.txt