Skip to content
This repository

Installation: I want to try and keep installation times below a minute. To do this we want everything to be automated as much as possible. Not only will this make things quick for the end user but also limit any possible configuration issues in the next step.


Linux:

Root user needed to install.

# yum install matahari matahari-broker

Windows:

  • Administrative priveleges needed
  • Download and burn ISO.
  • Pop cd in and let the autorun proceed.
  • An installation dialog appears and for any basic usage all the defaults provided will suffice.
  • Note: There is no matahari-broker available on Windows.

Once complete verify the installations worked by testing the status of the services. Linux: As Root

# service matahari-broker status

matahari-brokerd (pid 2045) is running...

# service matahari-host status

matahari-hostd (pid 2199) is running...

Windows: In your services administration dialog you should see the m_host, m_srv, m_net processes and they will be labeled in a running state.

The simplest way to get the Windows agents connecting to your specified broker is to go into your Registry Editor and alter/add the following key value pairs

\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Matahari
- Broker : 127.0.0.1
- Port : 49000

By default the broker is set to localhost. This will need to be changed to your broker's IP along with whatever port it was decided to run on (default is 49000) Make sure to go back into your Services editor and restart your services to make sure the new registry values take effect.


Connectivity: A successful test should include the ability to connect to a running agent and either have it perform some sort of command or return specified data.


Next verity that both the broker and the agents are up and running. To do so we'll use the qmf-tool application

[root@supa ~]# qmf-tool localhost:49000
Management Tool for QMF
qmf: list agents
QMF Agents:

   Id  Vendor               Product  Instance                              Epoch

==================================================================================

*  1   apache.org           qpidd    971e8d8b-38f8-45ad-9ccf-f82ea85e3ed7  4
   2   matahariproject.org  host     d0175049-b186-41a7-a10b-11589107c20a  4
   3   matahariproject.org  net      97e02c72-8ac4-4fd5-901b-77574af3d45c  2
   4   matahariproject.org  service  bbf07d98-be32-4046-bf7b-c1d162b0611d  2

To verify the agents actually work we'll do some interactions with one.

qmf: set default 2
Default Agent: matahariproject.org:host:d0175049-b186-41a7-a10b-11589107c20a
qmf: query host org.matahariproject
Data Objects Returned: 1:

Number  Data Address
===================================
1       org.matahariproject:host:

qmf: show 1
Properties:
Name                Value
 ========================================================================================================================================================================================================================================================================================================================================================================================================

load                {'1': 0.1, '5': 0.22, '15': 0.23}
hostname            supa.kooba
last_updated        1302756301000000000
free_swap           1839100
sequence            91591
free_mem            194920
os                  Linux (2.6.35.11-83.fc14.x86_64)
process_statistics  {'running': 1, 'sleeping': 267, 'zombie': 1, 'idle': 0, 'stopped': 0, 'total': 269}
cpu_count           4
cpu_model           Core(TM) i7 CPU       M 620  @ 2.67GHz
cpu_cores           16
wordsize            64
swap                2047996
memory              3850556
update_interval     5
cpu_flags           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts     acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt aes lahf_lm ida arat tpr_shadow vnmi flexpriority ept vpid
arch                x86_64
uuid                df023e75efce764fd9bd8a59000000

As seen above we've queried some properties of the system running the host agent.

Here is an output from a windows agent

qmf: show 1
Properties:
    Name                Value
    =======================================================================================================
    load                {'1': 0.0, '5': 0.0, '15': 0.0}
    hostname            akimbo-PC
    last_updated        1303740657000000000
    free_swap           1597500
    sequence            5
    free_mem            669520
    os                  Windows 7 (6.1)
    process_statistics  {'running': 43, 'sleeping': 0, 'zombie': 0, 'idle': 0, 'stopped': 0, 'total': 43}
    cpu_count           2
    cpu_model           QEMU Virtual CPU version 0.13.0
    cpu_cores           4
    wordsize            32
    swap                2096748
    memory              1048172
    update_interval     5
    cpu_flags           unknown
    arch                x86
    uuid                unknown

From the output above we've gathered that the agents and broker are up and running and successfully communicating with each other. The process remains the same no matter how many agents are being connected to the broker.

Running Beaker supported test units

First we need to install beakerlib

# yum install beakerlib

Within matahari/src/tests there are folders which contain shell scripts that utilize the beakerlib system in order to validate certain use cases.

For example, under matahari/src/tests/connection a test exists to verify that a matahari agent is able to make a connection to its predefined broker. The defaults used are localhost:49000 these can be altered by editing the test script and changing TEST_HOSTNAME and TEST_PORT variable.

Running the above test scenario without a broker that is accessible yields the following:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: TEST PROTOCOL
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Test run ID   : AlaxyoP
:: [   LOG    ] :: Package       : matahari
:: [   LOG    ] :: Installed:    : matahari-0.4.0-0.1.8003b6c.git.fc14.1.x86_64
:: [   LOG    ] :: Test started  : 2011-05-09 15:38:08
:: [   LOG    ] :: Test finished : 2011-05-09 15:38:10
:: [   LOG    ] :: Test name     : /matahari/Sanity/mh_simple_connect
:: [   LOG    ] :: Distro:       : Fedora release 14 (Laughlin)
:: [   LOG    ] :: Hostname      : supa.kooba
:: [   LOG    ] :: Architecture  : x86_64

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test description
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

PURPOSE of /matahari/Sanity/mh_simple_connect
Description: Test simple agent connections
Author: Adam Stokes <astokes@fedoraproject.org>

This test performs some simple connection sequences to verify matahari
agents are able to connect and talk with the broker.


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Checking for the presence of matahari rpm
:: [   LOG    ] :: Duration: 1s
:: [   LOG    ] :: Assertions: 1 good, 0 bad
:: [   PASS   ] :: RESULT: Setup

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   FAIL   ] :: Running 'matahari-hostd --broker 127.0.0.1 --port 49000' (Expected 0, got 139)
:: [   LOG    ] :: Duration: 1s
:: [   LOG    ] :: Assertions: 0 good, 1 bad
:: [   FAIL   ] :: RESULT: Test

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Cleanup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Duration: 0s
:: [   LOG    ] :: Assertions: 0 good, 0 bad
:: [   PASS   ] :: RESULT: Cleanup

Debug

Some ways to see what's going on:

QPID_LOG_ENABLE=debug+
QPID_TRACE=1
Something went wrong with that request. Please try again.