At $EMPLOYER we are developing and offering (Java based) COTS Enterprise Software to a wide range of customers. And while it looks like customer demand seem to concentrate on the various Linux enterprise distributions as well as Windows Server, there are of course still customers with different strategic platforms for Mission Critical applications. This includes AIX, HP-UX and Solaris which we all officially support.
For a specialized ISV it is hard to have test systems for all those platforms combinations and keep up with the latest patches and Java versions. This is especially true if you do not want to maintain a whole datacenter full of test equipment. Luckily most of the system vendors offer some sort of partner program and provide opportunities to test.
HP AllianceONE Partner Program
Today I want to blog about the HP offering called
Cloud Operating Environment (CLOE). As an
HP AllianceOne Partner Program member we have access to this offering and can order virtualized HP-UX machines on a self-service portal for the purpose of porting, integrating and troubleshooting customer problems.
The standard machines offered are OK for installation and compatibility testing or creating documentation for it. Simulating larger environments and doing load-tests requires different agreements.
When ordering a new "Project" you have to give some details about the work you are planning to do (but I had actually never denied any request). Most of the work is related in trying out installer, shell scripts as well as Java dependencies.
Remote Shell Access
After ordering a Server (for example the medium configuration of HP-UX 11i v3 Data Center OE with 2 CPUs, 4GB RAM and 2 x 36GB HDD). After the server is provisioned (which takes about 12 minutes), you will receive an e-mail with the SSH key for root user. This SSH keyfile can be converted into a PuTTY .ppk file with the use of the PuttyGen Tool. The SSH access is the only open incoming network connection, so you need the SSH port forwarding feature available in PuTTY if you want to access or provide remote services.
The login is a bit slow, I discovered, that it helps to put the option
UseDNS no
in
/opt/ssh/etc/sshd_config
to speed up the SSH login process. Otherwise you need to increase login timeout limits of some SFTP tools.
Installing Open Source Software
On the first startup the system is pretty basic, there are only some Open Source goodies installed in /usr/contrib. But it is missing for example a modern shell. We can fix this with the help of the
HP-UX Porting and Archive Centre:
# cd /var/tmp
# /usr/bin/ftp hpux.connect.org.uk
Name: ftp
Password: root@
ftp> cd /hpux/Sysadmin/depothelper-2.00/
ftp> get depothelper-2.00-ia64-11.31.depot.gz
ftp> quit
# /usr/contrib/bin/gunzip depothelper-2.00-ia64-11.31.depot.gz
# /usr/sbin/swinstall -s /var/tmp/depothelper-2.00-ia64-11.31.depot depothelper
...
# /usr/local/bin/depothelper curl bash
# /usr/local/bin/bash
Bash-4.2$
Using remote X11
If you need to run applications with a graphical user interface, you need a way to display X11 sessions. There are basically two options.
The first is, you install locally (on your PC) a X Window server (like
Xming) and then set the X11 DISPLAY variable to a port which is forwarded by SSH back to your desktop. This requires no additional software on HP-UX side, but is not very fast. Another problem is, that if you lose the SSH connection all GUI applications on the remote side will be terminated.
So the better option is to use a X11 simulating server on the HP side and connect to it. This allows to re-attach the session. Xvnc is a X11 server which can do that. It runs on the HP server talking X11 protocol to the local clients and publishes the frame buffer via VNC protocol. On the PC you only need a VNC client and connect (via a SSH port tunnel) to the remote. Unfortunately HP offers no Xvnc out of the box. But you can buy a version from
RealVNC. There is also an older 4.1.2 PARISC binary floating around on the Internet which does not require a commercial license and works fine in the Aeries emulator:
# cd /var/tmp
# export PATH=$PATH:/usr/local/bin
# curl -o vnc-4_1_2-parisc_hpux.depot.gz http://www.grossmatten.ch/share-freeware/Network/VNC/4.1/vnc-4_1_2-parisc_hpux.depot.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1767k 100 1767k 0 0 158k 0 0:00:11 0:00:11 --:--:-- 182k
# /usr/contrib/bin/gunzip vnc-4_1_2-parisc_hpux.depot.gz
# /usr/sbin/swinstall -s /var/tmp/vnc-4_1_2-parisc_hpux.depot VNC
...
# vncpasswd
Password:
Verify:
# vncserver
xauth: creating new authority file //.Xauthority
New 'aps39-92:1 (root)' desktop is aps39-92:1
Creating default startup script //.vnc/xstartup
Starting applications specified in //.vnc/xstartup
Log file is //.vnc/aps39-92:1.log
After this you need to forward port 5901 in PuTTY to localhost:5901 on remote, and can connect with a VNC Viewer on your Desktop.
Expanding Filesystem Capacity
The next task is, that the default filesystems are sized too small to install additional software, so you need to get access to the additional capacity. As I am not a HP-UX expert and I could not find a good tutorial on that, here is my attempt to mount the second disk and to increase the /var filesystem with the remaining LVM extends (I did not setup a LVM for the second disk to keep the two devices independent for better snapshotting):
# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 1048576 176080 865720 17% /
/dev/vg00/lvol1 1835008 167008 1655064 9% /stand
/dev/vg00/lvol8 4718592 899128 3794848 19% /var
/dev/vg00/lvol7 5472256 3340744 2114872 61% /usr
/dev/vg00/lvol4 524288 21200 499160 4% /tmp
/dev/vg00/lvol6 8708096 5689992 2994560 66% /opt
/dev/vg00/lvol5 106496 5792 99928 5% /home
# for i in /dev/disk/*; do diskowner -AF $i; done | grep -v ioerror
path=/dev/disk/disk4:owner=partition.vxfs
path=/dev/disk/disk4_p1:owner=vxfs
path=/dev/disk/disk4_p2:owner=lvm.vxfs
path=/dev/disk/disk4_p3:owner=vxfs
path=/dev/disk/disk5:owner=vxfs
# vgdisplay -v
…
--- Physical volumes ---
PV Name /dev/disk/disk4_p2
PV Status available
Total PE 4495
Free PE 1247
Autoswitch On
Proactive Polling On
# lvdisplay /dev/vg00/lvol8
--- Logical volumes ---
LV Name /dev/vg00/lvol8
…
LV Size (Mbytes) 4608
Current LE 576
Allocated PE 576
# lvextend -l $[576+1247] /dev/vg00/lvol8
Logical volume "/dev/vg00/lvol8" has been successfully extended.
# lvdisplay /dev/vg00/lvol8
...
LV Size (Mbytes) 14584
# fsadm -b 14584m /var
fsadm: /etc/default/fs is used for determining the file system type
vxfs fsadm: V-3-23585: /dev/vg00/rlvol8 is currently 4718592 sectors - size will be increased
# mkfs -F vxfs /dev/disk/disk5
version 6 layout
37748736 sectors, 37748736 blocks of size 1024, log size 16384 blocks
largefiles supported
# mkdir /u01
# echo "/dev/disk/disk5 /u01 vxfs delaylog 0 3" >> /etc/fstab
# mount /u01
# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 1048576 176080 865720 17% /
/dev/vg00/lvol1 1835008 167008 1655064 9% /stand
/dev/vg00/lvol8 14934016 899496 13930104 6% /var
/dev/vg00/lvol7 5472256 3340744 2114872 61% /usr
/dev/vg00/lvol4 524288 21200 499160 4% /tmp
/dev/vg00/lvol6 8708096 5689992 2994560 66% /opt
/dev/vg00/lvol5 106496 5792 99928 5% /home
/dev/disk/disk5 37748736 26333 35364760 0% /u01
The fsadm command to online-resize the filesystem is only available in the Data Center OE, the Base Operating Environment has not the required license option "Online JFS" activated
In the next article I will have a look at installing patches and Quality Packs.
Update 2012-05-13: How to get Started presentation from HP:
http://h20195.www2.hp.com/V2/GetDocument.aspx?docname=c03201145.
My Blog article is
featured by @HPAllianceOne on Twitter.