VIRTUALIZATION AND CLUSTER IN CAPITAL BANK: Difference between revisions
No edit summary |
|||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
[[category: | [[category:Capital Bank]] | ||
=='''DOCUMENT OF VIRTUALIZATION AND CLUSTER IN CAPITAL BANK'''== | |||
= Configurations on RHEL = | |||
# Base system information | # Base system information | ||
# Virtualization | # Virtualization | ||
| Line 9: | Line 9: | ||
# Problems | # Problems | ||
=='''Base systems'''== | |||
Operating system : RHEL5.5(64bit) | Operating system : RHEL5.5(64bit) | ||
| Line 26: | 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 36: | Line 36: | ||
Virtual Servers on | '''Virtual Servers on DATABASE server''' | ||
| Line 44: | Line 44: | ||
'''Configuration of each virtual machine''' | =='''Configuration of each virtual machine'''== | ||
'''CBS-APP1.capital.clab''' | '''CBS-APP1.capital.clab''' | ||
| Line 73: | 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 141: | 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 211: | Line 212: | ||
'''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 221: | 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 385: | 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 | ||
Latest revision as of 07:11, 4 September 2013
DOCUMENT OF VIRTUALIZATION AND CLUSTER IN CAPITAL BANK[edit]
Configurations on RHEL[edit]
- Base system information
- Virtualization
- Cluster
- 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
- CBS-APP-PROD.capital.clab(for APPLICATION server)
- 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
- 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
- Create one file ifcfg-bridge0 in /etc/sysconfig/network-scripts/
DEVICE=bridge0
TYPE=Bridge
BOOTPROTO=static
ONBOOT=yes
DELAY=0
- service network restart
- 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



























