5 - Remove "already migrated" cruft that will accumulate if we do small
6 --limit and then increase.
7 - Allow to migrate just one user (user filtering of installs, also
8 has userland capabilities, although it means we need some way of
9 selectively publishing the versions directory)
10 - Make migrate script rollback if it's interrupted (especially if
13 - Make parallel-find.pl use `sudo -u username git describe --tags`
14 to determine version. Make parallel-find.pl have this have greater
15 precedence. This also means, however, that we get
16 full mediawiki-1.2.3-2-abcdef names (Have patch, pending testing and commit)
17 - Make the installer use 'wizard install' /or/ do a migration
18 after doing a normal install (the latter makes it easier
20 - Have the upgrader do locking (.scripts/lock, probably)
22 - Relax MediaWiki regexes to terminate on semicolon, and not
25 - Better error message if daemon/scripts-security-upd
26 is not on scripts-security-upd list
28 - MediaWiki upgrade script does not give proper exit code;
29 if it fails, so be sure to check for "Done" in the last 10 characters.
30 - Custom merge algo: absolute php.ini symlinks to relative symlinks
31 - Custom merge algo: re-constitute AdminSettings.php if missing. It looks
32 like this is the case for most 1.5.8 installs (check what the merges
33 do in both directions). All 1.11.0 installs except four have
34 the other (check diff -u with all in /root)
36 - Make upgrade and install take version as a parameter
38 - Redo Wordpress conversion, with an eye for automating everything
39 possible (such as downloading the tarball and unpacking)
41 - Genericize callAsUser and drop_priviledges in shell
42 - Summary script should be more machine friendly, and should not
43 output summary charts when I increase specificity
45 Some other stuff to do in your copious free time:
46 - Summary script should do something intelligent when distinguishing
47 between old-style and new-style installs
48 - Check how many autoinstalls are missing w bits for
49 daemon.scripts (this would need pyafs)
50 - Make scripts AFS patch advertise its existence so we can check for it.
51 (This might be otherwise possible using `fs sysname`)
52 - Make 'wizard summary' generate nice pretty graphs of installs by date
53 (more histograms, will need to check actual .scripts-version files.)
54 - It should be able to handle installs like Django where there's a component
55 that gets installed in web_scripts and another directory that gets installed
58 PULLING OUT CONFIGURATION FILES IN AN AUTOMATED MANNER
60 advancedpoll: Template file to fill out
61 django: Noodles of template files
62 gallery2: Multistage install process
64 mediawiki: One-step install process
65 phpbb: Multistage install process
66 phpical: Template file
69 wordpress: Multistage install process
71 PHILOSOPHY ABOUT LOGGING
73 Logging is most useful when performing a mass run. This
74 includes things such as mass-migration as well as when running
75 summary reports. An interesting property about mass-migration
76 or mass-upgrade, however, is that if they fail, they are
77 idempotent, so an individual case can be debugged simply running
78 the single-install equivalent with --debug on. (This, indeed,
79 may be easier to do than sifting through a logfile).
81 It is a different story when you are running a summary report:
82 you are primarily bound by your AFS cache and how quickly you can
83 iterate through all of the autoinstalls. Checking if a file
84 exists on a cold AFS cache may
85 take several minutes to perform; on a hot cache the same report
86 may take a mere 3 seconds. When you get to more computationally
87 expensive calculations, however, even having a hot AFS cache
88 is not enough to cut down your runtime.
90 There are certain calculations that someone may want to be
91 able to perform on manipulated data. As such, this data should
92 be cached on disk, if the process for extracting this data takes
93 a long time. Also, for usability sake, Wizard should generate
94 the common case reports.
96 Ensuring that machine parseable reports are made, and then making
97 the machinery to reframe this data, increases complexity. Therefore,
98 the recommendation is to assume that if you need to run iteratively,
99 you'll have a hot AFS cache at your fingerprints, and if that's not
100 fast enough, then cache the data.
102 COMMIT MESSAGE FIELDS:
104 Installed-by: username@hostname
105 Pre-commit-by: Real Name <username@mit.edu>
106 Upgraded-by: Real Name <username@mit.edu>
107 Migrated-by: Real Name <username@mit.edu>
108 Wizard-revision: abcdef1234567890
109 Wizard-args: /wizard/bin/wizard foo bar baz
113 Committer: Real Name <username@mit.edu>
114 Author: lockername locker <lockername@scripts.mit.edu>
118 - It is not expected or required for update scripts to exist for all
119 intervening versions that were present pre-migration; only for it
120 to work on the most recent migration.
122 - Currently all repositories are initialized with --shared, which
123 means they have basically ~no space footprint. However, it
124 also means that /mit/scripts/wizard/srv MUST NOT lose revs after
127 - Full fledged logging options. Namely:
128 x all loggers (delay implementing this until we actually have debug stmts)
130 - debug => loglevel = DEBUG
132 - default is WARNING (see below for exception)
133 - verbose => loglevel = INFO
134 x file logger (creates a dir and lots of little logfiles)
136 - log-file => loglevel = INFO
140 * Some parts of the infrastructure will not be touched, although I plan
141 on documenting them. Specifically, we will be keeping:
143 - parallel-find.pl, and the resulting
144 /mit/scripts/.htaccess/scripts/sec-tools/store/scriptslist
146 * The new procedure for generating an update is as follows:
147 (check out the mass-migration instructions for something in this spirit,
148 although uglier in some ways; A indicates the step /should/ be automated)
150 0. ssh into not-backward, temporarily give the daemon.scripts-security-upd
151 bits by blanching it on system:scripts-security-upd, and run parallel-find.pl
153 1. Have the Git repository and working copy for the project on hand.
155 /- wizard prepare-pristine --
157 A 2. Checkout the pristine branch
159 A 3. Remove all files from the working copy. Use `wipe-working-dir`
161 A 4. Download the new tarball
163 A 5. Extract the tarball over the working copy (`cp -R a/. b` works well,
164 remember that the working copy is empty; this needs some intelligent
167 A 6. Check for empty directories and add stub files as necessary.
168 Use `preserve-empty-dir`
172 7. Git add it all, and then commit as a new pristine version (v1.2.3)
174 8. Checkout the master branch
176 9. [FOR EXISTING REPOSITORIES]
177 Merge the pristine branch in. Resolve any conflicts that our
178 patches have with new changes. Do NOT let Git auto-commit it
179 with --no-commit (otherwise, you want to git commit --amend
180 to keep our history clean
182 [FOR NEW REPOSITORIES]
183 Check if any patches are needed to make the application work
184 on Scripts (ideally, it shouldn't.
186 /- wizard prepare-new --
188 Currently not used for anything besides parallel-find.pl, but
189 we reserve the right to place files in here in the future.
192 A echo "Deny from all" > .scripts/.htaccess
196 10. Check if there are any special update procedures, and update
197 the wizard.app.APPNAME module accordingly (or create it, if
200 11. Run 'wizard prepare-config' on a scripts server while in a checkout
201 of this newest version. This will prepare a new version of the
202 configuration file based on the application's latest installer.
203 Manually merge back in any custom changes we may have made.
204 Check if any of the regular expressions need tweaking by inspecting
205 the configuration files for user-specific gunk, and modify
206 wizard.app.APPNAME accordingly.
208 12. Commit your changes, and tag as v1.2.3-scripts (or scripts2, if
209 you are amending an install without an upstream changes)
211 NOTE: These steps should be run on a scripts server
213 13. Test the new update procedure using our test scripts. See integration
214 tests for more information on how to do this.
216 http://scripts.mit.edu/wizard/testing.html#acceptance-tests
218 GET APPROVAL BEFORE PROCEEDING ANY FURTHER
220 NOTE: The following commands are to be run on not-backward.mit.edu.
221 You'll need to add daemon.scripts-security-upd to
222 scripts-security-upd to get bits to do this. Make sure you remove
223 these bits when you're done.
225 A 14. Run `wizard research appname`
226 which uses Git commands to check how many
227 working copies apply the change cleanly, and writes out a logfile
228 with the working copies that don't apply cleanly. It also tells
229 us about "corrupt" working copies, i.e. working copies that
230 have over a certain threshold of changes.
232 A 15. Run `wizard mass-upgrade appname`, which applies the update to all working
233 copies possible, and sends mail to users to whom the working copy
234 did not apply cleanly.
236 16. Run parallel-find.pl to update our inventory
238 * For mass importing into the repository, there are a few extra things:
240 * Many applications had patches associated with them. Be sure to
241 apply them, so later merges work better.
243 # the following operation might require -p1
244 patch -p0 < ../app-1.2.3/app-1.2.3.patch # [FIDDLY BIT]
246 * When running updates, if the patch has changed you will have to
247 do a special procedure for your merge:
249 git checkout pristine
250 # NOTE: Now, the tricky part (this is different from a real update)
251 git symbolic-ref HEAD refs/heads/master
252 # NOTE: Now, we think we're on the master branch, but we have
253 # pristine copy checked out
254 # NOTE: -p0 might need to be twiddled
255 patch -p0 < ../app-1.2.3/app-1.2.3.patch
257 # reconstitute .scripts directory
258 git checkout v1.2.2-scripts -- .scripts
260 # NOTE: Fake the merge
261 git rev-parse pristine > .git/MERGE_HEAD
263 You could also just try your luck with a manual merge using the patch
266 * The repository for a given application will contain the following files:
268 - The actual application's files, as from the official tarball
270 - A .scripts directory, with the intent of holding Scripts specific files
271 if they become necessary.
273 * .scripts/lock (generated) which locks an autoinstall during upgrade