The UW Technology WWW Development environment provides several sets of development and evaluation directories, and one set of production directories. The wwwinst Installation Tools (wwwuinst and wwwdinst) migrate files from development/evaluation into production.
wwwuinst is available for use from bank.u, shiva.cac, and red.cac. wwwdinst is only available from shiva.cac and red.cac.
Note: If you are developing on a host which is not in the cac.washington.edu domain (i.e. bank.u), you will not be able to directly access the production directories. You must use wwwuinst to do the installations.
There are a couple alternatives to using the wwwinst tools:
Copying files by hand has the danger of either forgetting to copy some necessary files, or forgetting to remove files that should no longer exist in the production area.
Developing in the production directories raises the possibility of having files become visible to the target audience before changes are completed or before they have been fully evaluated.
The wwwinst tools automate the process by allowing you to make an exact copy of your development files and directory structure into the production area.
The wwwinst Installation Tools consists of two different programs. You would use the one which corresponds to your development area. These programs are:
The simplest way to use the wwwinst tools is to specify the top-level directory you wish to copy from development to production. As an example, assume that you are developing in the directory wwwudev/world/sample and you are satisfied with how everything is laid out. To install a copy of this directory into the production area, use:
wwwuinst world/sample
A list of all files which are installed, updated, or removed is displayed. These changes will appear on www.washington.edu (with the URL of http://www.washington.edu/sample/) the next day. If you wish to force changes to appear immediately, you would instead use the command:
wwwuinst -push world/sample
If you do not use the -push flag (from the previous question), your files will not show up until the next day.
The wwwinst tools allow you to install individual files, also. For example, if you only changed the file wwwudev/world/sample/index.html, you can copy just that file with:
wwwuinst world/sample/index.html
The wwwinst tools provide a -show switch which will show you what files would be installed, but doesn't actually do the install. For example:
wwwuinst -show world/sample
You would use the -newer flag, which only will install a file if the production copy is older than what you're copying from. A sample command:
wwwuinst -newer world/sample
In most cases this flag is not necessary. It's purpose is for the times that you have files that were changed in production but not in development. Another method of preventing these files from being overwritten is to use a .wwwinstrc
file (see below).
The restrictions for using the wwwinst tools are:
Your webguide can help you with any of these restrictions. If you do not have a webguide, then you should contact www-mgmt.
The .wwwinstrc
file prevents files or directories from actually being installed to production. This can also be used when multiple groups to share the same directory. The .wwwinstrc
file must be put into the wwwdev or wwwudev directory in which the skip commands should take effect..
Each line in the .wwwinstrc
contains a command which wwwinst uses in the directory that contains the .wwwinstrc file. For example, if your file has the command:
skip test*
then any file or directory beginning with the word test
, such as test.html
or testdir
(including all of the contents of testdir
) would not be installed (or removed, if they exist only in production).
Files in subdirectories will not match, so for the example above, the file subdir/test.html
would be installed, not skipped. If you wish to skip that file, you need to create another .wwwinstrc
file in the directory subdir
which has a skip command.
Once you have removed an old file from /usr/local/wwwudev
you can remove it from production using the -delete
flag.
For example, if you just removed an old file:
% rm /usr/local/wwwudev/world/sample/oldfile.html
you can remove that file from production using the following command:
% wwwuinst -delete world/sample/oldfile.html Password for user xxx: Removing world/sample/oldfile.html
The -delete
flag can also be used to remove obsolete directories:
% wwwuinst -delete world/sample/olddirectory
You must not put a slash after the directory (such as world/sample/olddirectory/
).
The file or directory must not exist in /usr/local/wwwudev
directories before running wwwuinst -delete
.
You must wait overnight for the deleted files to be removed from the production systems.
If you have many files and/or directories you wish to remove at one time, rather than use the -delete
flag on many individual files, it may be simplest to just use the wwwuinst
command on a complete directory. Beware that this will also update any modified files, as well as install new files. You will not need to wait overnight for files to be deleted from the production systems if you use this method.
If a directory contains a file named .wwwinstmk
, the UNIX program make is run on that file before installation is done. The file must be in a format which can be used by the GNU make program.
cp: /usr/local/www/world/
directory/
path/
filename.INSTNEW: No such file or directory
% wwwuinst -push world/
directory/
path
Warning: couldn't fix protections for world/
directory/
path/
filename/usr/local/wwwudev/world/
directory/
path/
filename exists, can't remove from /usr/local/www
Nothing to delete
-delete
flag, you need to make sure the file does not exist in the /usr/local/wwwudev directory before running the command. This prevents the file from being reinstalled the next time the wwwuinst
command is run on the whole directory.File
filename is RCS controlled and locked, skipping
wwwuinst
if the file is both checked out and unlocked. If you see this message but didn't know your file was under RCS control (or aren't sure how to work with it) you should contact your webguide for assistance.make: Nothing to be done for `all'.
.wwwinstmk
file, the UNIX program make is run using that file. This message means that everything is already up-to-date.