Test things

From T2B Wiki
Jump to navigation Jump to search

new becms

 New becms group

Evo on linux

 Evo On Linux

Build CMS libxml2+libxslt+clientform+mechanize rpms

  • Goal is to build for slc4_ia32_gcc345 arch
  • Setup i386 SLC4 box
  • install pyvault 24 python
    • verify that python 2.4 is new default
  • get libxml2 and libxslt sources from xmlsoft.org
  • copy to /usr/src/redhat/SOURCES
  • untar and copy the spec file in the tarball
    • rename the release to 1.py24
  • run rpmbuild -bb on the libxml2 spce file and install the rpms
  • repeat with libxslt spec file, no need to install
  • for cleintform and mechanize, i used fc8 src rpms
    • download fc8 src rpms for python-setuptools, python-mechanize and pthon-clientform
    • run rpm -i on the src rpms
    • go to /usr/src/redhat/SPECS
    • rpmbuild -bb python-setuptools.spec
    • rpm -Uvh /usr/src/redhat/RPMS/noarch/python-setuptools-*
    • rpmbuild -bb python-clientform.spec
    • rpmbuild -bb python-mechanize.spec
  • copy the rpms from /usr/src/redhat/RPMS/i386 and /usr/src/redhat/RPMS/noarch/ to wherever you need them

kernel and anaconda patching

sl3 style

SL3 documentaion is hard to find. Original link: http://linux.duke.edu/~mstenner/docs/add-driver

###################################################
# First, get the drivers we need
###################################################

# download driver image to drivers.img
# insert blank disk
cat drivers.img > /dev/fd0

