Compiling OHAC

From Genunix

Revision as of 16:26, 26 May 2009 by Frueauf (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Compiling Open HA Cluster (OHAC) Core for Colorado on Open Solaris 2009.X

Note: These notes are for compiling OHAC on the OpenSolaris binary distribution. For compiling instructions on Solaris Express (Nevada), see http://www.opensolaris.org/os/community/ha-clusters/ohac/Documentation/Core/buildingcore/

  • Install the latest build of OpenSolaris 2009.06. The following procedure has been tested with build 111.
  • Install additional packages for the build system:
    Note: If you use a different build than 111, you need to install the package that corresponds to the build number you are using.
   # pkg set-authority -O http://pkg.opensolaris.org:80/dev/ opensolaris.org

   # pkg install SUNWperl584core@5.8.4-0.111
   # pkg install SUNWperl584usr@5.8.4-0.111
   # pkg install SUNWtcat@6.0.18,5.11-0.111
   # pkg install SUNWjavadb@10.4.2.1,5.11-0.111
   # pkg install SUNWjdmk-base@0.5.11,5.11-0.111
   # pkg install SUNWcacaort@0.5.11-0.111
   # pkg install SUNWonbld@0.5.11-0.111
   # pkg install SUNWant@1.7.1-0.111
   # pkg install sunstudioexpress
   # cd /opt
   # ln -s SunStudioExpress /opt/SUNWspro
   
  • OHAC core has a build time dependency on some parts of OpenDMK. You need to download, build and install the following:
     $ cd /builds
     $ unzip /path/opendmk-1.0-b02-src-dual-01-Oct-2007_19-17-46.zip
     $ cd OpenDMK-src

     ## make sure the following command can open an X11 display.
     ## If running from remote, use e.g. "ssh -g -X <hostname>"
     $ java -jar /path/opendmk-1.0-b02-binary-plug-01-Oct-2007_19-17-46.jar
          => accept license agreement
          => select install directory
                => /builds/OpenDMK-src

     $ /usr/bin/ant buildall
    
    • Install the required OpenDMK files:
     # cd /builds/OpenDMK-src/dist
     # cp lib/jdmktk.jar /usr/share/lib/jdmk
     # find etc/mibgen/mib_core.txt | cpio -pdu /usr/share/lib/jdmk
    
  • OHAC core has a build time dependency on some JATO related parts of the Sun Java Web Console. You need to download the Sun Java Web Console 3.0.2 for Solaris/<PLATFORM> archive (webconsole3.0.2-solx86.tar.gz or webconsole3.0.2-solsparc.tar.gz).
    • Install the required packages as follows:
    $ mkdir /var/tmp/webconsole
    $ cd /var/tmp/webconsole
    $ gzcat /path/webconsole3.0.2-sol<PLATFORM>.tar.gz | tar xf - 
 
    # yes | pkgadd -d . SUNWjato SUNWmctag SUNWmcon
    # yes | pkgadd -d SunOS-5.11-<PLATFORM> SUNWmcos
    
  • Download and install the following build tools:
    • The OHAC Specific Build Tools (ohac-tools-<DATE>.<PLATFORM>.tar.bz2). The ohac-tools archive contains the build tools that are necessary for building OHAC. To install the OHAC build tools:
   # cd /opt
   # bzcat /path/ohac-tools-<DATE>.<PLATFORM>.tar.bz2 | tar xf -
   
  • To build the OHAC Core, you also need to download and install the following archives:
    • The OHAC Core Closed Binaries (ohac-closed-bins-<DATE>.<PLATFORM>.tar.bz2). The ohac-closed-bins archive contains the Core binaries built from closed source.
    • The OHAC Core External Packages (ohac-ext-pkgs-<DATE>.<PLATFORM>.tar.bz2). The ohac-ext-pkgs archive contains prebuilt packages and product deliverables from other groups, such as Documentation and Globalization. To install the OHAC archives:
    # cd /opt
    # bzcat /path/ohac-closed-bins-<DATE>.<PLATFORM>.tar.bz2 | tar xf -
    # bzcat /path/ohac-ext-pkgs-<DATE>.<PLATFORM>.tar.bz2 | tar xf -
    
    • You also need to download and install a few private files from the ON source archive:
    # cd /var/tmp
    # bzcat /path/on-src.tar.bz2 | tar xf -
    # cat /path/on-filelist | cpio -pdum /
    
  • And finally, you need to download and install the OHAC Colorado Core Source Code (colorado-src-<DATE>.tar.bz2). You can install the source code wherever you like. This example assumes the archive is extracted to /builds:
     $ cd /builds
     $ bzcat /path/colorado-src-<DATE>.tar.bz2 | tar xf -
    
  • To build IPS packages, start an IPS depot server. See depotctl(1M) in /opt/scbld/man for more info. This example starts an IPS server listening on the default port and using /builds/repos for the backing store:
    $ /opt/scbld/bin/depotctl start -d /builds/repos
    
  • To build the Core source, run nbuild from within the source tree. This example creates a complete build of both non-debug and debug using the Sun Studio Compiler, and assumes all the compilers, tools and archives were installed in their default locations:
    $ cd /builds/colorado
    $ /opt/scbld/bin/nbuild -Dp
    
  • The resulting IPS packages are available from your IPS server, and the rest of the output from your build is located in /builds/colorado+5.11+PLATFORM, where you can find:
    * log/log.TIMEDATE.NUM - log files for this build
    * packages/PLATFORM/Sol_11 - debug SVR4 packages
    * packages/PLATFORM/Sol_11-nd - non-debug SVR4 packages 
   
  • Installing Core:
   # pkg set-authority -O http://<IPSSERVER>:<PORT>/ <IPSSERVER>
   # pkg set-authority -P <IPSSERVER>
   # pkg install ha-cluster-minimal
   # /usr/cluster/bin/scinstall -i
   
Personal tools