wiki:hct

Version 2 (modified by Jamie McClelland, 7 years ago) (diff)

--

Here Comes Trouble

Here Comes Trouble (htc) is a package for helping the support team with communications during an outage. It facilitates communicating service advisory messages to MF/PL members.

htc consists of the following components:

  • messages git repo - this is a git repository with three subdirectories:
    • templates - pre-written and translated templates for common service advisories
    • queue - messages queued for translation or approval
    • published - messages published, a directory for each year with a directory for each message in the corresponding year
  • trouble - a bash script that simplified the creation of new messages. trouble prompts you through the process of selecting a template, creating a new message with next available number, gpg signing the message, commiting and publishing
  • post-commit hooks
    • rss-publish - generates a new RSS feed based on the most recent 25 messages
    • html-publish - generates browseable html files for the complete set of messages
    • email-publish - based on the RSS feed, emails new messages to service-advisories email list
    • status-publish - based on the RSS feed, publishes new messages on various configured status-supported systems

htc is designed to require only a workstation with the appropriate (and reasonably up-to-date) software installed and Internet access between the workstation and jojobe.mayfirst.org (our server hosted in the UK).

trouble

The primary client component is a command line program called trouble.

trouble is a helper script that helps you edit a message based on existing templates, gpg sign the message, commit and push the message.

You can checkout a copy of trouble via git: git://git.mayfirst.org/mfpl/trouble

For usage, run trouble with no arguments:

0 jamie@animal:~$ trouble 
usage 
 trouble <subcmd> <options>
 trouble message [--template <template-name>] [--search <server-search-string>] 
 trouble message [--queue]

Subcommands
 message - create a trouble message
 dns - manipulate DNS records to redirect DNS queries from servers that may be down

Options
 --template - specify the name of a pre-existing dual language template
 --search - if freepupet helper is in your PATH, this string will be passed to freepuppet-helper 
   ls:<server-search-string>, and the Servers Affected line in the service advisory will be 
   pre-populated with the results
 --resume - resume message that has been saved in the queue (for approval or translation) 

Enviornment Variables
 TROUBLE_MESSAGES_PATH - the page to the service-advisories git repository. If undefined 
 it is set to the current working directory.
Unknown or empty subcmd.
0 jamie@animal:~$