Permalink
Browse files

Updated docs and 0.3.0

  • Loading branch information...
1 parent 9ff4bad commit ae3215bbf7658c7e2d0c7c49b9daf11eec0c6a36 @dnephin dnephin committed Mar 19, 2012
Showing with 119 additions and 117 deletions.
  1. +1 −1 LICENSE.txt
  2. +20 −10 debian/changelog
  3. +32 −11 docs/config.rst
  4. +3 −4 docs/developing.rst
  5. +0 −1 docs/index.rst
  6. +2 −3 docs/jobs.rst
  7. +1 −1 docs/man/tronctl.1
  8. +1 −1 docs/man/trond.8
  9. +39 −45 docs/man/tronfig.1
  10. +4 −1 docs/man/tronview.1
  11. +3 −0 docs/man_tronview.rst
  12. +1 −2 docs/services.rst
  13. +10 −0 docs/whats-new.rst
  14. +0 −36 tools/state_update.py
  15. +2 −1 tron/__init__.py
View
@@ -1,4 +1,4 @@
-Copyright 2010 Yelp
+Copyright 2010-2012 Yelp
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
View
@@ -1,3 +1,13 @@
+tron (0.3.0) unstable; urgency=low
+
+ * !Tags, *references, and &anchors are now deprecated in the trond
+ configuration file. Support will be removed for them in 0.5.
+ * Adding an enabled option for jobs, so they can be configured as disabled by default
+ * tron commands (tronview, tronfig, tronctl) now support a global config (defaults to /etc/tron/tron.yaml)
+ * tronview will now pipe its output through 'less' if appropriate
+
+ -- Daniel Nephin <dnephin@yelp.com> Mon, 19 Feb 2012 11:35:05 -0800
+
tron (0.2.10-1) unstable; urgency=low
* ssh_options is actually optional (sjohnson)
@@ -66,7 +76,7 @@ tron (0.2.6-1) unstable; urgency=low
* Replace an aggressive assert with a log message for monitor inconsistency. Fixes #73 (rhettg)
* Handle tronview event listing issue with garbage collected entites. Fixes #70 (rhettg)
* Prevent SSH stampedes by delaying some node EXEC calls (rhettg)
-
+
-- Rhett Garber <rhettg@gmail.com> Wed, 14 Sep 2011 14:30:15 -0700
@@ -76,35 +86,35 @@ tron (0.2.5-1) unstable; urgency=low
* Fix a crash in rebuilding all services under certain reconfig scenarios. Fixes #67 (rhettg)
* Fix potential service situation where monitors would stop running after failures (rhettg)
* Additional logging around startup failures (rhettg)
-
+
-- Rhett Garber <rhettg@gmail.com> Wed, 22 June 2011 13:24:00 -0800
tron (0.2.4-1) unstable; urgency=low
* Final tronfig fix for stdout/stdin behavior (rhettg)
-
+
-- Rhett Garber <rhettg@gmail.com> Tue, 12 Apr 2011 10:50:00 -0800
tron (0.2.3-2) unstable; urgency=low
* Made tronfig work with non-interactive uploads again. (jbrown)
-
+
-- James Brown <jbrown@yelp.com> Mon, 11 Apr 2011 22:06:56 -0700
tron (0.2.3-1) unstable; urgency=low
* Resolved an issue where tronfig via stdin wouldn't catch all errors. (rhettg)
* Provided additional config time validation to catch bad configurations. (rhettg)
-
+
-- Rhett Garber <rhettg@gmail.com> Thu, 7 Apr 2011 10:50:00 -0800
tron (0.2.2-1) unstable; urgency=low
- * Resolved an issue where certain service reconfigurations would
+ * Resolved an issue where certain service reconfigurations would
cause the service to be stuck in the DOWN state (rhettg)
- * Reworked service to keep consistant instance numbers across restarts
+ * Reworked service to keep consistant instance numbers across restarts
and reconfigs (rhettg)
-
+
-- Rhett Garber <rhettg@gmail.com> Wed, 23 Mar 2011 18:26:00 -0800
tron (0.2.1-1) unstable; urgency=low
@@ -172,14 +182,14 @@ tron (0.1.6-1) unstable; urgency=low
* Fix some issues with cmp functions for jobs that caused incorrect
reconfigs (#38) (mtytel)
* Fix issue with manually starting all_node jobs/services (mtytel)
-
+
-- Rhett Garber <rhettg@gmail.com> Fri, 15 Oct 2010 15:05:00 -0700
tron (0.1.5-1) unstable; urgency=low
* Fixed crash due to config bug where SSH options were sometimes missing (rhettg)
* Tweaks to command line interface (rhettg)
-
+
-- Rhett Garber <rhettg@gmail.com> Wed, 14 Sep 2010 10:14:00 -0700
tron (0.1.4-1) UNRELEASED; urgency=low
View
@@ -3,7 +3,7 @@ Configuration
.. note::
- **The configuration system has changed significantly since version 0.2.9.**
+ **The configuration system has changed significantly since version 0.2.10.**
All existing configurations should still work, but new configurations
should follow the new conventions.
@@ -19,8 +19,8 @@ configuration can be entirely JSON, since YAML is mostly a strict superset
of JSON.)
Past versions of Tron used additional YAML-specific features such as tags,
-anchors, and aliases. These features still work in version 0.3, but are not
-recommended.
+anchors, and aliases. These features still work in version 0.3, but are now
+deprecated.
Basic Example
-------------
@@ -128,12 +128,11 @@ Command Context
**command_context**
Dictionary of custom :ref:`command context variables
- <command_context_variables>`. This attribute does *not* use a tag since it
- is an arbitrary set of key-value pairs rather than an object with a schema.
+ <command_context_variables>`. It is an arbitrary set of key-value pairs.
::
- command_context: # no tag
+ command_context:
PYTHON: /usr/bin/python
TMPDIR: /tmp
@@ -144,14 +143,36 @@ Command Context
Built-In Command Context Variables
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-.. warning::
-
- This section is incomplete. If something is missing, don't hesitate to
- `file an issue <http://www.github.com.com/yelp/Tron/issues/new>`_.
**shortdate**
Current date in ``YYYY-MM-DD`` format. Supports simple arithmetic of the
- form ``%(shortdate+6)s``, ``%(shortdate-2)s``, etc.
+ form ``%(shortdate+6)s`` which returns a date 6 days in the future,
+ ``%(shortdate-2)s`` which returns a date 2 days before the run date.
+
+**year**
+ Current year in ``YYYY`` format. Supports the same arithmetic operations
+ as `shortdate`. For example, ``%(year-1)s`` would return the year previous
+ to the run date.
+
+**month**
+ Current month in `MM` format. Supports the same arithmetic operations
+ as `shortdate`. For example, ``%(month+2)s`` would return 2 months in the
+ future.
+
+**day**
+ Current day in `DD` format. Supports the same arithmetic operations
+ as `shortdate`. For example, ``%(day+1)s`` would return the day after the
+ run date.
+
+**unixtime**
+ Current timestamp. Supports addition and subtraction of seconds. For
+ example ``%(unixtime+20)s`` would return the timestamp 20 seconds after
+ the jobs runtime.
+
+**daynumber**
+ Current day number as an ordinal (datetime.toordinal()). Supports addition
+ and subtraction of days. For example ``%(daynumber-3)s`` would be 3 days
+ before the run date.
**name**
Name of the job or service
View
@@ -18,10 +18,9 @@ Here we used ``req_dev.txt`` instead of ``req.txt`` because `Testify
Coding Standards
----------------
-Although the code is not currently `PEP8
-<http://www.python.org/dev/peps/pep-0008/>`_`-compliant, all new code should
-comply as much as possible. The documentation must also be kept up to date with
-any changes in functionality, especially the man pages.
+All code should be `PEP8 <http://www.python.org/dev/peps/pep-0008/>`_ compliant,
+and should pass pyflakes without warnings. The documentation must also be kept
+up to date with any changes in functionality, especially the man pages.
If and when you come across non-PEP8-compliant code, avoid reformatting it in
the same branch as functional changes so that code reviews are less confusing.
View
@@ -35,6 +35,5 @@ Indices and tables
==================
* :ref:`genindex`
-* :ref:`modindex`
* :ref:`search`
View
@@ -84,9 +84,8 @@ Optional Fields
^^^^^^^^^^^^^^^
**requires**
- List of pointers to actions that must complete successfully before this
- action is run. These actions must have been specifid earlier in the config
- file.
+ List of action names that must complete successfully before this
+ action is run. Actions can only require actions in the same job.
**node**
Node or node pool to run the action on if different from the rest of the
View
@@ -1,4 +1,4 @@
-.TH "TRONCTL" "1" "February 14, 2012" "0.2" "Tron"
+.TH "TRONCTL" "1" "March 19, 2012" "0.3" "Tron"
.SH NAME
tronctl \- send management commands to jobs and actions within tron
.
View
@@ -1,4 +1,4 @@
-.TH "TROND" "8" "February 14, 2012" "0.2" "Tron"
+.TH "TROND" "8" "March 19, 2012" "0.3" "Tron"
.SH NAME
trond \- trond documentation
.
View
@@ -1,4 +1,4 @@
-.TH "TRONFIG" "1" "February 14, 2012" "0.2" "Tron"
+.TH "TRONFIG" "1" "March 19, 2012" "0.3" "Tron"
.SH NAME
tronfig \- tronfig documentation
.
@@ -237,60 +237,54 @@ action.
.sp
.nf
.ft C
-\-\-\- !TronConfiguration
-
-ssh_options: !SSHOptions
- agent: true
+ssh_options:
+ agent: true
nodes:
- \- &node1
- hostname: \(aqmachine1\(aq
- \- &node2
- hostname: \(aqmachine2\(aq
- \- &pool !NodePool
- nodes: [*node1, *node2]
+ \- name: node1
+ hostname: \(aqmachine1\(aq
+ \- name: node2
+ hostname: \(aqmachine2\(aq
+
+node_pools:
+ \- name: pool
+ nodes: [node1, node2]
command_context:
PYTHON: /usr/bin/python
jobs:
- \- &job0
- name: "job0"
- node: *pool
- all_nodes: True # Every time the Job is scheduled it runs on every node in its node pool
- schedule: "interval 20s"
- queueing: False
- actions:
- \- &start
- name: "start"
- command: "echo number 9"
- node: *node1
- \-
- name: "end"
- command: "echo love me do"
- requires: [*start]
+ \- name: "job0"
+ node: pool
+ all_nodes: True # Every time the Job is scheduled it runs on every node in its node pool
+ schedule: "daily 12:00 MWF"
+ queueing: False
+ actions:
+ \- name: "start"
+ command: "echo number 9"
+ node: node1
+ \- name: "end"
+ command: "echo love me do"
+ requires: [start]
- \- &job1
- name: "job1"
- node: *node1
- schedule: "interval 20s"
- queueing: False
- actions:
- \- &action
- name: "echo"
- command: "echo %(PYTHON)s"
- cleanup_action:
- command: "echo \(aqcleaning up job1\(aq"
+ \- name: "job1"
+ node: node1
+ schedule: "interval 20s"
+ queueing: False
+ actions:
+ \- name: "echo"
+ command: "echo %(PYTHON)s"
+ cleanup_action:
+ command: "echo \(aqcleaning up job1\(aq"
services:
- \-
- name: "testserv"
- node: *pool
- count: 8
- monitor_interval: 60
- restart_interval: 120
- pid_file: "/var/run/%(name)s\-%(instance_number)s.pid"
- command: "/bin/myservice \-\-pid\-file=%(pid_file)s start"
+ \- name: "testserv"
+ node: pool
+ count: 8
+ monitor_interval: 60
+ restart_interval: 120
+ pid_file: "/var/run/%(name)s\-%(instance_number)s.pid"
+ command: "/bin/myservice \-\-pid\-file=%(pid_file)s start"
.ft P
.fi
.SH FILES
View
@@ -1,4 +1,4 @@
-.TH "TRONVIEW" "1" "February 14, 2012" "0.2" "Tron"
+.TH "TRONVIEW" "1" "March 19, 2012" "0.3" "Tron"
.SH NAME
tronview \- tronview documentation
.
@@ -94,6 +94,9 @@ Don\(aqt display preface
.B \-c, \-\-color
Display in color
.TP
+.B \-\-nocolor
+Display without color
+.TP
.B \-o, \-\-stdout
Solely displays stdout
.TP
View
@@ -57,6 +57,9 @@ Options
-c, --color
Display in color
+--nocolor
+ Display without color
+
-o, --stdout
Solely displays stdout
View
@@ -72,8 +72,7 @@ States
Examples
--------
-Here is the example from :ref:`Overview: Services <overview_services>`, but
-with the correct anchor and tag::
+Here is the example from :ref:`Overview: Services <overview_services>`::
# ...
services:
View
@@ -1,6 +1,16 @@
What's New
==========
+0.3.0
+-----
+
+* **!** (tags), **\*** (references), and **&** (anchors) are now deprecated in the trond
+ configuration file. Support will be removed for them in 0.5.
+* Adding an enabled option for jobs, so they can be configured as disabled by default
+* tron commands (tronview, tronfig, tronctl) now support a global config (defaults to /etc/tron/tron.yaml)
+* tronview will now pipe its output through 'less' if appropriate
+
+
0.2.10
------
Oops, something went wrong.

0 comments on commit ae3215b

Please sign in to comment.