The MMS is deployed as a number of headless VisualWorks processes. All of the processes use the same headless image into which they all load the same OSkMMS parcel. The startup parameters to the image specify the task of a particular image.
Setting up the runtime directory structure
Here we explain what needs to be done to set up a new host from scratch.
Set up users and groups
- Add an mms group using addgroup mms. Check by looking in /etc/group.
- Add your account to the mms group, using adduser xxxx mms. Check by running groups. You'll have to log out and back in for the new group to take effect for you.
Set up the directory structure
The aim here is to have a directory structure that allows us to use the right VisualWorks VM with the right base image for the desired MMS system version.
- Create the following directories:
- /opt/mms/vw (for the VMs and base images)
- /opt/mms/vw/n.n (for each VisualWorks version, e.g. 7.1)
- /opt/mms/vw/7.3/vm/ (contains the VisualWorks virtual machine executable)
- /opt/mms/vw/n.n/image-nnnn (for a base image version which was built for a particular VisualWorks version. e.g. nnnn could be 1-067 of the OSkBaseImageElements loaded into a 7.1 image)
- /opt/mms/nnnn (there will be one of these for each MMS system version. e.g. nnnn could be 1-120)
- Recursively set the group of the directory to mms: chgrp -R mms /opt/mms/
- Recursively give the group read, write and execute permissions on the directory: chmod -R g+rwx /opt/mms/
Populate the directories
- Move the VisualWorks vwlinux86 file to the appropriate /opt/mms/vw/n.n/vm directory. Copy from the VisualWorks installation directory ($VISUALWORKS/bin/...).
- Build the base image (see below) and move to to the appropriate /opt/mms/vw/n.n/image-nnnn directory.
- Prepare the MMS parcels and start script (see below) and move those to the /opt/mms/nnnn directory that corresponds to the parcel versions (which is in turn the pundle version from Store).
Make sure needed packages are installed
- tcsh (needed when calling shell scripts from VisualWorks)
Make sure that outbound email works
- Configure the local SMTP server per Email for Services
Creating the base headless image.
Here is how to make a base image within which the MMS can run. Note, a base image may well be good for several versions of the system. You'll only need to build a new mms.im image if there is a new version of VisualWorks, or you change the OSkMMSBaseImageElements bundle.
- Start a clean VisualWorks image using the target version of VisualWorks
- Load the version of the OS MMS DEVELOPMENT bundle you wish to build a base image for.
- Save the OSkMMSBaseImageElements bundle as a parcel.
- Close the image (no need to save it).
- Start another clean image (do not load Store or any other development tools into this image).
- Load the OSkMMSBaseImageElements parcel into the image. This will pull in all the prerequisite parcels needed by the MMS system.
- Evaluate: "MMSBootstrap makeHeadlessImageAndSaveAs: 'mms'". This will save a headless image called "mms.im". This is your new base image.
- Exit from the image without saving it.
Prepare the parcels and start script
Create the MMS.pcl and MMS.pst files:
- Start a clean VisualWorks image as before.
- Load the OS MMS DEVELOPMENT bundle you wish to deploy.
- Save the OSkMMS bundle as a parcel.
- The 01-Start script (see below). Give the mms group execute permision to this file(chmod g+x /opt/mms/01-Start).
- The mms.im file (see below).
- The OSkMMS.pcl and OSkMMS.pst files.