(→Next steps) |
(→Participants and SkyNET Installation) |
||
| (43 intermediate revisions not shown) | |||
| Line 2: | Line 2: | ||
Whilst BOSS is deployed in production, this packaged version is still | Whilst BOSS is deployed in production, this packaged version is still | ||
| - | in beta-testing and is subject to change | + | in beta-testing and is subject to continuous change. |
| - | + | ||
However BOSS and SkyNET both install and run at a basic level on a | However BOSS and SkyNET both install and run at a basic level on a | ||
| - | clean Debian 6.0 | + | clean Debian 6.0 installation (OpenSuse 11.4 has some issues - patches welcome) |
= Installation = | = Installation = | ||
| Line 28: | Line 27: | ||
of the packages can be monitored at : | of the packages can be monitored at : | ||
| - | Testing : https://build.pub.meego.com/project/monitor?project=Project:MINT:Testing | + | Testing : https://build.pub.meego.com/project/monitor?project=Project:MINT:Testing (Current) |
| - | + | ||
| - | + | ||
Stable : (No release yet) https://build.pub.meego.com/project/monitor?project=Project:MINT | Stable : (No release yet) https://build.pub.meego.com/project/monitor?project=Project:MINT | ||
| Line 42: | Line 39: | ||
(new version of BOSS on opensuse 11.4) | (new version of BOSS on opensuse 11.4) | ||
| - | zypper ar http://repo.pub.meego.com/Project:/MINT:/ | + | zypper ar http://repo.pub.meego.com/Project:/MINT:/Testing/openSUSE_11.4/Project:MINT:Testing.repo MINT |
zypper ref | zypper ref | ||
zypper in boss | zypper in boss | ||
| - | |||
This will install Rabbit MQ and the boss worker daemon. | This will install Rabbit MQ and the boss worker daemon. | ||
| Line 56: | Line 52: | ||
cat <<EOF > /etc/apt/sources.list.d/MINT.list | cat <<EOF > /etc/apt/sources.list.d/MINT.list | ||
| - | deb http://repo.pub.meego.com/Project:/MINT:/ | + | deb http://repo.pub.meego.com/Project:/MINT:/Testing/Debian_6.0/ / |
EOF | EOF | ||
| Line 87: | Line 83: | ||
=== SUSE === | === SUSE === | ||
| - | zypper ar | + | zypper ar https://build.pub.meego.com/project/monitor?project=Project:MINT:Testing |
zypper ref | zypper ref | ||
zypper in boss-viewer | zypper in boss-viewer | ||
| Line 100: | Line 96: | ||
cat <<EOF > /etc/apt/sources.list.d/MINT.list | cat <<EOF > /etc/apt/sources.list.d/MINT.list | ||
| - | deb http://repo.pub.meego.com/Project:/MINT:/ | + | deb http://repo.pub.meego.com/Project:/MINT:/Testing/Debian_6.0/ / |
EOF | EOF | ||
| Line 106: | Line 102: | ||
apt-get install --no-install-recommends boss-viewer | apt-get install --no-install-recommends boss-viewer | ||
| - | This will install the boss viewer. | + | This will install (and start) the boss viewer. |
Then, as usual | Then, as usual | ||
| - | /etc/init.d/boss {start|stop|restart|force-reload|log} | + | /etc/init.d/boss-viewer {start|stop|restart|force-reload|log} |
| - | |||
| - | |||
| - | + | == Participants and SkyNET Installation == | |
| - | + | BOSS needs participants to do any real work. These can be installed on the main BOSS machine or on other machines in the network. | |
| - | + | Participants are managed by SkyNET (ie start/stop/logging/registration etc) | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | You may install SkyNET by itself or it will be pulled in when you install any of the boss-participant packages. See http://autodoc.meego.com/mint/boss-standard-workflow/ for details of participants | |
| - | + | ||
| - | + | ||
| - | + | === SUSE === | |
| - | + | zypper ar https://build.pub.meego.com/project/monitor?project=Project:MINT:Testing | |
| - | + | zypper ref | |
| - | + | zypper in boss-participant-standard-workflow boss-participant-prechecks | |
| - | + | or | |
| - | + | zypper in boss-skynet | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
=== Debian Squeeze/6.0 === | === Debian Squeeze/6.0 === | ||
cat <<EOF > /etc/apt/sources.list.d/MINT.list | cat <<EOF > /etc/apt/sources.list.d/MINT.list | ||
| - | deb http://repo.pub.meego.com/Project:/MINT:/ | + | deb http://repo.pub.meego.com/Project:/MINT:/Testing/Debian_6.0/ / |
EOF | EOF | ||
| + | apt-get update | ||
| + | apt-get install --no-install-recommends boss-standard-workflow boss-participant-standard-workflow boss-participant-prechecks | ||
| + | or for an empty installation: | ||
apt-get install --no-install-recommends boss-skynet | apt-get install --no-install-recommends boss-skynet | ||
| - | + | This will install (but not start) the boss participants. | |
| - | + | ||
| - | + | === SkyNET === | |
| - | + | To use skynet see: | |
| - | + | skynet help | |
| - | + | ||
| - | + | ||
| - | + | To see the participants : | |
| - | + | ||
| - | + | skynet list | |
| - | + | ||
| - | + | = Getting started and Testing the Deployment = | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | Once you have installed BOSS and SkyNET you are ready to create and run some processes. | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | This is an optional step to verify that you installation was successful so far. Experienced users can skip it. In order to | |
| - | + | make the test works you need to install package <code>boss-skynet</code> manually. (Using the same command you have installed boss components above, it comes from the same repository.) If you choose to skip this step the package will be installed automatically as a dependency in a later step (this is not true as of Sept. '11 because some dependencies are still missing) | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | the | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
== Watch BOSS == | == Watch BOSS == | ||
| Line 232: | Line 185: | ||
queues and available for use in processes: | queues and available for use in processes: | ||
| - | skynet register | + | skynet register check |
| - | skynet register | + | skynet register notify |
| Line 241: | Line 194: | ||
* register : can also specify the amqp queue to use if it's not the name | * register : can also specify the amqp queue to use if it's not the name | ||
| - | == Launch a process == | + | == Launch a process instance == |
| - | With a participant ready to do some work, we're ready to launch a process: | + | With a participant ready to do some work, we're ready to launch a process instance: |
/usr/share/boss-skynet/skynet_launch | /usr/share/boss-skynet/skynet_launch | ||
| Line 272: | Line 225: | ||
== Debugging == | == Debugging == | ||
| + | TODO | ||
| + | |||
| + | = BOSS OBS Plugin = | ||
| + | The OBS plugin is designed to launch processes when a build/publish event occurs on the OBS | ||
| + | |||
| + | == Installation == | ||
| + | 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:/Testing/openSUSE_11.2/Project:MINT:Testing.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 | ||
| + | |||
| + | == Configuration == | ||
| + | |||
| + | '''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. | ||
= Next steps = | = Next steps = | ||
| - | Do something useful with your installation using | + | Do something useful with your installation using the [[../Standard workflow|standard workflow]] and the [[../Participants|participants and launchers]] |
Contents |
Whilst BOSS is deployed in production, this packaged version is still in beta-testing and is subject to continuous change.
However BOSS and SkyNET both install and run at a basic level on a clean Debian 6.0 installation (OpenSuse 11.4 has some issues - patches welcome)
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)
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:/Testing/openSUSE_11.4/Project:MINT:Testing.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:/Testing/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/
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:Testing 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:/Testing/Debian_6.0/ / EOF
apt-get update apt-get install --no-install-recommends boss-viewer
This will install (and start) the boss viewer.
Then, as usual
/etc/init.d/boss-viewer {start|stop|restart|force-reload|log}
BOSS needs participants to do any real work. These can be installed on the main BOSS machine or on other machines in the network.
Participants are managed by SkyNET (ie start/stop/logging/registration etc)
You may install SkyNET by itself or it will be pulled in when you install any of the boss-participant packages. See http://autodoc.meego.com/mint/boss-standard-workflow/ for details of participants
zypper ar https://build.pub.meego.com/project/monitor?project=Project:MINT:Testing zypper ref zypper in boss-participant-standard-workflow boss-participant-prechecks
or
zypper in boss-skynet
cat <<EOF > /etc/apt/sources.list.d/MINT.list deb http://repo.pub.meego.com/Project:/MINT:/Testing/Debian_6.0/ / EOF
apt-get update apt-get install --no-install-recommends boss-standard-workflow boss-participant-standard-workflow boss-participant-prechecks
or for an empty installation:
apt-get install --no-install-recommends boss-skynet
This will install (but not start) the boss participants.
To use skynet see:
skynet help
To see the participants :
skynet list
Once you have installed BOSS and SkyNET you are ready to create and run some processes.
This is an optional step to verify that you installation was successful so far. Experienced users can skip it. In order to
make the test works you need to install package boss-skynet manually. (Using the same command you have installed boss components above, it comes from the same repository.) If you choose to skip this step the package will be installed automatically as a dependency in a later step (this is not true as of Sept. '11 because some dependencies are still missing)
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:/Testing/openSUSE_11.2/Project:MINT:Testing.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