5 - Keep my sanity when upgrading 1000 installs
6 - Custom merge algo: absolute php.ini symlinks to relative symlinks (this
7 does not seem to have been a problem in practice)
8 - Prune -7 call errors and automatically reprocess them (with a
9 strike out counter of 3)--this requires better error parsing.
10 - IOError should be aggregated, right now contains custom string
11 that makes this not possible. Partition on a colon.
12 - Replace gaierror with a more descriptive name (this is a DNS error)
13 - Stronger skips means that backup failures should also be avoided
14 - Distinguish between types of backup failures
15 - Ignore empty blacklists; they should all have reasons
17 - Figure out a way of collecting blacklist data from .scripts/blacklisted
18 and aggregate it together
20 - Let users use Wizard when ssh'ed into Scripts
21 - Make single user mass-migrate work when not logged in as root
23 - Make the rest of the world use Wizard
24 - Make parallel-find.pl use `sudo -u username git describe --tags`
25 to determine version. Make parallel-find.pl have this have greater
26 precedence. This also means, however, that we get
27 full mediawiki-1.2.3-2-abcdef names (Have patch, pending testing and commit)
28 - Make deployed installer use 'wizard install' /or/ do a migration
29 after doing a normal install (the latter makes it easier
32 - Pre-emptively check if daemon/scripts-security-upd
33 is not on scripts-security-upd list (/mit/moira/bin/blanche)
35 - Redo Wordpress conversion, with an eye for automating everything
36 possible (such as downloading the tarball and unpacking)
39 - Genericize callAsUser and drop_priviledges in shell
40 - Summary script should be more machine friendly, and should not
41 output summary charts when I increase specificity
42 - Summary script should do something intelligent when distinguishing
43 between old-style and new-style installs
44 - Report code in wizard/command/__init__.py is ugly as sin. Also,
45 the Report object should operate at a higher level of abstraction
46 so we don't have to manually increment fails. (in fact, that should
47 probably be called something different). The by-percent errors should
49 - Indents in upgrade.py are getting pretty ridiculous; more breaking
50 into functions is probably a good idea
51 - Move resolutions in mediawiki.py to a text file? (the parsing overhead
53 - Investigate QuotaParseErrors
54 - If a process is C-ced, it can result in a upgrade that has
55 an updated filesystem but not updated database. Make this more
57 - PHP end of file allows omitted semicolon, can result in parse error
58 if merge resolutions aren't careful.
61 - Don't use the scripts heuristics unless we're on scripts with the
62 AFS patch. Check with `fs sysname`
63 - Make 'wizard summary' generate nice pretty graphs of installs by date
64 (more histograms, will need to check actual .scripts-version files.)
65 - It should be able to handle installs like Django where there's a component
66 that gets installed in web_scripts and another directory that gets installed
68 - ACLs is a starting point for sending mail to users, but it has
69 several failure modes:
70 - Old maintainers who don't care who are still on the ACL
71 - Private AFS groups that aren't mailing lists and that we
73 A question is whether or not sending mail actually helps us:
74 many users will probably have to come back to us for help; many
75 other users won't care.
77 PULLING OUT CONFIGURATION FILES IN AN AUTOMATED MANNER
79 advancedpoll: Template file to fill out
80 django: Noodles of template files
81 gallery2: Multistage install process
83 mediawiki: One-step install process
84 phpbb: Multistage install process
85 phpical: Template file
88 wordpress: Multistage install process
90 PHILOSOPHY ABOUT LOGGING
92 Logging is most useful when performing a mass run. This
93 includes things such as mass-migration as well as when running
94 summary reports. An interesting property about mass-migration
95 or mass-upgrade, however, is that if they fail, they are
96 idempotent, so an individual case can be debugged simply running
97 the single-install equivalent with --debug on. (This, indeed,
98 may be easier to do than sifting through a logfile).
100 It is a different story when you are running a summary report:
101 you are primarily bound by your AFS cache and how quickly you can
102 iterate through all of the autoinstalls. Checking if a file
103 exists on a cold AFS cache may
104 take several minutes to perform; on a hot cache the same report
105 may take a mere 3 seconds. When you get to more computationally
106 expensive calculations, however, even having a hot AFS cache
107 is not enough to cut down your runtime.
109 There are certain calculations that someone may want to be
110 able to perform on manipulated data. As such, this data should
111 be cached on disk, if the process for extracting this data takes
112 a long time. Also, for usability sake, Wizard should generate
113 the common case reports.
115 Ensuring that machine parseable reports are made, and then making
116 the machinery to reframe this data, increases complexity. Therefore,
117 the recommendation is to assume that if you need to run iteratively,
118 you'll have a hot AFS cache at your fingerprints, and if that's not
119 fast enough, then cache the data.
121 COMMIT MESSAGE FIELDS:
123 Installed-by: username@hostname
124 Pre-commit-by: Real Name <username@mit.edu>
125 Upgraded-by: Real Name <username@mit.edu>
126 Migrated-by: Real Name <username@mit.edu>
127 Wizard-revision: abcdef1234567890
128 Wizard-args: /wizard/bin/wizard foo bar baz
132 Committer: Real Name <username@mit.edu>
133 Author: lockername locker <lockername@scripts.mit.edu>
137 - It is not expected or required for update scripts to exist for all
138 intervening versions that were present pre-migration; only for it
139 to work on the most recent migration.
141 - Currently all repositories are initialized with --shared, which
142 means they have basically ~no space footprint. However, it
143 also means that /mit/scripts/wizard/srv MUST NOT lose revs after
146 - Full fledged logging options. Namely:
147 x all loggers (delay implementing this until we actually have debug stmts)
149 - debug => loglevel = DEBUG
151 - default is WARNING (see below for exception)
152 - verbose => loglevel = INFO
153 x file logger (creates a dir and lots of little logfiles)
155 - log-file => loglevel = INFO
159 * Some parts of the infrastructure will not be touched, although I plan
160 on documenting them. Specifically, we will be keeping:
162 - parallel-find.pl, and the resulting
163 /mit/scripts/.htaccess/scripts/sec-tools/store/scriptslist
165 * The new procedure for generating an update is as follows:
166 (check out the mass-migration instructions for something in this spirit,
167 although uglier in some ways; A indicates the step /should/ be automated)
169 0. ssh into not-backward, temporarily give the daemon.scripts-security-upd
170 bits by blanching it on system:scripts-security-upd, and run parallel-find.pl
172 1. Have the Git repository and working copy for the project on hand.
174 /- wizard prepare-pristine --
176 A 2. Checkout the pristine branch
178 A 3. Remove all files from the working copy. Use `wipe-working-dir`
180 A 4. Download the new tarball
182 A 5. Extract the tarball over the working copy (`cp -R a/. b` works well,
183 remember that the working copy is empty; this needs some intelligent
186 A 6. Check for empty directories and add stub files as necessary.
187 Use `preserve-empty-dir`
191 7. Git add it all, and then commit as a new pristine version (v1.2.3)
193 8. Checkout the master branch
195 9. [FOR EXISTING REPOSITORIES]
196 Merge the pristine branch in. Resolve any conflicts that our
197 patches have with new changes. Do NOT let Git auto-commit it
198 with --no-commit (otherwise, you want to git commit --amend
199 to keep our history clean
201 [FOR NEW REPOSITORIES]
202 Check if any patches are needed to make the application work
203 on Scripts (ideally, it shouldn't.
205 /- wizard prepare-new --
207 Currently not used for anything besides parallel-find.pl, but
208 we reserve the right to place files in here in the future.
211 A echo "Deny from all" > .scripts/.htaccess
215 10. Check if there are any special update procedures, and update
216 the wizard.app.APPNAME module accordingly (or create it, if
219 11. Run 'wizard prepare-config' on a scripts server while in a checkout
220 of this newest version. This will prepare a new version of the
221 configuration file based on the application's latest installer.
222 Manually merge back in any custom changes we may have made.
223 Check if any of the regular expressions need tweaking by inspecting
224 the configuration files for user-specific gunk, and modify
225 wizard.app.APPNAME accordingly.
227 12. Commit your changes, and tag as v1.2.3-scripts (or scripts2, if
228 you are amending an install without an upstream changes)
230 NOTE: These steps should be run on a scripts server
232 13. Test the new update procedure using our test scripts. See integration
233 tests for more information on how to do this.
235 http://scripts.mit.edu/wizard/testing.html#acceptance-tests
237 GET APPROVAL BEFORE PROCEEDING ANY FURTHER
239 NOTE: The following commands are to be run on not-backward.mit.edu.
240 You'll need to add daemon.scripts-security-upd to
241 scripts-security-upd to get bits to do this. Make sure you remove
242 these bits when you're done.
244 A 14. Run `wizard research appname`
245 which uses Git commands to check how many
246 working copies apply the change cleanly, and writes out a logfile
247 with the working copies that don't apply cleanly. It also tells
248 us about "corrupt" working copies, i.e. working copies that
249 have over a certain threshold of changes.
251 A 15. Run `wizard mass-upgrade appname`, which applies the update to all working
252 copies possible, and sends mail to users to whom the working copy
253 did not apply cleanly.
255 16. Run parallel-find.pl to update our inventory
257 * For mass importing into the repository, there are a few extra things:
259 * Many applications had patches associated with them. Be sure to
260 apply them, so later merges work better.
262 # the following operation might require -p1
263 patch -p0 < ../app-1.2.3/app-1.2.3.patch # [FIDDLY BIT]
265 * When running updates, if the patch has changed you will have to
266 do a special procedure for your merge:
268 git checkout pristine
269 # NOTE: Now, the tricky part (this is different from a real update)
270 git symbolic-ref HEAD refs/heads/master
271 # NOTE: Now, we think we're on the master branch, but we have
272 # pristine copy checked out
273 # NOTE: -p0 might need to be twiddled
274 patch -p0 < ../app-1.2.3/app-1.2.3.patch
276 # reconstitute .scripts directory
277 git checkout v1.2.2-scripts -- .scripts
279 # NOTE: Fake the merge
280 git rev-parse pristine > .git/MERGE_HEAD
282 You could also just try your luck with a manual merge using the patch
285 * The repository for a given application will contain the following files:
287 - The actual application's files, as from the official tarball
289 - A .scripts directory, with the intent of holding Scripts specific files
290 if they become necessary.
292 * .scripts/lock (generated) which locks an autoinstall during upgrade