Meego Wiki
Views

Release Infrastructure/BOSS/Installation

From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
(Testing)
Line 79: Line 79:
=== Testing ===
=== Testing ===
-
In order to verify BOSS is working, please install SkyNET and follow the sample deployment.
+
In order to verify BOSS is working, please install SkyNET:
 +
 
 +
zypper in boss-skynet
== BOSS-Viewer ==
== BOSS-Viewer ==

Revision as of 11:19, 11 August 2011

Contents

Overview

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.

Installation

Preparation

  • Proxy : On OpenSUSE you need to set the proxy in /etc/sysconfig/proxy

BOSS

Overview

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
Release Candidate : (Don't use) https://build.pub.meego.com/project/monitor?project=Project:MINT:RC
Stable : (No release yet) https://build.pub.meego.com/project/monitor?project=Project:MINT

SUSE

(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
zypper ref
zypper in boss


This will install Rabbit MQ and the boss worker daemon.

To run boss:

 rcboss start / stop

Debian Squeeze/6.0

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

Configuration

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/

Testing

In order to verify BOSS is working, please install SkyNET:

zypper in boss-skynet

BOSS-Viewer

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)

  1. FIXME: Make sure you go to /_ruote/ otherwise you will get a big scary error.

SUSE

 http://repo.pub.meego.com/Project:/MINT:/Testing/openSUSE_11.4/Project:MINT:Testing.repo
 zypper ref
 zypper in boss-viewer

This will install boss-viewer.

To run boss-viewer:

rcboss-viewer start / stop

Debian Squeeze/6.0

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}

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:/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

Configuration

You *MUST* have a participant registered as "obs_event" 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.

Getting started and Testing the Deployment

Once you have installed BOSS and SkyNET you are ready to create and run some processes.

Watch BOSS

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.

Setup a participant

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 -n check
skynet register -n notify


The skynet command also supports:

  • stop : shutdown the participant and don't respawn.
  • reload : stop and start once
  • register : can also specify the amqp queue to use if it's not the name

Launch a process

With a participant ready to do some work, we're ready to launch a process:

/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.

Debugging

Next steps

Do something useful with your installation using the standard workflow and the participants and launchers

Personal tools