r8 - 12 Oct 2007 - 16:50:21 - BeckyHYou are here: Wiki >  AppLogic2 Web > CatServerLinux64Cid
ALERT! AppLogic 2.1/2.2 Documentation The latest production release is AppLogic 2.9.9

LINUX64 - Linux Server based on CentOS 5 (64bit) - Implementation Design

Base Class

LINUX64 is a base class created from a CentOS? 5 installation on hardware

Class Volumes

LINUX64 consists of the following class volumes:

  • boot volume, 2.5 GB size, mounted as "/", writable, instantiable.

Packages

Contents of the release directory:

Exported appliance images:

  • LINUX64-1.0.0.tar.bz2

Source RPMs:

  • LINUX64-1.0.0-1.x86_64.rpm - Installs appliance-specific files to the boot image

Tests (see the test plan CatServerLinux64TestPlan):

  • linux64-tst-app.tar.bz2 - test application

Re-creating the Appliance

To recreate the LINUX64 appliance:

  1. install CentOS? 5 (64 bit) on native hardware - requires all 7 CDs - The following is a list of instructions for selecting the packages that were installed:
    • Desktop - unselect everything
    • Applications
      • select Editors
      • select Text-based Internet and only select lynx within the optional packages
    • Development
      • Select Development libraries and select ALL optional packages
      • Select Development Tools and unselect the following: frysk, gcc-fortran, dogtail
    • Servers
      • Select Mail Server and include ONLY the following optional packages: cyrus-sasl, exim, sendmail
      • Select Legacy Network and include ONLY the following optional packages: xinetd
      • Select FTP and include NO optional packages
      • Select DNS and include NO optional packages
      • Select Server Configuration Tools and include ONLY the following package: system-config-security-level
    • Base
      • The default packages are fine
    • System Tools - include ONLY the following optional packages: gnutls-utils, mt-st, samba-client, screen
  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/
       
  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
       depmod -a -b /mnt 2.6.18-xenU
       
  4. Update all installed packages with the latest versions
       yum update --all  --installroot /mnt
       
  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/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
       
  6. Copy & modify files
    • install the attached rpm file to install appliance-customization files
       rpm -root /mnt -i linux64-1.0.0-1.x86_64.rpm 
    • install /boot/initrd-2.6.18-xenU.img (copy from a dom0 server in a grid from the current version)
    • modify the root password chroot /mnt passwd --stdin root < /proc/sys/kernel/random/uuid
    • ensure that selinux is disabled - edit /etc/sysconfig/selinux
  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. Disable unnecessary services
       chkconfig kudzu off
       chkconfig bluetooth off
       chkconfig cpuspeed off
       chkconfig restorecond off
       chkconfig mcstrans off
       chkconfig mdmonitor off
       chkconfig hidd off
       chkconfig pcscd off
       chkconfig smartd off
       chkconfig firstboot off
       
  9. Configure log rotation
    • edit /mnt/etc/logrotate.conf and set 'size 512k' and ensure rotate is set to 4
  10. Create images
       dd if=/dev/zero of=/tmp/LINUX64.boot.img bs=1k count=2560k
       mkfs -t ext3 -F /tmp/LINUX64.boot.img
       mount -o loop /tmp/LINUX64.boot.img /media/
       mv /mnt/* /media/
       umount /media/
       gzip /tmp/LINUX64.boot.img
       
  11. Create an application in EDT named myapp
    • add a new singleton
    • Edit:
      • name: LUX64
      • Category: Generic
      • Description: Linux Server based on CentOS? 5 (64bit) (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, 2.5G, fs: ext3, boot
      • resources: see data sheet
  12. export application
       app export myapp myapp
       
  13. 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 LINUX64.boot.img.gz
       
  14. import the application with the new volumes
       app import myapp2 myapp
       
  15. Move to catalog
       class move  myapp2:LINUX64 /user:LINUX64
       

Theory of Operation

None.

Configuration

None.

Log Files

None.

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