]> scripts.mit.edu Git - wizard.git/blob - TODO
Implement migration script, update TODO with new things to do.
[wizard.git] / TODO
1 The Git Autoinstaller
2
3 TODO NOW:
4
5 - Fix mediawiki repository (has lots of stale files and a weird
6   history. This also means that the ichuang wiki will need to be
7   remigrated; frob .scripts-version to make it acceptable, but
8   otherwise should be fairly trivial).  When I say "fix", I mean
9   "redo". Thorough documentation would be good too.  Some bits
10   can be automated and/or have tools to assist it
11 - Whiteboard the flow for performing an upgrade on a single
12   install. How assisted does it need to be?
13 - Conduct migration tool testing
14 - Create mass-migration tool (should be able to limit on mediawiki)
15 - Run parallel-find.pl
16 - Migrate all mediawikis
17
18 OVERALL PLAN:
19
20 * Some parts of the infrastructure will not be touched, although I plan
21   on documenting them.  Specifically, we will be keeping:
22
23     - parallel-find.pl, and the resulting
24 /mit/scripts/sec-tools/store/scriptslist
25
26     - The current install scripts will be kept in place, sans changes
27       necessary to make them use Git install of copying the script over.
28       Porting these scripts to Python and making them modular would be
29       nice, but is priority.  For the long term, seeing this scripts
30       be packaged with rest of our code would be optimal.
31
32 * The new procedure for generating an update is as follows (this is
33   also similar to procedure for creating these repositories):
34
35     1. Have the Git repository and working copy for the project on hand.
36
37     2. Checkout the pristine branch
38
39     3. Remove all files from the working copy (rm -Rf *, and then delete
40        any dot stragglers.  A script to do this would be handy)
41
42     4. Download the new tarball
43
44     5. Extract the tarball over the working copy (`cp -R a/. b` works well,
45        remember that the working copy is empty)
46
47     6. Check for empty directories and add stub files as necessary
48        (use preserve-empty-dir)
49
50     7. Git add it all, and then commit as a new pristine version (v1.2.3)
51
52     8. Checkout the master branch
53
54     9. [FOR EXISTING REPOSITORIES]
55        Merge the pristine branch in. Resolve any conflicts that our
56        patches have with new changes. Do NOT let Git auto-commit it
57        with --no-commit (otherwise, you want to git commit --amend
58        to keep our history clean
59
60        [FOR THE FIRST TIME]
61        Apply the scripts patch that was used for that version here
62        (usually patch -p1 < patch)
63
64    10. Check if there are any special update procedures, and update the
65        .scripts/update shell script as necessary (this means that any
66        application specific update logic will be kept with the actual
67        source code.  The language of this update script will vary
68        depending on context.)
69
70    11. Commit your changes, and tag as v1.2.3-scripts
71
72    If you're setting up a repository from scratch, stop here, and
73    repeat as necessary
74
75        XXX: Should we force people to push to the real repository at
76        this point, or just make the repository that the script pulls
77        stuff out of configurable? (Twiddling origin can get you a
78        devel setup with no code changes)
79
80    12. Run the "dry-run script", which uses Git commands to check how many
81        working copies apply the change cleanly, and writes out a logfile
82        with the working copies that don't apply cleanly.
83
84    13. Run the "limited run" script, which applies the update to our
85        test-bed, and lets us check the basic functionality of the update.
86        This can include a script that lets us update a single directory
87        with verbose output.
88
89    14. Run the "deploy" script, which applies the update to all working
90        copies possible, and sends mail to users to whom the working copy
91        did not apply cleanly. It also frobs .scripts/version for successful
92        upgrades.
93
94    15. Run parallel-find.pl
95
96 * The repository for a given application will contain the following files:
97
98     - The actual application's files, as from the official tarball
99
100     - A .scripts directory, which contains the following information:
101
102         * .scripts/update shell script (with the +x bit set appropriately),
103           which performs the commands necessary to update a script.  This can
104           be in any language.
105
106         * .scripts/.htaccess to prevent this directory from being accessed
107           from the web.
108
109         * .scripts/database (generated) contains the database the
110           user installed the script to, so scripts-remove can clean it
111
112         * .scripts/version (generated) which contains the version
113           last autoinstalled (as distinct from the actual version
114           the script is) (This is the same as .scripts-version right
115           now; probably want to keep that for now)
116
117             XXX: It's unclear if we want to move to this wholesale, or
118             delay this indefinitely.
119
120 * The migration process has been implemented, see 'wizard migrate'.
121
122     XXX: We have not decided what migration should do to .scripts-version;
123     if it does move it to .scripts, repositories should have a .gitignore
124     in those directories
125
126 * The autoupgrade shall be the process of:
127
128     # Make the directory not accessible by the outside world (htaccess, but be careful!)
129     git add -u .
130     git commit -m 'automatically generated backup'
131     git pull origin master
132     if [ $? ne 0 ]; then git reset --hard; echo 'conflicts during upgrade'; fi
133     ./.scripts/update
134     # Make it accessible
135
136   (with some more robust error checking)
137
138 * Make 'wizard summary' generate nice pretty graphs of installs by date
139   (more histograms, will need to check actual .scripts-version files.)