On Premise -> Amazon AWS EC2
- 1 1. Introduction
- 2 2. Initial Setup and Configuration
- 3 3. Install, Configure and Run the Standby software
1. Introduction
The purpose of this Deployment guide is to demonstrate the way in which Dbvisit Standby 8.0 software can be installed on an Amazon AWS EC2 instance. In this guide, we focus on the Primary being located 'on-premise' and a Standby database hosted in AWS. In another document, we focus on both the Primary and Standby databases hosted in AWS.
A link that document can be found here
The setup will be from a Single Instance on-Premise Primary Database to a Single Instance Standby Database with Datafiles stored on standard filesystems on a Linux Platform. However, the options for configuring Dbvisit Standby are in no way limited to this.
2. Initial Setup and Configuration
2.1 Provisioning the Standby Server
Connect to AWS EC2 Dashboard and Select 'Launch Instance'
In this guide we are going to install and configure Dbvisit Standby 8.0.20 on Oracle Linux, choosing the AMI (ami-0d25886d) from the Community AMIs. This is Step 1 in the launch instance wizard.
Click select.
Step 2 "Choose an Instance Type": The allows you to select from a range of Amazon Instance Types. The "learn more" link directs you to more information about the instance types and how they might suit your computing needs. For the purpose of this guide only, we have chosen t2.small.
Step 3: Configure the Instance Details. Here we choose the defaults,
Step 4 "Add Storage". We also accept the defaults here as a 30GB disk is more than enough for the demo purposes.
Throughout this guide, no mention is made to the licensing implications of running Oracle software on Amazon AWS. The setup we have here has been built for demonstration purposes/ Further information regarding Oracle Licenses in the cloud can be found here. Also Licensing Oracle Software in the Cloud Computing Environment.
Step 5 "Add Tags". Create a Tag with Key = "Name" and Value = "dbvaws01"
Step 6 "Configure Security Group". Here, we've chosen an existing security group with ports 22 (SSH), 4433 (dbvserver), 7890 (dbvnet) and 7891 (dbvagent) enabled within the INBOUND security rules.
The final step is to review and Launch the new instance making sure that if the 'Choose an existing key pair' option is selected that the .pem file is accessible by yourself.
I have access to the dbvAWS.pem file so I clicked the tick box and then proceeded with "Launch Instance"
Once the launch is initiated, the running instance can be viewed from within the EC2 dashboard, Instances submenu
The preparation of the OL7 Linux for the oracle user creation and the installation of the Oracle binaries are outwith the scope of this guide. The next section starts from the scp of the Dbvisit Standby binaries to the cloud host. The On-premise primary database is 11.2.0.4. Therefore, these binaries were also installed. This ORACLE_BASE article was used as a reference.
The 'primary' server in this guide is an Oracle Virtualbox VM running locally. The network is configured to have two adapters, one bridged and one host only. For it to be internet facing, the dbvisit dbvnet and dbvagent processes must listen on the IP that is visible from the router. This means, when the request to the externally facing (office) IP address on one of the dbvisit ports comes in, the router is able to forward this to the VM.
The machine name is dbvlab01 and the Ipv4 Public IP of the AWS instance dbvaws01 has been added to the local host's file.
root@dbvlab01[/root]: cat /etc/hosts |grep -i dbvaws01
52.38.136.118 dbvaws01
On the AWS server dbvaws01, the IP address of our office router has been added to the /etc/hosts file, so that a ping of server dbvlab01 resolves to this address which in turn finds the VM via the bridged network adaptor. This has not been added to the guide for apparent reasons.
An overview of both Primary and Standby machines is shown in the table below.
Primary Server Details | Standby Server Details |
|---|---|
Name: dbvlab01 Hosted: Oracle Virtualbox Running Locally vCPUs : 2 OS: Oracle linux EL6 Memory : 3G Storage : 60G Version: 11.2.0.4 Edition: Enterprise Edition Database : XE Dbvisit Base: /usr/dbvisit/standby Standby Version: 8.0.20 | Name: dbvaws01 Hosted: Amazon AWS EC2 vCPUs : 1 OS: Oracle Linux EL7 Memory : 2G Storage : 30G Version: 11.2.0.4 Edition: Enterprise Edition Database : XE Dbvisit Base: /usr/dbvisit/standby Standby Version: 8.0.20 |
2.2 Preparing the AWS Standby Instance: dbvaws01
Connect to the server with key pair specified on creation (dbvAWS) as the ec2-user and 'sudo su -' to the root user. As the root user, prepare the directory that will be the Dbvisit Standby Base.
Lorraines-MBP:Downloads landers$ ssh -i dbvAWS.pem ec2-user@dbvaws01
[ec2-user@ip-172-31-13-235 ~]$ sudo su -
[root@ip-172-31-13-235 ~]# cd /usr
[root@ip-172-31-13-235 usr]# mkdir dbvisit
[root@ip-172-31-13-235 usr]# chown oracle:oinstall dbvisitThe latest version of the Dbvisit Standby software has already been downloaded locally. As the ec2-user, scp this to the instance, then as root change the ownership and unpack the installation files.
Lorraines-MBP:Downloads landers$ scp -i dbvAWS.pem dbvisit-standby8.0.20-el7.zip ec2-user@52.38.136.118:/tmp
dbvisit-standby8.0.20-el7.zip 100% 71MB 5.5MB/s 00:13
[root@ip-172-31-13-235 usr]# chown oracle:oinstall /tmp/dbvisit-standby8.0.20-el7.zip
[root@ip-172-31-13-235 tmp]# su - oracle
[oracle@ip-172-31-13-235 ~]$ cd /tmp
[oracle@ip-172-31-13-235 tmp]$ unzip dbvisit-standby8.0.20-el7.zip
Archive: dbvisit-standby8.0.20-el7.zip
inflating: dbvisit-standby8.0.20-el7.tar
[oracle@ip-172-31-13-235 tmp]$ tar -xvf dbvisit-standby8.0.20-el7.tar
[oracle@ip-172-31-13-235 tmp]$ cp dbvisit-standby8.0.20-el7.tar /home/oracle
At this point, we will take an Amazon machine image of dbvaws01. It has the binaries copied over to /home/oracle (/tmp is storage that is lost on instance shutdown), the /usr/dbvisit directory in place with the correct permissions and the oracle user correctly installed. This image will be used when launching a second machine for the AWS Primary to AWS Standby guide.