Tuesday, January 22, 2013

Installing EBS R12.1.3 using Oracle VM Template without VM Server & Manager (Part 3 of 4)

Section 4 –  Configuring Application Tier Template
We need to perform the exact same steps as we did for Database template configuration with few additional steps.  Below screen shot just summarizes what all need to be done before we checkout the additional steps involved. If you want details of each one then please follow the details below otherwise skip the duplicate steps and check only additional steps
Booting Linux in Rescue Mode – Start the Virtual Machine created for Application Server. Make sure the Linux bootable disk are inserted into CDROM / ISO Image and its supposed to boot from CD-ROM.

Enter ‘Linux Rescue’ at the prompt and enter to boot linux in rescue mode.
Choose the language and Keyboard layout

Configure both the network interfaces (eth0 and eth1). Right now we can just make it to use the IP address from DHCP, that will do the job. If you are confident enough your manual configuration will work and accessible from HOST along with Guest able to access the internet.
Just enable IPv4 support, that will do the job.
Used DHCP to obtain IP information.
Now we are done with configuring the first network adapter (i.e Host-Only adapter – used to connect the Guest Machine from HOST). Same we did we have to configure the second network adapter (i.e NAT adapter – it will be used to connect to the internet to download and update kernel files). Same can be achieved by browsing the files from installation media.

Now click on Continue and make a note of the mount point where system has been mounted. We need to access that to make the system work.
Click OK to return to shell prompt.  As instructed in the above screen shot please go to root environment by running command: chroot /mnt/sysimage

To proceed further we have two ways to accessing the virtual machine:
  • Access from VM Console
  • Access from HOST system. To use this we need to enable ‘sshd’ services in VM console before it can be used.
Use command:
service sshd start
Update the configuration files –

The kernels that are loaded while we booted the system in rescue mode supports Xen Kernel, where as our target kernel will going to support that. To make it work we need to modify modprobe.conf and install new kernel.

Before modifying the modprobe.conf its better to make a copy of it, so if something goes wrong we can recover that.
[root@localhost ~]# cp /etc/modprobe.conf /etc/modprobe.conf.xen
[root@localhost ~]# cat /etc/modprobe.conf
alias eth0 xennet
alias scsi_hostadapter xenblk
[root@localhost ~]# vi /etc/modprobe.conf
alias eth0 e1000
alias scsi_hostadapter ata_piix
alias scsi_hostadapter1 ahci
~
[root@localhost ~]# diff /etc/modprobe.conf /etc/modprobe.conf.xen
1,9c1,2
< alias eth0 e1000
< alias scsi_hostadapter ata_piix
< alias scsi_hostadapter1 ahci
---
> alias eth0 xennet
> alias scsi_hostadapter xenblk
[root@localhost ~]#
[root@localhost ~]# vi /etc/fstab
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-VM           swap                    swap    defaults        0 0
LABEL=ebs1211db         /u01                    ext3    defaults        1 0
[root@localhost ~]#
Update the /etc/sysconfig/oraclevm-template to disable automatic template configuration at boot time. Before running the configuration we need to make sure every thing is fine and we can proceed with template configuration. If we don’t disable then we may have to run through the same process again after boot. We could have directly updated the file, but I though its better not to delete content of the file where as just disable it and add a new entry as we needed.

[root@localhost ~]#vi /etc/sysconfig/oraclevm-template
# Template configuration
#
# Allow configuration of the template when the service is enabled
#
#RUN_TEMPLATE_CONF=YES
RUN_TEMPLATE_CONF=NO
~
[root@localhost ~]# grep RUN /etc/sysconfig/oraclevm-template
#RUN_TEMPLATE_CONF=YES
RUN_TEMPLATE_CONF=NO
[root@localhost ~]#
Installing a new Kernel – The kernel that were loaded while booting (Xen) is not going to work with OVM template, to make it work we need to replace it with standard kernel of same version. We could have used the ISO CD-ROM that we used to boot in rescue mode to install standard kernel or we can get it from the internet. I preferred to go over internet (Oracle Public Yum Server) to get the Kernel. That would definitely need an internet connection and the NAT adapter will do the job for us.

