]> scripts.mit.edu Git - wizard.git/blob - TODO
Reduce duplication in test scripts, more logging.
[wizard.git] / TODO
1 The Git Autoinstaller
2
3 TODO NOW:
4
5 - --retry option for install, so it won't complain about a directory already
6   being there.
7 - The calling web code invocations are a mess, with stubs living
8   in the install, deploy modules and the real deal living in util.  Furthermore,
9   we use the scripts-specific heuristic to determine where the app
10   lives, and the only reason my test scripts work is because they
11   get manually fed the domain and path by my environment variables.
12
13   We will record the URL used for the initial installation, and save it in
14   .scripts/url.  If autodetection in either direction is
15   available, we verify this value against the actual file path the installation
16   lives in (for the scripts case, we can do a file-level comparison because we
17   know the web root of any given file).  If they mismatch, we error out
18   and have someone manually resolve the problem.  If autodetection is not
19   available, we use the saved .scripts/url for operations.
20
21 - wizard install wordpress should ask for password
22 - Test code should auto-nuke the database using `wizard remove` before doing a new install
23 - git diff :1:$file :2:$file to find out what the user did, or is it :3:?
24 - Document how to fix a broken upgrade
25 - php.ini needs to get substituted!
26 - Make wizard install accept appname-head (so that you can do a test with
27   head, and do things without tags).  Also make it accept commit hashes.
28   In fact, let it accept any committish.  Figure out what to do if we
29   do a test script with x.y.z when we REALLY mean x.y.z-scripts. XXX!!!
30 - Do early validation of inputs for configuration
31 - Let 'wizard configure' be interactive
32 - Parse output HTML for class="error" and give those errors back to the user,
33   then boot them back into configure
34 - Get rid of our custom sizing code and use dialog's built-in sizing (i.e. width=0, height=0).
35   Maybe our sizing code is superior, maybe not.
36
37 - Replace gaierror with a more descriptive name (this is a DNS error)
38
39 - Pre-emptively check if daemon/scripts-security-upd
40   is not on scripts-security-upd list (/mit/moira/bin/blanche)
41
42 - Redo Wordpress conversion, with an eye for automating everything
43   possible (such as downloading the tarball and unpacking)
44
45 - Web application for installing autoinstalls has a hard problem
46   with credentials (as well as installations that are not conducted
47   on an Athena machine.)  Possible solutions include asking the user
48   to SSH into an athena machine and run a bunch of commands, or writing
49   a Java applet (possibly in Clojure or Scala) which gets filesystem
50   permissions and then performs the operations.
51
52 - Pay back code debt
53     - Genericize callAsUser and drop_priviledges in shell
54     - Summary script should be more machine friendly, and should not
55       output summary charts when I increase specificity
56     - Summary script should do something intelligent when distinguishing
57       between old-style and new-style installs
58     - Report code in wizard/command/__init__.py is ugly as sin.  Also,
59       the Report object should operate at a higher level of abstraction
60       so we don't have to manually increment fails. (in fact, that should
61       probably be called something different).  The by-percent errors should
62       also be automated.
63     - Move resolutions in mediawiki.py to a text file? (the parsing overhead
64       may not be worth it)
65     - If a process is C-ced, it can result in a upgrade that has
66       an updated filesystem but not updated database. Make this more
67       resilient
68     - PHP end of file allows omitted semicolon, can result in parse error
69       if merge resolutions aren't careful.  `php -l` can be a quick stopgap
70
71 - Other stuff
72     - Figure out why Sphinx sometimes fails to crossref :func: but wil
73       crossref :meth:, even though the dest is very clearly a function.
74       Example: :func:`wizard.app.php.re_var`
75     - The TODO extension for Sphinx doesn't properly force a full-rebuild
76     - Code annotation!
77     - Make single user mass-migrate work when not logged in as root
78     - Don't use the scripts heuristics unless we're on scripts with the
79       AFS patch.  Check with `fs sysname`
80     - Make 'wizard summary' generate nice pretty graphs of installs by date
81       (more histograms, will need to check actual .scripts-version files.)
82     - It should be able to handle installs like Django where there's a component
83       that gets installed in web_scripts and another directory that gets installed
84       in Scripts.
85     - ACLs is a starting point for sending mail to users, but it has
86       several failure modes:
87         - Old maintainers who don't care who are still on the ACL
88         - Private AFS groups that aren't mailing lists and that we
89           can't get to
90       A question is whether or not sending mail actually helps us:
91       many users will probably have to come back to us for help; many
92       other users won't care.
93
94 PULLING OUT CONFIGURATION FILES IN AN AUTOMATED MANNER
95
96 advancedpoll: Template file to fill out
97 django: Noodles of template files
98 gallery2: Multistage install process
99 joomla: Template file
100 mediawiki: One-step install process
101 phpbb: Multistage install process
102 phpical: Template file
103 trac: NFC
104 turbogears: NFC
105 wordpress: Multistage install process
106
107 COMMIT MESSAGE FIELDS:
108
109 Installed-by: username@hostname
110 Pre-commit-by: Real Name <username@mit.edu>
111 Upgraded-by: Real Name <username@mit.edu>
112 Migrated-by: Real Name <username@mit.edu>
113 Wizard-revision: abcdef1234567890
114 Wizard-args: /wizard/bin/wizard foo bar baz
115
116 GIT COMMIT FIELDS:
117
118 Committer: Real Name <username@mit.edu>
119 Author: lockername locker <lockername@scripts.mit.edu>
120
121 NOTES:
122
123 - It is not required nor expected for update scripts to exist for all
124   intervening versions that were present pre-migration; only for it
125   to work on the most recent migration.
126
127 - Currently all repositories are initialized with --shared, which
128   means they have basically ~no space footprint.  However, it
129   also means that /mit/scripts/wizard/srv MUST NOT lose revs after
130   deployment.
131
132 OVERALL PLAN:
133
134 * Some parts of the infrastructure will not be touched, although I plan
135   on documenting them.  Specifically, we will be keeping:
136
137     - parallel-find.pl, and the resulting
138       /mit/scripts/.htaccess/scripts/sec-tools/store/scriptslist
139
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)
143
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
146
147     1. [ see doc/upgrade.rst ]
148
149     [ENTER HERE FROM CREATING A NEW REPO]
150
151     9. Push all of your changes in a public place, and encourage others
152        to test, using --srv-path and a full path.
153
154 [ XXX: doc/deploy.rst ]
155       GET APPROVAL BEFORE PROCEEDING ANY FURTHER;
156       THIS IS PUSHING THE CHANGES TO THE PUBLIC
157
158       NOTE: The following commands are to be run on not-backward.mit.edu.
159       You'll need to add daemon.scripts-security-upd to
160       scripts-security-upd to get bits to do this.  Make sure you remove
161       these bits when you're done.
162
163    10. Run `wizard research appname`
164        which uses Git commands to check how many
165        working copies apply the change cleanly, and writes out a logfile
166        with the working copies that don't apply cleanly.  It also tells
167        us about "corrupt" working copies, i.e. working copies that
168        have over a certain threshold of changes.
169
170    11. Run `wizard mass-upgrade appname`, which applies the update to all working
171        copies possible.
172
173    12. Run parallel-find.pl to update our inventory
174
175 [ XXX: doc/upgrade.rst ]
176 * For mass importing into the repository, there are a few extra things:
177
178     * When mass producing updates, if the patch has changed you will have to
179       do a special procedure for your merge:
180
181         git checkout pristine
182         # NOTE: Now, the tricky part (this is different from a real update)
183         git symbolic-ref HEAD refs/heads/master
184         # NOTE: Now, we think we're on the master branch, but we have
185         # pristine copy checked out
186         # NOTE: -p0 might need to be twiddled
187         patch -p0 < ../app-1.2.3/app-1.2.3.patch
188         git add .
189         # reconstitute .scripts directory
190         git checkout v1.2.2-scripts -- .scripts
191         git add .scripts
192         # NOTE: Fake the merge
193         git rev-parse pristine > .git/MERGE_HEAD
194
195       You could also just try your luck with a manual merge using the patch
196       as your guide.
197
198 [ XXX: doc/layout.rst ]
199 * The repository for a given application will contain the following files:
200
201     - The actual application's files, as from the official tarball
202
203     - A .scripts directory, with the intent of holding Scripts specific files
204       if they become necessary.
205