Difference between revisions of "Teabag"

From CoGepedia
Jump to: navigation, search
m
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Teabag - CoGe's Utility Belt =
+
= Teabag - CoGe's Utility Belt =
  
Teabag is a bash script that manages CoGe services abstracting away the need for multiple, messy CLI calls.
+
Teabag is a bash script that manages CoGe services abstracting away the need for multiple, messy CLI calls.  
 +
 
 +
== Dependencies  ==
 +
 
 +
Teabag has a few dependencies for operation and formatting that might not come default on most unix systems. They are:<br>
 +
 
 +
*pgrep - a process grep program
 +
*pkill - a process killer program
  
 
== Installation  ==
 
== Installation  ==
Line 8: Line 15:
  
 
#<code>mv &lt;the teabag script&gt; /usr/local/bin/teabag</code>  
 
#<code>mv &lt;the teabag script&gt; /usr/local/bin/teabag</code>  
#<code>sudo chmod 755 teabag</code>
+
#<code>sudo chmod 755 teabag</code><code></code><code></code>
  
=== Configuration  ===
+
== Configuration  ==
  
Configuration is as simple as changing some config variables in the script.  
+
Configuring Teabag to work on your system is as simple as changing some config variables in the script.  
  
#Open the teabag script in your favorite text editor and change the configuration settings at the top.
+
Open the teabag script in your favorite text editor and change these configuration settings located at the top of the file:
 +
 
 +
<code></code>
 +
 
 +
<code></code>
  
 
<code>
 
<code>
Line 20: Line 31:
 
  #    Configuration Settings    #  
 
  #    Configuration Settings    #  
 
  ##################################
 
  ##################################
  GREENTEA_DIR='<Greentea's Root Path>'  
+
  GREENTEA_DIR='&lt;Greentea's Root Path&gt;'  
 
  GREENTEA_LOG_FILE='$GREENTEA_DIR/logs/error.log'
 
  GREENTEA_LOG_FILE='$GREENTEA_DIR/logs/error.log'
 
  URL='geco.iplantc.org/analytics'
 
  URL='geco.iplantc.org/analytics'
Line 26: Line 37:
 
</code>
 
</code>
  
== Usage ==
+
<code></code>
 +
 
 +
<code></code>
 +
 
 +
== Usage ==
  
To '''start''' up all the currently configured processes:
+
To '''start''' up all the currently configured processes:  
  
*<code>teabag</code>  
+
*<code>teabag</code>
  
To '''start specific''' processes:
+
To '''start specific''' processes:  
  
*<code>teabag infuse &lt;process&gt;</code>  
+
*<code>teabag infuse &lt;process&gt;</code>
  
To '''check''' which '''processes''' Teabag is currently configured for:
+
To '''check''' which '''processes''' Teabag is currently configured for:  
  
*<code>teabag processes</code>  
+
*<code>teabag processes</code>
  
To '''check''' the '''status''' of all currently configured proccesses:
+
To '''check''' the '''status''' of all currently configured proccesses:  
  
*<code>teabag status</code>  
+
*<code>teabag status</code>
  
To '''kill''' all running processes:
+
To '''kill''' all running processes:  
  
*<code>teabag kill</code>  
+
*<code>teabag kill</code>
  
To '''kill specific''' processes:
+
To '''kill specific''' processes:  
  
*<code>teabag kill &lt;process&gt;</code>  
+
*<code>teabag kill &lt;process&gt;</code>
  
To list all usable '''commands''':
+
To list all usable '''commands''':  
  
*<code>teabag usage</code>  
+
*<code>teabag usage</code>
  
To restart the '''apache''' server alone:
+
To restart the '''apache''' server alone:  
  
*<code>teabag apache</code>  
+
*<code>teabag apache</code>
  
For '''help''' with any commands:
+
For '''help''' with any commands:  
  
 
*<code>teabag help &lt;command&gt;</code>
 
*<code>teabag help &lt;command&gt;</code>

Latest revision as of 14:43, 22 February 2013

Teabag - CoGe's Utility Belt

Teabag is a bash script that manages CoGe services abstracting away the need for multiple, messy CLI calls.

Dependencies

Teabag has a few dependencies for operation and formatting that might not come default on most unix systems. They are:

  • pgrep - a process grep program
  • pkill - a process killer program

Installation

Teabag comes pre-installed on the coge dev server, but if you don't have access to this fine machine never fear:

  1. mv <the teabag script> /usr/local/bin/teabag
  2. sudo chmod 755 teabag

Configuration

Configuring Teabag to work on your system is as simple as changing some config variables in the script.

Open the teabag script in your favorite text editor and change these configuration settings located at the top of the file:

################################## 
#     Configuration Settings     # 
##################################
GREENTEA_DIR='<Greentea's Root Path>' 
GREENTEA_LOG_FILE='$GREENTEA_DIR/logs/error.log'
URL='geco.iplantc.org/analytics'
FONT='invita' 

Usage

To start up all the currently configured processes:

  • teabag

To start specific processes:

  • teabag infuse <process>

To check which processes Teabag is currently configured for:

  • teabag processes

To check the status of all currently configured proccesses:

  • teabag status

To kill all running processes:

  • teabag kill

To kill specific processes:

  • teabag kill <process>

To list all usable commands:

  • teabag usage

To restart the apache server alone:

  • teabag apache

For help with any commands:

  • teabag help <command>