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
20 * Some parts of the infrastructure will not be touched, although I plan
21 on documenting them. Specifically, we will be keeping:
23 - parallel-find.pl, and the resulting
24 /mit/scripts/sec-tools/store/scriptslist
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.
32 * The new procedure for generating an update is as follows (this is
33 also similar to procedure for creating these repositories):
35 1. Have the Git repository and working copy for the project on hand.
37 2. Checkout the pristine branch
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)
42 4. Download the new tarball
44 5. Extract the tarball over the working copy (`cp -R a/. b` works well,
45 remember that the working copy is empty)
47 6. Check for empty directories and add stub files as necessary
48 (use preserve-empty-dir)
50 7. Git add it all, and then commit as a new pristine version (v1.2.3)
52 8. Checkout the master branch
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
61 Apply the scripts patch that was used for that version here
62 (usually patch -p1 < patch)
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.)
70 11. Commit your changes, and tag as v1.2.3-scripts
72 If you're setting up a repository from scratch, stop here, and
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)
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.
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
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
94 15. Run parallel-find.pl
96 * The repository for a given application will contain the following files:
98 - The actual application's files, as from the official tarball
100 - A .scripts directory, which contains the following information:
102 * .scripts/update shell script (with the +x bit set appropriately),
103 which performs the commands necessary to update a script. This can
106 * .scripts/.htaccess to prevent this directory from being accessed
109 * .scripts/database (generated) contains the database the
110 user installed the script to, so scripts-remove can clean it
112 XXX: Could cause problems if a user copies the autoinstall,
113 fiddles with the DB credentials, and then scripts-remove's
116 * .scripts/version (generated) which contains the version
117 last autoinstalled (as distinct from the actual version
118 the script is) (This is the same as .scripts-version right
119 now; probably want to keep that for now)
121 XXX: It's unclear if we want to move to this wholesale, or
122 delay this indefinitely.
124 * The migration process has been implemented, see 'wizard migrate'.
126 XXX: We have not decided what migration should do to .scripts-version;
127 if it does move it to .scripts, repositories should have a .gitignore
130 * The autoupgrade shall be the process of:
132 # Make the directory not accessible by the outside world (htaccess, but be careful!)
134 git commit -m 'automatically generated backup'
135 git pull origin master
136 if [ $? ne 0 ]; then git reset --hard; echo 'conflicts during upgrade'; fi
140 (with some more robust error checking)
142 * Make 'wizard summary' generate nice pretty graphs of installs by date
143 (more histograms, will need to check actual .scripts-version files.)