5 - Make wizard install accept appname-head (so that you can do a test with
6 head, and do things without tags). Also make it accept commit hashes.
7 In fact, let it accept any committish. Figure out what to do if we
8 do a test script with x.y.z when we REALLY mean x.y.z-scripts. XXX!!!
9 - Do early validation of inputs for configuration
10 - Let 'wizard configure' be interactive
11 - Parse output HTML for class="error" and give those errors back to the user,
12 then boot them back into configure
14 - Replace gaierror with a more descriptive name (this is a DNS error)
16 - Pre-emptively check if daemon/scripts-security-upd
17 is not on scripts-security-upd list (/mit/moira/bin/blanche)
19 - Redo Wordpress conversion, with an eye for automating everything
20 possible (such as downloading the tarball and unpacking)
22 - Web application for installing autoinstalls has a hard problem
23 with credentials (as well as installations that are not conducted
24 on an Athena machine.) Possible solutions include asking the user
25 to SSH into an athena machine and run a bunch of commands, or writing
26 a Java applet (possibly in Clojure or Scala) which gets filesystem
27 permissions and then performs the operations.
30 - Genericize callAsUser and drop_priviledges in shell
31 - Summary script should be more machine friendly, and should not
32 output summary charts when I increase specificity
33 - Summary script should do something intelligent when distinguishing
34 between old-style and new-style installs
35 - Report code in wizard/command/__init__.py is ugly as sin. Also,
36 the Report object should operate at a higher level of abstraction
37 so we don't have to manually increment fails. (in fact, that should
38 probably be called something different). The by-percent errors should
40 - Move resolutions in mediawiki.py to a text file? (the parsing overhead
42 - If a process is C-ced, it can result in a upgrade that has
43 an updated filesystem but not updated database. Make this more
45 - PHP end of file allows omitted semicolon, can result in parse error
46 if merge resolutions aren't careful. `php -l` can be a quick stopgap
49 - Make single user mass-migrate work when not logged in as root
50 - Don't use the scripts heuristics unless we're on scripts with the
51 AFS patch. Check with `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
57 - ACLs is a starting point for sending mail to users, but it has
58 several failure modes:
59 - Old maintainers who don't care who are still on the ACL
60 - Private AFS groups that aren't mailing lists and that we
62 A question is whether or not sending mail actually helps us:
63 many users will probably have to come back to us for help; many
64 other users won't care.
66 PULLING OUT CONFIGURATION FILES IN AN AUTOMATED MANNER
68 advancedpoll: Template file to fill out
69 django: Noodles of template files
70 gallery2: Multistage install process
72 mediawiki: One-step install process
73 phpbb: Multistage install process
74 phpical: Template file
77 wordpress: Multistage install process
79 COMMIT MESSAGE FIELDS:
81 Installed-by: username@hostname
82 Pre-commit-by: Real Name <username@mit.edu>
83 Upgraded-by: Real Name <username@mit.edu>
84 Migrated-by: Real Name <username@mit.edu>
85 Wizard-revision: abcdef1234567890
86 Wizard-args: /wizard/bin/wizard foo bar baz
90 Committer: Real Name <username@mit.edu>
91 Author: lockername locker <lockername@scripts.mit.edu>
95 - It is not required nor expected for update scripts to exist for all
96 intervening versions that were present pre-migration; only for it
97 to work on the most recent migration.
99 - Currently all repositories are initialized with --shared, which
100 means they have basically ~no space footprint. However, it
101 also means that /mit/scripts/wizard/srv MUST NOT lose revs after
106 * Some parts of the infrastructure will not be touched, although I plan
107 on documenting them. Specifically, we will be keeping:
109 - parallel-find.pl, and the resulting
110 /mit/scripts/.htaccess/scripts/sec-tools/store/scriptslist
112 * The new procedure for generating an update is as follows:
113 (check out the mass-migration instructions for something in this spirit,
114 although uglier in some ways; A indicates the step /should/ be automated)
116 0. ssh into not-backward, temporarily give the daemon.scripts-security-upd
117 bits by blanching it on system:scripts-security-upd, and run parallel-find.pl
119 1. Have the Git repository and working copy for the project on hand.
121 2. Checkout the pristine branch
123 3. Run wizard `prepare-pristine APP-VERSION`
125 X. Commit, with name "Appname x.y.z"
127 4. Checkout the master branch
129 5. Merge the pristine branch in. Resolve any conflicts that our
130 patches have with new changes. Do NOT let Git auto-commit it
131 with --no-commit (otherwise, you want to git commit --amend
132 to keep our history clean
134 X. Commit, with name "Appname x.y.z-scripts". This is going to be
137 6. Run 'wizard prepare-config' on a scripts server while in a checkout
138 of this newest version. This will prepare a new version of the
139 configuration file based on the application's latest installer.
140 Manually merge back in any custom changes we may have made.
141 Check if any of the regular expressions need tweaking by inspecting
142 the configuration files for user-specific gunk, and modify
143 wizard.app.APPNAME accordingly. Commit with --amend, and
144 propagate back to your local copy (git reset --hard HEAD~; git pull afs).
146 [ENTER HERE FROM CREATING A NEW REPO]
148 7. Check if there are any special update procedures, and update
149 the wizard.app.APPNAME module accordingly. If this is the first
150 time you are performing an upgrade, implement upgrade() in your
151 Application class. (XXX: extended instructions here). Test
152 the new update procedure using our test scripts (preferably
153 on a scripts server). Check this page for more info on our
156 http://scripts.mit.edu/wizard/testing.html#acceptance-tests
158 8. If you have any further changes, git commit --amend, and finally
159 tag as v1.2.3-scripts (or scripts2, if you are amending an install
160 without an upstream changes)
162 9. Push all of your changes in a public place, and encourage others
163 to test, using --srv-path and a full path.
165 GET APPROVAL BEFORE PROCEEDING ANY FURTHER;
166 THIS IS PUSHING THE CHANGES TO THE PUBLIC
168 NOTE: The following commands are to be run on not-backward.mit.edu.
169 You'll need to add daemon.scripts-security-upd to
170 scripts-security-upd to get bits to do this. Make sure you remove
171 these bits when you're done.
173 10. Run `wizard research appname`
174 which uses Git commands to check how many
175 working copies apply the change cleanly, and writes out a logfile
176 with the working copies that don't apply cleanly. It also tells
177 us about "corrupt" working copies, i.e. working copies that
178 have over a certain threshold of changes.
180 11. Run `wizard mass-upgrade appname`, which applies the update to all working
183 12. Run parallel-find.pl to update our inventory
185 * For mass importing into the repository, there are a few extra things:
187 * Many applications had patches associated with them. Be sure to
188 apply them, so later merges work better.
190 # the following operation might require -p1
191 patch -p0 < ../app-1.2.3/app-1.2.3.patch # [FIDDLY BIT]
193 * When running updates, if the patch has changed you will have to
194 do a special procedure for your merge:
196 git checkout pristine
197 # NOTE: Now, the tricky part (this is different from a real update)
198 git symbolic-ref HEAD refs/heads/master
199 # NOTE: Now, we think we're on the master branch, but we have
200 # pristine copy checked out
201 # NOTE: -p0 might need to be twiddled
202 patch -p0 < ../app-1.2.3/app-1.2.3.patch
204 # reconstitute .scripts directory
205 git checkout v1.2.2-scripts -- .scripts
207 # NOTE: Fake the merge
208 git rev-parse pristine > .git/MERGE_HEAD
210 You could also just try your luck with a manual merge using the patch
213 * The repository for a given application will contain the following files:
215 - The actual application's files, as from the official tarball
217 - A .scripts directory, with the intent of holding Scripts specific files
218 if they become necessary.
220 * Making the module files for a new application
222 1. Create a wizard/app/APPNAME.py file. Create an object Application
223 inheriting from wizard.app.Application (check existing modules for
224 the boilerplate code).
226 2. Implement download(). "wizard prepare-pristine" will use this in order
227 to download the next version of an application.
229 3. Create a git repository with `git init`
231 4. Use `wizard prepare-pristine APP-VERSION` to download the tarball and
232 extract it into the directory. If download() doesn't work and you don't
233 want to special case it (for example, you need a /really old version/
234 for record-keeping purposes), replace APP-VERSION with PATH, where PATH
235 is the tarball to extract.
237 5. `git commit -asm "APP VERSION"`
239 6. Check if any patches are needed to make the application work
240 on Scripts (ideally, it shouldn't.) Pre-existing patches
241 live in /mit/scripts/deploy/APP-VERSION/ directories.
243 7. Run `wizard prepare-new` to setup common filesets for our repositories.
245 8. If you are running a PHP script, there is usually a php.ini file
246 that we package. You can see previous instances of this patch
247 at /mit/scripts/deploy/php.ini/ as well as in the repositories
248 of any already migrated scripts. We hope to make these changes
249 unnecessary once PHP 5.3 arrives.
251 9. Do an initial commit (we're gonna be amending the hell of this)
252 using `git commit -asm "APP VERSION-scripts"
254 10. Implement install(). Test using `wizard install APP`; you won't
255 be able to do a version-specific install with `wizard install APP-VERSION`
256 until you generate a tag (which will become out of date once you
257 amend the commit.) Now might be a good time to create a
258 tests/test-install-APP.sh file (use the other tests as reference) so
259 you don't have to constantly enter the parameters when you're doing
262 11. Push your changes to a directory accessible in the production environment.
263 In the case of scripts, this is equivalent to your AFS homedir, and
264 the production environment is a scripts.mit.edu. We're going to
265 perform a configuration in the production environment to extract
266 out the canonical configuration files.
268 12. On the production server, call your wizard to perform an installation;
269 be sure to use the option --no-commit in order to make propagating changes
270 back easier. Inspect the generated configuration files (you can use `git
271 status` to find unversioned files that the installer created), and
275 These are dictionaries of functions that perform extraction
276 and substitution of variables from config files. You don't
277 actually have to hand code them; you can app.make_extractors
278 and app.make_substitutions on a common dictionary. Check
279 out wizard/app/__init__.py for more information on this
280 format, as well as other files for samples.
281 (XXX: extended instructions here)
283 These are any files that contain WIZARD_* variables
285 This is a simple, fs based check on whether or not the application
286 was configured. Usually checking if some generated config file
287 is present is sufficient
289 You might be able to reuse machinery from extractors (namely, whatever
290 function you were using to generate regular expressions), or you might
291 need to code a custom regular expression to parse this out.
293 Usually you won't need this; use it if there's a configuration variable
294 that needs to get parametrized, but isn't actually necessary and
295 gets obsoleted in a later version. You probably won't know if that's
296 the case until later.
298 13. With these implemented, `wizard prepare-config` should now work if you run
299 it on the installed copy. The configuration file should now contain only
300 generic WIZARD_* variables, and no user-specific config. If it is, your
301 script was buggy; try again.
303 14. The current changes in the working copy should be merged in. Add any new
304 files, and then `git commit --amend`. `git push --force` to stick these
305 changes back in the "public" repository.
307 15. In your local copy, you can pull the changes by doing `git reset --hard HEAD~`
308 and then a `git pull` from the relevant source. Otherwise, Git will complain
309 about a non-fast-forward.
311 16. Congratulations! You've implemented the installation code for a new install.
312 Now goto "ENTER HERE FROM CREATING A NEW REPO" and finish the rest of the