Contents |
Whilst BOSS is deployed in production, this packaged version is still in beta-testing and is subject to change. In particular the repositories are not yet finalised (eg installing from :RC).
However BOSS and SkyNET both install and run at a basic level on a clean Debian 6.0 or OpenSuse 11.4 installation.
BOSS provides the ruote worker and the main AMQP server.
This component is the main process dispatcher; no work happens here but all process steps are initiated from here.
Currently BOSS uses the Ruote filesystem storage system and the worker and viewer need to run on the same system. This will change when BOSS moves to Redis.
The stable and testing projects are at the community OBS, the state of the packages can be monitored at :
Testing : https://build.pub.meego.com/project/monitor?project=Project:MINT:Testing (Current)
Release Candidate : https://build.pub.meego.com/project/monitor?project=Project:MINT:RC (~June 2011)
Stable : (No release yet) https://build.pub.meego.com/project/monitor?project=Project:MINT
(old version of BOSS on openSUSE 11.2)
zypper ar http://download.opensuse.org/repositories/Maemo:/MeeGo-Infra/openSUSE_11.2-plus/Maemo:MeeGo-Infra.repo zypper ref zypper in boss
(new version of BOSS on opensuse 11.4)
zypper ar http://repo.pub.meego.com/Project:/MINT:/RC/openSUSE_11.4/Project:MINT:RC.repo MINT zypper ref zypper in boss
This will install Rabbit MQ and the boss worker daemon.
To run boss:
rcboss start / stop
cat <<EOF > /etc/apt/sources.list.d/MINT.list deb http://repo.pub.meego.com/Project:/MINT:/RC/Debian_6.0/ / EOF
apt-get update apt-get install --no-install-recommends boss
This will install Rabbit MQ and the boss worker daemon.
Then, as usual
/etc/init.d/boss {start|stop|restart|force-reload|log}
Default settings are found in /etc/default/boss
BOSS is preconfigured with username boss and password boss on the boss vhost (AMQP will lose vhosts soon)
BOSS stores workitem and process data in /var/spool/boss/
In order to be able to work with BOSS, please install SkyNET now: (this manual step should be no longer necessary in future, all participants will have a dependency on boss-skynet)
zypper in boss-skynet
from the repository
https://build.pub.meego.com/project/monitor?project=Project:MINT:RC
This must be installed on the boss server when using the FS storage.
The default port is 9292, point your browser at http://127.0.0.1:9292/_ruote/ (if you are running on the same machine)
zypper ar https://build.pub.meego.com/project/monitor?project=Project:MINT:RC zypper ref zypper in boss-viewer
This will install boss-viewer.
To run boss-viewer:
rcboss-viewer start / stop
cat <<EOF > /etc/apt/sources.list.d/MINT.list deb http://repo.pub.meego.com/Project:/MINT:/RC/Debian_6.0/ / EOF
apt-get update apt-get install --no-install-recommends boss-viewer
This will install the boss viewer.
Then, as usual
/etc/init.d/boss {start|stop|restart|force-reload|log}
Once you have installed BOSS and SkyNET you are ready to create and run some processes.
On the BOSS machine:
/etc/init.d/boss log &
You'll see messages about the engine being alive and participant registration. Further debug output is possible here.
On the skynet machine we need to setup some code as a participant:
skynet make_participant -n check -p /usr/share/doc/python-boss-skynet/example-check-participant skynet make_participant -n notify -p /usr/share/doc/python-boss-skynet/example-notify-participant
This creates a daemontools/participant directory structure with a symbolic link to the code for these participants.
Now we need to ensure they start to run under daemontools (and restart if there's a problem):
skynet enable check skynet enable notify
To watch the log output:
skynet log check & skynet log notify &
Now we need to tell boss that there is something listening on these queues and available for use in processes:
skynet register check skynet register notify
The skynet command also supports:
With a participant ready to do some work, we're ready to launch a process instance:
/usr/share/boss-skynet/skynet_launch
The log output should show
2011-03-29 00:49:21.186558500 checking for /tmp/success 2011-03-29 00:49:21.186849500 Failed to read /tmp/success 2011-03-29 00:49:21.708706500 Nothing to say
Now do:
echo Hi there > /tmp/success
And relaunch:
/usr/share/boss-skynet/skynet_launch
gives
2011-03-29 00:49:31.659986500 checking for /tmp/success 2011-03-29 00:49:31.660440500 Read /tmp/success 2011-03-29 00:49:31.878978500 Send email saying : Hi there 2011-03-29 00:49:31.878980500
Of course a process can be launched from anywhere on the network using any 'trigger' and participants also run on any machine.
TODO
The OBS plugin is designed to launch processes when a build/publish event occurs on the OBS
The plugin is installed on the OBS backend which runs the schedulers
openSUSE 11.2
zypper ar http://download.opensuse.org/repositories/devel:/languages:/perl/openSUSE_11.2/devel:languages:perl.repo zypper ar http://repo.pub.meego.com/Project:/MINT:/RC/openSUSE_11.2/Project:MINT:RC.repo zypper ref zypper in boss-obs-plugin
opensuse 11.4
zypper ar http://download.opensuse.org/repositories/devel:/languages:/perl/openSUSE_11.4/devel:languages:perl.repo zypper ar http://repo.pub.meego.com/Project:/MINT:/Testing/openSUSE_11.4/Project:MINT:Testing.repo zypper ref zypper in boss-obs-plugin
You *MUST* have a participant registered as "obs_event" (provided by the robogrator launcher package https://meego.gitorious.org/meego-infrastructure-tools/boss-launcher-robogrator ) running before enabling this plugin or ruote will silently fill up with hundreds/thousands/millions of stalled processes.
Edit the file:
/usr/lib/obs/server/BSConfig.pm
and define/add:
our $notification_plugin = "notify_boss"; our $BOSS_host="boss"; # hostname for server running BOSS AMQP our $BOSS_user="boss"; # AMQP username our $BOSS_passwd="boss"; # AMQP password (cleartext)
You may also uncomment and set to 1:
our $multiaction_notify_support = 1;
(This allows osc requests containing multiple actions to be handled properly).
The plugin itself is installed in :
/usr/lib/obs/server/plugins/notify_boss.pm
The schedulers will need to be restarted to take effect. Note there is currently an issue that the plugin will block if the AMQP server is not available - this will halt the OBS.
Do something useful with your installation using the standard workflow and the participants and launchers