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