Before we install new kernel we need to perform Additional steps. We would like to use our DB server as server to get the updates, otherwise we can connect to internet from application server system and update the kernel. Please perform below steps

[root@localhost]# echo "nameserver 8.8.8.8" > /etc/resolv.conf
[root@localhost]# cat /etc/resolv.conf
nameserver 8.8.8.8
[root@localhost]# nslookup public-yum.oracle.com
Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
public-yum.oracle.com   canonical name = bigip-public-yum.oracle.com.
Name:   bigip-public-yum.oracle.com
Address: 141.146.44.34
[root@localhost]# cat /etc/yum.repos.d
Open the repo file and make sure [ol5_u6_base] is enabled

[root@localhost]# vi public-yum-el5.repo
[root@localhost]# grep -B5 'enabled=1' public-yum-el5.repo | grep ']'
[ol5_u6_base]
Now install Kernel OL5U6 (2.6.18-238) from Oracle public yum server.
[root@localhost]# yum install kernel-2.6.18-238.el5

Press ‘Y’ to download and install the kernel.
Also install ‘screen’ if its not available. For me its not there so I installed it. This will be use full to create saved ssh sessions.

Upon completion create ‘initrd’ for the new kernel.
[root@localhost]# mkinitrd -v -f /boot/initrd-2.6.18-238.el5.img 2.6.18-238.el5
Install ‘Screen’ as we did in database server
[root@localhost ~]# yum install screen
Now rescue taks are done.  We need to restart the system now.

Reboot the Virtual Machine

  • Remove the disk from CD-ROM or change the boot order from Virtual Machine boot setting.
  • Start Virtual Machine and login with root user. The default root user password is ‘ovsroot’ as given in the read me file.
  • The SSH services would be starting automatically this time so no need to start SSH services manually.
Configure Oracle VM Application Tier Server

First we need to enable the OracleVM Template as we disabled it while started the system in rescue mode.

[root@localhost ~]# vi /etc/sysconfig/oraclevm-template
# Template configuration
#
# Allow configuration of the template when the service is enabled
#
RUN_TEMPLATE_CONF=YES
#RUN_TEMPLATE_CONF=NO
~
Start the OracleVM-Template configuration script
[root@localhost ~]# screen –S ebsapp

Now start the OracleVM-Template script
[root@localhost ~]# /etc/init.d/oraclevm-template start
Same as DB server configuration after entering DNS details system will reconfigure network adapter and your current session is gone. After few seconds start a new session with the new IP address we assigned and pull the stored seesion that we created using ‘screen’.

[root@localhost ~]# screen –d -R ebsapp

You session will be recovered, Now we need to enter APPS password to continue (ie. ‘apps’). But before proceeding further we need to perform some of the additional steps.

Update the host file in application tier server: Start a new session and perform below steps

[root@localhost ~]# vi /etc/hosts
[root@localhost ~]# cat /etc/hosts
Ping the DB host from application and make sure its responding
Once done please go back to old session and enter the APPS password (apps) to continue.
Now script will start all the services related to Application Tier.

Now we are done with the installation. Lets see how to use it in our next and last section



Previous-: Section 3 –  Configuring Database Tier Template

2 comments :

  1. Hi Tauseef,

    I followed the steps mentioned in the article. However, while the oraclevm template script was running, it did not prompt me asking if the application services for VIS must be started. It automatically rebooted the system and asked me for root login. Should i make any updates to the template script and try to re-run the oraclevm script?

    Thanks in advance.

    ReplyDelete
    Replies
    1. Hello,

      I believe while oraclevm template was running it complete all the task till starting the service and then restarted with some reason. If this is the case then no need to do any thing with the script.

      But if all the task is not completed, then you to restart the script.

      Delete

SeachBox