5 - Keep my sanity when upgrading 1000 installs
6 - Distinguish between errors(?)
7 - Custom merge algo: absolute php.ini symlinks to relative symlinks (this
8 does not seem to have been a problem in practice)
9 - Custom merge algo: check if it's got extra \r's in the file,
10 and dos2unix it if it does, before performing the merge
11 - `vos exa` in order to check what a person's quota is. We can
12 figure out roughly how big the upgrade is going to be by
13 doing a size comparison of the tars: `git pull` MUST NOT
14 fail, otherwise things are left conflicted, and not easy to fix.
15 - Prune -7 call errors and automatically reprocess them (with a
16 strike out counter of 3)--this requires better error parsing
17 - Report stats if I C-C the process
19 - Distinguish from logging and reporting (so we can easily send mail
21 - Figure out a way of collecting blacklist data from .scripts/blacklisted
22 and aggregate it together
23 - Failed migrations should be wired to have wizard commands in them
24 automatically log to the relevant file. In addition, the seen file
25 should get updated when one of them gets fixed.
27 - Let users use Wizard when ssh'ed into Scripts
28 - Make single user mass-migrate work when not logged in as root
30 - Make the rest of the world use Wizard
31 - Make parallel-find.pl use `sudo -u username git describe --tags`
32 to determine version. Make parallel-find.pl have this have greater
33 precedence. This also means, however, that we get
34 full mediawiki-1.2.3-2-abcdef names (Have patch, pending testing and commit)
35 - Make deployed installer use 'wizard install' /or/ do a migration
36 after doing a normal install (the latter makes it easier
39 - Pre-emptively check if daemon/scripts-security-upd
40 is not on scripts-security-upd list (/mit/moira/bin/blanche)
42 - Redo Wordpress conversion, with an eye for automating everything
43 possible (such as downloading the tarball and unpacking)
46 - Genericize callAsUser and drop_priviledges in shell
47 - Summary script should be more machine friendly, and should not
48 output summary charts when I increase specificity
49 - Summary script should do something intelligent when distinguishing
50 between old-style and new-style installs
51 - Report code in wizard/command/__init__.py is ugly as sin
54 - Don't use the scripts heuristics unless we're on scripts with the
55 AFS patch. Check with `fs sysname`
56 - Make 'wizard summary' generate nice pretty graphs of installs by date
57 (more histograms, will need to check actual .scripts-version files.)
58 - It should be able to handle installs like Django where there's a component
59 that gets installed in web_scripts and another directory that gets installed
61 - ACLs is a starting point for sending mail to users, but it has
62 several failure modes:
63 - Old maintainers who don't care who are still on the ACL
64 - Private AFS groups that aren't mailing lists and that we
66 A question is whether or not sending mail actually helps us:
67 many users will probably have to come back to us for help; many
68 other users won't care.
70 PULLING OUT CONFIGURATION FILES IN AN AUTOMATED MANNER
72 advancedpoll: Template file to fill out
73 django: Noodles of template files
74 gallery2: Multistage install process
76 mediawiki: One-step install process
77 phpbb: Multistage install process
78 phpical: Template file
81 wordpress: Multistage install process
83 PHILOSOPHY ABOUT LOGGING
85 Logging is most useful when performing a mass run. This
86 includes things such as mass-migration as well as when running
87 summary reports. An interesting property about mass-migration
88 or mass-upgrade, however, is that if they fail, they are
89 idempotent, so an individual case can be debugged simply running
90 the single-install equivalent with --debug on. (This, indeed,
91 may be easier to do than sifting through a logfile).
93 It is a different story when you are running a summary report:
94 you are primarily bound by your AFS cache and how quickly you can
95 iterate through all of the autoinstalls. Checking if a file
96 exists on a cold AFS cache may
97 take several minutes to perform; on a hot cache the same report
98 may take a mere 3 seconds. When you get to more computationally
99 expensive calculations, however, even having a hot AFS cache
100 is not enough to cut down your runtime.
102 There are certain calculations that someone may want to be
103 able to perform on manipulated data. As such, this data should
104 be cached on disk, if the process for extracting this data takes
105 a long time. Also, for usability sake, Wizard should generate
106 the common case reports.
108 Ensuring that machine parseable reports are made, and then making
109 the machinery to reframe this data, increases complexity. Therefore,
110 the recommendation is to assume that if you need to run iteratively,
111 you'll have a hot AFS cache at your fingerprints, and if that's not
112 fast enough, then cache the data.
114 COMMIT MESSAGE FIELDS:
116 Installed-by: username@hostname
117 Pre-commit-by: Real Name <username@mit.edu>
118 Upgraded-by: Real Name <username@mit.edu>
119 Migrated-by: Real Name <username@mit.edu>
120 Wizard-revision: abcdef1234567890
121 Wizard-args: /wizard/bin/wizard foo bar baz
125 Committer: Real Name <username@mit.edu>
126 Author: lockername locker <lockername@scripts.mit.edu>
130 - It is not expected or required for update scripts to exist for all
131 intervening versions that were present pre-migration; only for it
132 to work on the most recent migration.
134 - Currently all repositories are initialized with --shared, which
135 means they have basically ~no space footprint. However, it
136 also means that /mit/scripts/wizard/srv MUST NOT lose revs after
139 - Full fledged logging options. Namely:
140 x all loggers (delay implementing this until we actually have debug stmts)
142 - debug => loglevel = DEBUG
144 - default is WARNING (see below for exception)
145 - verbose => loglevel = INFO
146 x file logger (creates a dir and lots of little logfiles)
148 - log-file => loglevel = INFO
152 * Some parts of the infrastructure will not be touched, although I plan
153 on documenting them. Specifically, we will be keeping:
155 - parallel-find.pl, and the resulting
156 /mit/scripts/.htaccess/scripts/sec-tools/store/scriptslist
158 * The new procedure for generating an update is as follows:
159 (check out the mass-migration instructions for something in this spirit,
160 although uglier in some ways; A indicates the step /should/ be automated)
162 0. ssh into not-backward, temporarily give the daemon.scripts-security-upd
163 bits by blanching it on system:scripts-security-upd, and run parallel-find.pl
165 1. Have the Git repository and working copy for the project on hand.
167 /- wizard prepare-pristine --
169 A 2. Checkout the pristine branch
171 A 3. Remove all files from the working copy. Use `wipe-working-dir`
173 A 4. Download the new tarball
175 A 5. Extract the tarball over the working copy (`cp -R a/. b` works well,
176 remember that the working copy is empty; this needs some intelligent
179 A 6. Check for empty directories and add stub files as necessary.
180 Use `preserve-empty-dir`
184 7. Git add it all, and then commit as a new pristine version (v1.2.3)
186 8. Checkout the master branch
188 9. [FOR EXISTING REPOSITORIES]
189 Merge the pristine branch in. Resolve any conflicts that our
190 patches have with new changes. Do NOT let Git auto-commit it
191 with --no-commit (otherwise, you want to git commit --amend
192 to keep our history clean
194 [FOR NEW REPOSITORIES]
195 Check if any patches are needed to make the application work
196 on Scripts (ideally, it shouldn't.
198 /- wizard prepare-new --
200 Currently not used for anything besides parallel-find.pl, but
201 we reserve the right to place files in here in the future.
204 A echo "Deny from all" > .scripts/.htaccess
208 10. Check if there are any special update procedures, and update
209 the wizard.app.APPNAME module accordingly (or create it, if
212 11. Run 'wizard prepare-config' on a scripts server while in a checkout
213 of this newest version. This will prepare a new version of the
214 configuration file based on the application's latest installer.
215 Manually merge back in any custom changes we may have made.
216 Check if any of the regular expressions need tweaking by inspecting
217 the configuration files for user-specific gunk, and modify
218 wizard.app.APPNAME accordingly.
220 12. Commit your changes, and tag as v1.2.3-scripts (or scripts2, if
221 you are amending an install without an upstream changes)
223 NOTE: These steps should be run on a scripts server
225 13. Test the new update procedure using our test scripts. See integration
226 tests for more information on how to do this.
228 http://scripts.mit.edu/wizard/testing.html#acceptance-tests
230 GET APPROVAL BEFORE PROCEEDING ANY FURTHER
232 NOTE: The following commands are to be run on not-backward.mit.edu.
233 You'll need to add daemon.scripts-security-upd to
234 scripts-security-upd to get bits to do this. Make sure you remove
235 these bits when you're done.
237 A 14. Run `wizard research appname`
238 which uses Git commands to check how many
239 working copies apply the change cleanly, and writes out a logfile
240 with the working copies that don't apply cleanly. It also tells
241 us about "corrupt" working copies, i.e. working copies that
242 have over a certain threshold of changes.
244 A 15. Run `wizard mass-upgrade appname`, which applies the update to all working
245 copies possible, and sends mail to users to whom the working copy
246 did not apply cleanly.
248 16. Run parallel-find.pl to update our inventory
250 * For mass importing into the repository, there are a few extra things:
252 * Many applications had patches associated with them. Be sure to
253 apply them, so later merges work better.
255 # the following operation might require -p1
256 patch -p0 < ../app-1.2.3/app-1.2.3.patch # [FIDDLY BIT]
258 * When running updates, if the patch has changed you will have to
259 do a special procedure for your merge:
261 git checkout pristine
262 # NOTE: Now, the tricky part (this is different from a real update)
263 git symbolic-ref HEAD refs/heads/master
264 # NOTE: Now, we think we're on the master branch, but we have
265 # pristine copy checked out
266 # NOTE: -p0 might need to be twiddled
267 patch -p0 < ../app-1.2.3/app-1.2.3.patch
269 # reconstitute .scripts directory
270 git checkout v1.2.2-scripts -- .scripts
272 # NOTE: Fake the merge
273 git rev-parse pristine > .git/MERGE_HEAD
275 You could also just try your luck with a manual merge using the patch
278 * The repository for a given application will contain the following files:
280 - The actual application's files, as from the official tarball
282 - A .scripts directory, with the intent of holding Scripts specific files
283 if they become necessary.
285 * .scripts/lock (generated) which locks an autoinstall during upgrade