Skip to content

Commit

Permalink
updated for next toss release.
Browse files Browse the repository at this point in the history
including init script sample for rhel
  • Loading branch information
baallan committed Feb 19, 2015
1 parent 1b6d842 commit 75c796f
Show file tree
Hide file tree
Showing 28 changed files with 1,389 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ACLOCAL_AMFLAGS = -I m4

EXTRA_DIST= \
libevent-2.0.21-stable.tar.gz \
m4/Ovis-top.m4 \
packaging/firerpms \
SHA.txt \
TAG.txt

Expand Down
6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,11 @@ AC_CONFIG_FILES([Makefile
util/Makefile
util/man/Makefile
util/sample_init_scripts/Makefile
util/sample_init_scripts/hackable/Makefile
util/sample_init_scripts/rhel/Makefile
util/sample_init_scripts/rhel/etc/Makefile
util/sample_init_scripts/rhel/etc/init.d/Makefile
util/sample_init_scripts/rhel/etc/ldms/Makefile
util/sample_init_scripts/rhel/etc/sysconfig/Makefile
packaging/ovis-base.spec])
AC_OUTPUT
9 changes: 9 additions & 0 deletions packaging/firerpms
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
./autogen.sh
./configure '--enable-ssl' '--enable-rdma' '--enable-ncsa-unified' '--disable-zap' '--disable-zaptest' '--with-libevent=/usr/lib64/ovis-libevent2' '--disable-rpath' '--enable-authentication' '--disable-readline' 'CC=gcc46' 'CXX=g++' --disable-sos
./util/release_tarball-240.sh
cd Release
tar zxf ldms-2.4.0.tar.gz
cd ldms-2.4.0
./configure '--enable-ssl' '--enable-rdma' '--enable-ncsa-unified' '--disable-zap' '--disable-zaptest' '--with-libevent=/usr/lib64/ovis-libevent2' '--disable-rpath' '--enable-authentication' '--disable-readline' 'CC=gcc46' 'CXX=g++' --disable-sos
make toss
11 changes: 6 additions & 5 deletions packaging/ovis-base.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ License: GPLv2 or BSD
Group: %{ldms_all}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source: %{name}-%{version}.tar.gz
Requires: rpm >= 4.8.0
BuildRequires: doxygen openssl-devel libibverbs-devel librdmacm-devel
Requires: rpm >= 4.8.0 ovis-libevent2
BuildRequires: doxygen openssl-devel libibverbs-devel librdmacm-devel gcc46 ovis-libevent2-devel glib2-devel libibmad-devel
Url: http://ovis.ca.sandia.gov/

Prefix: /usr
Expand All @@ -30,7 +30,7 @@ Configured with @ac_configure_args@.
* ldmsd: the LDMS daemon, which can run as sampler or aggregator (or both).
* ldms_ls: the tool to list metric information of an ldmsd.
* ldmsctl: the tool to control an ldmsd.
* libevent2 installed privately to ldms plugin directory.


%prep
%setup -q
Expand All @@ -39,7 +39,7 @@ Configured with @ac_configure_args@.
echo bTMPPATH %{_tmppath}
rm -rf $RPM_BUILD_ROOT
echo bBUILDROOT $RPM_BUILD_ROOT
%configure @ac_configure_args@ LIBEVENT_BUILD=1 --disable-sos
%configure @ac_configure_args@ --disable-sos
make

%install
Expand All @@ -49,7 +49,6 @@ make DESTDIR=${RPM_BUILD_ROOT} install
# remove unpackaged files from the buildroot
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/ovis-ldms/lib*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/ovis-libevent/lib*.la
rm $RPM_BUILD_ROOT%{_bindir}/test_*
rm $RPM_BUILD_ROOT%{_bindir}/ldms_ban.sh
mv $RPM_BUILD_ROOT%{_docdir}/ovis-ldms-*/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/
Expand Down Expand Up @@ -94,5 +93,7 @@ Doxygen files for ldms-all package.
%{_datadir}/doc/%{name}-%{version}
%docdir %{_defaultdocdir}
%changelog
* Wed Feb 18 2015 Ben Allan <baallan@sandia.gov> 2.4.0-1
packaging with separate libevent
* Mon Sep 15 2014 Ben Allan <baallan@sandia.gov> 2.2.0-1
all-in-one packaging w/libevent
68 changes: 68 additions & 0 deletions util/release_tarball-240.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/bin/bash -x

if ! test -f m4/Ovis-top.m4; then
echo This must be run from top of a source tree, which should be clean.
exit 1
fi
REPO_DIR=`pwd`
OUTPUT_DIR=`pwd`/Release
BRANCH_NAME=master
# Will get this from git in the future
VERSION=2.4.0

if ! test -f libevent-2.0.21-stable.tar.gz; then
echo "do not need a copy of libevent-2.0.21-stable.tar.gz in $REPO_DIR"
echo "for release $VERSION before packing."
# exit 1
fi
# Create output dir
mkdir -p $OUTPUT_DIR

# cd to local git clone
cd $REPO_DIR

# Checkout $BRANCH_NAME
git checkout origin/$BRANCH_NAME -b $BRANCH_NAME

# Find SHA of latest checkin
COMMIT_ID="$(git log -1 --pretty="%H")"

# Get most recent tag id for this branch
TAG_ID="$(git describe --tags --abbrev=0)"

TARGET=ldms-${VERSION}.tar

# Create archive of desired branch
#git archive $BRANCH_NAME --format=tar --output=${OUTPUT_DIR}/ldms-${VERSION}.tar
git archive --prefix=ldms-${VERSION}/ $COMMIT_ID --format=tar --output=${OUTPUT_DIR}/$TARGET
sleep 0.1

