Child pages
  • Sakai 2.6 Build Scripts for Linux (Marist)
Skip to end of metadata
Go to start of metadata

Introduction

The IBM joint study program at Marist College has written these build scripts to facilitate rapid building and deployment of Sakai for testing and development on linux blade servers. Though the scripts only support Websphere and Tomcat builds at the moment, they are easily modified to support new platforms. In the current release, the scripts will check out source, update source (from trunk or from a tag), build, initialize a db2 or mySQL database, and deploy Sakai (this only works on Tomcat at the moment).

Downloading the Scripts

The scripts are attached to this document in tar format.

Supported Platforms

  • Websphere 6.1
  • Tomcat
  • DB2 9
  • mySQL

Dependencies

Aside from the supported platforms, these scripts rely on:

  • Maven 2
  • Java 1.5 (and Jython)

Included Files and their Purposes

File

Purpose

master.sh

The master script checks out source and dispatches work to other platform-specific scripts.

lava.properties

The properties file from which the build scripts pull relevant paths
and credentials. Documentation for the various properties can be found
in the file.

tomcat/main.sh

Builds and deploys Sakai on Tomcat, then restarts Tomcat.

websphere/main.sh

Builds Sakai for Websphere; Dispatches to other scripts to handle WAS configuraiton.

websphere/makeprofile.sh

Deletes all WAS profiles and creates a new one. Dispatches configuration.

websphere/configure.py

Configures a WAS profile for Sakai. mysql/main.sh Calls the mySQL database creation and configuration script.

mysql/mysql_init.sql

Creates and configures a mySQL database for Sakai.

db2/main.sh

Calls the DB2 database creation and configuration script.

db2/sakai_set_db2

Creates and configures a DB2 database for Sakai.

Usage Instructions

1. Configure the lava.properties accordingly. You can ignore properties for platforms you aren't using. The lava.properties file has comments on all properties indicating what they are for and any specific notes as to how to specify them.

Be sure to configure the "action", "servletContainer", and "database" properties if you wish to perform an unattended install. You will be prompted to specify these if they are not specified in the properties file.

2. Run master.sh in the scripts' root directory.

You should keep an eye on install.log in the scripts' root directory for any errors that may occur. As of now, there is no check for errors as the scripts dispatch accomplish their tasks--any one task that fails will likely cascade into other failures. It's best to ctrl+c out of the script if you see errors occurring.

Platform Specific Concerns

Websphere

Websphere build and deploy works off of the following assumptions:

  • You have an existing wasShared directory at $wasShared.
  • You have a mysql connector in its proper place in $wasshared/common/lib
  • You have a sakai.properties file (properly configured) in $wasshared/sakai
  • maven will place the sakai deployment in /opt/tomcat.

DB2

DB2 database creation and configuration works off of the following assumptions:

  • db2inst1 is the DB2 instance owner.

Adding Support for New Platforms (Plug-ins)

These scripts are designed to allow easy extension.

To add support for a new platform:

1. Create a new directory in the scripts' root folder.

2. Name this directory in one word, all lower-case that is easily relatable to the name of the platform.

3. Place the appropriate setup scripts for the platform (for a database, this needs be only the db creation and configuration, for a servlet container, this should include build, configuration, and deployment script(s)) in the directory you just created.

4. Ensure that the primary script is named "main.sh" and dispatches only to scripts that are at equal level or deeper in the directory structure than main.sh. This script will be invoked by master.sh when the script suite is run and your new platform is selected.

5. Add any appropriate configuration settings to the lava.properties file in the root script directory. Please comment these settings appropriately as the rest in the document are, and clearly demark where your new platform's settings begin (and end, if necessary).

6.
a.) If you are addng support for a new database system: add the name of the directory that you created in step one to the end of line 27 of master.sh ("select opt in mysql db2 yourdatabasename")
b.) If you are adding support for a new servlet container: add the name of the directory that you created in step one to the end of line 16 of master.sh ("select opt in websphere tomcat yourcontainernamehere")

  • No labels