mount /mnt/floppy
mkdir drivers
cp /mnt/floppy/* drivers/
umount /mnt/floppy

cd drivers
gzip -d < modules.cgz | cpio -i --make-directories
# now look in modules.dep to see if you're going to 
# need to get any other modules.
# find the entries for each of the modules you need 
# in modules.dep, modinfo and pcitable
# the actual modules should be in a dir called 2.4.2-2BOOT
# (or something similar - will vary with version)
cd ..

###################################################
# Now, get the files from the bootnet image 
# that we must edit
###################################################

# download bootnet image to bootnet.img
# insert blank disk
cat bootnet.img > /dev/fd0
mount /mnt/floppy
mkdir initrd-mod
cp /mnt/floppy/initrd.img initrd-mod/initrd.img.orig.gz
cd initrd-mod/                # pwd = initrd-mod
gzip -d < initrd.img.orig.gz > initrd.img.orig
cp initrd.img.orig initrd.img.working
mkdir loop
mount -t ext2 -o loop initrd.img.working loop
cd loop/modules               # pwd = initrd-mod/loop/modules
mkdir ../../modules-mod
cp * ../../modules-mod/
cd ../../modules-mod/         # pwd = initrd-mod

###################################################
# Back up these files and edit them
###################################################

for FILE in *; do cp $FILE $FILE.orig; done
# now edit each of (module-info modules.dep pcitable) that you
# need to, adding the entries from the corresponding files on the
# driver disk
gzip -d < modules.cgz | cpio -i --make-directories
# this should make a directory called 2.4.2-2BOOT (depending on
# version).   Put each of the modules that you need from the driver
# disk into this directory.  For example:
cp ../../drivers/2.4.2-2BOOT/3c509.o 2.4.2-2BOOT/

# rebuild the modules.cgz file with
find 2.4.2-2BOOT | cpio -o -H crc | gzip -9 > modules.cgz

###################################################
# Put our changes back into the floppy
###################################################

# copy each of the files that you changed back into
# initrd-mod/loop/modules/
# this includes, of course, modules.cgz

cd ..     # pwd = initrd-mod
umount loop
gzip -9 < initrd.img.working > initrd.img.new
cp initrd.img.new /mnt/floppy/initrd.img
umount /mnt/floppy
============================================================

CB - client

You are advised to use the apt approach for sl3 and yum for sl4, but very probably everything works here.

APT - SL3

  • Now meta-package for the CB-client installation. It installs all aii things + everything needed for panc and svncheck.
    • SL3
  echo "rpm http://mon.iihe.ac.be/ begrid/install/apt cb-v3_i386_sl3 quattor_i386_sl3" > /etc/apt/sources.list.d/cb-v3-sl3.list
    • SL4
  echo "rpm http://mon.iihe.ac.be/ begrid/install/apt cb-v3_i386_sl4 quattor_i386_sl4" > /etc/apt/sources.list.d/cb-v3-sl4.list
    • then do
  apt-get update
  apt-get install cb-client
    • if it seems not to work, check the priorities of current repositories. eg on slc308 you will need to edit /etc/apt/preferences to give a higher priority to packages from mon.iihe.ac.be
  Package: *
  Pin: release o=linux.cern.ch
  Pin-Priority: 980

  Package: *
  Pin: origin mon.iihe.ac.be
  Pin-Priority: 985

YUM - SL4

  • EL3-type:
  echo '[cb-v3]' >> /etc/yum.conf
  echo 'name=CB server - client repo - SL3' >> /etc/yum.conf
  echo 'baseurl=http://mon.iihe.ac.be/begrid/install/apt/RPMS.cb-v3_i386_sl3/' >> /etc/yum.conf

  echo '[quattor]' >> /etc/yum.conf
  echo 'name=Quattor repo - SL3' >> /etc/yum.conf
  echo 'baseurl=http://mon.iihe.ac.be/begrid/install/apt/RPMS.quattor_i386_sl3/' >> /etc/yum.conf
  • EL4-type:
  echo '[cb-v3]' > /etc/yum.repos.d/cb-v3-sl4.repo
  echo 'name=CB server - client repo - SL4' >> /etc/yum.repos.d/cb-v3-sl4.repo
  echo 'baseurl=http://mon.iihe.ac.be/begrid/install/apt/RPMS.cb-v3_i386_sl4/' >> /etc/yum.repos.d/cb-v3-sl4.repo

  echo '[quattor]' >> /etc/yum.repos.d/cb-v3-sl4.repo
  echo 'name=Quattor repo - SL4' >> /etc/yum.repos.d/cb-v3-sl4.repo
  echo 'baseurl=http://mon.iihe.ac.be/begrid/install/apt/RPMS.quattor_i386_sl4/' >> /etc/yum.repos.d/cb-v3-sl4.repo
  • yum install cb-client
    • it's possible that this doesn't work out of the box. as there is no priority plugin for yum by default, some manual need to be done. for slc43 eg you need to do
  yum install swig compat-libstdc++-33 dhcp
  yum --disablerepo='*' --enablerepo=quattor --enablerepo=cb-v3  install cb-client

Post installation

  • for old reasons, the cb-v3 templates require that panc is known as panc6. this can be easily switched off, but still is the case. just do
  ln -s /usr/bin/panc /usr/bin/panc6
  panc6 -v
  • the installation of tftp and aii-server can cause some configuration file problems. be sure to check them after installation
  12:aii-server             ########################################### [ 48%]
  File /etc/xinetd.d/tftp already exists, I will not overwrite it
  You may want to check it against /usr/share/doc/aii-1.0.43/eg/tftp.example


CB server

APT

  • Howto create apt-repo:
    • make directory apt/RPMS.<something>
    • genbasedir <FULL_PATH>/to/apt something
    • this creates a apt/base directory with the pkglists etc.
    • if the apt dir is reachable through http://machine/path/to/apt, you need
  echo "rpm http://machine/path/to/apt something" > /etc/apt/sources.list.d/something.list
  • Howto generate metarpms:
    • edit specfile file.spec
    • rpmbuild -bb file.spec
    • eg of file.spec:
  Summary: Metapackage for centralised begrid-client
  Name: cb-client
  Version: 1.0.0
  Release: 1
  License: EDG license http://www.edg.org/license.html
  Group: begrid/meta
  ## the aii-stuff
  Requires: perl-LC >= 1.0.11-1
  Requires: perl-AppConfig-caf >= 1.4.7-1
  Requires: perl-CAF >= 1.4.7-1
  Requires: perl-Proc-ProcessTable >= 0.39-1
  Requires: perl-Compress-Zlib >= 1.16-12
  Requires: ccm >= 1.4.31-1
  Requires: perl-XML-Simple >= 2.13-1
  Requires: aii-server >= 1.0.36-1
  Requires: cdp-listend >= 1.0.17-1
  Requires: aii-client >= 1.0.36-1
  Requires: ncm-template >= 1.0.4-1
  ## the cb-client stuff
  Requires: jdk >= 1.5.0
  Requires: tcl >= 8.3.5-92.2
  Requires: tk >= 8.3.5-92.2
  Requires: python2.3 >= 2.3.5-2
  Requires: python2.3-devel >= 2.3.5
  Requires: python2.3-tools >= 2.3.5
  Requires: python2.3-tkinter >= 2.3.5
  Requires: python-pysvn >= 1.3.1-2
  Requires: panc >= 4.0.2
  ##
  BuildArch: noarch
  ##
  %description
  This package is a meta-package, meaning that its purpose is to contain
  dependencies for cb-client.
  It itself includes no software, only dependencies on software.
  ##
  ##
  %files
  ##
  %changelog
**Sat Mar 18 2006 <Stijn.De.Weirdt@cern.ch>
  - initial try
  yum-arch /path/to/rpms
  createrepo /path/to/rpms
  • everything: (eg EL3)
  echo '[cb-all]' >> /etc/yum.conf
  echo 'name=CB server - full swrep repo' >> /etc/yum.conf
  echo 'baseurl=http://gridtst.iihe.ac.be/begrid/install/apt/RPMS.swrep-i386_sl3/' >> /etc/yum.conf

SINDES remarks

  • in ca.config:
  [ req_distinguished_name ]
  O                      = IIHE
  OU                     = GRID
  CN                     = q3.iihe.ac.be CA
  • direct route to sindes server (ie the DN in the apache.crt) is needed
    • extra line in aii
    • hard route config in wn-profiles
  • logfiles in /var/log/httpd and /var/log/sindes
  • use ca_dir instead of ca_file (in AII, ccm.conf and aii-shellfe.conf)
  • add a "--use_fqdn " to aii-installack.cgi
  • aii-installack.cgi also needs a direct route to the cgi-server.
  • if you restart the httpd on LS4, you might get
  Starting httpd: Syntax error on line 25 of
  /etc/httpd/conf.d/sindes-ssl.conf:
  SSLCARevocationFile: file '/var/sindes/crl.pem' does not exist or is empty
  [FAILED]
 This is SElinux doing its thing. You can switch off SElinux by adding selinux=0 to the kernel boot entry in grub and restart the machine.

VMware Server

  • file nvram contains bios settings. create a good one: during booting, press F2, modify things (like boot order etc etc). then copy around
  • hardware macaddresses:
    • possible range is fixed: 00:50:56, 3c:: is maximum
    • use eg
  config.version = "8"
  virtualHW.version = "4"
  scsi0.present = "TRUE"
  memsize = "700"
  scsi0:0.present = "TRUE"
  scsi0:0.fileName = "Red Hat Linux.vmdk"
  ide1:0.present = "FALSE"
  ide1:0.fileName = "auto detect"
  ide1:0.deviceType = "cdrom-raw"
  floppy0.fileName = "A:"
  Ethernet0.present = "TRUE"
  displayName = "Red Hat Linux"
  guestOS = "redhat"
  priority.grabbed = "normal"
  priority.ungrabbed = "normal"
  scsi0:0.redo = ""
  ethernet0.addressType = "static"
  uuid.location = "56 4d 39 21 15 29 df b1-63 81 c9 15 5a c7 b2 72"
  uuid.bios = "56 4d 39 21 15 29 df b1-63 81 c9 15 5a c7 b2 72"
  ide1:0.autodetect = "TRUE"
  ethernet0.Address = "00:50:56:07:b2:72"
  floppy0.present = "FALSE"

sol

pxeboot freedos

  You have to get the proper freedos disk-image

  wget http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/old/beta9sr2/fdos1440.img

  make a new pxelinux.cfg/hostname

  default freedos

  label freedos
    KERNEL memdisk
    append initrd=fdos1440.img

  with "memdisk" being the file from the syslinux package. Next, I will try with the mtools-package to enable automatic bios flashing via command.com


Template:TracNotice