You should never change the production files or database scheme directly. Instead, make all such changes on the development server and then deploy them in a controlled fashion. The key elements to deployment are:
Pre-tested Change. Any changes you make to the system have already been tested in a simulated production environment. (The best way to do this is with a pre-production environment. That is, a change is tested in dev, and then tested in a recent clone of production. This will be documented here in the future.)
Version-Controlled Change. When you make a change to production, you are confident that you are getting exactly the change you want and nothing more or less.
Rollback. If anything goes wrong, there is a very-low-risk, very fast way to restore the system to its state before the change.
(THIS PARAGRAPH AND THE THINKING BEHIND IT ARE STILL A WORK IN PROGRESS.) For OpenACS 4.5, we will draw a line between the file system and the database. We'll assume that we can change the filesystem freely without affecting the database. So, any change that doesn't change the database schema can be effected by changing the file system, and we can safely roll back these changes simply be changing the filesystem back. Changes that do affect the database should go through OpenACS's package mechanism, which has provisions and standards for controlled change of the database without data loss. In short, Files through CVS, database through APM
Install the tutorial package
This step assumes that you have put the package file in /tmp.
Click the Load a new package from a URL or local directory link
For Path:, enter /tmp/tutorialapp-0.1d.apm and click
Click Install
Click
Click Main Site
Mount the tutorial package in the site map
(TEMP WORKAROUND because the install package doesn't run the database script - psql -f /web/openacs-prod/packages/tutorialapp/sql/postgresql/tutorial-create.sql openacs-prod):Click Package Manager.
Click the new sub folder link on the Main Site line.
Type tutorial and click .
Click the new application link on the tutorial line.
Type Tutorial where it says untitled, choose Tutorial App from the drop-down list, and click .
Go back to the development server and make a minor change.
cd /web/openacs-dev/www emacs index.adp
Change some of the text on the page.
Verify the change by browsing to http://yourserver:8000 and looking at your change.
Add the change to cvs.
cvs commit -m "" index.adp cvs tag -F current index.adp
Test the change on the preproduction server . (INCOMPLETE - document how to set up a preproduction server.) This example assumes that the old version is the original installation, and the date is 01 January 2003. From a root shell:
su - nsadmin
cd /web
cvs export -r current -d openacs-20030101 openacs
svc -d /service/openacs-pre
rm openacs-pre
ln -s openacs-20030101 openacs-pre
svc -u /service/openacs-pre
exit
Browse to http://yourserver:8000 and test.
If everything tests okay, deploy to production.
svc -d /service/openacs-prod mv openacs-prod openacs-prod-lastgood mv openacs-20030101 openacs-prod svc -u /service/openacs-prod exit
If something goes wrong, you can reverse the changes via:
svc -d /service/openacs-prod mv openacs-prod openacs-prod-newbad mv openacs-prod-lastgood openacs-prod svc -u /service/openacs-prod