Team administration

Team notes

Do not put anything private in here - passwords should be stored securely elsewhere.

DNS entries

DNS registrations are held at https://admin.ukservers.net/main

Reminders for renewals will be sent to Ton.

To renew a DNS registration:
* goto https://admin.ukservers.net/main
* click on Renewals
* checkout
* pay with team paypal account

Leavers

These are the steps for someone leaving the team.

Leaver has to:
- Update all current tracker items

Administration tasks:
- Reassign leaver's tracker items to project lead
- Remove from Sourceforge's list of developers. This will include CVS access. Do not
need to remove from CVS avail file
- If applicable, remove from mailing list administrators
- Keep on nagiosplug-team mailing list, unless specifically requested to be removed

nagiosplugins.org

Responsibilities

Nagios Plugin Team responsible for:

Login

ssh -p 1022 {user}@nagiosplugins.opsera.com

Sites

There are three sites:

These are under /srv/www.

Site promotion


cd /srv/www
copy_site {site name}

This will copy the site across, taking files + database if applicable.

Scripts

Stored under /usr/local/nagiosplugin/bin. TODO: use git to version control - speak to Thomas

Man page updates

This is invoked from a cron job by the nagiosplugins user, running the /home/nagiosplugins/bin/np_build_from_sf script. This calls the update_man_pages script which updates the drupal database with the latest --help output.

If a new plugin is added, the script will fail. You need to manually add the page in drupal and then re-run. When adding a page:

Emails get sent to Ton on failure.

Backups

Run from tonvoon's crontab at 3am UK time. Backs up into /srv/backups, files and database. Retains last 30 backups.

Directory is rsync onto Ton's home server.

Restores


gunzip -c /srv/backups/nagiosplugins.latest.db.gz | mysql -u root dev
cd /srv/www/dev.nagiosplugins.org
tar --gzip -xvf /srv/backups/nagiosplugins.latest.tar.gz

Then check http://dev.nagiosplugins.org

Users and groups

Will have two groups:

Only npadmin have sudo access to root (to review).

Will have 1 user called nagiosplugins to handle cronjobs and drupal. Any one in the nagioplugins team can switch to this application user:

sudo su - nagiosplugins

New users

Only npadmin group can do.

sudo useradd -g nagiosplugins -s /bin/bash -d /home/{user} -m {user}
sudo passwd {user} # Set to some random one
sudo usermod -G npadmin {user} # If team admin

User should then sort out their ssh keys and password:

passwd
ssh -p 1022 {user}@nagiosplugins.opsera.com
mkdir .ssh
exit
scp -P 1022 {id_dsa.pub} {user}@nagiosplugins.opsera.com:.ssh/authorized_keys
ssh -p 1022 {user}@nagiosplugins.opsera.com # Check key works

Removing users


sudo userdel {user}

mysql

Mysql root password held by Ton and Holger.

New starters

We are always interested in new team members! This explains the criteria for adding a new member and what the process is for adding them in.

Evaluation of proposed team member

- What has their previous attitude been like? Receptive to team's comments?
- What have they got planned as their first tasks? (We do not want to add in more plugins)
- Can we add some testing actions to their first tasks
- Are they interested in handling bug reports and reviewing patches contributed by others?
- Can they look at and review bugs/patches for the plugins they are initially looking at?

Actions to add them to team

Need to know:
- Name
- Primary email for nagiosplug-team mailings
- Sourceforge id
- Type of member (translator, developer, release manager, project administrator)

