r1 - 08 Oct 2008 - 17:13:43 - EricTYou are here: Wiki >  AppLogic24 Web > CatGenericLUX64Cid
ALERT! AppLogic 2.4 Documentation The latest production release is AppLogic 3.0.30

Implementation Notes

Base Class

LUX64 is a base class, it is build on a physical server and then the volumes are pushed into the appliance.

Class Volumes

The boot volume LUX64 is based on 64-bit CentOS 5. Below is a list of the software packages installed on LUX64.

Installed Packages.

  • audit-libs-1.3.1-1.el5
  • basesystem-8.0-5.1.1.el5.centos
  • bash-3.1-16.1
  • beecrypt-4.1.2-10.1.1
  • bzip2-1.0.3-3
  • bzip2-libs-1.0.3-3
  • centos-release-5-0.0.el5.centos.2
  • centos-release-notes-5.0.0-2
  • chkconfig-1.3.30.1-1
  • coreutils-5.97-12.1.el5
  • cpio-2.6-20
  • cracklib-2.8.9-3.1
  • cracklib-dicts-2.8.9-3.1
  • crontabs-1.10-8
  • cyrus-sasl-lib-2.1.22-4
  • db4-4.3.29-9.fc6
  • db4-4.3.29-9.fc6
  • device-mapper-1.02.13-1.el5
  • diffutils-2.8.1-15.2.2
  • e2fsprogs-1.39-8.el5
  • e2fsprogs-libs-1.39-8.el5
  • ed-0.2-38.2.2
  • elfutils-libelf-0.125-3.el5
  • ethtool-5-1.el5
  • expat-1.95.8-8.2.1
  • file-4.17-8
  • filesystem-2.4.0-1.el5.centos
  • findutils-4.2.27-4.1
  • gawk-3.1.5-14.el5
  • gdbm-1.8.0-26.2.1
  • gdbm-1.8.0-26.2.1
  • glib2-2.12.3-2.fc6
  • glibc-2.5-12
  • glibc-2.5-12
  • glibc-common-2.5-12
  • grep-2.5.1-54.2.el5
  • gzip-1.3.5-9.el5.centos
  • info-4.8-14.el5
  • initscripts-8.45.14.EL-1.el5.centos.1
  • iproute-2.6.18-4.el5
  • iputils-20020927-43.el5
  • krb5-libs-1.5-17
  • less-394-5.el5
  • libacl-2.2.39-1.1
  • libattr-2.4.32-1.1
  • libcap-1.10-26
  • libgcc-4.1.1-52.el5
  • libgcc-4.1.1-52.el5
  • libhugetlbfs-1.0.1-1.el5
  • libhugetlbfs-lib-1.0.1-1.el5
  • libselinux-1.33.4-2.el5
  • libselinux-python-1.33.4-2.el5
  • libsemanage-1.9.1-3.el5
  • libsepol-1.15.2-1.el5
  • libstdc++-4.1.1-52.el5
  • libstdc++-4.1.1-52.el5
  • libsysfs-2.0.0-6
  • libtermcap-2.0.8-46.1
  • libtermcap-2.0.8-46.1
  • libuser-0.54.7-2.el5.1
  • libvolume_id-095-14.5.el5
  • logrotate-3.7.4-7
  • m2crypto-0.16-6.el5.1
  • MAKEDEV-3.23-1.2
  • mcstrans-0.1.10-1.el5
  • mingetty-1.07-5.2.2
  • mktemp-1.5-23.2.2
  • module-init-tools-3.3-0.pre3.1.16.el5
  • ncurses-5.5-24.20060715
  • net-tools-1.60-73
  • newt-0.52.2-9
  • openldap-2.3.27-5
  • openssh-4.3p2-16.el5
  • openssh-clients-4.3p2-16.el5
  • openssh-server-4.3p2-16.el5
  • openssl-0.9.8b-8.3.el5
  • pam-0.99.6.2-3.14.el5
  • passwd-0.73-1
  • patch-2.5.4-29.2.2
  • pcre-6.6-1.1
  • perl-5.8.8-10
  • perl-5.8.8-10
  • popt-1.10.2-37.el5
  • procps-3.2.7-8.1.el5
  • psmisc-22.2-5
  • python-2.4.3-19.el5
  • python-elementtree-1.2.6-5
  • python-sqlite-1.1.7-1.2.1
  • python-urlgrabber-3.1.0-2
  • readline-5.1-1.1
  • readline-5.1-1.1
  • rpm-4.4.2-37.el5
  • rpm-libs-4.4.2-37.el5
  • rpm-python-4.4.2-37.el5
  • sed-4.1.5-5.fc6
  • setup-2.5.58-1.el5
  • shadow-utils-4.0.17-12.el5
  • slang-2.0.6-4.el5
  • sqlite-3.3.6-2
  • sysfsutils-2.0.0-6
  • sysklogd-1.4.1-39.2
  • SysVinit? -2.86-14
  • tar-1.15.1-23.el5
  • tcp_wrappers-7.6-40.2.1
  • termcap-5.5-1.20060701.1
  • tmpwatch-2.9.7-1.1.el5.1
  • tzdata-2006m-2.fc6
  • udev-095-14.5.el5
  • usermode-1.88-3.el5
  • util-linux-2.13-0.44.el5
  • vim-minimal-7.0.109-3
  • vixie-cron-4.1-66.1.el5
  • wget-1.10.2-7.el5
  • which-2.16-7
  • xen-ukrnl-3.2-1
  • xen-umods-3.2-1
  • yum-3.0.5-1.el5.centos.2
  • zlib-1.2.3-3

