|
| 1 | +Welcome to Runsheet V2 (RsV2). This guide will help you understand how |
| 2 | +to setup this software and how it works under the hood. |
| 3 | + |
| 4 | +## What is RsV2? |
| 5 | + |
| 6 | +RsV2 is a second iteration, re-written from scratch, of an original |
| 7 | +runsheet script which given a set of tasks and their dependencies, |
| 8 | +scheduled them in the most time optimized arrangement and provided a UI |
| 9 | +to help tracking the progress of those tasks. You can think of it as a |
| 10 | +simpler, collaborative and more focused Gantt chart with live task |
| 11 | +status updates. |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +## What can I use it for? |
| 16 | + |
| 17 | +RsV2 can be used to track a weekend roll out for instance. You have a |
| 18 | +bunch of tasks that must be done in a certain order, such as putting up |
| 19 | +a maintenance notice, taking systems down, upgrading and testing. RsV2’s |
| 20 | +real advantage comes into play when multiple people are involved and |
| 21 | +prompt starting and finishing of tasks is of importance. |
| 22 | + |
| 23 | +## Features |
| 24 | + |
| 25 | +* RDBMS backed storage for tasks and runsheets |
| 26 | +* Multiple runsheets per server |
| 27 | +* Lax requirements on how the tasks and runsheets are stored |
| 28 | +* Completely reactive UI with live collaborative features. |
| 29 | +* Automatic time divisions based on total run time |
| 30 | +* Support for variety of database backends |
| 31 | +* Start time and “Behind Schedule” notifications |
| 32 | +* Single Go binary for ease of deployment (not static yet!) |
| 33 | +* Multi-platform support |
| 34 | + |
| 35 | +## Build & Install |
| 36 | + |
| 37 | +``` |
| 38 | +go generate |
| 39 | +go install -tags prod |
| 40 | +``` |
| 41 | + |
| 42 | +## Quick Demo |
| 43 | + |
| 44 | +Run `runsheet -config example-config.json` and open your browser at |
| 45 | +http://localhost:8080 |
| 46 | + |
| 47 | +## Setup |
| 48 | + |
| 49 | +### Config |
| 50 | + |
| 51 | +RsV2 is configured using a file named `config.yaml` which must be placed |
| 52 | +in either: same directory as the executable; `/etc/runsheet`; |
| 53 | +`$HOME/.runsheet` or their equivalent locations on other platforms. |
| 54 | + |
| 55 | +`config.yaml` has the following format: |
| 56 | + |
| 57 | +```yaml |
| 58 | +# Optional |
| 59 | +Listen: :8080 |
| 60 | + |
| 61 | +# A comment starting with hash character |
| 62 | +ConnectionUrl: dbdriver://… |
| 63 | +RunsheetsSql: select * from … |
| 64 | +``` |
| 65 | +
|
| 66 | +`Listen` specifies which interface and port number to listen for |
| 67 | +connections to serve the UI. `:8080` is the default and means: serve on |
| 68 | +port `8080` on all interfaces. To limit to localhost for instance, you |
| 69 | +can use `127.0.0.1:8080`. |
| 70 | + |
| 71 | +`ConnectionUrl` specifies which DB driver to use and what parameters to |
| 72 | +pass, such as username, password, host and others. Following are |
| 73 | +examples of `ConnectionUrl`s for various supported databases: |
| 74 | + |
| 75 | +```yaml |
| 76 | +-# Oracle - Oracle Instant Client Basic is required |
| 77 | +-ConnectionUrl: goracle://username/password@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=host.name.com)(PORT=1530)))(CONNECT_DATA=(SERVICE_NAME=MY_SERVICE_NAME))) |
| 78 | +
|
| 79 | +# Microsoft SQL |
| 80 | +ConnectionUrl: sqlserver://username:password@host.name.com?database=my_db |
| 81 | +
|
| 82 | +# SQLite |
| 83 | +ConnectionUrl: sqlite3://./relative/path/to/test.db |
| 84 | +``` |
| 85 | + |
| 86 | +`RunsheetsSql` is a query or otherwise any valid SQL for the given |
| 87 | +database that retrieves the list of runsheets. |
| 88 | + |
| 89 | +### Runsheet |
| 90 | + |
| 91 | +A **runsheet** is simply a list of tasks and their dependencies. |
| 92 | +`RunsheetsSql` must return the following columns (some optional): |
| 93 | + |
| 94 | +* `id` (string): ID of the runsheet |
| 95 | +* `name` (string)(optional): name or title of the runsheet — supports |
| 96 | + markdown |
| 97 | +* `description` (string)(optional): runsheet description — supports |
| 98 | + markdown |
| 99 | +* `connection_url` (string): Same format as `ConnectionUrl` above but |
| 100 | + for this runsheet |
| 101 | +* `tasks_sql` (string): SQL to get the list of tasks |
| 102 | +* `update_sql` (string): SQL to update status of a task |
| 103 | +* `start_time` (string)(optional): start time and date of the first task |
| 104 | + |
| 105 | +All column names are case sensitive and `RunsheetsSql` must not retrieve |
| 106 | +any column that is not specified above. |
| 107 | + |
| 108 | +`tasks_sql` is a query or otherwise any valid SQL for the given database |
| 109 | +that retrieves the list of tasks for the corresponding runsheet. |
| 110 | + |
| 111 | +### Task |
| 112 | + |
| 113 | +A **task** is an undertaking assigned to a specific resource (person) |
| 114 | +and has defined duration in minutes. It may also have dependencies on |
| 115 | +other tasks. `tasks_sql` must return the following columns (some |
| 116 | +optional): |
| 117 | + |
| 118 | +* `id` (string): Task ID |
| 119 | +* `name` (string)(optional): Task name — supports markdown |
| 120 | +* `description` (string)(optional): Task description — supports markdown |
| 121 | +* `assignee` (string): Name of assignee |
| 122 | +* `duration` (number): Task duration in minutes |
| 123 | +* `status` (string): Task status which must be one of `idle`, `ongoing` |
| 124 | + or `done` |
| 125 | +* `dependees` (string): List of task IDs this task depends on, each |
| 126 | + separated by `|` |
| 127 | + |
| 128 | +All column names are case sensitive and `tasks_sql` must not retrieve |
| 129 | +any column that is not specified above. |
| 130 | + |
| 131 | +As an example of `dependees`: say we have three tasks with IDs of `A`, |
| 132 | +`B` and `C`. If `C` depends on `A` and `B`, then `C`’s record will have |
| 133 | +`A|B` in the `dependees` column. |
| 134 | + |
| 135 | +`update_sql` is a valid SQL for the given database which updates status |
| 136 | +for a given task. All occurrences of `{{task}}` inside `update_sql` will |
| 137 | +be replaced with ID of the task whose status is being updated. All |
| 138 | +occurences of `{{status}}` inside `update_sql` will be replaced with the |
| 139 | +new status of the task. Below is an example: |
| 140 | + |
| 141 | +``` |
| 142 | +update tasks set "status" = '{{status}}' where "id" = '{{task}}' |
| 143 | +``` |
| 144 | + |
| 145 | +Note that no DB aware substitutions are done. Thus you’re required to |
| 146 | +quote literal string values in your SQL. |
| 147 | + |
| 148 | +`start_time` is a string representation of the start time and date the |
| 149 | +earliest task in the runsheet is to be stamped with. Regular interval |
| 150 | +timestamps are shown on the left side of a runsheet UI. You may use any |
| 151 | +format supported by Javascript. Following is recommended: `2018-10-25 |
| 152 | +18:10:00 EST` where `EST` defines the time zone, in this case Australian |
| 153 | +Eastern Standard Time. You may use an offset instead, such as `+11:00` |
| 154 | +or [other abbreviations](https://www.timeanddate.com/time/zones/). |
0 commit comments