1. Add member to nagiosplug-team mailing list (https://lists.sourceforge.net/lists/admin/nagiosplug-team)
and to the nagiosplug-checkins mailing list (https://lists.sourceforge.net/lists/admin/nagiosplug-checkins,
add sourceforge email address via Privacy Options->Sender filters)
2. Add Sourceforge access:
- Translator: Git access, Shell access, Release Tech (no)
- Developer: Project role: Developer, Git access, Shell access, Release Tech (no), Task Manager (A&T),
Forums (Moderator), Doc Manager (Editor)
Update Developer Permissions.
For each tracker, set to Technician (need to add all trackers first, then change to
technician for each one)
3. Add to CVS avail file (deprecated?):
- Translator: Add member to translation files
- Developer: Add member to CVSROOT/avail for all files
4. Send email to nagiosplug-team introducing new member
5. Recommend joining #nagios-devel on Freenode

Releasing

NOTES ON RELEASING NEW VERSION OF NAGIOSPLUG

NB: A copy of this document is located at:
http://nagiosplugins.org/node/96

*** Pre-release
git pull
. tools/devmode, if feeling adventurous
check compilation, check tinderbox screens

*** Prepare and commit files
Update BUGS, NEWS file
Update AUTHORS if new members
Update configure.in, package.def and NP-VERSION-GEN with version
Run git2cl (get from http://josefsson.org/git2cl/):
git2cl >Changelog
commit BUGS NEWS configure.in package.def ChangeLog NP-VERSION-GEN

*** Create new tag and push to SF
git tag -a -m release-1.4.15 release-1.4.15
git push --tags

*** Checkout new version
rm -fr /tmp/nagioslug
# If you need to checkout the tag, don't forget to "checkout master" later to
# get back to your development branch:
git checkout tags/release-1.4.14
# Beware: the trailing slash of --prefix is REQUIRED
git checkout-index --prefix=/tmp/nagiosplugins/ -a

*** Build the tarball
cd /tmp/nagiosplugins
tools/setup
./configure
make dist

*** Upload generated tarball to sourceforge
** These steps have changed due to SF procedural changes - need revising
Setup account on SF to allow SSH access:
ssh -t USER,nagiosplug@shell.sourceforge.net create

Goto filesystem UI: https://sourceforge.net/project/admin/explorer.php?group_id=29880
Create a subdirectory under nagiosplug for the release version

Upload file to new release directory, eg:
scp nagios-plugins-1.4.14.tar.gz USER,nagiosplug@frs.sourceforge.net:/home/frs/project/n/na/nagiosplug/nagiosplug/1.4.14

SF -> Develop -> News -> Submit

Add news item to http://nagiosplugins.org/nagiosplugins-{release}
"Proud to announce...."
Summary about release
List all people on team involved.
Add acknowledgement to contributors
Link to download at https://sourceforge.net/projects/nagiosplug/files/
Include contents of NEWS for this release. Use this perl script to convert NEWS to wiki format:


perl -pe 'BEGIN { $in_release=0} if(/^[\d\.]+/ && $in_release) { exit} if($in_release) { s/^\t//; s/^/ * / unless (/^[A-Z]*$/) } if(/^[\d\.]+/ && $in_release==0) { $in_release=1 }' NEWS

Publish to front page.

SF -> Submit News about release. Make sure it is called "Nagios Plugins" (with those caps)
Link to plugins site news article

*** Announce new release
Send email to nagiosplug-help, nagios-announce with the summary and link to nagiosplugins.org
Send email to Ethan directly to update nagios.org site.

Releasing Nagios::Plugin

Update Changes file

Update version in lib/Nagios/Plugin.pm and lib/Nagios/Plugin/Functions.pm

Commit

perl Makefile.PL
make
make test
make dist

Login to http://pause.perl.org
Upload new file

Update tarball in nagiosplug if required.

Send email to nagiosplug-help mailing list.

Snapshots

Snapshot Process

Snapshots are run on nagiosplugins.org by the nagiosplugins user via cron every hour.

This executes the bin/sfsnapshot-upload script which uses a git repo in ~/staging. If there have been changes, then it uploads to SF.

The upload to SF uses the SSH key pair for the nagiosplugins user. The public key is associated with Ton's SF account, so don't misuse it!

The master sfsnapshot-upload and associated sfsnapshotgit are held in git under tools/.

Adding a branch

These steps are UNESTED for now...

Adding the branch "nagiosplug-branch" to the snapshots (the branch must already be in the official Git repository):

  1. From the ~/staging/nagiosplugins repository, checkout and create the local tracking branch

    $ git checkout origin/nagiosplug-branch
    $ git checkout -b nagiosplug-branch

  2. Add the branch to the cronjob arguments. i.e. change this:

    0 * * * * /home/nagiosplugins/bin/sfsnapshot-upload master 2>/home/nagiosplugins/sfsnapshot-upload.log || cat /home/nagiosplugins/sfsnapshot-upload.log 1>&2

    To this:

    0 * * * * /home/nagiosplugins/bin/sfsnapshot-upload master nagiosplug-branch 2>/home/nagiosplugins/sfsnapshot-upload.log || cat /home/nagiosplugins/sfsnapshot-upload.log 1>&2

  3. On the next run, verify the log (~/sfsnapshot-upload.log)

Removing a branch

These steps are UNESTED for now...

Removing the branch "nagiosplug-branch" from the snapshots:

  1. Remove the branch to the cronjob arguments. i.e. change this:

    0 * * * * /home/nagiosplugins/bin/sfsnapshot-upload master nagiosplug-branch 2>/home/nagiosplugins/sfsnapshot-upload.log || cat /home/nagiosplugins/sfsnapshot-upload.log 1>&2

    To this:

    0 * * * * /home/nagiosplugins/bin/sfsnapshot-upload master 2>/home/nagiosplugins/sfsnapshot-upload.log || cat /home/nagiosplugins/sfsnapshot-upload.log 1>&2

  2. From the ~/staging/nagiosplugins repository, remove the local tracking branch

    $ git branch -D nagiosplug-branch

  3. On the next run, verify the log (~/sfsnapshot-upload.log)
  4. Verify that next run actually remove all related files and erase this line.