Re-install Procedure

Here are the steps needed to create a LUX64 (tested on applogic 2.2.0)

  1. Install centos 5 on a physical server from th efirst cd with this ks file (network configuration and root password should be changed). To use the ks file, type on the centos boot prompt: linux text ks=hd:sdb1/ks.cfg . This example assumes that you have the ks.cfg file on a separate disk (usb pendrive also works), you can boot the file from the cd (you need to rebuild the cd) or from the network
  2. After the installation is complete, login the the server and do
       cp -a /{bin,boot,dev,etc,home,lib,lib64,media,opt,root,sbin,srv,usr,var} /mnt/
       mkdir /mnt/{mnt,proc,sys,tmp}
       chmod 755 /mnt/mnt /mnt/sys/
       chmod 555 /mnt/proc/
       chmod 1777 /mnt/tmp/
       rpm --root /mnt -e audit-libs-python authconfig policycoreutils selinux-policy selinux-policy-targeted setools checkpolicy kernel-headers cryptsetup-luks dbus-glib hal kudzu Deployment_Guide-en-US dhclient dhcpv6_client dmidecode hdparm hwdata iptables iptables-ipv6 kbd  libgcrypt libgpg-error libusb libxml2 libxml2-python pciutils pm-utils  prelink rhpl rootfiles setserial system-config-securitylevel-tui tcl wireless-tools dbus 
       rpm --root /mnt -e kernel
       rpm --root /mnt --allmatches -e nash lvm2 dmraid grub  kpartx lvm2 mkinitrd nash redhat-logos
       
  3. install xen DomU kernel and modules. The actual package versions will depend on the applogic version. The example below is for applogic 2.2, use the rpms that come in the applogic install directory for the current release
       rpm --root /mnt -Uv  xen-ukrnl-3.2-1.x86_64.rpm  xen-umods-3.2-1.x86_64.rpm
       
  4. Configure log rotation
    • edit /mnt/etc/logrotate.conf and set 'size 512k' and ensure rotate is set to 4
  5. Cleanup
       chroot /mnt rpm -v --rebuilddb
       rm -f /mnt/root/anaconda-ks.cfg /mnt/root/install.log /mnt/root/install.log.syslog /mnt/root/.lesshst
       rm -rf /mnt/usr/share/doc/*
       rm -rf /mnt/usr/share/man/*
       rm -rf /mnt/boot/grub
       find /mnt/var/log/ -type f -exec rm -f {} \;
       rm -f /mnt/etc/sysconfig/network-scripts/ifcfg-eth*
       rm -f /mnt/etc/sysconfig/network-scripts/route-eth*
       echo -n "" > /mnt/etc/resolv.conf
       echo "127.0.0.1 localhost.localdomain localhost" > /mnt/etc/hosts
       touch /mnt/etc/applogic_network.conf
       cd /mnt/usr/lib/locale/ && for dir in *; do [ ! "$dir" == "en_US" ] && [ ! "$dir" == "en_US.iso885915" ] && [ ! "$dir" == "en_US.utf8" ] && rm -rf $dir; done
       cd /mnt/usr/share/locale/ && for dir in *; do [ ! "$dir" == "en" ] && [ ! "$dir" == "en_GB" ] && [ ! "$dir" == "en_US" ] && rm -rf $dir; done
       
  6. Copy files %NOTE: The atached files are part of applogic 2.2.0, you should get the files from the latest applogic version.
  7. Setup init scripts
       chroot /mnt chkconfig --add applogic_appliance
       chroot /mnt chkconfig --add applogic_cca
       chroot /mnt chkconfig --add applogic_network
       chroot /mnt chkconfig --add applogic_vma
       
  8. Change files
    1. Edit fstab
    2. Disable password logins and PAM in sshd config
    3. Enable arp_ignore
    4. Fix applogic prompt
    5. Disable ttys > 1
  9. Create images
       dd if=/dev/zero of=/tmp/LUX64.boot.img bs=1k seek=290k count=1k
       dd if=/dev/zero of=/tmp/LUX64.usr.img bs=1k seek=290k count=1k
       mkfs -t ext3 -F /tmp/LUX64.usr.img
       mkfs -t ext3 -F /tmp/LUX64.boot.img
       mount -o loop /tmp/LUX64.usr.img /media/
       mv /mnt/usr/* /media/
       umount /media/
       mount -o loop /tmp/LUX64.boot.img /media/
       mv /mnt/* /media/
       umount /media/
       gzip /tmp/LUX64.usr.img
       gzip /tmp/LUX64.boot.img
       
  10. Crate an application in EDT named myapp
  11. add a new singleton
  12. Edit:
    • name: LUX64
    • Category: Generic
    • Description: Generic 64-bit Centos 5-based appliance (version 0.0.1)
    • kernel + initrd: /boot/vmlinuz-2.6.18-xenU, /boot/initrd-2.6.18-xenU.img
    • terminals: add mon out terminal (proto cce, not mendatory)
    • volumes:
      • boot, instantiable, mount on /dev/hda1, 300M, fs: ext3, boot
      • usr, type common, mount on /dev/hda2, 300M, fs: ext3, shared, ro
      • resources: see data sheet
  13. export application
    app export myapp myapp
  14. upload new images to the vol directory of your exported application
       # Example:
       sftp -o 'StrictHostKeyChecking no' -o "IdentitiesOnly yes"  -o "IdentityFile ~/.ssh/applogic" root@ev1.3tera.net:/_impex/myapp/vol
       # on the command prompt
       put LUX64.usr.img.gz
       put LUX64.boot.img.gz
       
  15. import the application with the new volumes
    app import myapp2 myapp
  16. resize volumes
       vol resize myapp2:LUX64.boot size=110M
       vol resize myapp2:LUX64.usr size=140M
       
  17. Move to catalog
    class move  myapp2:LUX64 /user:LUX64

-- EricT - 09 Oct 2008

 
Copyright © CA 2005-2011. All Rights Reserved.
%