Using SVN and the staging serverThe USSF2007 web site is now using a version control system. If you are simply adding content to the site then you do not need to concern yourself with the staging server or version control or anything. You can simply continue adding content as you have in the past. On the other hand, if you are a developer on the site, meaning that you are adding/changing modules, changing the style sheet, or making any other file changes to the site, then please read on and learn how to make changes to the site in a way that is collaborative and ensures that we make fewer mistakes directly on the live site. As of 2007-06-04, this information is outdated: we are transitioning to a new server by the 8th of June and this information will be updated to reflect the new approach at that time. The key change is: you can no longer make changes directly on the live site anymore. Instead, the new process is:
Using the staging server The staging server can be accessed at: It is protected by a simple HTTP basic Auth to keep google and nosy bumblers away. (Diligent busybodies will find their way in to the staging server, at which point we will co-opt them into the ICT group.) You can get in with: user: ussf2007 If you have shell access on our server, you can access this site by secure shelling into chavez.mayfirst.org (that part is the same) and changing into the following directory: /home/members/mayfirst/sites/staging.ussf2007.org Here you can make your changes (upload a new module, modify a style sheet, etc.). Note that at the moment, the staging server still can send e-mail (though it should say "staging" in the various headers, etc). So be cautious about doing staging changes that might emit e-mail. So... How do I add my changes to the repository? Suppose you change the style sheet and you want those changes committed. First, edit the style.css file using whatever method you are comfortable with. Next secure shell into the server, change into the directory containing the style.css file and "commit" your changes with:
Be sure to add a good comment when prompted! Now, say you find you need to add version 1.4 of module foo to the site. First upload and untar the module into the modules directory. Then enable it on the staging server and make sure it works ok. Because you are adding something new to the file system you have to use the "add" command before the "commit" command.
How do I make my changes live? First - keep in mind that you should not push every change you make live file-by-file. The goal of this system is to make the live server more stable by reducing the number of small changes to the site. Instead, the goal should be to make a number of changes on the staging server, ensure that they all work well together, then push them to the live server together. So, assuming that you have a set of changes that you would like to make live... You may want to first compare what is in trunk (the most recent changes submitted to svn) with what is on the live server. To do so, first cd to the live directory:
Then, using the svn info command to get the current status of the live site:
This will output something like: Path: . The URL line tells us which tag the live server is running (in this case: 27) Now, you can compare the 27 tag with trunk by issuing:
If that looks reasonable, you'll want to tag what is in trunk. You can find out the existing tags by running:
Pick the next available number (my example assumes that "27" was the last tag iIcould see), and make a tag:
The last step is to update the live site itself to the new tag with:
The "ussf-push-tag" is a special script that will execute the change with the permissions of the proper use. If you are in the "ussf" group you will be able to execute that command. |