]> scripts.mit.edu Git - wizard.git/blob - TODO
Remove unnecessary commands, add help to install.
[wizard.git] / TODO
1 The Git Autoinstaller
2
3 TODO NOW:
4
5 - Do early validation of inputs for configuration
6 - Let 'wizard configure' be interactive
7 - Parse output HTML for class="error" and give those errors back to the user,
8   then boot them back into configure
9 - Indicate a default is available in the --help message.
10
11 - Keep my sanity when upgrading 1000 installs
12     - Replace gaierror with a more descriptive name (this is a DNS error)
13
14 - Make the rest of the world use Wizard
15     - Make parallel-find.pl use `sudo -u username git describe --tags`
16       to determine version.  Make parallel-find.pl have this have greater
17       precedence.  This also means, however, that we get
18       full mediawiki-1.2.3-2-abcdef names (Have patch, pending testing and commit)
19     - Make deployed installer use 'wizard install' /or/ do a migration
20       after doing a normal install (the latter makes it easier
21       for mass-rollbacks).
22
23 - Pre-emptively check if daemon/scripts-security-upd
24   is not on scripts-security-upd list (/mit/moira/bin/blanche)
25
26 - Redo Wordpress conversion, with an eye for automating everything
27   possible (such as downloading the tarball and unpacking)
28
29 - Web application for installing autoinstalls has a hard problem
30   with credentials (as well as installations that are not conducted
31   on an Athena machine.)  Possible solutions include asking the user
32   to SSH into an athena machine and run a bunch of commands, or writing
33   a Java applet (possibly in Clojure or Scala) which gets filesystem
34   permissions and then performs the operations.
35
36 - Pay back code debt
37     - Genericize callAsUser and drop_priviledges in shell
38     - Summary script should be more machine friendly, and should not
39       output summary charts when I increase specificity
40     - Summary script should do something intelligent when distinguishing
41       between old-style and new-style installs
42     - Report code in wizard/command/__init__.py is ugly as sin.  Also,
43       the Report object should operate at a higher level of abstraction
44       so we don't have to manually increment fails. (in fact, that should
45       probably be called something different).  The by-percent errors should
46       also be automated.
47     - Indents in upgrade.py are getting pretty ridiculous; more breaking
48       into functions is probably a good idea
49     - Move resolutions in mediawiki.py to a text file? (the parsing overhead
50       may not be worth it)
51     - Investigate QuotaParseErrors
52     - If a process is C-ced, it can result in a upgrade that has
53       an updated filesystem but not updated database. Make this more
54       resilient
55     - PHP end of file allows omitted semicolon, can result in parse error
56       if merge resolutions aren't careful.
57
58 - Other stuff
59     - Make single user mass-migrate work when not logged in as root
60     - Don't use the scripts heuristics unless we're on scripts with the
61       AFS patch.  Check with `fs sysname`
62     - Make 'wizard summary' generate nice pretty graphs of installs by date
63       (more histograms, will need to check actual .scripts-version files.)
64     - It should be able to handle installs like Django where there's a component
65       that gets installed in web_scripts and another directory that gets installed
66       in Scripts.
67     - ACLs is a starting point for sending mail to users, but it has
68       several failure modes:
69         - Old maintainers who don't care who are still on the ACL
70         - Private AFS groups that aren't mailing lists and that we
71           can't get to
72       A question is whether or not sending mail actually helps us:
73       many users will probably have to come back to us for help; many
74       other users won't care.
75
76 PULLING OUT CONFIGURATION FILES IN AN AUTOMATED MANNER
77
78 advancedpoll: Template file to fill out
79 django: Noodles of template files
80 gallery2: Multistage install process
81 joomla: Template file
82 mediawiki: One-step install process
83 phpbb: Multistage install process
84 phpical: Template file
85 trac: NFC
86 turbogears: NFC
87 wordpress: Multistage install process
88
89 COMMIT MESSAGE FIELDS:
90
91 Installed-by: username@hostname
92 Pre-commit-by: Real Name <username@mit.edu>
93 Upgraded-by: Real Name <username@mit.edu>
94 Migrated-by: Real Name <username@mit.edu>
95 Wizard-revision: abcdef1234567890
96 Wizard-args: /wizard/bin/wizard foo bar baz
97
98 GIT COMMIT FIELDS:
99
100 Committer: Real Name <username@mit.edu>
101 Author: lockername locker <lockername@scripts.mit.edu>
102
103 NOTES:
104
105 - It is not required nor expected for update scripts to exist for all
106   intervening versions that were present pre-migration; only for it
107   to work on the most recent migration.
108
109 - Currently all repositories are initialized with --shared, which
110   means they have basically ~no space footprint.  However, it
111   also means that /mit/scripts/wizard/srv MUST NOT lose revs after
112   deployment.
113
114 OVERALL PLAN:
115
116 * Some parts of the infrastructure will not be touched, although I plan
117   on documenting them.  Specifically, we will be keeping:
118
119     - parallel-find.pl, and the resulting
120       /mit/scripts/.htaccess/scripts/sec-tools/store/scriptslist
121
122 * The new procedure for generating an update is as follows:
123   (check out the mass-migration instructions for something in this spirit,
124   although uglier in some ways; A indicates the step /should/ be automated)
125
126     0. ssh into not-backward, temporarily give the daemon.scripts-security-upd
127        bits by blanching it on system:scripts-security-upd, and run parallel-find.pl
128
129     1. Have the Git repository and working copy for the project on hand.
130
131     2. Checkout the pristine branch
132
133     3. Run wizard `prepare-pristine APP-VERSION`
134
135     4. Checkout the master branch
136
137     5. [FOR EXISTING REPOSITORIES]
138        Merge the pristine branch in. Resolve any conflicts that our
139        patches have with new changes. Do NOT let Git auto-commit it
140        with --no-commit (otherwise, you want to git commit --amend
141        to keep our history clean
142
143        [FOR NEW REPOSITORIES]
144        Check if any patches are needed to make the application work
145        on Scripts (ideally, it shouldn't.)  Run
146        `wizard prepare-new` to setup common filesets for our repositories.
147
148        If you are running a PHP script, there is usually a php.ini file
149        that we package.  You can see previous instances of this patch
150        at /mit/scripts/deploy/php.ini/ as well as in the repositories
151        of any already migrated scripts.  We hope to make these changes
152        unnecessary once PHP 5.3 arrives.
153
154     6. Check if there are any special update procedures, and update
155        the wizard.app.APPNAME module accordingly (or create it, if
156        need be).
157
158     7. Run 'wizard prepare-config' on a scripts server while in a checkout
159        of this newest version.  This will prepare a new version of the
160        configuration file based on the application's latest installer.
161        Manually merge back in any custom changes we may have made.
162        Check if any of the regular expressions need tweaking by inspecting
163        the configuration files for user-specific gunk, and modify
164        wizard.app.APPNAME accordingly.
165
166     8. Commit your changes, and tag as v1.2.3-scripts (or scripts2, if
167        you are amending an install without an upstream changes)
168
169       NOTE: These steps should be run on a scripts server
170
171     9. Test the new update procedure using our test scripts.  See integration
172        tests for more information on how to do this.
173
174         http://scripts.mit.edu/wizard/testing.html#acceptance-tests
175
176       GET APPROVAL BEFORE PROCEEDING ANY FURTHER
177
178       NOTE: The following commands are to be run on not-backward.mit.edu.
179       You'll need to add daemon.scripts-security-upd to
180       scripts-security-upd to get bits to do this.  Make sure you remove
181       these bits when you're done.
182
183    10. Run `wizard research appname`
184        which uses Git commands to check how many
185        working copies apply the change cleanly, and writes out a logfile
186        with the working copies that don't apply cleanly.  It also tells
187        us about "corrupt" working copies, i.e. working copies that
188        have over a certain threshold of changes.
189
190    11. Run `wizard mass-upgrade appname`, which applies the update to all working
191        copies possible.
192
193    12. Run parallel-find.pl to update our inventory
194
195 * For mass importing into the repository, there are a few extra things:
196
197     * Many applications had patches associated with them.  Be sure to
198       apply them, so later merges work better.
199
200         # the following operation might require -p1
201         patch -p0 < ../app-1.2.3/app-1.2.3.patch  # [FIDDLY BIT]
202
203     * When running updates, if the patch has changed you will have to
204       do a special procedure for your merge:
205
206         git checkout pristine
207         # NOTE: Now, the tricky part (this is different from a real update)
208         git symbolic-ref HEAD refs/heads/master
209         # NOTE: Now, we think we're on the master branch, but we have
210         # pristine copy checked out
211         # NOTE: -p0 might need to be twiddled
212         patch -p0 < ../app-1.2.3/app-1.2.3.patch
213         git add .
214         # reconstitute .scripts directory
215         git checkout v1.2.2-scripts -- .scripts
216         git add .scripts
217         # NOTE: Fake the merge
218         git rev-parse pristine > .git/MERGE_HEAD
219
220       You could also just try your luck with a manual merge using the patch
221       as your guide.
222
223 * The repository for a given application will contain the following files:
224
225     - The actual application's files, as from the official tarball
226
227     - A .scripts directory, with the intent of holding Scripts specific files
228       if they become necessary.
229