Friday, December 11, 2009

Thursday, December 10, 2009

Websphere Cluster Installation

#############To create a new cell##############################
manageprofiles
-create
-templatePath C:\IBM\WebSphere\AppServer\profileTemplates\cell\dmgr
-nodeProfilePath C:\IBM\WebSphere\AppServer\profiles\TSTDMGR
-profileName TSTDMGR
-cellName TSTCELL
-nodeName TSTDMGR
-appServerNodeName TSTPROXY
#############To start deployment manager#######################
startManager
#############To enable security################################
Login to admin console
Enable security
stopManager
startManager
#############To add windows service for DMGR###################
WASService.exe
-add "DMGR"
-serverName "dmgr"
-profilePath "C:\IBM\WebSphere\AppServer\profiles\TSTDMGR"
-wasHome "C:\IBM\WebSphere\AppServer"
-logfile "C:\IBM\WebSphere\AppServer\profiles\TSTDMGR\logs\dmgr\startServer.log"
-logRoot "C:\IBM\WebSphere\AppServer\profiles\TSTDMGR\logs\dmgr"
-stopArgs "-username admin -password password"
-startArgs "-username admin -password password"
#############To create node01###################################
manageprofiles.bat
-create
-profileName "TSTAPP01"
-templatePath "C:\IBM\WebSphere\AppServer\profileTemplates\managed"
-profilePath "C:\IBM\WebSphere\AppServer\profiles\TSTAPP01"
-nodeName "TSTAPP01"
#############To federate node01#################################
addNode tstproxy.example.ca
#############To add windows service for the node################
WASService.exe
-add "NODEAGENT"
-serverName "nodeagent"
-profilePath "C:\IBM\WebSphere\AppServer\profiles\TSTAPP01"
-wasHome "C:\IBM\WebSphere\AppServer"
-logfile "C:\IBM\WebSphere\AppServer\profiles\TSTAPP01\logs\nodeagent\startServer.log"
-logRoot "C:\IBM\WebSphere\AppServer\profiles\TSTAPP01\logs\nodeagent"
-stopArgs "-username admin -password password"
-startArgs "-username admin -password password"
#############To create node02####################################
manageprofiles.bat
-create
-profileName "TSTAPP02"
-templatePath "C:\IBM\WebSphere\AppServer\profileTemplates\managed"
-profilePath "C:\IBM\WebSphere\AppServer\profiles\TSTAPP02"
-nodeName "TSTAPP02"
#############To federate Node02##################################
addNode tstproxy.example.ca
#############To add windows service for the node#################
WASService.exe
-add "NODEAGENT"
-serverName "nodeagent"
-profilePath "C:\IBM\WebSphere\AppServer\profiles\TSTAPP02"
-wasHome "C:\IBM\WebSphere\AppServer"
-logfile "C:\IBM\WebSphere\AppServer\profiles\TSTAPP02\logs\nodeagent\startServer.log"
-logRoot "C:\IBM\WebSphere\AppServer\profiles\TSTAPP02\logs\nodeagent"
-stopArgs "-username admin -password password"
-startArgs "-username admin -password password"
#############To install HTTP Server##############################
Install IBM HTTP Server from the CD
Install Port 80
Admin Port 8008
#############To add the webserver to the admin console###########
System Administration > Nodes > Add Node > Unmanaged >
Servers > Web Servers > New >
Plugin Location = C:\IBM\HTTPServer\Plugins\

Tuesday, December 8, 2009

KVM Setup


KVM Virtualization On Ubuntu Host

################install KVM and vm builder utils#######################
sudo apt-get install kvm kvm-pxe libvirt-bin ubuntu-vm-builder bridge-utils

################install uml utilities##################################
sudo apt-get install uml-utilities

################Test kvm installation##################################
virsh -c qemu:///system list

################/etc/network/interfaces################################
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet manual

#virtual interface
auto br0
iface br0 inet static
address 172.16.2.230
network 172.16.2.0
netmask 255.255.255.0
broadcast 172.16.2.255
gateway 172.16.2.252
bridge_ports eth0
bridge_stp off
bridge_fd 9
bridge_hello 2
bridge_maxwait 12

##############To create virbr0 DHCP####################################
sudo vim /etc/libvirt/qemu/networks/default.xml

#change this to
<network>
<name>default</name>
<bridge name="virbr%d" />
<forward/>
<ip address="192.168.122.1" netmask="255.255.255.0">
<dhcp>
<range start="192.168.122.2" end="192.168.122.254" />
</dhcp>
</ip>
</network>

#this
<network>
<name>default</name>
<bridge name="virbr%d" />
<forward/>
<ip address="10.0.1.1" netmask="255.0.0.0">
<dhcp>
<range start="10.0.1.10" end="10.0.1.100" />
</dhcp>
</ip>
</network>

##############Restart virtual network##################################
sudo virsh net-list
sudo virsh net-destroy default
sudo virsh net-stop default

##############Command to create a new image file#######################
sudo qemu-img create -f qcow win2k3-64.img 10G

##############Command to boot from the disk############################
sudo qemu-system-x86_64 -m 512 -hda win2k3-64.img -cdrom /dev/dvd -boot d -vnc :1

##############Script to generate random MAC address####################
#! /usr/bin/python
# macgen.py script generates a MAC address for Xen guests
#
import random
mac = [ 0x00, 0x16, 0x3e,
random.randint(0x00, 0x7f),
random.randint(0x00, 0xff),
random.randint(0x00, 0xff) ]
print ':'.join(map(lambda x: "%02x" % x, mac))

##############Command to launch the image##############################
sudo qemu-system-x86_64 -hda vms/tstproxy/win2003-64.qcow -m 1024 -net nic,macaddr=00:16:3e:03:d9:5f -net tap -nographic -localtime &
sudo qemu-system-x86_64 -hda vms/tstapp01/win2003-64.qcow -m 2048 -net nic,macaddr=00:16:3e:33:0e:8a -net tap -nographic -localtime &
sudo qemu-system-x86_64 -hda vms/tstapp02/win2003-64.qcow -m 2048 -net nic,macaddr=00:16:3e:3e:7e:14 -net tap -nographic -localtime &

##############Command to check the available memory####################
free -m
free -m -l -s 2

##############Command to list running KVM/QEMU processes###############
ps -A | grep qemu