by Vinod Kurup
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -75,17 +75,17 @@
communicate with the database. There is one script each for
Oracle and PostGreSQL. They don't conflict, so if you plan
to use both databases, install both.
OPTIONAL - install nsopenssl. This AOLserver module is required if you want people to connect to your site via https. These commands compile nsopenssl and install it, along with a tcl helper script to handle https connections. You will also need ssl certificates. Because those should be different for each server service, you won't need those instructions until later. You will need the nsopenssl tarball in /tmp.
[root@yourserver bin]# cd /usr/local/src/aolserver
[root@yourserver aolserver]# tar xzf /tmp/nsopenssl-2.1.tar.gz
[root@yourserver aolserver]# cd nsopenssl-2.1
@@ -291,4 +291,4 @@
cd analog-5.31
make
cd ..
-mv analog-5.31 /usr/share/
by Bryan Quinn
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -89,7 +89,7 @@
packages for other ACS users to download and install.
For a simple illustration of the difference between ACS without APM
(pre-3.3) and ACS with APM (3.3 and beyond), consider a hypothetical ACS
installation that uses only two of the thirty-odd modules available circa ACS
-3.2 (say, bboard and e-commerce):
APM itself is part of a package, the OpenACS Kernel, an OpenACS
service that is the only mandatory component of an OpenACS installation.
Competitive Analysis
The OpenACS is a platform for web-based application software, and any software
platform has the potential to develop problems like those described above.
Fortunately, there are many precedents for systematic solutions,
@@ -542,4 +542,4 @@
all of this functionality in one interface and it can be confusing from a
usability perspective.
Authors
System creator: Bryan Quinn, Jon Salz, Michael Yoon, Lars Pind, Todd
Nightingale.
System owner: Bryan Quinn
Documentation author: Bryan Quinn, building from earlier versions by Jon
-Salz, Michael Yoon, and Lars Pind.
by Bryan Quinn and Todd Nightingale
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -293,4 +293,4 @@
are set using the acs_attribute_values table. The automatic web interface for
setting package parameters should be one and the same with the interface for
setting acs object attribute values. Consequently, the implementation of
-these features should be quite straightforward.
Revision History
Document Revision #
Action Taken, Notes
When?
By Whom?
0.1
Creation
8/10/2000
Bryan Quinn, Todd Nightingale
�
Reviewed
8/11/2000
John Prevost, Mark Thomas, and Pete Su
0.2
Revised and updated
8/12/2000
Bryan Quinn
0.3
Reviewed, revised, and updated - conforms to requirements template.
by Don Baccus
with additions by Joel Aufrecht
OpenACS docs are written by the named authors, but may be edited
@@ -47,7 +47,7 @@
unneccesary and has complicated permissions. Make sure that you are using the cron job to back up the database to a file in /web/service0/database-backup so that the tar command will include the database.
[root@yourserver root]# su - service0
[service0@yourserver service0]$ tar -cpsj --exclude /web/service0/etc/daemontools/supervise --file /tmp/service0-backup.tar.bz2 /web/service0/
tar: Removing leading `/' from member names
-[service0@yourserver service0]$
Testing
On a test service, make sure that your backup-recovery process work. After backing up the database and file system, delete the service as detailed below and then recover it.
On a test service, make sure that your backup-recovery process work. After backing up the database and file system, delete the service as detailed below and then recover it.
by Jon Salz
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -87,4 +87,4 @@
At this point, bootstrap.tcl is done executing. AOLserver
proceeds to source the remaining files in the /tcl directory
(i.e., unpackaged libraries) and begins listening for connections.
-
by Joel Aufrecht
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -10,26 +10,26 @@
in SVRMGRL with the cascade
option. This command will drop the user and every database object
the user owns.
-SVRMGR> drop user server0 cascade;
+SVRMGR> drop user service0 cascade;
If this does not work because svrmgrl "cannot drop a user that
is currently connected", make sure to kill the AOLserver using
this user. If it still does not work, do:
-SVRMGR> select username, sid, serial# from v$session where lower(username)='server0';
and then
+SVRMGR> select username, sid, serial# from v$session where lower(username)='service0';
and then
SVRMGR> alter system kill session 'sid,serial#';
where sid and serial# are
replaced with the corresponding values for the open session.
Use with caution!
If you feel the need to delete everything
related to the service, you can also issue the following:
-SVRMGR> drop tablespace server0 including contents cascade constraints;
Deleting a PostgreSQL tablespace
+SVRMGR> drop tablespace service0 including contents cascade constraints;
Deleting a PostgreSQL tablespace
Dropping a PostgreSQL tablespace is easy. You have to stop any
AOLserver instances that are using the database that you wish to
drop. If you're using daemontools, this is simple, just use the
'down' flag (-d). If you're using inittab, you have to comment out
your server in /etc/inittab,
reread the inittab with /sbin/init
q, and then restart-aolserver
- server0.
Then, to drop the db, just do:
-server0:~$ dropdb server0
+ service0.
Then, to drop the db, just do:
+service0:~$ dropdb service0
DROP DATABASE
Vacuum Postgres nightly
The "vacuum" command must be run periodically to reclaim space. The
"vacuum analyze" form additionally collects statistics on the
@@ -46,4 +46,4 @@
Edit your crontab:
joeuser:~$ crontab -e
We'll set vacuum up to run nightly at 1 AM. Add the following
line:
by Jon Salz. Revised and expanded by
Roberto Mello (rmello at fslc dot usu dot edu), July 2002.
@@ -731,4 +731,4 @@
The nsv containing the list is initialized by the bootstrap script and should
never be referenced directly by user code.
Returns the current rdbms type and version.
-
By claus@arsdigita.com, with
additions by Roberto
Mello and the OpenACS Community
@@ -32,7 +32,7 @@
In order to separate content and presentation, all OpenACS documentation will be marked up to conform to the
DocBook XML DTD
-
+
This enables us to publish in a variety
of formats and relieves each contributor of the burden of presentation, freeing him to focus
on content and sharing knowledge.
@@ -53,7 +53,7 @@
list of elements and use more exotic features in your
documents. The list is made up of SGML-elements but basically
the same elements are valid in the XML DTD as long as you remember to:
-
+
Always close your tags with corresponding end-tags and to
not use other tag minimization
@@ -99,7 +99,7 @@
The documentation for each package will make up a little "book" that is structured like this
- examples are emphasized:
-
+
book : Docs for one package - templating
@@ -123,20 +123,20 @@
sources of these DocBook documents
to get an idea of how they are tied together.
Headlines, Sections
-
+
Given that your job starts at the sect1-level, all your documents should open with a
<sect1>-tag and end
with the corresponding </sect1>.
-
+
You need to feed every <sect1> two attributes. The first attribute,
id, is standard and can be used with all elements. It comes in very
handy when interlinking between documents (more about this when talking about links in the section called “Links”).
The value of id has to be unique
throughout the book you're making since the id's in your
sect1's will turn into filenames when the book is parsed into HTML.
-
+
The other attribute is xreflabel. The value of this is the text that will appear
as the link when referring to this sect1.
@@ -151,7 +151,7 @@
</sect1>
-
+
Inside this container your document will be split up into
<sect2>'s,
each with the same requirements - id and xreflabel
@@ -160,7 +160,7 @@
When it comes to naming your
sect2's and below, prefix them with some abbreviation of the id in the sect1 such as requirements-overview.
Code
-
+
For displaying a snippet of code, a filename or anything else you just want to appear as a part of
a sentence, we will use the tag
<computeroutput>.
@@ -170,12 +170,12 @@
<programlisting> is used. Just wrap your code block in it; mono-spacing, indents and all that stuff is taken care of
automatically.
Links
-
+
Linking falls into two different categories: inside the book you're making and outside:
1. Inside linking, cross-referencing other parts of your book
By having unique id's you can cross-reference any part of your book
with a simple tag, regardless of where that part is.
-
Check out how I link to a subsection of the Developer's Guide:
+
Check out how I link to a subsection of the Developer's Guide:
Put this in your XML:
@@ -213,7 +213,7 @@
packages-looks, the
parser will try its best to explain where the link takes you.
2. Linking outside the documentation
-
+
If you're hyper-linking out of the documentation, it works almost the same way as HTML - the tag is just
a little different
@@ -234,7 +234,7 @@
do it, so if you want to start converting your documents right away, start out with the ones without graphics ;)
-
+
To insert a graphic we use the elements
<mediaobject>,
<imageobject>,
@@ -260,7 +260,7 @@
Put your graphics in a separate directory ("images") and link to them
only with relative paths.
Lists
-
+
Here's how you make the DocBook equivalent of the three usual HTML-lists:
1. How to make an <ul>
Making an unordered list is pretty much like doing the same thing in HTML - if you close your <li>, that is. The only differences are that each list item has to be wrapped in something more, such as
@@ -305,7 +305,7 @@
</variablelist>
Tables
-
+
DocBook supports several types of tables, but in most cases, the
<informaltable>
is enough:
@@ -342,7 +342,7 @@
<table>
for an example.
Emphasis
-
+
Our documentation uses two flavors of emphasis - italics and bold type. DocBook uses one -
<emphasis>.
@@ -421,4 +421,4 @@
8/3/2002
Vinod Kurup
0.3
Added OpenACS information, updated tools, added
extra links and added info to the Publishing section.
-
12/24/2001
Roberto Mello
0.2
Changed recommendation from <phrase> to <emphasis role="strong">
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
The Big Picture
@@ -82,4 +82,4 @@
debugging (e.g. the error will say something like
"Cannot insert null value into column"), we recommend naming not null
constraints to be consistent in our naming of all constraints.
-
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -91,4 +91,4 @@
detailed set of regression tests. For now we try to enforce this by
restricting work on the release branch to fixing reported problem in
the current release, e.g. no new features or big changes to
-fundamental behavior.
NOTE: Some of the sections of this template may not apply to your
package, e.g. there may be no user-visible UI elements for a component
of the OpenACS Core. Furthermore, it may be easier in some circumstances
@@ -136,4 +136,4 @@
System creator
System owner
Documentation author
Revision History
The revision history table below is for this template - modify it
as needed for your actual design document.
-
Document Revision #
Action Taken, Notes
When?
By Whom?
0.3
Edited further, incorporated feedback from Michael Yoon
by Rafael H. Schloming and Mark Thomas
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -301,4 +301,4 @@
by Rafael H. Schloming, Mark Thomas
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -222,4 +222,4 @@
where clause, whatever mechanism is used to check membership in SQL
should be fairly small and simple.
Requirements: User Interface
The user interface is a set of HTML pages that are used to drive the
underlying API. The user interface may provide the following functions:
200.0 Create a party
210.0 View the attributes of a party
220.0 Update the attributes of a party
240.0 Delete a party
250.0 Add a party to a group
260.0 Remove a party from a group
270.0 Perform the membership and composition checks
-outlined in 130.x to 165.x
Revision History
Document Revision #
Action Taken, Notes
When?
By Whom?
0.1
Creation
08/16/2000
Rafael Schloming
0.2
Initial revision
08/19/2000
Mark Thomas
0.3
Edited and reviewed, conforms to requirements template
OpenACS 4.6.2.�The OpenACS tarball comprises the core packages and
many useful additional packages. This includes a full set
of documentation. The tarball works with both PostGreSQL
and Oracle.
Operating System.�OpenACS is designed for a Unix-like system. It is
@@ -9,7 +9,7 @@
standard Linux shell. If you are using a different
shell, you will need to substitute your shell's
conventions for setting environment variables when
- appropriate.
Windows/VMWare.�OpenACS Installation Guide for Windows 2000 The only
way to run OpenACS on Windows is through the VMWare
emulator. (Please let me know if you have OpenACS
running directly in Windows.)
Build Environment.�The Reference Platform installation compiles most programs from
@@ -127,4 +127,4 @@
get patched and development code in between releases) use cvs.
cvs 1.11.2, OPTIONAL.�cvs is included in most unix distributions. You
need this if you want to track old versions of your
files, do controlled deployment of code from development
- to production, or get or contribute development code from openacs.org.
by Vinod Kurup
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -74,7 +74,7 @@
The basic steps to getting OpenACS up and running are:
Install an OS
Install a webserver (AOLServer)
Install a database (Oracle or
PostgreSQL)
Install a database driver (allows the webserver to talk to the database)
-
Start the OpenACS installer, which will configure a database instance..
How to use this guide
This is text you will see on
+
Start the OpenACS installer, which will configure a database instance..
How to use this guide
This is text you will see on
screen, such as a Button or link
in a radio button list or menu.
This is text that you will type.
This is text from a program or file which you may need to
examine or edit:
if {$database == "oracle"} {
@@ -124,10 +124,9 @@
Post a question on the bboards. Make sure
you've done a search first. When you do post, be sure to include
your setup information (OS, etc) as well as the exact commands
- that are failing with the accompanying error. If you want to post
- stuff from your logs (please do!), be sure to enclose them in
- <PRE></PRE> tags so that they don't get all jumbled
- together.
+ that are failing with the accompanying error. If
+ there's a SQL error in the TCL error or in the log,
+ post that too.
If you find errors in this document or if you have ideas about
making it better, please post them in our
@@ -146,7 +145,7 @@
just plagiarism from a number of documents that came before it. If
I've used something that you've written without proper credit, let me
know and I'll fix it right away.
-
(In my experience, it's almost always a net time savings of several hours to install a new machine from scratch compared to installing each of these packages installed independently.)
Unplug the network cable from your
computer. We don't want to connect to the network
until we're sure the computer is secure.
-
+
(Wherever you see
the word secure, you should always read it as, "secure
enough for our purposes, given the amount of work we're
@@ -39,7 +39,7 @@
Review (and modify if needed) the partitions created and click Next
On the pop-up window asking "Are you sure
you want to do this?" click
Yes
- IF YOU ARE WIPING YOUR HARD DRIVE.
Click Next on the boot loader screen
Configure Networking.
+ IF YOU ARE WIPING YOUR HARD DRIVE.
Click Next on the boot loader screen
Configure Networking.
Again, if you know what you're doing, do this step
yourself, being sure to note the firewall holes. Otherwise,
follow the instructions in this step to set up a computer directly connected to the internet with a dedicated IP address.
DHCP is a system by which a computer that
@@ -60,7 +60,7 @@
Mail (SMTP). In the Other ports
box, enter 443, 8000, 8443. Click
Next.
-Port 443 is for https (http over ssl), and 8000 and 8443 are http and https access to the development server we'll be setting up.
Select any additional languages you want the
+Port 443 is for https (http over ssl), and 8000 and 8443 are http and https access to the development server we'll be setting up.
Select any additional languages you want the
computer to support and then click
Next
Choose your time zone and click Next.
Type in a root
password, twice. To
@@ -81,9 +81,9 @@
risk that's still screened by the firewall, or a resource hog. Just
don't install a database or web server, because that would conflict
with the database and web server we'll install later.
-
check�Editors�(this�installs�emacs),
+
check�Editors�(this�installs�emacs),
click�Details�next�to�Text-based�Internet,�check�lynx,�and�click�OK;
-check�Authoring�and�Publishing�(this�installs�docbook),
+check�Authoring�and�Publishing�(this�installs�docbook),
uncheck�Server�Configuration�Tools,
uncheck�Web�Server,
uncheck�Windows�File�Server,
@@ -96,7 +96,7 @@
Flat
View and wait. In a minute, a
list of packages will appear.
SSH is the protocol we use to connect
securely to the computer (replacing telnet, which is
insecure). sshd is the daemon that listens for incoming
@@ -153,4 +153,4 @@
Last login: Mon Mar 3 21:15:27 2003 from host-12-01.dsl-sea.seanet.com
[remadmin@yourserver remadmin]$ su -
Password:
-[root@yourserver root]#
Compared to its predecessors, version 4.6.2 of OpenACS has a much
more structured organization, i.e. the most
significant change is found at the system architecture level,
@@ -28,4 +28,4 @@
This document provides a high level overview of the kernel
package. Documentation for the other packages can be found
elsewhere.
-
None of these locations are set in stone - they're simply
the values that we've chosen. The values that you'll
probably want to change, such as service name, are
@@ -24,25 +24,25 @@
you start in. Text instructions always precede the commands they refer to.
Unpack the OpenACS tarball
The OpenACS tarball contains sample configuration files
for some of the packages listed below. In order to access those
files, unpack the tarball now.
[root@yourserver root]# cd /tmp
-[root@yourserver tmp]# tar xzf openacs-4-6.tgz
+[root@yourserver tmp]# tar xzf openacs-4.6.2.tgz
cd /tmp
-tar xzf openacs-4-6.tgz
Initialize CVS (OPTIONAL)
CVS is a source control system. Create and prepare a
+tar xzf openacs-4.6.2.tgz
Initialize CVS (OPTIONAL)
CVS is a source control system. Create and prepare a
directory for a local cvs repository.
If you plan to write or edit any documentation with emacs, install a
customized emacs configuration file with DocBook commands in the skeleton
directory, so it will be used for all new users. The file also
fixes the backspace -> help mis-mapping that often occurs in
- terminals.
Daemontools is a collection of programs for controlling
other processes. We use daemontools to run and monitor AOLServer. It is
installed in /package. These commands install daemontools and
svgroup. svgroup is a script for granting permissions, to allow
users other than root to use daemontools for specific
- services.
Install Daemontools
Red Hat
Make sure you have the source tarball in
+ services.
Install Daemontools
Red Hat
Make sure you have the source tarball in
/tmp, or download it. (The -p
flag in mkdir causes all implied directories in the path
to be made as well.)
Qmail is a Mail Transfer Agent. It handles incoming and outgoing mail. Install qmail if you want your OpenACS server to send and receive mail, and you don't want to use an alternate MTA.
Install ucspi.�This program handles incoming tcp connections.
Qmail is a Mail Transfer Agent. It handles incoming and outgoing mail. Install qmail if you want your OpenACS server to send and receive mail, and you don't want to use an alternate MTA.
Install ucspi.�This program handles incoming tcp connections.
(I'm not sure if this next step is 100% necessary, but when I skip it
I get problems. If you get the error 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1) then you need to do this.) AOLServer sends outgoing mail via the ns_sendmail
command, which pipes a command to the sendmail executable. Or, in our
@@ -104,10 +104,10 @@
Unless this mail is addressed to the same machine, qmail thinks that
it's an attempt to relay mail, and rejects it. So these two commands
set up an exception so that any mail sent from 127.0.0.1 is allowed to
-send outgoing mail.
by Joel Aufrecht
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
This section collection of maintenance
- tasks and alternate configurations for AOLserver. This section has not yet been updated for 4.6.2
AOLserver keepalive with inittab
This is an alternative method for keeping the AOLserver
+ tasks and alternate configurations for AOLserver. This section has not yet been updated for 4.6.2
AOLserver keepalive with inittab
This is an alternative method for keeping the AOLserver
process running. The recommended method is to run AOLserver
supervised.
This step should be completed as root. This can break every service
@@ -61,7 +61,7 @@
joeuser:~$ killall nsd
nsd: no process killed
The number 23727 indicates the process id(s) (PIDs) of the
- processes being killed. It is important that no processes are killed by the second
+ processes being killed. It is important that no processes are killed by the second
call to killall. If there are
processes being killed, it means that the script is not
working.
@@ -77,7 +77,7 @@
nss1 is unique.
nss1:345:respawn:/usr/local/aolserver/bin/nsd-postgres -i -u nobody -g web -t /home/joeuser/web/birdnotes/nsd.tcl
- Important: Make sure there is a
+ Important: Make sure there is a
newline at the end of the file. If there is not a newline at
the end of the file, the system may suffer catastrophic
failures.
@@ -94,7 +94,7 @@
Killing 23750
If processes were killed, congratulations, your server is now
automated for startup and shutdown.
-
Running AOLserver on Port 80
If you want your webserver to be http://yourserver.com, it must run on port 80, the default HTTP port. You set this in the config.tcl file. You will need to start the service as
+
Running AOLserver on Port 80
If you want your webserver to be http://yourserver.com, it must run on port 80, the default HTTP port. You set this in the config.tcl file. You will need to start the service as
root. If you follow the instructions
above for automating
startup, this will be taken care of, but if you ever start the
@@ -109,21 +109,21 @@
root. This mean that if someone was
able to exploit your web server to execute a command on your server,
they would not be able to gain root
- access.
Running multiple services on one machine
Services on different ports.�To run a different service on another port but the same
+ access.
Running multiple services on one machine
Services on different ports.�To run a different service on another port but the same
ip, simply repeat Install OpenACS 4.6.2 replacing
service0, and change the
-
set httpport 8000
-set httpsport 8443
+
set httpport 8000
+set httpsport 8443
to different values.
Services on different host names.�For example, suppose you want to support
http://foo.com and
http://bar.com on the same
machine. The easiest way is to assign each one a different ip
address. Then you can install two services as above, but with
different values for
-
set hostname [ns_info hostname]
-set address 127.0.0.1
+
set hostname [ns_info hostname]
+set address 127.0.0.1
If you want to install two services with different host
names sharing the same ip, you'll need nsvhr to redirect requests
based on the contents of the tcp headers. See AOLserver
Virtual Hosting with TCP by markd.
-
by Rafael H. Schloming
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -33,4 +33,4 @@
even capable of fully tracking the history of membership state.
The design choice of explicitly representing object identity with an
integer primary key that is derived from a globally unique sequence is the
key to eliminating redundant code and replacing it with generic object
-level services.
By Pete Su
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -265,4 +265,4 @@
this integrate with application level SQL queries?
Revision History
Document Revision #
Action Taken, Notes
When?
By Whom?
0.1
Creation
08/10/2000
Bryan Quinn
0.2
Major re-write
08/11/2000
Pete Su
0.3
Draft completed after initial reviews
08/22/2000
Pete Su
0.4
Edited, updated to conform to requirements template, pending freeze
08/23/2000
Kai Wu
�
Final edits before freeze
08/24/2000
Pete Su
0.5
Edited for consistency
08/27/2000
Kai Wu
0.6
Put Object ID stuff first, because it makes more sense
08/28/2000
Pete Su
0.7
Added requirement that knowledge-level objects must be moveable between
databases.
08/29/2000
Richard Li
0.8
Rewrote intro to match language and concepts in the design document. Also
cleaned up usage a bit in the requirements section. Added short vague
-requirements on relation types.
By Pete Su
OpenACS docs are written by the named authors, but may be edited
@@ -81,7 +81,7 @@
Fire up your text editor and open the
ROOT/packages/notes/sql/oracle/notes-create.sql (ROOT/packages/notes/sql/postgresql/notes-create.sql for the PG version) file created
when we created the package. Then, do the following:
-
Describe the new type to the type system
+
Describe the new type to the type system
First, add an entry to the acs_object_types table with the following PL/SQL call:
begin
@@ -141,7 +141,7 @@
because the new type note is a subtype of
acs_object, it will inherit these attributes, so there is
no need for us to define them.
-
Define a table in which to store your objects
+
Define a table in which to store your objects
The next thing we do is make a small modification to the data model to
reflect the fact that each row in the notes table
represents something that is not only an object of type
@@ -166,7 +166,7 @@
use the acs_objects table to find objects will
transparently find any objects that are instances of any subtype of
acs_objects.
-
Define a package for type specific procedures
+
Define a package for type specific procedures
The next step is to define a PL/SQL package for your new type, and
write some basic procedures to create and delete objects. Here is a
package definition for our new type:
@@ -214,7 +214,7 @@
object OBJ was "read only", then any other object that used OBJ as its
context would also be "read only" by default. We'll talk about this more
later.
-
Define a package body for type specific procedures
+
Define a package body for type specific procedures
The PL/SQL package body contains the implementations of the procedures
defined above. The only subtle thing going on here is that we must use
acs_object.new to insert a row into
@@ -396,4 +396,4 @@
especially true for the context_id field.
OpenACS (Open Architecture Community System) is an
advanced toolkit for building scalable, community-oriented
web applications. If you're thinking of building an
@@ -33,4 +33,4 @@
help you in your endeavors with the system. Stop by our
web site and feel
free to ask a question, post ideas or whatever.
-
by Vinod Kurup
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
-
Set up the file system for an OpenACS Service
The reference install stores all OpenACS services in
+
Set up the file system for an OpenACS Service
The reference install stores all OpenACS services in
/web, with one subdirectory per
service. The first time you install a service, you must create
that directory and set its permissions:
Unpack the OpenACS tarball and rename it to service0. Secure the directory so that only the owner can access it. Check the permissions by listing the directory.
[root@yourserver root]# su - service0
[service0@yourserver service0]$ cd /web
-[service0@yourserver web]$ tar xzf /tmp/openacs-4-6.tgz
-[service0@yourserver web]$ mv openacs-4-6 service0
+[service0@yourserver web]$ tar xzf /tmp/openacs-4.6.2.tgz
+[service0@yourserver web]$ mv openacs-4.6.2 service0
[service0@yourserver web]$ chmod -R 700 service0
[service0@yourserver web]$ ls -al
total 3
@@ -86,11 +86,11 @@
[root@yourserver root]#
su - service0
cd /web
-tar xzf /tmp/openacs-4-6.tgz
-mv openacs-4-6 service0
+tar xzf /tmp/openacs-4.6.2.tgz
+mv openacs-4.6.2 service0
chmod -R 700 service0/
ls -al
-exit
Add the Service to CVS - OPTIONAL.�If this is a development server, you may want to add it to your local CVS repository.
Create and set permissions on a subdirectory in the local cvs repository.
mkdir /cvsroot/service0
@@ -107,11 +107,11 @@
plus this string,
i.e.
/cvsroot/service0.
- "OpenACS" is the vendor tag, and "openacs-4-6" is the
+ "OpenACS" is the vendor tag, and "openacs-4-6-2" is the
release tag. These tags will be useful in upgrading and
branching. -m sets the version comment.
su - service0
cd /web/service0
-cvs import -m "initial install" service0 OpenACS openacs-4-6
Move the original directory to a temporary location, and check out the cvs repository in its place. If the service starts correctly, come back and remove the temporary copy of the uploaded files.
Move the original directory to a temporary location, and check out the cvs repository in its place. If the service starts correctly, come back and remove the temporary copy of the uploaded files.
Automate daily database Vacuuming. This is a process which cleans out discarded data from the database. A quick way to automate vacuuming is to edit the cron file for the database user.
Add this line to the file. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day.
0 1 * * * /usr/local/pgsql/bin/vacuumdb service0
Add Full Text Search Support - OPTIONAL
If you are installing Full Text Search, add required packages to the new database.
Automate daily database Vacuuming. This is a process which cleans out discarded data from the database. A quick way to automate vacuuming is to edit the cron file for the database user.
Add this line to the file. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day.
0 1 * * * /usr/local/pgsql/bin/vacuumdb service0
Add Full Text Search Support - OPTIONAL
If you are installing Full Text Search, add required packages to the new database.
[service0@yourserver service0]$ /usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
BEGIN
CREATE
(many lines omitted)
@@ -311,7 +311,7 @@
The AOLserver architecture lets you run an arbitrary number of
virtual servers. A virtual server is an HTTP service running on a
specific port, e.g. port 80. In order for OpenACS to work, you
- need to configure a virtual server. The Reference Platform uses a configuration file included in the OpenACS tarball. Copy it to the /web/service0/etc directory and open it in an editor to adjust the parameters.
[root@yourserver root]# su - service0
+ need to configure a virtual server. The Reference Platform uses a configuration file included in the OpenACS tarball. Copy it to the /web/service0/etc directory and open it in an editor to adjust the parameters.
Kill any current running AOLserver processes and start a new
one. (Note, if you are using Oracle, rather than PostgreSQL, replace
nsd-postgres with
@@ -382,7 +382,7 @@
to make sure the service is starting without any problems. If you
need to make changes, don't forget to kill any running servers with killall nsd.
-
OPTIONAL - Automate AOLserver keepalive
Assuming AOLserver started cleanly in the previous step, we'll set it up so that it's always running, and automatically restarts whenever it dies or is stopped. This step is strongly recommended, even for development sites, because it makes install and maintenance much simpler.
The Reference Platform uses Daemontools to control AOLserver. An earlier method using init, less flexible and reliable, is here.
Daemontools must already be installed. If not, install it.
Each service controlled by daemontools must have a directory in /service. That directory must have a file called run. Daemontools then creates additional files and directories to track status and log. Create the appropriate directory as /web/service0/etc/daemontools, copy the prepared run file, and set permissions. If your server is not called service0, edit /web/service0/etc/run accordingly.
[service0@yourserver log]$ cd /web/service0/etc
+
OPTIONAL - Automate AOLserver keepalive
Assuming AOLserver started cleanly in the previous step, we'll set it up so that it's always running, and automatically restarts whenever it dies or is stopped. This step is strongly recommended, even for development sites, because it makes install and maintenance much simpler.
The Reference Platform uses Daemontools to control AOLserver. A simpler method, using init, is here.
Daemontools must already be installed. If not, install it.
Each service controlled by daemontools must have a directory in /service. That directory must have a file called run. Daemontools then creates additional files and directories to track status and log. Create the appropriate directory as /web/service0/etc/daemontools, copy the prepared run file, and set permissions. If your server is not called service0, edit /web/service0/etc/run accordingly.
Test FTS. (INCOMPLETE). Add a package that supports search,like "note," add some content, and search for it.
Back up the New Service - OPTIONAL
This is a very good time to back the service, even if it's not a production service. Making a backup now lets you roll back to this initial, clean setup at any point in the future, without repeating the install process. A full OpenACS service backup includes everything in the /web/service0/ directory. At this point it's probably sufficient to back up just the database, because you can recover the files from a tarball.
Note that, if you did the CVS options in this document, the /web/service0/etc directory is not included in cvs and you may want to add it.
PostGreSQL.�Create a backup file and verify that it was created and has a reasonable size (several megabytes).
Test FTS. (INCOMPLETE). Add a package that supports search,like "note," add some content, and search for it.
Back up the New Service - OPTIONAL
This is a very good time to back the service, even if it's not a production service. Making a backup now lets you roll back to this initial, clean setup at any point in the future, without repeating the install process. A full OpenACS service backup includes everything in the /web/service0/ directory. At this point it's probably sufficient to back up just the database, because you can recover the files from a tarball.
Note that, if you did the CVS options in this document, the /web/service0/etc directory is not included in cvs and you may want to add it.
PostGreSQL.�Create a backup file and verify that it was created and has a reasonable size (several megabytes).
Backup can encompass all files in /web/service0. For a development server, putting the files in cvs is sufficient. (It's important then to back up the cvs repository!)
A quick way to automate database backup is a cron job. This is not recommended for production and is not part of the Reference Platform, because it is not cross-platform and can fail silently. More thorough methods are documented in the section called “Backup Strategy”
Add this line to the file. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day.
If you plan to back up the whole /web/service0 directory, then it would be redundant to keep a history of database backups. In that case, set up the cron job to overwrite the previous backup each time:
Analog is a program with processes webserver access logs,
+ls -al /web/service0/database-backup
Oracle - INCOMPLETE.�
Set up Automated Backup - OPTIONAL
Backup can encompass all files in /web/service0. For a development server, putting the files in cvs is sufficient. (It's important then to back up the cvs repository!)
A quick way to automate database backup is a cron job. This is not recommended for production and is not part of the Reference Platform, because it is not cross-platform and can fail silently. More thorough methods are documented in the section called “Backup Strategy”
Add this line to the file. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day.
If you plan to back up the whole /web/service0 directory, then it would be redundant to keep a history of database backups. In that case, set up the cron job to overwrite the previous backup each time:
Analog is a program with processes webserver access logs,
performs DNS lookup, and outputs HTML reports. Analog should
already be
installed. A modified configuration file is included in
@@ -556,4 +556,4 @@
[root@yourserver root]# emacs /etc/cron.daily/analog
by Vinod Kurup
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -1274,4 +1274,4 @@
authorized to do a connect
internal within
svrmgrl to gain full system
- access to the Oracle system.
by Rafael H. Schloming
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -313,4 +313,4 @@
single integer primary key in what could be thought of as a pure relation.
Because a membership relation is an ordinary acs object with object identity, it is as easy to extend the
membership relation to store extra information as it is to extend the users
-table or the groups table.
by John Prevost and Rafael H. Schloming
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -184,4 +184,4 @@
by John McClary Prevost
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -89,4 +89,4 @@
clause, whatever mechanism is used to make checks in SQL should be fairly
small and simple.
In particular, constraining a SELECT to return only rows the
current user has access to should not add more than one line to a query.
Revision History
Document Revision #
Action Taken, Notes
When?
By Whom?
0.1
Creation
8/17/2000
John Prevost
0.2
Revised, updated with new terminology
8/25/2000
John Prevost
0.3
Edited, reformatted to conform to requirements template, pending
-freeze.
by Vadim Nasardinov. Modified and converted to Docbook XML by Roberto Mello
Overview
The general permissions system has a relatively complex data model in OpenACS 4.x.
@@ -86,7 +86,7 @@
to store permission information explicitly about every object, i.e. if the system has 100,000 and 1,000 users
who have the read privilege on all objects, then we would need to store 100,000,000
entries of the form:
-
Table�9.1.�
object_id
grantee_id
privilege
object_id_1
user_id_1
'read'
object_id_1
user_id_2
'read'
...
object_id_1
user_id_n
'read'
object_id_2
user_id_1
'read'
object_id_2
user_id_2
'read'
...
object_id_2
user_id_n
'read'
...
...
object_id_m
user_id_1
'read'
object_id_m
user_id_2
'read'
...
object_id_m
user_id_n
'read'
+
Table�9.1.�
object_id
grantee_id
privilege
object_id_1
user_id_1
'read'
object_id_1
user_id_2
'read'
...
object_id_1
user_id_n
'read'
object_id_2
user_id_1
'read'
object_id_2
user_id_2
'read'
...
object_id_2
user_id_n
'read'
...
...
object_id_m
user_id_1
'read'
object_id_m
user_id_2
'read'
...
object_id_m
user_id_n
'read'
Although quite feasible, this approach fails to take advantage of the fact
that objects in the system are commonly organized hierarchally,
and permissions usually follow the hierarchical structure, so that if user
@@ -101,7 +101,7 @@
Context Hierarchy
Suppose objects A, B, ...,
and F form the following hierarchy.
-
Table�9.2.�
A
+
Table�9.2.�
A
object_id=10
B
object_id=20
@@ -117,23 +117,23 @@
This can be represented in the acs_objects table
by the following entries:
-
Table�9.3.�
object_id
context_id
20
10
30
10
40
20
50
20
60
30
+
Table�9.3.�
object_id
context_id
20
10
30
10
40
20
50
20
60
30
The first entry tells us that object 20 is the descendant of object 10, and
the third entry shows that object 40 is the descendant of object 20. By
running a CONNECT BY query,
we can compute that object 40 is the second-generation descendant of object 10.
With this in mind, if we want to record the fact that user Joe has the read privilege on objects
A, ..., F, we only need to record one entry in the
acs_permissions table.
-
Table�9.4.�
object
grantee
privilege
A
Joe
read
+
Table�9.4.�
object
grantee
privilege
A
Joe
read
The fact that Joe can also read B, C,
..., and F can be derived by ascertaining that these objects
are children of A by traversing the context hierarchy.
As it turns out, hierarchical queries are expensive. As
Rafael Schloming put it so aptly, Oracle can't deal with hierarchies for shit.
One way to solve this problem is to cache a flattened view of the context tree like so:
-
Table�9.5.�
object
ancestor
n_generations
A
A
0
B
B
0
B
A
1
C
C
0
C
A
1
D
D
0
D
B
1
D
A
2
E
E
0
E
B
1
E
A
2
F
F
0
F
C
1
F
A
2
+
Table�9.5.�
object
ancestor
n_generations
A
A
0
B
B
0
B
A
1
C
C
0
C
A
1
D
D
0
D
B
1
D
A
2
E
E
0
E
B
1
E
A
2
F
F
0
F
C
1
F
A
2
Note that the number of entries in the flattened view grows exponentially with
respect to the depth of the context tree. For instance, if you have a fully
populated binary tree with a depth of n, then the number of entries
@@ -204,7 +204,7 @@
an object's security_inherit_p column to 'f', you can stop permissions
from cascading down the context tree. In the following example, Joe does not have
the read permissions on C and F.
-
Table�9.6.�
+
Table�9.6.�
A object_id=10 readable�by�Joe
@@ -232,7 +232,7 @@
Privileges are also organized hierarchically. In addition to the five main system privileges
defined in the ACS Kernel data model, application developers may define their own. For instance,
the Bboard package defines the following privileges:
-
Table�9.7.�
privilege
create_category
create_forum
create_message
delete_category
delete_forum
delete_message
moderate_forum
read_category
read_forum
read_message
write_category
write_forum
write_message
+
Table�9.7.�
privilege
create_category
create_forum
create_message
delete_category
delete_forum
delete_message
moderate_forum
read_category
read_forum
read_message
write_category
write_forum
write_message
By defining parent-child relationship between privileges, the OpenACS data model
makes it easier for developers to manage permissions. Instead of granting
a user explicit read, write, delete,
@@ -241,7 +241,7 @@
privilege to which the first four privileges are tied. To give
a more detailed example, the Bboard privileges are structured
as follows.
-
Table�9.8.�
admin
create
delete
read
write
moderate forum
create category
create forum
create message
delete category
delete forum
delete message
read category
read forum
read message
write category
write forum
write message
+
Table�9.8.�
admin
create
delete
read
write
moderate forum
create category
create forum
create message
delete category
delete forum
delete message
read category
read forum
read message
write category
write forum
write message
The parent-child relationship between privileges is represented in
the acs_privilege_hierarchy table:
@@ -287,7 +287,7 @@
Party Hierarchy
Now for the third hierarchy playing a promiment role in the permission system. The party
data model is set up as follows.
-
by Vinod Kurup
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -42,7 +42,7 @@
Change to the postgres user and run ./configure to set the compilation options automatically. This is the point at which you can
configure PostgreSQL in various ways. For example, if you want to
enable
- Unicode support, add the flags --enable-locale and --enable-multibyte. If you want to see what the other possibilities are, run ./configure --help.
+ Unicode support, add the flags --enable-locale and --enable-multibyte. If you want to see what the other possibilities are, run ./configure --help.
[root@yourserver src]# su - postgres
[postgres@yourserver pgsql]$ cd /usr/local/src/postgresql-7.2.3
[postgres@yourserver postgresql-7.2.3]$ ./configure
@@ -138,11 +138,11 @@
changes runlevels, postgresql goes to the appropriate
state. Red Hat and Debian and SuSE each work a little
differently so three sets of instructions are provided.
-
by Michael Yoon, Jon Salz and Lars Pind.
OpenACS docs are written by the named authors, but may be edited
@@ -212,4 +212,4 @@
perform lookup by name, they perform a linear lookup, whereas arrays use a
hash table, so ns_sets are slower than arrays when the number of
entries is large.
-
By David Lutterkort
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -84,4 +84,4 @@
element is a sect1.
How to use it
Of course, you should read the emacs texinfo pages that come with PSGML
mode from start to finish. Barring that, here are some handy commands:
Key
Command
C-c C-e
Insert an element. Uses completion and only lets you insert elements that
are valid
C-c C-a
Edit attributes of enclosing element.
C-c C-x C-i
Show information about the document's DTD.
C-c C-x C-e
Describe element. Shows for one element which elements can be parents,
-what its contents can be and lists its attributes.
By Pete Su
OpenACS docs are written by the named authors, but may be edited
@@ -38,7 +38,7 @@
diagram summarizes the stages of the request processor assuming a URL
request like http://someserver.com/notes/somepage.adp.
-
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
Introduction
@@ -81,4 +81,4 @@
pre-existing system or prototype first, and thus you may want to write
some thoughts on implementation, for aiding and guiding yourself or
other programmers.
-
Revision History
Document Revision #
Action Taken, Notes
When?
By Whom?
0.3
Edited further, incorporated feedback from Michael Yoon
by Rafael H. Schloming
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -98,4 +98,4 @@
sec_id_seq
[ad_conn user_id]
User_id of a person if the person is logged in. Otherwise, it is
blank
[ad_conn sec_validated]
This becomes "secure" when the connection uses SSL
�
Database API
[ad_conn db,handles]
What are the list of handles available to AOL?
[ad_conn db,n_handles_used]
How many database handles are currently used?
[ad_conn db,last_used]
Which database handle did we use last?
[ad_conn db,transaction_level,$db]
Specifies what transaction level we are in
[ad_conn db,db_abort_p,$dbh]
Whether the transaction is aborted
�
APM
�
Packages
[ad_conn package_id]
The package_id of the package associated with the URL.
[ad_conn package_url]
The URL on which the package is mounted.
�
Miscellaneous
[ad_conn system_p]
If true then the request has been made to one of the special directories
specified in the config file (somewhere), and no authentication or
-authorization has been performed.
by Rafael H. Schloming
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -24,4 +24,4 @@
or state associated with a pageroot based on it's location within the URL
space.
30.0 Authentication
30.10 The request processor must be able to verify that the connecting
browser actually represents the party it claims to represent.
40.0 Authorization
40.10 The request processor must be able to verify that the party the
-connecting browser represents is allowed to make the request.
by Richard Li, Archit Shah
OpenACS docs are written by the named authors, but may be edited
@@ -350,4 +350,4 @@
chosen from the cache to be used is chosen by a call to
ns_rand.
ad_secure_conn_p
As discussed above, the security of the secure sessions authentication system is
-dependent upon this function.
by Richard Li
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -56,4 +56,4 @@
The set of string match expressions in the procedure above should be extended
appropriately for other registration pages. This procedure does not use
ad_parameter or regular expressions for performance reasons, as
-it is called by the request processor.
by Richard Li
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -45,4 +45,4 @@
AOLserver for each step of the login process (e.g., by a load balancer).
12.4 Secure The security system should not store
passwords in clear text in the database.
13.0 SSL Hardware The system must work when the SSL
processing occurs outside of the web server (in specialized hardware, in a
-firewall, etc.).
by Joel Aufrecht
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -9,4 +9,4 @@
in turn require and operating system. Many additional
programs, such as a Mail Transport Agent and source control
system, are also needed for a fully effective instance.
-
by Rafael H. Schloming
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -210,4 +210,4 @@
a particular configuration of site nodes/packages. As we build more
fundamental applications that can be applied in more general areas, this
feature will become more and more in demand since more problems will be
-solvable by configuration instead of coding.
by Rafael H. Schloming and Dennis Gregorovic
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -55,4 +55,4 @@
package and make it available at a URL underneath the subsite.
20.20.0 Package deactivation
20.20.1 The administrator should be able to deactivate
any package, causing it to be inaccessible to users.
20.20.5 Deactivating a package makes the package no
longer accessible, but it does not remove data created within the context of
-that package.
Documenting Tcl Files: Page Contracts and Libraries
by Jon Salz on 3 July 2000
OpenACS docs are written by the named authors, but may be edited
@@ -169,4 +169,4 @@
script was first created.
A @cvs-id tag containing the page's CVS
identification string. Just use $Id: tcl-documentation.html,v 1.2
2000/09/19 07:22:35 ron Exp $ when creating the file, and CVS will
-substitute an appropriate string when you check the file in.
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
Overview
@@ -168,4 +168,4 @@
inserting properties into the text of the page. Later on we'll get
into templates more deeply, and show how to use database queries as
data sources.
-
by Joel Aufrecht
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
-
Overview
This tutorial covers topics which are not essential to
+
Overview
This tutorial covers topics which are not essential to
creating a minimal working package. Each section can be used
independently of all of the others; all sections assume that
you've completed the basic tutorial.
How to enforce security so that users can't
change other users records
How to use the content management tables so that
... what?
How to change the default stylesheets for Form
Builder HTML forms.
How to make your package searchable with OpenFTS/Oracle
How to make your package send email notifications
How to prepare pagelets for inclusion in other pages
How and when to put procedures in a tcl procedure library
How to add general_comments to your pages
More on ad_form - data validation, other stuff.
(plan to draw from Jon Griffin's doc)
How and when to implement caching
partialquery in xql
How to use the html/text entry widget to get the
- "does this look right" confirm page
APM package dependencies
Delete with confirmation
We need a way to delete records. We'll create a
+ "does this look right" confirm page
APM package dependencies
Delete with confirmation
We need a way to delete records. We'll create a
recursive confirmation page.
ad_page_contract {
A page that gets confirmation and then delete notes.
@@ -71,7 +71,7 @@
<formtemplate id="note-del-confirm"></formtemplate>
</form>
The ADP is very simple. The
formtemplate tag outputs the HTML
-form generated by the ad_form command with the matching name. Test it by adding the new files in the APM and then deleting a few samplenotes.
General_comments
You can track comments for any ACS Object. Here we'll track
+form generated by the ad_form command with the matching name. Test it by adding the new files in the APM and then deleting a few samplenotes.
General_comments
You can track comments for any ACS Object. Here we'll track
comments for notes. On the notes.tcl/adp pair, which is used to
display individual notes, we want to put a link to add comments at
the bottom of the screen. If there are any comments, we want to
@@ -92,13 +92,13 @@
there are comments. Then you pass the note id, which is also the
acs_object id.
We put our two new variables in the notes.adp
page.
<a href="@comment_add_url@">Add a comment</a>
-@comments_html@
Prepare the package for distribution.
Browse to the package manager. Click on
+@comments_html@
Prepare the package for distribution.
Browse to the package manager. Click on
tutorialapp.
Click on Generate a distribution file
for this package from the
filesystem.
Click on the file size
(37.1KB)
after the label Distribution
File: and save the file to
- /tmp.
by Joel Aufrecht
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
-
Code the data model
We create all database objects with scripts in the
+
Code the data model
We create all database objects with scripts in the
samplenote/sql/ directory. All
database scripts are database-specific and are thus in either
the samplenote/sql/oracle or
@@ -40,7 +40,7 @@
@author which will be picked up
by the API browser. The string
$Id$ will automatically be
- expanded when the file is checked in to cvs.
--
-- packages/samplenote/sql/postgresql/samplenote-functions-create.sql
--
-- @author rhs@mit.edu
@@ -123,7 +123,7 @@
"package-aware."
define_function_args prepares the function to be used by a tcl wrapper function. */
-select define_function_args(samplenote__new,'note_id,title,creation_date,creation_user,creation_ip,context_id');
+select define_function_args('samplenote__new','note_id,title,creation_date,creation_user,creation_ip,context_id');
create or replace function samplenote__new (integer,varchar,varchar,timestamptz,integer,varchar,integer)
returns integer as '
@@ -196,7 +196,7 @@
end;
' language 'plpgsql';
Create a database file to drop everything if the package
- is uninstalled.
by Joel Aufrecht
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
-
Debugging
PostgreSQL.�You can work directly with the database to do debugging
+
Debugging
PostgreSQL.�You can work directly with the database to do debugging
steps like looking directly at tables and testing stored
procedures. Start emacs. Type
M-x sql-postgres. Press enter for
@@ -19,10 +19,10 @@
?�searches�backward�
/�searches�forward.�
����������
-
Manual testing
Make a list of basic tests to make sure it works
Test Num
Action
Expected Result
001
Browse to the index page while not logged in and
+
Manual testing
Make a list of basic tests to make sure it works
Test Num
Action
Expected Result
001
Browse to the index page while not logged in and
while one or more notes exist.
No edit or delete or add links should appear.
002
Browse to the index page while logged in. An Edit
link should appear. Click on it. Fill out the form and
click Submit.
The text added in the form should be visible on the
index page.
Other things to test: try to delete someone else's
note. Try to delete your own note. Edit your own note.
- Search for a note.
by Joel Aufrecht
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
-
Overview
To start developing new code in OpenACS, we build a new
+
Overview
To start developing new code in OpenACS, we build a new
package. A package is a a discrete collection of web
pages, tcl code, and database tables and procedures. A package
can be installed, upgraded, and removed. It communicates with
other packages through an API. This chapter walks you through the
minimum steps to create a useful package, including writing
documentation, setting up database tables and procedures,
writing web pages, debugging, and automatic regression testing.
-
Before you begin
You will need:
A computer with a working installation of OpenACS
+
Before you begin
You will need:
A computer with a working installation of OpenACS
4.6. If you don't have this, see Installation Overview.
Example files, which are included in the
standard OpenACS 4.6.2 distribution.
-
We use the ACS Package Manager (APM) to add, remove, and
upgrade packages. It handles package meta-data, such as lists of
files that belong in the package. Each package is uniquely
identified by a package key. To start developing a new
@@ -43,7 +43,7 @@
This creates a package rooted at
/web/service0/packages/samplenote.
This is the "home directory" of our new package, and all
- files in the package will be within this directory.
Mount the package in the site map
In order to see your work in progress, you must create a
+ files in the package will be within this directory.
Mount the package in the site map
In order to see your work in progress, you must create a
map between the URL space of incoming requests and the package.
You do this by mounting the package in the Site Map. This
creates a link between the incoming URL and an
@@ -65,7 +65,7 @@
click New.
By mounting the package, we've caused all requests to
http://yourserver.test:8000/note
- to be satisfied from the files at /web/service0/packages/samplenote/www.
Write the Requirements and Design Specs
It's time to document. For the tutorial we'll use
+ to be satisfied from the files at /web/service0/packages/samplenote/www.
Write the Requirements and Design Specs
It's time to document. For the tutorial we'll use
pre-written documentation. When creating a package
from scratch, start by copying the documentation template from
/web/openacs-dev/packages/acs-core-docs/xml/docs/xml/package-documentation-template.xml
@@ -115,7 +115,7 @@
Writing bi01.html for bibliography
Writing index.html for book
[service0@yourserver xml]$
Verify that the documentation was generated and reflects
- your changes by browsing to http://yoursite:8000/samplenote/doc
Add the new package to CVS
Before you do any more work, make sure that your work is
+ your changes by browsing to http://yoursite:8000/samplenote/doc
by Joel Aufrecht
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
-
Build the "Index" page
Each user-visible page in your package has, typically,
+
Build the "Index" page
Each user-visible page in your package has, typically,
three parts. The xql file contains any database queries, the
tcl file holds the procedural logic for the page and does things
like check permissions, invoke the database queries, and modify
@@ -69,7 +69,7 @@
</queryset>
Create the user-visible page.
[service0@yourserver www]$ emacs index.adp
The first line indicates that this page should be rendered within the the master template, which defaults to /web/service0/www/default-master. The second line passes a title variable to the master template. The third line inserts the contents of the variable table_html. The last line is a link to a page we haven't created yet.
<master>
<property name="title">Sample Notes</property>
@table_html@
-<p><a href="note-edit">Add a note</a></p>
Add files to APM
Before we can test these files, we have to notify the
+<p><a href="note-edit">Add a note</a></p>
Add files to APM
Before we can test these files, we have to notify the
package manager that they exist. (More precisely, the tcl and
adp will work fine as-is, but the xql file will not be
recognized until we tell the APM about it.).
Go to http://yourserver.test:8000/acs-admin/apm
Click on the samplenote link
Click Manage file information
Click Scan the packages/samplenote directory for additional files in thispackage
Click add checked files
On the list of files, on the
@@ -79,7 +79,7 @@
loaded when they're added.) Watching an xql file causes the APM
to load the contents of the XQL into memory so that it can be
used, and to reload it whenever the file is changed. The
- watch will last until the server is restarted.
Now that the pages are in the APM, check to make sure that the self-documenting code is working.
Browse to http://yourserver.test:8000/api-doc/
Click Notes 0.1d
Click Content Pages
Click index.tcl and examine the results.
Test the index page
Go to http://yourserver.test:8000/note/. You should see this:
+ watch will last until the server is restarted.
Now that the pages are in the APM, check to make sure that the self-documenting code is working.
Browse to http://yourserver.test:8000/api-doc/
Click Notes 0.1d
Click Content Pages
Click index.tcl and examine the results.
Test the index page
Go to http://yourserver.test:8000/note/. You should see this:
Sample Notes
Your Workspace : Main Site : Sample Note
@@ -88,7 +88,7 @@
Add a note.
foo@yourserver.test
-
Since our table is empty, it's a pretty boring page. So next we'll make it possible to add records.
We'll create a single page to handle both adding and
editing records. In this recursive approach, the same tcl
function can present a blank HTML form, present the same form
pre-loaded with an existing record, and handle the resulting
@@ -115,7 +115,7 @@
{label "Body"}
}
} -select_query_name note_query -new_data {
-samplenote::new db_1row do_insert { *SQL* }
+db_1row do_insert { *SQL* }
} -edit_data {
db_dml do_update { *SQL* }
} -after_submit {
@@ -167,7 +167,7 @@
title, for both variables but
wrap it in curly brackets for context so that the spaces aren't
interpreted separators. The formtemplate tag outputs the form
- html with the matching name.
Go to the APM as before and scan for new files and add your new work. Then test all this by going to the package home page and adding and editing a few records.
Adding files to cvs
Put your new work into source control.
[service0@yourserver www]$ cvs add *.adp *.tcl *.xql
+ html with the matching name.
Go to the APM as before and reload. Then test all this by going to the package home page and adding and editing a few records.
The required platform for OpenACS 4.6 is the same as
4.5, with the excepion of OpenFTS. You now need OpenFTS 0.3.2, not 0.2.
- OpenACS 4.6 does not support PostGreSQL 7.3.
Required for Full Text Search on PostGreSQL: OpenFTS 0.3.2
Overview
OpenACS consists of files and a database schema. The files
in the OpenACS 4.6 tarball include database upgrade scripts. To start the
upgrade, replace your existing files with the new files and
then restart the server. Then, browse to the APM, which will
detect the new packages and offer to run the appropriate database upgrade
scripts. After restarting the server again, the upgrade is
- complete.
Figure�6.1.�Assumptions in this section
name of OpenACS user
nsadmin
OpenACS server name
openacs-dev
Root of OpenACS file tree
/web/openacs-dev
Database backup directory
/backup/openacs/
Upgrading on Linux/Unix
Make a Backup.�Back up the database and file system.
PostGreSQL.�Create a backup file and verify that it was created and has a reasonable size (several megabytes).
[root@localhost root]# su - nsadmin
+ complete.
Figure�6.1.�Assumptions in this section
name of OpenACS user
nsadmin
OpenACS server name
openacs-dev
Root of OpenACS file tree
/web/openacs-dev
Database backup directory
/backup/openacs/
Upgrading on Linux/Unix
Make a Backup.�Back up the database and file system.
PostGreSQL.�Create a backup file and verify that it was created and has a reasonable size (several megabytes).
by Joel Aufrecht
OpenACS docs are written by the named authors, but may be edited
by OpenACS documentation staff.
@@ -8,4 +8,4 @@
or better, you should always be able to upgrade all of your core
packages automatically. If you haven't changed anything, no
manual intervention should be required. If you are running
- OpenACS prior to 4.5, upgrading will require manual effort.
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/files/samplenote/Makefile'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-core-docs/www/xml/Makefile
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/Makefile,v
diff -u -r1.3.2.1 -r1.3.2.2
--- openacs-4/packages/acs-core-docs/www/xml/Makefile 7 Apr 2003 16:45:03 -0000 1.3.2.1
+++ openacs-4/packages/acs-core-docs/www/xml/Makefile 19 Apr 2003 20:41:29 -0000 1.3.2.2
@@ -1,18 +1,22 @@
# A very simple Makefile to generate the HTML docs
# @author Vinod Kurup (vinod@kurup.com)
+# @creation-date 2002-08-10
+#
# @author Modified by Roberto Mello (rmello@fslc.usu.edu) to have PDF generation
+# @modified-date 2002-09-21
# plus refactored it a bit to have rules and dependencies.
+
#
-# @creation-date 2002-08-10
+# @author Joel Aufrecht (joel@aufrecht.org)
# @modified-date 2002-09-21
+# Removed the xml/files directory as redundant.
#
-# This simply copys all the 'files' and 'images'
+# This copies the 'images'
# to the appropriate directory in www so that they are accessible
#
# It then moves into the www directory and runs the XSLT generation
# and runs htmldoc to generate PDFs.
#
-# I'm a Makefile newbie, so feel free to comment/slash/change.
# Paths
XSLTPROC=/usr/bin/xsltproc
@@ -21,9 +25,6 @@
all: html
prelim:
- cp -u files/*.{txt,html} ../files/
- cp -u files/samplenote/*.* ../files/samplenote/
- cp -u files/samplenote/Makefile ../files/samplenote/
cp -u images/*.{pdf,png,gif,jpg} ../images/
cp -u openacs.css ..
Index: openacs-4/packages/acs-core-docs/www/xml/openacs.xsl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/openacs.xsl,v
diff -u -r1.4.2.3 -r1.4.2.4
--- openacs-4/packages/acs-core-docs/www/xml/openacs.xsl 15 Apr 2003 17:04:47 -0000 1.4.2.3
+++ openacs-4/packages/acs-core-docs/www/xml/openacs.xsl 19 Apr 2003 20:41:29 -0000 1.4.2.4
@@ -3,7 +3,7 @@
version="1.1"
exclude-result-prefixes="doc">
-
+