5 - Make sure massmigrate cleanly ignores already migrated
7 - Push su code to migrate, not mass-migrate (only do it
8 as root, this serves as a safe guard)
9 - Move migration code into Wizard, since we already deal
10 with installation there anyway (this TODO has been updated
13 - Make parallel-find.pl use `sudo -u username git describe --tags`
15 - Remove .scripts/version generation in install script
16 - Make the installer use 'wizard install' /or/ do a migration
17 after doing a normal install (the latter makes it easier
20 - Better error message if daemon/scripts-security-upd
21 is not on scripts-security-upd list
23 - Fix retarded logging mechanism
24 - This is interesting because the non-retarded way would be
25 to have each subprocess send data through stdout, but
26 this runs the risk of filling up the tubes. Maybe just
27 create a log directory and give each process different
30 - The great initial deploy:
31 - Turn on mediawiki new autoinstaller
32 - Migrate all mediawiki installs
34 - Redo Wordpress conversion, with an eye for automating everything
35 possible (such as downloading the tarball and unpacking)
37 - Summary script should be more machine friendly, and should not
38 output summary charts when I increase specificity
40 Some other stuff to do in your copious free time:
41 - Summary script should do something intelligent when distinguishing
42 between old-style and new-style installs
43 - Check how many autoinstalls are missing w bits for
44 daemon.scripts (this would need pyafs)
45 - Make scripts AFS patch advertise its existence so we can check for it.
46 (This might be otherwise possible using `fs sysname`)
47 - Make 'wizard summary' generate nice pretty graphs of installs by date
48 (more histograms, will need to check actual .scripts-version files.)
49 - It should be able to handle installs like Django where there's a component
50 that gets installed in web_scripts and another directory that gets installed
53 PULLING OUT CONFIGURATION FILES IN AN AUTOMATED MANNER
55 advancedpoll: Template file to fill out
56 django: Noodles of template files
57 gallery2: Multistage install process
59 mediawiki: One-step install process
60 phpbb: Multistage install process
61 phpical: Template file
64 wordpress: Multistage install process
66 PHILOSOPHY ABOUT LOGGING
68 Logging is most useful when performing a mass run. This
69 includes things such as mass-migration as well as when running
70 summary reports. An interesting property about mass-migration
71 or mass-upgrade, however, is that if they fail, they are
72 idempotent, so an individual case can be debugged simply running
73 the single-install equivalent with --debug on. (This, indeed,
74 may be easier to do than sifting through a logfile).
76 It is a different story when you are running a summary report:
77 you are primarily bound by your AFS cache and how quickly you can
78 iterate through all of the autoinstalls. Checking if a file
79 exists on a cold AFS cache may
80 take several minutes to perform; on a hot cache the same report
81 may take a mere 3 seconds. When you get to more computationally
82 expensive calculations, however, even having a hot AFS cache
83 is not enough to cut down your runtime.
85 There are certain calculations that someone may want to be
86 able to perform on manipulated data. As such, this data should
87 be cached on disk, if the process for extracting this data takes
88 a long time. Also, for usability sake, Wizard should generate
89 the common case reports.
91 Ensuring that machine parseable reports are made, and then making
92 the machinery to reframe this data, increases complexity. Therefore,
93 the recommendation is to assume that if you need to run iteratively,
94 you'll have a hot AFS cache at your fingerprints, and if that's not
95 fast enough, then cache the data.
97 COMMIT MESSAGE FIELDS:
99 Installed-by: username@hostname
100 Pre-commit-by: Real Name <username@mit.edu>
101 Upgraded-by: Real Name <username@mit.edu>
102 Migrated-by: Real Name <username@mit.edu>
103 Wizard-revision: abcdef1234567890
104 Wizard-args: /wizard/bin/wizard foo bar baz
108 Committer: Real Name <username@mit.edu>
109 Author: lockername locker <lockername@scripts.mit.edu>
113 - It is not expected or required for update scripts to exist for all
114 intervening versions that were present pre-migration; only for it
115 to work on the most recent migration.
117 - Currently all repositories are initialized with --shared, which
118 means they have basically ~no space footprint. However, it
119 also means that /mit/scripts/wizard/srv MUST NOT lose revs after
122 - Full fledged logging options. Namely:
123 x all loggers (delay implementing this until we actually have debug stmts)
125 - debug => loglevel = DEBUG
127 - default is WARNING (see below for exception)
128 - verbose => loglevel = INFO
129 x file logger (creates a dir and lots of little logfiles)
131 - log-file => loglevel = INFO
135 * Some parts of the infrastructure will not be touched, although I plan
136 on documenting them. Specifically, we will be keeping:
138 - parallel-find.pl, and the resulting
139 /mit/scripts/.htaccess/scripts/sec-tools/store/scriptslist
141 * The new procedure for generating an update is as follows:
142 (check out the mass-migration instructions for something in this spirit,
143 although uglier in some ways; A indicates the step /should/ be automated)
145 0. ssh into not-backward, temporarily give the daemon.scripts-security-upd
146 bits by blanching it on system:scripts-security-upd, and run parallel-find.pl
148 1. Have the Git repository and working copy for the project on hand.
150 /- wizard prepare-pristine --
152 A 2. Checkout the pristine branch
154 A 3. Remove all files from the working copy. Use `wipe-working-dir`
156 A 4. Download the new tarball
158 A 5. Extract the tarball over the working copy (`cp -R a/. b` works well,
159 remember that the working copy is empty; this needs some intelligent
162 A 6. Check for empty directories and add stub files as necessary.
163 Use `preserve-empty-dir`
167 7. Git add it all, and then commit as a new pristine version (v1.2.3)
169 8. Checkout the master branch
171 9. [FOR EXISTING REPOSITORIES]
172 Merge the pristine branch in. Resolve any conflicts that our
173 patches have with new changes. Do NOT let Git auto-commit it
174 with --no-commit (otherwise, you want to git commit --amend
175 to keep our history clean
177 [FOR NEW REPOSITORIES]
178 Check if any patches are needed to make the application work
179 on Scripts (ideally, it shouldn't.
181 /- wizard prepare-new --
184 A echo "Deny from all" > .scripts/.htaccess
188 10. Check if there are any special update procedures, and update
189 the wizard.app.APPNAME module accordingly (or create it, if
192 11. Run 'wizard prepare-config' on a scripts server while in a checkout
193 of this newest version. This will prepare a new version of the
194 configuration file based on the application's latest installer.
195 Manually merge back in any custom changes we may have made.
196 Check if any of the regular expressions need tweaking by inspecting
197 the configuration files for user-specific gunk, and modify
198 wizard.app.APPNAME accordingly.
200 12. Commit your changes, and tag as v1.2.3-scripts (or scripts2, if
201 you are amending an install without an upstream changes)
203 NOTE: These steps should be run on a scripts server
205 13. Test the new update procedure using our test scripts. See integration
206 tests for more information on how to do this.
208 http://scripts.mit.edu/wizard/testing.html#acceptance-tests
210 GET APPROVAL BEFORE PROCEEDING ANY FURTHER
212 NOTE: The following commands are to be run on not-backward.mit.edu.
213 You'll need to add daemon.scripts-security-upd to
214 scripts-security-upd to get bits to do this. Make sure you remove
215 these bits when you're done.
217 A 14. Run `wizard research appname`
218 which uses Git commands to check how many
219 working copies apply the change cleanly, and writes out a logfile
220 with the working copies that don't apply cleanly. It also tells
221 us about "corrupt" working copies, i.e. working copies that
222 have over a certain threshold of changes.
224 A 15. Run `wizard mass-upgrade appname`, which applies the update to all working
225 copies possible, and sends mail to users to whom the working copy
226 did not apply cleanly.
228 16. Run parallel-find.pl to update our inventory
230 * For mass importing into the repository, there are a few extra things:
232 * Many applications had patches associated with them. Be sure to
233 apply them, so later merges work better.
235 # the following operation might require -p1
236 patch -p0 < ../app-1.2.3/app-1.2.3.patch # [FIDDLY BIT]
238 * When running updates, if the patch has changed you will have to
239 do a special procedure for your merge:
241 git checkout pristine
242 # NOTE: Now, the tricky part (this is different from a real update)
243 git symbolic-ref HEAD refs/heads/master
244 # NOTE: Now, we think we're on the master branch, but we have
245 # pristine copy checked out
246 # NOTE: -p0 might need to be twiddled
247 patch -p0 < ../app-1.2.3/app-1.2.3.patch
249 # reconstitute .scripts directory
250 git checkout v1.2.2-scripts -- .scripts
252 # NOTE: Fake the merge
253 git rev-parse pristine > .git/MERGE_HEAD
255 You could also just try your luck with a manual merge using the patch
258 * The repository for a given application will contain the following files:
260 - The actual application's files, as from the official tarball
262 - A .scripts directory, which contains the following information:
264 * .scripts/.htaccess to prevent this directory from being accessed
267 * .scripts/old-version (optional) the old value of .scripts-version,
268 basically used for reverting an install to pre-migrated state.
270 * .scripts/lock (generated) which locks the autoinstall during an upgrade
272 * .scripts/version (deprecated)