]> scripts.mit.edu Git - wizard.git/blob - TODO
Update TODO.
[wizard.git] / TODO
1 The Git Autoinstaller
2
3 TODO NOW:
4
5 - Keep my sanity when upgrading 1000 installs
6     - Replace gaierror with a more descriptive name (this is a DNS error)
7
8 - Make the rest of the world use Wizard
9     - Make parallel-find.pl use `sudo -u username git describe --tags`
10       to determine version.  Make parallel-find.pl have this have greater
11       precedence.  This also means, however, that we get
12       full mediawiki-1.2.3-2-abcdef names (Have patch, pending testing and commit)
13     - Make deployed installer use 'wizard install' /or/ do a migration
14       after doing a normal install (the latter makes it easier
15       for mass-rollbacks).
16
17 - Pre-emptively check if daemon/scripts-security-upd
18   is not on scripts-security-upd list (/mit/moira/bin/blanche)
19
20 - Redo Wordpress conversion, with an eye for automating everything
21   possible (such as downloading the tarball and unpacking)
22
23 - Pay back code debt
24     - Genericize callAsUser and drop_priviledges in shell
25     - Summary script should be more machine friendly, and should not
26       output summary charts when I increase specificity
27     - Summary script should do something intelligent when distinguishing
28       between old-style and new-style installs
29     - Report code in wizard/command/__init__.py is ugly as sin.  Also,
30       the Report object should operate at a higher level of abstraction
31       so we don't have to manually increment fails. (in fact, that should
32       probably be called something different).  The by-percent errors should
33       also be automated.
34     - Indents in upgrade.py are getting pretty ridiculous; more breaking
35       into functions is probably a good idea
36     - Move resolutions in mediawiki.py to a text file? (the parsing overhead
37       may not be worth it)
38     - Investigate QuotaParseErrors
39     - If a process is C-ced, it can result in a upgrade that has
40       an updated filesystem but not updated database. Make this more
41       resilient
42     - PHP end of file allows omitted semicolon, can result in parse error
43       if merge resolutions aren't careful.
44
45 - Other stuff
46     - Make single user mass-migrate work when not logged in as root
47     - Don't use the scripts heuristics unless we're on scripts with the
48       AFS patch.  Check with `fs sysname`
49     - Make 'wizard summary' generate nice pretty graphs of installs by date
50       (more histograms, will need to check actual .scripts-version files.)
51     - It should be able to handle installs like Django where there's a component
52       that gets installed in web_scripts and another directory that gets installed
53       in Scripts.
54     - ACLs is a starting point for sending mail to users, but it has
55       several failure modes:
56         - Old maintainers who don't care who are still on the ACL
57         - Private AFS groups that aren't mailing lists and that we
58           can't get to
59       A question is whether or not sending mail actually helps us:
60       many users will probably have to come back to us for help; many
61       other users won't care.
62
63 PULLING OUT CONFIGURATION FILES IN AN AUTOMATED MANNER
64
65 advancedpoll: Template file to fill out
66 django: Noodles of template files
67 gallery2: Multistage install process
68 joomla: Template file
69 mediawiki: One-step install process
70 phpbb: Multistage install process
71 phpical: Template file
72 trac: NFC
73 turbogears: NFC
74 wordpress: Multistage install process
75
76 COMMIT MESSAGE FIELDS:
77
78 Installed-by: username@hostname
79 Pre-commit-by: Real Name <username@mit.edu>
80 Upgraded-by: Real Name <username@mit.edu>
81 Migrated-by: Real Name <username@mit.edu>
82 Wizard-revision: abcdef1234567890
83 Wizard-args: /wizard/bin/wizard foo bar baz
84
85 GIT COMMIT FIELDS:
86
87 Committer: Real Name <username@mit.edu>
88 Author: lockername locker <lockername@scripts.mit.edu>
89
90 NOTES:
91
92 - It is not required nor expected for update scripts to exist for all
93   intervening versions that were present pre-migration; only for it
94   to work on the most recent migration.
95
96 - Currently all repositories are initialized with --shared, which
97   means they have basically ~no space footprint.  However, it
98   also means that /mit/scripts/wizard/srv MUST NOT lose revs after
99   deployment.
100
101 OVERALL PLAN:
102
103 * Some parts of the infrastructure will not be touched, although I plan
104   on documenting them.  Specifically, we will be keeping:
105
106     - parallel-find.pl, and the resulting
107       /mit/scripts/.htaccess/scripts/sec-tools/store/scriptslist
108
109 * The new procedure for generating an update is as follows:
110   (check out the mass-migration instructions for something in this spirit,
111   although uglier in some ways; A indicates the step /should/ be automated)
112
113     0. ssh into not-backward, temporarily give the daemon.scripts-security-upd
114        bits by blanching it on system:scripts-security-upd, and run parallel-find.pl
115
116     1. Have the Git repository and working copy for the project on hand.
117
118     2. Checkout the pristine branch
119
120     3. Run wizard `prepare-pristine APP-VERSION`
121
122     4. Checkout the master branch
123
124     5. [FOR EXISTING REPOSITORIES]
125        Merge the pristine branch in. Resolve any conflicts that our
126        patches have with new changes. Do NOT let Git auto-commit it
127        with --no-commit (otherwise, you want to git commit --amend
128        to keep our history clean
129
130        [FOR NEW REPOSITORIES]
131        Check if any patches are needed to make the application work
132        on Scripts (ideally, it shouldn't.)  Run
133        `wizard prepare-new` to setup common filesets for our repositories.
134
135     6. Check if there are any special update procedures, and update
136        the wizard.app.APPNAME module accordingly (or create it, if
137        need be).
138
139     7. Run 'wizard prepare-config' on a scripts server while in a checkout
140        of this newest version.  This will prepare a new version of the
141        configuration file based on the application's latest installer.
142        Manually merge back in any custom changes we may have made.
143        Check if any of the regular expressions need tweaking by inspecting
144        the configuration files for user-specific gunk, and modify
145        wizard.app.APPNAME accordingly.
146
147     8. Commit your changes, and tag as v1.2.3-scripts (or scripts2, if
148        you are amending an install without an upstream changes)
149
150       NOTE: These steps should be run on a scripts server
151
152     9. Test the new update procedure using our test scripts.  See integration
153        tests for more information on how to do this.
154
155         http://scripts.mit.edu/wizard/testing.html#acceptance-tests
156
157       GET APPROVAL BEFORE PROCEEDING ANY FURTHER
158
159       NOTE: The following commands are to be run on not-backward.mit.edu.
160       You'll need to add daemon.scripts-security-upd to
161       scripts-security-upd to get bits to do this.  Make sure you remove
162       these bits when you're done.
163
164    10. Run `wizard research appname`
165        which uses Git commands to check how many
166        working copies apply the change cleanly, and writes out a logfile
167        with the working copies that don't apply cleanly.  It also tells
168        us about "corrupt" working copies, i.e. working copies that
169        have over a certain threshold of changes.
170
171    11. Run `wizard mass-upgrade appname`, which applies the update to all working
172        copies possible.
173
174    12. Run parallel-find.pl to update our inventory
175
176 * For mass importing into the repository, there are a few extra things:
177
178     * Many applications had patches associated with them.  Be sure to
179       apply them, so later merges work better.
180
181         # the following operation might require -p1
182         patch -p0 < ../app-1.2.3/app-1.2.3.patch  # [FIDDLY BIT]
183
184     * When running updates, if the patch has changed you will have to
185       do a special procedure for your merge:
186
187         git checkout pristine
188         # NOTE: Now, the tricky part (this is different from a real update)
189         git symbolic-ref HEAD refs/heads/master
190         # NOTE: Now, we think we're on the master branch, but we have
191         # pristine copy checked out
192         # NOTE: -p0 might need to be twiddled
193         patch -p0 < ../app-1.2.3/app-1.2.3.patch
194         git add .
195         # reconstitute .scripts directory
196         git checkout v1.2.2-scripts -- .scripts
197         git add .scripts
198         # NOTE: Fake the merge
199         git rev-parse pristine > .git/MERGE_HEAD
200
201       You could also just try your luck with a manual merge using the patch
202       as your guide.
203
204 * The repository for a given application will contain the following files:
205
206     - The actual application's files, as from the official tarball
207
208     - A .scripts directory, with the intent of holding Scripts specific files
209       if they become necessary.
210