]> scripts.mit.edu Git - wizard.git/blob - README
Clarify size of indents.
[wizard.git] / README
1 Wizard is the new autoinstaller management system for
2 scripts.mit.edu.  It resides on not-backward.mit.edu at:
3
4     /wizard
5
6 Developers, read on:
7
8 == Compatibility ==
9
10 This is Python 2.6 only!
11
12 == Module overview ==
13
14 - deploy: object model for autoinstall deployments, applications
15     and versions
16
17 - shell: subprocess wrapper that does logging, error handling
18     and asynchronous processing
19
20 - sset: "serialized set", use in a mass* command for tracking
21     what installs have already been seen and successfully processed
22
23 - util: miscellaneous utility functions, right now mostly one-off
24     parsing and convenience wrappers
25
26 == 'command' package ==
27
28 To add a new command to wizard, you need to touch the following
29 locations:
30
31 - bin/wizard
32     Add a line describing your command in the helpstring
33
34 - wizard/command/commandname.py
35     Implement your command there as main(). Copy the function
36     signature and scaffolding from another file; it's non-trivial
37
38 As a command file, you're expected to have a main() and parse_args()
39 function.  Try to keep main() one to two page function that can
40 be browsed for a descriptive overview of what the command does
41 internally.  Use helper functions liberally.  Place all error classes
42 at the bottom.
43
44 == 'app' package ==
45
46 There is a certain amount of application specific code that
47 needs to be written for each autoinstaller.  These go here.
48
49 == Notes when fiddling with application repositories ==
50
51 - 'git rebase -p -i' is your friend.  Use it to rewrite history!
52
53 - The obvious scripts specific change that a new repository
54   will have are the patches, but you should also check the
55   autoinstall scripts if they do anything special.  In particular:
56
57     - If it's a PHP application, it's probably inserting a php.ini
58       file and creating symlinks to it.  Be sure to replace the
59       appropriate values with placeholders WIZARD_SESSIONNAME
60       and WIZARD_TMPDIR
61
62     - You will probably need to generate relevant configuration
63       files for each version
64
65 == Design decisions ==
66
67 - A mass tool will plow ahead even if the subcommand throws
68   Wizard errors.  Normal errors will cause us to halt
69   completely.  If the error that occured is within the realm
70   of possibly, and should be dealt with by manual intervention
71   (or even possibly a code change), and would not cause harm
72   if we continued going, we will keep going, and let the maintainer
73   deal later on with the errors en masse.
74
75 - We use the Google Python style guide.  See:
76     http://code.google.com/p/soc/wiki/PythonStyleGuide
77   However, we use 4-space indents, not 2-space indents.