Jump to content

VIRTUALIZATION AND CLUSTER IN CAPITAL BANK: Difference between revisions

From TetraWiki
VIRTUALIZATION AND CLUSTER IN CAPITAL BANK
 
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''DOCUMENT OF VIRTUALIZATION AND CLUSTER IN CAPITAL BANK'''
[[category:Capital Bank]]


=='''DOCUMENT OF VIRTUALIZATION AND CLUSTER IN CAPITAL BANK'''==


= Configurations on RHEL =
# Base system information
# Base system information
# Virtualization
# Virtualization
Line 7: Line 9:
# Problems
# Problems


# '''Base systems'''
=='''Base systems'''==


Operating system : RHEL5.5(64bit)
Operating system : RHEL5.5(64bit)
Line 24: Line 26:
# CBS-DB-PROD.capital.clab(for DATABASE server)
# CBS-DB-PROD.capital.clab(for DATABASE server)


'''VIRTUALIZATION'''
=='''VIRTUALIZATION'''==


Virtual Servers on APPLICATION server
'''Virtual Servers on APPLICATION server'''




Line 34: Line 36:




Virtual Servers on DATABSE server
'''Virtual Servers on DATABASE server'''




Line 42: Line 44:




'''Configuration of each virtual machine'''
=='''Configuration of each virtual machine'''==


'''CBS-APP1.capital.clab'''
'''CBS-APP1.capital.clab'''
Line 71: Line 73:
'''CBS-APP2.capital.clab'''
'''CBS-APP2.capital.clab'''


Virtualization-Full virtualization
=Virtualization-Full virtualization=


Image location:/var/libvirt/images/CBS-APP2.img
Image location:/var/libvirt/images/CBS-APP2.img
Line 139: Line 141:
/orabkup 290GB
/orabkup 290GB


=Implementation=


NOTE:-In kvm unlike of xen you wont found inbuilt bridge,so you need to bridge one nic as bridge.
NOTE:-In kvm unlike of xen you wont found inbuilt bridge,so you need to bridge one nic as bridge.
Line 185: Line 188:
Follow the below print screens.
Follow the below print screens.


[[Image:]]
[[Image:Capital1.png]]




[[Image:]]
[[Image:Capital2.png]]




[[Image:]]
[[Image:Capital3.png]]




[[Image:]]
[[Image:Capital4.png]]




[[Image:]]
[[Image:Capital5.png]]




[[Image:]]
[[Image:Capital6.png]]




[[Image:]]
[[Image:Capital7.png]]




[[Image:]]
[[Image:Capital8.png]]




'''Problem which can occur.'''
=='''Problem which can occur.'''==


Now the virtual machine are ready.but if i m attaching the shared storage between those virtual machines,one problem will occur.
Now the virtual machine are ready.but if i m attaching the shared storage between those virtual machines,one problem will occur.
Line 219: Line 222:
As chache=on,so we need to disable the cache of each vm.
As chache=on,so we need to disable the cache of each vm.


==Final configuration==


Final configuration file of each vm should look like the following
Final configuration file of each vm should look like the following
Line 383: Line 388:
login in browser by url [https://CBS-APP-PROD.capital.clab:8084/ https://CBS-APP-PROD.capital.clab:8084]
login in browser by url [https://CBS-APP-PROD.capital.clab:8084/ https://CBS-APP-PROD.capital.clab:8084]


==Application Cluster ==


First I created application cluster
First I created application cluster
Line 406: Line 412:




[[Image:]]
[[Image:Capital9.png]]




[[Image:]][[Image:]]
[[Image:Capital10.png]][[Image:Capital11.png]]




[[Image:]]
[[Image:Capital12.png]]




[[Image:]]
[[Image:Capital13.png]]




[[Image:]]
[[Image:Capital14.png]]




Line 426: Line 432:
Now the base cluster
Now the base cluster


[[Image:]]
[[Image:Capital15.png]]




[[Image:]]
[[Image:Capital17.png]]




[[Image:]]
[[Image:Capital18.png]]




[[Image:]]
[[Image:Capital19.png]]




[[Image:]]
[[Image:Capital20.png]]




[[Image:]]
[[Image:Capital21.png]]




Line 470: Line 476:
Exported storage in vm as virtio disk,and created the partitions as file system ext3
Exported storage in vm as virtio disk,and created the partitions as file system ext3


[[Image:]]
[[Image:Capital22.png]]




[[Image:]]
[[Image:Capital23.png]]




[[Image:]]
[[Image:Capital24.png]]




[[Image:]]
[[Image:Capital25.png]]




[[Image:]]
[[Image:Capital26.png]]




[[Image:]]
[[Image:Capital27.png]]




[[Image:]]
[[Image:Capital28.png]]




[[Image:]]
[[Image:Capital29.png]]

Latest revision as of 07:11, 4 September 2013


DOCUMENT OF VIRTUALIZATION AND CLUSTER IN CAPITAL BANK[edit]

Configurations on RHEL[edit]

  1. Base system information
  2. Virtualization
  3. Cluster
  4. Problems

Base systems[edit]

Operating system : RHEL5.5(64bit)

Hard disk=793GB(after RAID5 configuration)

RAM=16GB

Partition: Created default partition(for two dc servers)

Packages selected:Selected all packages including cluster and virtualization package with all optional packages but excluding games and mysql.

Hostname for dc servers

  1. CBS-APP-PROD.capital.clab(for APPLICATION server)
  2. CBS-DB-PROD.capital.clab(for DATABASE server)

VIRTUALIZATION[edit]

Virtual Servers on APPLICATION server


CBS-APP1.capital.clab

CBS-DB2.capital.clab


Virtual Servers on DATABASE server


CBS-APP2.capital.clab

CBS-DB1.capital.clab


Configuration of each virtual machine[edit]

CBS-APP1.capital.clab

Virtualization-Full virtualization

Image location:/var/libvirt/images/CBS-APP1.img

Harddisk assined: 350GB

RAM:6GB

CPU CORES=2

Partitions:

/ 40GB

/tmp4GB

Swap6GB

/app40GB

/appbkup 250GB


CBS-APP2.capital.clab

Virtualization-Full virtualization[edit]

Image location:/var/libvirt/images/CBS-APP2.img

Harddisk assined: 350GB

RAM:6GB

CPU CORES=2

Partitions:

/ 40GB

/tmp4GB

Swap6GB

/app40GB

/appbkup 250GB


CBS-DB1.capital.clab

Virtualization-Full virtualization

Image location:/var/libvirt/images/CBS-DB1.img

Harddisk assined: 350GB

RAM:7GB

CPU CORES=4

Partitions:

/ 40GB

/tmp4GB

Swap6GB

/orabkup 290GB


CBS-DB2.capital.clab

Virtualization-Full virtualization

Image location:/var/libvirt/images/CBS-DB2.img

Harddisk assined: 350GB

RAM:7GB

CPU CORES=4

Partitions:

/ 40GB

/tmp4GB

Swap6GB

/orabkup 290GB

Implementation[edit]

NOTE:-In kvm unlike of xen you wont found inbuilt bridge,so you need to bridge one nic as bridge.

Follow the steps to make Ethernet bridged.

Suppose if you want to make eth0 as bridge

  1. go to vi /etc/sysconfig/network-scripts/ifcfg-eth0

Add the highlighted line


# Intel Corporation 82576 Gigabit Network Connection

DEVICE=eth0

BOOTPROTO=dhcp

HWADDR=00:25:90:20:8d:3e

ONBOOT=yes

BRIDGE=bridge0

TYPE=Ethernet


  1. Create one file ifcfg-bridge0 in /etc/sysconfig/network-scripts/

DEVICE=bridge0

TYPE=Bridge

BOOTPROTO=static

ONBOOT=yes

DELAY=0

  1. service network restart
  2. Your bridge is ready

Now create the virtual machine either by virt-install or with gui virt-manager.

Follow the below print screens.









Problem which can occur.[edit]

Now the virtual machine are ready.but if i m attaching the shared storage between those virtual machines,one problem will occur.

If you write any data with first virtual machine in storage,data will not get displayed on second virtual machine in the same storage.

This above problem occurs because each vm built on kvm,is having default configuration

As chache=on,so we need to disable the cache of each vm.


Final configuration[edit]

Final configuration file of each vm should look like the following


<domain type='kvm'>

<name>CBS-DB2</name>

<uuid>c4dbb197-ac51-7803-bd09-0f713145a2d2</uuid>

<memory>7168000</memory>

<currentMemory>7168000</currentMemory>

<vcpu>8</vcpu>

<os>

<type arch='x86_64' machine='rhel5.4.0'>hvm</type>

<boot dev='hd'/>

</os>

<features>

<acpi/>

<apic/>

<pae/>

</features>

<clock offset='utc'/>

<on_poweroff>destroy</on_poweroff>

<on_reboot>restart</on_reboot>

<on_crash>restart</on_crash>

<devices>

<emulator>/usr/libexec/qemu-kvm</emulator>

<disk type='file' device='disk'>

<driver name='qemu' cache='none'/>

<source file='/var/lib/libvirt/images/CBS-DB2.img'/>

<target dev='vda' bus='virtio'/>

<shareable/>

</disk>

<disk type='block' device='cdrom'>

<target dev='hdc' bus='ide'/>

<readonly/>

</disk>

<disk type='block' device='disk'>

<driver name='qemu' cache='none'/>

<source dev='/dev/sdb'/>

<target dev='vdb' bus='virtio'/>

<shareable/>

</disk>

<interface type='bridge'>

<mac address='54:52:00:6e:2d:29'/>

<source bridge='bridge0'/>

<model type='virtio'/>

</interface>

<serial type='pty'>

<source path='/dev/pts/2'/>

<target port='0'/>

</serial>

<console type='pty' tty='/dev/pts/2'>

<source path='/dev/pts/2'/>

<target port='0'/>

</console>

<input type='mouse' bus='ps2'/>

<graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>

</devices>

</domain>


CLUSTER


IPMI CONFIGURATION


Service ipmi restart

dmesg(check ipmi no errors should come)

ipmitool lan print 1(Displayrint ipmi chanel 1 configuration)

ipmitool lan set 1 ipsrc static

ipmitool lan set 1 ipaddr 192.168.0.46

ipmitool lan set 1 netmask 255.255.255.0

ipmitool lan set 1 arp respond on

ipmitool lan set 1 arp generate on

ipmitool lan set 1 arp interval 5

ipmitool lan set 1 user

ipmitool lan set 1 access on

ipmitool userlist


Now we will create cluster on CBS-APP-PROD.capital.clab

There will be two cluster one for application virtual machine and other for run fence_xvmd agent.


luci_admin init


username: admin

password: capital123


service ricci start

service luci restart


login in browser by url https://CBS-APP-PROD.capital.clab:8084

Application Cluster[edit]

First I created application cluster


In order to provide fencing for virtual guests running in a cluster, the physical host systems must also be in a cluster of their own. For instance, HostA and HostB may be physical systems running KVM or Xen, and GuestA, GuestB, GuestC, and GuestD are virtual guests running on both hosts. ClusterA would have HostA and HostB as cluster nodes, whereas,ClusterB would be comprised of Guests A-D as nodes. These two clusters cannot share,any members.Red Hat Enterprise Linux Cluster provides the fence_xvmd daemon, which runs on the virtualization hosts to track the location and status of virtual cluster nodes, and listens for fencing requests from those nodes. These virtual nodes send the fencing requests using the fence_xvm agent, which sends a multicast request to the host cluster along with the libvirt domain name of the guest to be fenced. When the virtualization host receives this request,and authenticates it, it uses the libvirt interfaces to destroy and restart the errant guest.

Authentication

In order for the host nodes to be able to authenticate fencing requests from the guest

cluster, each node must possess the same key to use for packet hashing and SHA

authentication. This key can be created on any one of the host or guest systems like so:


# dd if=/dev/urandom of=/etc/cluster/fence_xvm.key bs=4096 count=1


This key should then be copied to /etc/cluster/fence_xvm.key on every virtual host and

Guest.







With this application cluster configuration over.


Now the base cluster







Now cluster on CBS-DB-PROD.capital.clab

luci_admin init


username: admin

password: capital123


service ricci start

service luci restart


login in browser by url https://CBS-DB-PROD.capital.clab:8084


Name of cluster db_clust


In this cluster,We have used storage (DAS box),with file system ext3.


Exported storage in vm as virtio disk,and created the partitions as file system ext3