Established 1986
Kevin Martin - PO Box 82783 - Portland, OR 97282
Content-Site Update
The content site is mostly .phtml pages, some PHP 4.0 code, and the
usual assortment of images. The current version is maintained
in Microsoft Visual Source Safe (VSS). To migrate it to the
QA, staging, and production sites, follow this process.
- Get the current files
In VSS, "Get most recent version, recursive" for the httpd tree, and
save it into C:\Unpack on the PC. (The directory name is significant
and my Unix shell scripts do depend on it.)
- Zip it up
Go to the Unpack directory and zip up all the directories created there
by VSS. When you Winzip them, make sure to check the box for "Include
extra directory information." When the .zip file is unzipped, it will
create an Unpack directory on the Unix machine containing htdocs,
php-prep, php, and php-common as subdirectories. That's what we
want. Create the archive file as contxxx.zip (e.g. cont104.zip for version
1.04).
- Copy the zip file to [the NT box that allows anon ftp], ftp
it to whorfin
Copy the zip file to ftpbox/Builds, then log on to
whorfin as a regular user and use ftp to pull the file from ftpbox to
whorfin's /tmp directory:
Sun Microsystems Inc. SunOS 5.7 Generic October 1998
No mail.
kmartin@whorfin:~# cd /tmp
kmartin@whorfin:/tmp# ftp ftpbox
Connected to ftpbox.clientsite.com.
220 ftpbox Microsoft FTP Service (Version 4.0).
Name (ftpbox:kmartin): ftp
331 Anonymous access allowed, send identity (e-mail name) as password.
Password: kevin
230 Anonymous user logged in.
ftp> bin
200 Type set to I.
ftp> get cont110b.zip
200 PORT command successful.
150 Opening BINARY mode data connection for cont110b.zip(1356283 bytes).
226 Transfer complete.
local: cont110b.zip remote: cont110b.zip
1356283 bytes received in 0.13 seconds (9834.39 Kbytes/s)
ftp> bye
221
kmartin@whorfin:/tmp#
You'll note that this is cont110b.zip -- the 'b' indicates that it is
a minor change to a previous package (for example, this is version 1.10
plus a few changed images). VSS allows you to get just the changed files,
which you can then zip up on your PC along with the old files -- the moral
is, do not delete your Unpack directory until a completely new version is
ready to upload!
- scp it to QA and/or staging
Still logged on to whorfin, use scp to copy the contxxx.zip file to
sabre:/tmp and/or production-4:/tmp. (I have authorized_keys set up so
that whorfin can scp to those two boxes as kmartin without prompting
for my password).
- Install it on QA
Log on to sabre and become superuser.
In sabre:/root/bin there is a script called mvcont
(if you type "bash" to change your shell, it should add /root/bin
to your path automatically). You give it the file name without extension
("mvcont contxxx") and it will do the following:
1) unzip the contxxx.zip file
2) remove these directories from /httpd: htdocs, php, php_common,
php_prep
3) fix the ownership and protection on the new files in the /tmp/Unpack
directory tree
4) move the four directories into /httpd
It does very limited sanity checking; basically, if you forget to put the
name of the archive on the command line, it will exit. If it finishes
successfully, it will say "Done."
- Install it on staging
On production-4, running "mvcont contxxx" as root does all of the above,
AND creates a new tar archive on /tmp for use by the next script.
- Install it into production
On production-1, 2, and 3, kmartin/bin has a script called getcont. It copies the contxxx.tar file from
production-4 using scp, and installs it locally the same way mvcont does.
You need to run it on each of the three servers. You may get some warning
messages because there are prep site files in the same directory that
are set as read-only and owned by another user. The script can't change
the permissions for these [at least, not until he gets in there and
makes them group-owned, as they're supposed to be!]. Those warning
messages can be ignored for now.
Back: Application Software
-
Continue: Interactive Site
-
Next: Relationships
Please Note
If a search engine dropped you directly into this document, you
should go to the index page to find out
what you're reading. This document is a record of a project
from 1999-2000 -- it is not a current guide to installing any
software product.