]> scripts.mit.edu Git - wizard.git/blob - TODO
Add some more docs, minor updates.
[wizard.git] / TODO
1 The Git Autoinstaller
2
3 * Some parts of the infrastructure will not be touched, although I plan
4   on documenting them.  Specifically, we will be keeping:
5
6     - parallel-find.pl, and the resulting
7 /mit/scripts/sec-tools/store/scriptslist
8
9     - The current install scripts will be kept in place, sans changes
10       necessary to make them use Git install of copying the script over.
11       Porting these scripts to Python and making them modular would be
12       nice, but is priority.  For the long term, seeing this scripts
13       be packaged with rest of our code would be optimal.
14
15 * The new procedure for generating an update is as follows:
16
17     1. Have the Git repository and working copy for the project on hand.
18
19     2. Download the new tarball
20
21     3. Extract the tarball over the working copy
22
23     4. Check if there are any special update procedures, and update the
24        .scripts/update shell script as necessary (this means that any
25        application specific update logic will be kept with the actual
26        source code.  The language of this update script will vary
27        depending on context.)
28
29     X. Check for empty directories and add stub files as necessary
30        (use preserve-empty-dir)
31
32     5. Commit your changes, and tag as v1.2.3-scripts
33
34     6. Run the "dry-run script", which uses Git commands to check how many
35        working copies apply the change cleanly, and writes out a logfile
36        with the working copies that don't apply cleanly.
37
38     7. Run the "limited run" script, which applies the update to our
39        test-bed, and lets us check the basic functionality of the update.
40
41     8. Run the "deploy" script, which applies the update to all working
42        copies possible, and sends mail to users to whom the working copy
43        did not apply cleanly. (It also frobs .scripts/version)
44
45     Note: The last three scripts will need to be implemented, with an
46           eye towards speed.
47
48 * How to migrate an old autoinstaller to the new autoinstaller
49
50     - Find the oldest tarball/patch set for the application that still
51       is in use and upgradable.
52
53     - Untar, apply patch, place in a directory and git init
54
55     - Create the .scripts directory and populate it with the interesting
56       information (see below)
57
58 * The repository for a given application will contain the following files:
59
60     - The actual application's files, as from the official tarball
61
62     - A .scripts directory, which contains the following information:
63
64         * .scripts/update shell script (with the +x bit set appropriately),
65           which performs the commands necessary to update a script.  This can
66           be in any language.
67
68         * .scripts/version which contains the version last autoinstalled
69           (as distinct from the actual version the script is) (This will
70           be auto-generated and should not be versioned)
71
72         * .scripts/real-version (+x) which checks the source code to find the
73           actual version of the application
74
75         * .scripts/.htaccess to prevent this directory from being accessed
76           from the web.
77
78     - Because there will be no .gitignore file, you *must not* run
79       `git add .` on an actual running copy of the application.
80       `git add -u .` will generally be safe.
81
82 * The migration process shall be as such:
83
84     1. git init
85
86     2. git add remote origin /foo
87
88     3. whatever the merge frob is
89
90     4. git fetch origin
91
92     5. git reset
93
94     6. Setup .scripts/version (probably pipe the output of real-version)
95
96 * We will not add special code to handle .htaccess; thus the kernel patch
97   for allowing Apache access to .htaccess sent to scripts-team@mit.edu
98   must be handled first.
99
100 * The autoupgrade shall be the process of:
101
102     git add -u .
103     git commit -m 'automatically generated backup'
104     git pull /mit/scripts/deploy/wordpress.git master
105     if [ $? ne 0 ]; then git reset --hard; echo 'conflicts during upgrade'; fi
106     ./.scripts/update
107
108 * Make install-statistics generate nice pretty graphs of installs by date
109   (more histograms, will need to check actual .scripts-version files.)