]> scripts.mit.edu Git - wizard.git/blob - TODO
Object-orient the code, and add --count-exists functionality.
[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-scripts1
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.
44
45     Note: The last three scripts will need to be implemented, with an
46           eye towards speed.
47
48 * The repository for a given application will contain the following files:
49
50     - The actual application's files, as from the official tarball
51
52     - A .scripts directory, which contains the following information:
53
54         * .scripts/update shell script (with the +x bit set appropriately),
55           which performs the commands necessary to update a script.  This can
56           be in any language.
57
58         * .scripts/version which contains the version last autoinstalled
59           (as distinct from the actual version the script is)
60
61         * .scripts/real-version (+x) which checks the source code to find the
62           actual version of the application
63
64         * .scripts/.htaccess to prevent this directory from being accessed
65           from the web.
66
67     - Because there will be no .gitignore file, you *must not* run
68       `git add .` on an actual running copy of the application.
69       `git add -u .` will generally be safe.
70
71 * The migration process shall be as such:
72
73     1. git init
74
75     2. git add remote origin /foo
76
77     3. whatever the merge frob is
78
79     4. git fetch origin
80
81     5. git reset
82
83 * We will not add special code to handle .htaccess; thus the kernel patch
84   for allowing Apache access to .htaccess sent to scripts-team@mit.edu
85   must be handled first.
86
87 * The autoupgrade shall be the process of:
88
89     git add -u .
90     git commit -m 'automatically generated backup'
91     git pull /mit/scripts/deploy/wordpress.git master
92     if [ $? ne 0 ]; then git reset --hard; echo 'conflicts during upgrade'; fi
93     ./.scripts/update