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 - Replace gaierror with a more descriptive name (this is a DNS error)
11 - Stronger skips means that backup failures should also be avoided
12 - Distinguish between types of backup failures
13 - Ignore empty blacklists; they should all have reasons
15 - Figure out a way of collecting blacklist data from .scripts/blacklisted
16 and aggregate it together
18 - Let users use Wizard when ssh'ed into Scripts
19 - Make single user mass-migrate work when not logged in as root
21 - Make the rest of the world use Wizard
22 - Make parallel-find.pl use `sudo -u username git describe --tags`
23 to determine version. Make parallel-find.pl have this have greater
24 precedence. This also means, however, that we get
25 full mediawiki-1.2.3-2-abcdef names (Have patch, pending testing and commit)
26 - Make deployed installer use 'wizard install' /or/ do a migration
27 after doing a normal install (the latter makes it easier
30 - Pre-emptively check if daemon/scripts-security-upd
31 is not on scripts-security-upd list (/mit/moira/bin/blanche)
33 - Redo Wordpress conversion, with an eye for automating everything
34 possible (such as downloading the tarball and unpacking)
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
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
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
55 - PHP end of file allows omitted semicolon, can result in parse error
56 if merge resolutions aren't careful.
59 - Don't use the scripts heuristics unless we're on scripts with the
60 AFS patch. Check with `fs sysname`
61 - Make 'wizard summary' generate nice pretty graphs of installs by date
62 (more histograms, will need to check actual .scripts-version files.)
63 - It should be able to handle installs like Django where there's a component
64 that gets installed in web_scripts and another directory that gets installed
66 - ACLs is a starting point for sending mail to users, but it has
67 several failure modes:
68 - Old maintainers who don't care who are still on the ACL
69 - Private AFS groups that aren't mailing lists and that we
71 A question is whether or not sending mail actually helps us:
72 many users will probably have to come back to us for help; many
73 other users won't care.
75 PULLING OUT CONFIGURATION FILES IN AN AUTOMATED MANNER
77 advancedpoll: Template file to fill out
78 django: Noodles of template files
79 gallery2: Multistage install process
81 mediawiki: One-step install process
82 phpbb: Multistage install process
83 phpical: Template file
86 wordpress: Multistage install process
88 PHILOSOPHY ABOUT LOGGING
90 Logging is most useful when performing a mass run. This
91 includes things such as mass-migration as well as when running
92 summary reports. An interesting property about mass-migration
93 or mass-upgrade, however, is that if they fail, they are
94 idempotent, so an individual case can be debugged simply running
95 the single-install equivalent with --debug on. (This, indeed,
96 may be easier to do than sifting through a logfile).
98 It is a different story when you are running a summary report:
99 you are primarily bound by your AFS cache and how quickly you can
100 iterate through all of the autoinstalls. Checking if a file
101 exists on a cold AFS cache may
102 take several minutes to perform; on a hot cache the same report
103 may take a mere 3 seconds. When you get to more computationally
104 expensive calculations, however, even having a hot AFS cache
105 is not enough to cut down your runtime.
107 There are certain calculations that someone may want to be
108 able to perform on manipulated data. As such, this data should
109 be cached on disk, if the process for extracting this data takes
110 a long time. Also, for usability sake, Wizard should generate
111 the common case reports.
113 Ensuring that machine parseable reports are made, and then making
114 the machinery to reframe this data, increases complexity. Therefore,
115 the recommendation is to assume that if you need to run iteratively,
116 you'll have a hot AFS cache at your fingerprints, and if that's not
117 fast enough, then cache the data.
119 COMMIT MESSAGE FIELDS:
121 Installed-by: username@hostname
122 Pre-commit-by: Real Name <username@mit.edu>
123 Upgraded-by: Real Name <username@mit.edu>
124 Migrated-by: Real Name <username@mit.edu>
125 Wizard-revision: abcdef1234567890
126 Wizard-args: /wizard/bin/wizard foo bar baz
130 Committer: Real Name <username@mit.edu>
131 Author: lockername locker <lockername@scripts.mit.edu>
135 - It is not expected or required for update scripts to exist for all
136 intervening versions that were present pre-migration; only for it
137 to work on the most recent migration.
139 - Currently all repositories are initialized with --shared, which
140 means they have basically ~no space footprint. However, it
141 also means that /mit/scripts/wizard/srv MUST NOT lose revs after
144 - Full fledged logging options. Namely:
145 x all loggers (delay implementing this until we actually have debug stmts)
147 - debug => loglevel = DEBUG
149 - default is WARNING (see below for exception)
150 - verbose => loglevel = INFO
151 x file logger (creates a dir and lots of little logfiles)
153 - log-file => loglevel = INFO
157 * Some parts of the infrastructure will not be touched, although I plan
158 on documenting them. Specifically, we will be keeping:
160 - parallel-find.pl, and the resulting
161 /mit/scripts/.htaccess/scripts/sec-tools/store/scriptslist
163 * The new procedure for generating an update is as follows:
164 (check out the mass-migration instructions for something in this spirit,
165 although uglier in some ways; A indicates the step /should/ be automated)
167 0. ssh into not-backward, temporarily give the daemon.scripts-security-upd
168 bits by blanching it on system:scripts-security-upd, and run parallel-find.pl
170 1. Have the Git repository and working copy for the project on hand.
172 /- wizard prepare-pristine --
174 A 2. Checkout the pristine branch
176 A 3. Remove all files from the working copy. Use `wipe-working-dir`
178 A 4. Download the new tarball
180 A 5. Extract the tarball over the working copy (`cp -R a/. b` works well,
181 remember that the working copy is empty; this needs some intelligent
184 A 6. Check for empty directories and add stub files as necessary.
185 Use `preserve-empty-dir`
189 7. Git add it all, and then commit as a new pristine version (v1.2.3)
191 8. Checkout the master branch
193 9. [FOR EXISTING REPOSITORIES]
194 Merge the pristine branch in. Resolve any conflicts that our
195 patches have with new changes. Do NOT let Git auto-commit it
196 with --no-commit (otherwise, you want to git commit --amend
197 to keep our history clean
199 [FOR NEW REPOSITORIES]
200 Check if any patches are needed to make the application work
201 on Scripts (ideally, it shouldn't.
203 /- wizard prepare-new --
205 Currently not used for anything besides parallel-find.pl, but
206 we reserve the right to place files in here in the future.
209 A echo "Deny from all" > .scripts/.htaccess
213 10. Check if there are any special update procedures, and update
214 the wizard.app.APPNAME module accordingly (or create it, if
217 11. Run 'wizard prepare-config' on a scripts server while in a checkout
218 of this newest version. This will prepare a new version of the
219 configuration file based on the application's latest installer.
220 Manually merge back in any custom changes we may have made.
221 Check if any of the regular expressions need tweaking by inspecting
222 the configuration files for user-specific gunk, and modify
223 wizard.app.APPNAME accordingly.
225 12. Commit your changes, and tag as v1.2.3-scripts (or scripts2, if
226 you are amending an install without an upstream changes)
228 NOTE: These steps should be run on a scripts server
230 13. Test the new update procedure using our test scripts. See integration
231 tests for more information on how to do this.
233 http://scripts.mit.edu/wizard/testing.html#acceptance-tests
235 GET APPROVAL BEFORE PROCEEDING ANY FURTHER
237 NOTE: The following commands are to be run on not-backward.mit.edu.
238 You'll need to add daemon.scripts-security-upd to
239 scripts-security-upd to get bits to do this. Make sure you remove
240 these bits when you're done.
242 A 14. Run `wizard research appname`
243 which uses Git commands to check how many
244 working copies apply the change cleanly, and writes out a logfile
245 with the working copies that don't apply cleanly. It also tells
246 us about "corrupt" working copies, i.e. working copies that
247 have over a certain threshold of changes.
249 A 15. Run `wizard mass-upgrade appname`, which applies the update to all working
250 copies possible, and sends mail to users to whom the working copy
251 did not apply cleanly.
253 16. Run parallel-find.pl to update our inventory
255 * For mass importing into the repository, there are a few extra things:
257 * Many applications had patches associated with them. Be sure to
258 apply them, so later merges work better.
260 # the following operation might require -p1
261 patch -p0 < ../app-1.2.3/app-1.2.3.patch # [FIDDLY BIT]
263 * When running updates, if the patch has changed you will have to
264 do a special procedure for your merge:
266 git checkout pristine
267 # NOTE: Now, the tricky part (this is different from a real update)
268 git symbolic-ref HEAD refs/heads/master
269 # NOTE: Now, we think we're on the master branch, but we have
270 # pristine copy checked out
271 # NOTE: -p0 might need to be twiddled
272 patch -p0 < ../app-1.2.3/app-1.2.3.patch
274 # reconstitute .scripts directory
275 git checkout v1.2.2-scripts -- .scripts
277 # NOTE: Fake the merge
278 git rev-parse pristine > .git/MERGE_HEAD
280 You could also just try your luck with a manual merge using the patch
283 * The repository for a given application will contain the following files:
285 - The actual application's files, as from the official tarball
287 - A .scripts directory, with the intent of holding Scripts specific files
288 if they become necessary.
290 * .scripts/lock (generated) which locks an autoinstall during upgrade