stasher gets installed on all nodes in the cluster. All nodes in the cluster must generally run on the same hardware and software platform, including the C++ runtime. stasher's internal communication protocols are binary in nature. The actual requirement is that all stasher nodes must have the same C++ ABI. This generally means the same version of the operating system, and the same hardware family.
LIBCXX must be installed first. stasher uses LIBCXX, which currently builds only on Linux.
Preparing an installable package is recommended, rather than running
configure and make, manually.
stasher includes a script that builds RPM packages on
Fedora. Executing
“rpmbuild -ta stasher-version
.tar.bz2”
produces two packages: stasher, the required runtime, and stasher-devel,
which contains header files and other needed tools for building
other applications that use stasher's C++ API.
On Linux, use the following manual installation instructions only as a guide for preparing installable stasher packages, when the RPM build script cannot be used for some reason.
LIBCXX's development environment must be installed, first.
Run ./configure followed by make. configure takes the usual options.
To build the Perl module, run make perl-configure and make perl-build from the top level source directory.
Run make check. Don't make this a part of an automated build. make check's regression tests should be used as a sanity check after building stasher on a new platform, for the first time. Once that's done, they serve no further purpose.
make install DESTDIR=scratchdir
creates an installation image in
scratchdir
.
Also run the same command from the perl/Stasher
subdirectory, if installing the Perl module.
Use that to create your installable package.
Some arrangements should be made to have stasher started automatically
on system boot. ./configure creates
stasher.sysinit
, an init-style startup/shutdown
script, and stasher.service
, a
systemd unit file.
There is no fixed location where an object repository lives on
a filesystem. One can be created anywhere, for stasher to start, and
run with. There is a default location used by stasher's tools
and the stasher.sysinit
script:
,
where localstatedir
/stasherlocalstatedir
gets set by
./configure's
--localstatedir
option. If so:
/usr/local/var/stasher/clusters
Default location for cluster certificates and private keys.
/usr/local/var/stasher/newnodes
Default location for newly-created node directories and certificates.
/usr/local/var/stasher/nodes
stasher.sysinit
starts and stops an stasher
node for each subdirectory in here.
If there's more than one subdirectory here, an stasher instance
gets started in each one.
The standard workflow creates new nodes in
/usr/loal/var/stasher/newnodes
. If the
new node runs on this machine, it gets mved
to
/usr/local/var/stasher/nodes
; otherwise
the entire new node directory gets copied (carefully, with
ownership and permissions preserved) to
/usr/local/var/stasher/nodes
on the other
machine.
The default RPM build script sets
localstatedir
to /var
. With the default
RPM package, they are
/var/stasher/clusters
,
/var/stasher/newnodes
, and
/var/stasher/nodes
.
Cluster and node directories get created as subdirectories in these locations. These directories are not the actual directories for cluster certificates and nodes. The name of a subdirectory, in each one of these directories, don't generally matter; but there is a default name, as explained later.
This allows a single machine to run nodes that belong to different, unrelated, object repository clusters.
The maillogs.sh
script gets installed in the
directory (usually datadir
/stasher/usr/local/share/stasher
).
The installation package should make arrangements to execute this
script on a regular basis, typically an hourly frequency.
The maillogs.sh
reads stasher's logs from
,
which is where stasher creates them, in its default configuration.
localstatedir
/stasher/nodes/*/logsmaillogs.sh
invokes LIBCXX's
maillogs tool to mail stasher's log entries at
level warning
and higher.
make install installs a configuration file
for maillogs.sh
, called
stasherlogconfig
, in
(usually sysconfdir
/usr/local/etc
).
An installable package should not overwrite any existing
stasherlogconfig
from a previous version of
stasher. In absence of the supporting functionality from the
packaging system, the installable package should install the
configuration file as stasherlogconfig.dist
,
and copy it to stasherlogconfig
only if this
file does not exist.
The default RPM build script uses
/etc/stasherlogconfig
, and takes care of
running /usr/share/stasher/maillogs.sh
as part
of cron.hourly
.