Pycroraptor2 is a process manager, essentially intended to be a Python replacement for the Microraptor process manager. Pycroraptor2 is in a working state but is not yet a feature-complete replacement for Microraptor.
The Pycroraptor2 system includes several components:
pyraptordprocess management daemon. Typically, an instance of
pyraptordis the parent process for all managed processes running on a particular host.
pyrtermclient shell that provides a tty user interface for controlling processes managed by
- A web interface for controlling processes managed by
pyraptord. This component has not been implemented yet.
Pycroraptor2 also offers a ZeroRPC
API. To quickly get started using this API, you can use the
command-line tool included in the ZeroRPC Python repo or use the
Python shell included in the geocamUtil repo.
(Fill this in)
pyraptord is currently known to work in Linux (tested on RedHat
Enterprise Linux 6 and Ubuntu 12.04) and Mac OS X (tested on Snow
It probably will not work in any version of Windows without extensive modifications.
Pycroraptor2 depends on geocamUtil:
git clone email@example.com:geocam/geocamUtil.git cd geocamUtil python setup.py install
Download or clone from the geocamPycroraptor2 repository on GitHub:
git clone firstname.lastname@example.org:geocam/geocamPycroraptor2.git
In order to run, Pycroraptor2 requires two configuration files:
ports.jsonfile specifies network endpoints for named services that are available through the 0MQ socket library. This file specifies the endpoint where
pyraptordshould listen for commands and tells
zclientwhere to find
pycroraptor.jsonfile specifies the rest of the Pycroraptor2 configuration, including how to run processes and where to put log files.
Examples for these files can be found in the
tests subdirectory of
the Pycroraptor2 repo.
Pycroraptor2 is often used to manage persistent processes that are started on boot. To make that happen:
- You need to install a boot script for Pycroraptor2 that brings up the
pyraptordinstance for that host. See the Boot Script section below.
- In order to start processes at
pyraptordstart time, they should be placed in the
Example boot scripts for
pyraptord are available in the
subdirectory of the Pycroraptor2 repo, for the following platforms:
- RedHat Enterprise Linux 6 (
- Ubuntu Linux 12.04 (
- Mac OS X 10.8.3 Mountain Lion (
Look within each boot script to find platform-specific install instructions.
Examples of how to start and stop the
On RedHat Enterprise Linux:sudo service pyraptord start sudo service pyraptord stop sudo service pyraptord restart sudo service pyraptord status
On Mac OS X:sudo launchctl load /Library/LaunchDaemons/gov.nasa.arc.irg.pyraptord.plist sudo launchctl unload /Library/LaunchDaemons/gov.nasa.arc.irg.pyraptord.plist man launchctl
To control Pycroraptor2, run
zclient.py -p ports.json using the same
ports.json file you used with
pyraptord, and try some of these
help(pyraptord) pyraptord.getStatusAll() pyraptord.getStatus('service1') pyraptord.start('service2') pyraptord.stop('service3') pyraptord.restart('service4')