# cd to output dir
cd $OUTPUT_DIR

# Untar archive
echo "Untarring archive"
tar xf $TARGET
sleep 0.1

# Add SHA file
pushd ldms-${VERSION}
echo $COMMIT_ID > SHA.txt
echo $TAG_ID > TAG.txt
./autogen.sh
#cp $REPO_DIR/libevent-2.0.21-stable.tar.gz .
popd

# Tar back up excluding unwanted files and dirs
echo "tarring archive with excludes from "
echo "$REPO_DIR/util/tar-excludes.txt"
TAR_OPTS="-X $REPO_DIR/util/tar-excludes.txt"
tar czf $TARGET.gz $TAR_OPTS ldms-${VERSION}
sleep 0.1

# Remove untarred stuff
echo "Removing cruft"
rm -rf ldms-${VERSION} $TARGET
sleep 0.1

ls -l
3 changes: 1 addition & 2 deletions util/sample_init_scripts/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

docdir = $(datadir)/doc/@PACKAGE@-@VERSION@/sample_init_scripts
SUBDIRS= hackable rhel
dist_doc_DATA = \
ldmsd.conf.example \
ldmsd.example \
README
3 changes: 3 additions & 0 deletions util/sample_init_scripts/README
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
For TOSS deployment, see rhel/.

For cluster hacking, see hackable/.
* ldmsd.example is an init script that may need local modifications depending on where the associated configuration file (ldmsd.conf), pid files, etc. should be placed. When running as a user these files will need to be placed in a user read/write-able location. The normal place to put this file when running as root is /etc/init.d/ldmsd

* ldmsd.conf.example is a configuration file that is utilized by the ldmsd init script to define machine specific information such as hostname to component ID mapping, what metric sets are to be collected, where to write log files etc. The normal location for this file would be in /etc/sysconfig/ldmsd.conf. When running as a user this file will need to be placed in a user read/write-able location.
3 changes: 3 additions & 0 deletions util/sample_init_scripts/hackable/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

docdir = $(datadir)/doc/@PACKAGE@-@VERSION@/sample_init_scripts/hackable
dist_doc_DATA = ldmsd.conf.example ldmsd.example README
5 changes: 5 additions & 0 deletions util/sample_init_scripts/hackable/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
These scripts are deprecated.

* ldmsd.example is an init script that may need local modifications depending on where the associated configuration file (ldmsd.conf), pid files, etc. should be placed. When running as a user these files will need to be placed in a user read/write-able location. The normal place to put this file when running as root is /etc/init.d/ldmsd

* ldmsd.conf.example is a configuration file that is utilized by the ldmsd init script to define machine specific information such as hostname to component ID mapping, what metric sets are to be collected, where to write log files etc. The normal location for this file would be in /etc/sysconfig/ldmsd.conf. When running as a user this file will need to be placed in a user read/write-able location.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions util/sample_init_scripts/rhel/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

docdir = $(datadir)/doc/@PACKAGE@-@VERSION@/sample_init_scripts/rhel
SUBDIRS= etc
dist_doc_DATA = \
README
24 changes: 24 additions & 0 deletions util/sample_init_scripts/rhel/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
To test, copy the etc/ layout here into your /etc or imageroot/etc/
and then cd to imageroot (or / if no imageroot) and:

make prefix=`pwd` -f etc/ldms/makeldmsconf
to generate ldms-aggd.conf

The plan here is to set up a rhel-like set of init scripts for:
$PREFIX/sbin/ldmsd - the sampler service
$PREFIX/sbin/ldms-aggd - the aggregation service, a symlink to ldmsd in 1.3

where each (X=ldms-aggd ldmsd) has:
init.d/X service script
sysconfig/X service configuration scalar values list
sysconfig/X.conf service node data generated with
/etc/ldms/makeldmsconf.
and jointly they have init.d/ldms-functions

We will need corresponding man pages:
X(5)
X.conf(5)
X(8)
makeldmsconf(8)
ldms-two-level-config

4 changes: 4 additions & 0 deletions util/sample_init_scripts/rhel/etc/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

docdir = $(datadir)/doc/@PACKAGE@-@VERSION@/sample_init_scripts/rhel/etc
SUBDIRS= init.d ldms sysconfig
dist_doc_DATA =
16 changes: 16 additions & 0 deletions util/sample_init_scripts/rhel/etc/init.d/CHANGES
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
2/6/2015
* Split sampler (ldmsd) from aggregator (ldms-aggd)
* Split common support functions to /etc/init.d/ldms-functions
* Qualified kill statements by $USER, as restarting root daemons should not kill user daemons.
* Moved LDMS_RDMAV_FORK_SAFE to conf file
* tab indent everywhere
* got rid of agg vs node prefix on vars which never meet.
* minimized diff of init.d/ldms*

Init process for each daemon X is:
/etc/init.d/$X
load stock functions
load /etc/sysconfig/$X
then at point of starting, function in init.d/ldms-functions handle
parse /etc/sysconfig/$X.conf which is a generated file for aggs primarily.

3 changes: 3 additions & 0 deletions util/sample_init_scripts/rhel/etc/init.d/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

docdir = $(datadir)/doc/@PACKAGE@-@VERSION@/sample_init_scripts/rhel/etc/init.d
dist_doc_DATA = CHANGES ldms-aggd ldmsd ldms-functions
Loading

0 comments on commit 75c796f

Please sign in to comment.