Bric::Admin - Bricolage System Administration Guide.
$Revision: 1.157 $
$Date: 2004/04/30 00:14:02 $
This guide is intended for the system administrator in charge of installing, configuring, or tuning a Bricolage system.
Follow these instructions if you are both impatient and expert.
Debian users can get skip most of the download and installation by downloading the debian package from http://people.debian.org/~erich/bricolage/. After installing, be sure to follow the instructions in /usr/share/doc/README.Debian to complete the installation.
perl Makefile.PL make make test
And then as root:
If you run into problems then read below for the details.
Bricolage requires a lot of other components to be installed; here's a list of them:
Follow these instructions to prepare your system for Bricolage. If you're upgrading from an older version of Bricolage see the UPGRADING section below.
The standard Perl installation should apply with no problems. If your system comes with a package manager (ex. Redhat Linux RPM, FreeBSD ports, etc.) then you can use that to install Perl.
Here is how to install Perl from source:
sh Configure -Umymalloc -Dinstallusrbinperl -des make make test make install
For the curious, the options used with Configure above are:
You'll need to install OpenSSL if you want to use Bricolage's SSL support to run a more secure server, otherwise you can skip this step. Installation of OpenSSL follows the usual conventions. Here's an example:
sh config <commands> make make test
make install generally isn't necessary because the sources will be compiled
into Apache, but may be necessary to generate your own test certificates or
certificates to be signed by a public certificate authority.
You'll need to install mod_ssl or apache_ssl if you want to use Bricolage's SSL support to run a more secure server; otherwise you can skip this step.
Installation of mod_ssl follows the usual conventions. Here's an example:
--with-apache, so you'll need to have already downloaded, gunzipped, and untarred the Apache sources (see below). If you already have a server certificate and a server key, use the
--with-keycommands to point to them. You might also want to consider including the optional MM library (see mod_ssl's INSTALL file for details). Then, execute this command:
Where ``apache_1.3.xx'' represents the version of Apache you will be installing (see the ``Packages'' section above for a recommended version number.
make install aren't necessary because the sources will be
compiled into Apache.
Installation of mod_perl follows the usual conventions for installing Perl modules. It does require a number of Makefile.PL parameters, however. The most important parameter is APACHE_SRC, which points to the Apache sources. You will need to have already downloaded, gunzipped, and untarred the Apache sources before compiling mod_perl. Here's the routine:
perl Makefile.PL \ APACHE_SRC=../apache_1.3.*/src \ DO_HTTPD=1 \ USE_APACI=1 \ PREP_HTTPD=1 \ EVERYTHING=1 make make install
Before continuing, consult the README.configure file that comes with the Apache distribution. It contains a very helpful (and short) bit of documentation and covers a lot of good information, particularly with respect to DSO use (a topic not covered here).
By now you've downloaded Apache and gunzipped and untarred its sources. There are a lot of Configure commands supported by Apache. We recommend that you use the following for Bricolage:
./configure \ --with-layout=Apache \ --disable-rule=EXPAT \ --enable-module=rewrite \ --activate-module=src/modules/perl/libperl.a \ --disable-shared=perl make
Or if you're planning to use mod_ssl:
./configure \ --with-layout=Apache \ --disable-rule=EXPAT \ --enable-module=ssl \ --enable-module=rewrite \ --activate-module=src/modules/perl/libperl.a \ --disable-shared=perl makeIf you plan to use SSL you'll need to install the SSL certificates before you install Apache. If you compiled OpenSSL with the
--with-keycommands, you can skip this step.
If you don't have a formal certificate from a certificate authority such as VeriSign then you can make a dummy certificate with the command:
make certificate TYPE=dummy
If you do have a formal certificate then can make a certificate with the command:
make certificate TYPE=custom
Near the end of the certificate creation process, you will be prompted to enter information for the certificate. Here you'll enter the information for your certificate. See the OpenSSL documentation for a description of the certificate data.
You'll be prompted to enter the certificate information twice. Afterward, you'll see this prompt for each of the two new certificates:
Encrypt the private key now? [Y/n]:
Enter ``n'' to avoid having to type in a passphrase every time you start Apache. Enter ``y'' if you really don't trust your system users.Finally, install Apache:
make installDon't forget to install the Apache::Session and Apache::Request perl modules now (See ``Perl Modules,'' above).
And you're done! You can test the installation by calling
PostgreSQL is an integral part of Bricolage: it's where all of your assets are stored! Its installation is pretty straight-forward and typical, but it requires a number of extra steps that one might not expect.
If you're using Redhat Linux you may already have Postgres installed. If so,
all you need to do to get it ready for use with Bricolage is edit your
postgresql.conf file (run
locate postgresql.conf to find it) and turn on
the tcpip_socket option:
tcpip_socket = true
Otherwise, here are the installation details:
/usr/sbin/useradd -d /home/postgres postgres -s /bin/tcshChange into the source directory and read the INSTALL file to see if you need to use any Configure commands. One Configure command is required by Bricolage:
--enable-multibyte=UNICODE. Because Bric stores all of its textual data in Unicode format, this command is not optional. If you require the use of a different character set for your installation, this can be configured as part of the system preferences, via the Admin interface. Install PostgreSQL:
./configure --enable-multibyte=UNICODE make make installNow make a directory in which you want to keep your PostgreSQL databases, including the Bricolage database. Make the ``postgres'' user the owner of that directory. Think carefully about where you want this directory to be, and on what partition. The Bricolage database will get to be quite large, and will require a great deal of disk accessing, so we recommend you put it on its own partition. This example just demonstrates the default:
mkdir /usr/local/pgsql/data chown postgres /usr/local/pgsql/dataInitialize the PostgreSQL database. Be sure to pass the directory you just created to the
su - postgres -c "/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data"
You might find it easier to set PostgreSQL default encoding for new databases to UNICODE when initializing the database cluster, using the following command instead of the former one:
su - postgres -c "/usr/local/pgsql/bin/initdb --encoding UNICODE -D /usr/local/pgsql/data"Start the PostgreSQL ``postmaster''. You can use one of the scripts in contrib/start-scripts. Make the PostgreSQL documentation. This step is optional, if you don't need the docs or have them available elsewhere:
cd docs make installDon't forget to install the DBD::Pg perl module! If its Makefile.PL can't find your installed version of PostgreSQL, you'll need to set the
POSTGRES_LIBenvironment variables, first:
export POSTGRES_INCLUDE=/usr/local/include export POSTGRES_LIB=/usr/local/lib
Then you can build the module:
cd /path/to/DBD-Pg-1.xx perl Makefile.PL make make test make install
And now PostgreSQL is ready to go!
There are quite a few Perl modules required by Bricolage (see PACKAGES above for a list). The easiest way to install them all is to let Bricolage's installation system handle it using the CPAN.pm module (see below for details).
Another option is to use CPAN.pm yourself to download the latest Bundle::Bricolage package and use it to install all the required packages:
perl -MCPAN -e 'install Bundle::Bricolage'
However, this is unlikely to succeed without manual intervention since some of the modules required by Bricolage have problems with CPAN.pm.
Finally, manual installation of each of the required modules follows the usual perl module installation process:
perl Makefile.PL make make test make install
With the 1.4.0 release, Bricolage now can be installed using the new installation system.
This step will check your system for all required packages. It will also ask you questions regarding your installation. In most cases the default answer will be correct and you can just press return.
Note that if you use 'IDENT sameuser' authentication in PostgreSQL, you have to 1) use the same username for 'Bricolage Postgres Username' as you did for 'Apache User' (so that the apache process has permission to access the database), and 2) enter a bogus password for 'Bricolage Postgres Password'.Install Bricolage (as root):
If you run into a problem, the fastest way of getting help is to search the bricolage-general archive at http://sourceforge.net/mailarchive/forum.php. Failing that, please send an email to the mailing list itself at email@example.com. Please make sure that you describe your problem as concisely as possible. Questions like ``My installation fails, please help'' will not help other users to help you. If other uses confirm that the problem you're experiencing is a bug and suggest that you send a bug report, file it at http://bugzilla.bricolage.cc/. Include a copy of all *.db files generated by the Makefile as well as a complete description of where the process failed. Then, either wait for us to fix the problem or try the manual installation instructions below.
If the installation procedure completes successfully you'll receive a message describing how to start the Bricolage server.
Here's how to install Bricolage manually.
./bric_pgimport -u postgres -p postgres -d dbname -c -m db_user:db_password
Where 'dbname' is the name you want the Bricolage database to be called in PostgreSQL, and 'db_user' and 'db_password' are the user name and password to be created in the PostgreSQL database, and under which the Bricolage application will run. Note that the -u argument must represent a PostgreSQL user with CREATE DATABASE and CREATE USER permissions. The 'bric_user' user will be created without these permissions (the 'dbname' database will be owned by the user passed in via the -u argument), but will be granted full CREATE, DELETE, UPDATE, and SELECT permissions on all objects in the Bricolage database.
See the Bric::DBA manpage for more information on database security. You may want to alter the default security policy. Also, bric_import uses a TCP/IP connection so you may need to run postmaster with the -i option.Configure Apache to use Bricolage. To have Bricolage run as the main server process on your Apache server, simply add the following two lines to your httpd.conf file (an example is provided in conf/httpd.conf):
PerlPassEnv BRICOLAGE_ROOT PerlModule Bric::App::ApacheConfig
Bricolage will automatically pass the necessary configuration directives to
the Apache daemon. As of mod_perl 1.27, Bricolage uses Apache::ReadConfig to
configure the httpd daemon. There is no httpd include file. If you wish to
have Bricolage generate and use an httpd include file, or if you with to
manually configure your httpd daemon, set the
MANUAL_APACHE directive in
conf/bricolage.conf. This directive will force the startup process to write
out the Bricolage configuration directives to
$TEMP_DIR/bricolage/bric_httpd.conf, and then this file will be
automatically rewritten and included on each startup operation. If you change
then only the contents of the httpd.conf file specified in
bricolage.conf via the
APACHE_CONF direcive will be passed to the httpd
You can also configure Bricolage to run on a virtual host. See CONFIGURATION below.Start Apache. Use one of the scripts in scripts/ if you like. You can manually start it via the following command:
/usr/local/bricolage/bin/bric_apachectl startTry to hit the web server. If you're prompted for a login, you're in! If not, check the Apache error log to figure out what might have gone wrong.
To start using Bricolage, log in as the default user. The user name is ``admin'' and the password is ``change me now!''. This user is not special, so you can change it however you like. The first thing you should do is to change the admin login password so that others who download the Bricolage sources can't just use that login to get into your installation! Now use the admin login to create other user accounts.
To install HTMLArea, an optional application that offers WYSIWYG editing in
the Bricolage UI, simply download it from
http://www.interactivetools.com/products/htmlarea/, decompress the files,
and move them to the comp/media/htmlarea directory in your Bricolage root.
You will also need to enable the
ENABLE_HTMLAREA bricolage.conf directive
(see UI Configuration).
To use the spell-checking feature of HTMLArea, the GNU Aspell library must be installed, along with the appropriate distionaries. These must be installed before the Text::Aspell module is installed from CPAN. Download GNU Aspell and the associated dictionaries from http://aspell.net/.
If you're upgrading an installation of Bricolage that was previously installed
make install, then simply upgrade using
make upgrade. If, however,
you're upgrading an older installation of Bricolage that didn't have a build
system, or it was simply used as-is from CVS, you'll need to follow the
To upgrade a manual installation of Bricolage, first set the BRICOLAGE_ROOT environment variable to the root of your Bricolage installation if it's something other than the default (/usr/local/bricolage), e.g.:
Next, stop the server:
Save copies of your bricolage.conf and httpd.conf files, so that you don't overwrite them:
cp conf/bricolage.conf conf/bricolage.conf.old cp conf/httpd.conf conf/httpd.conf.old
Install the latest Bundle::Bricolage from CPAN to make sure that you have all the needed modules (or read through the list of required modules above and do it yourself).
Delete all existing Mason object files and temporary files:
rm -rf data/obj/BRIC_UI/* rm -rf /tmp/bricolage/*
Run the upgrade scripts needed for upgrading to the new version. The upgrade scripts are in the inst/upgrade/ directory. Run each script in all of the version number directories that are higher than the version you're upgrading from. For example, to upgrade from 1.3.2 to 1.4.0, run each of the scripts in 1.3.0/, 1.3.1/, 1.3.2/, and 1.4.0/ -- in that order.
Next, copy in the new sources from the distribution into you bricolage directory. Be sure not to copy example templates, as they may overwrite your own templates. You're best off moving the contents of data/ out of the way.
mv data /tmp/bric_data_tmp cp -r /path/to/new/bricolage/* . mv /tmp/bric_data_tmp data
Now edit the new bricolage.conf file to match your old settings using the bricolage.conf.old settings you saved as a guide. Do the same thing with httpd.conf. Don't just copy the old settings back into place -- there may be new configuration variables that you'll need to set for the new version. See the CONFIGURATION section below for details.
Now, start up Bricolage and enjoy the new features!
Configuration of Bricolage is handled via two interfaces. The first is the user interface, where application administrators can set preferences such as Time Zone and Date Format. The second interface -- and the one of interest to us here -- is the Bricolage configuration file, which you'll find at /usr/local/bricolage/conf/bricolage.conf. This file is designed for system configuration, and thus to be edited by system administrators -- in other words, the audience of for this document.
The Bricolage configuration file contains a number of configuration options, each of which falls roughly into a number of categories, described below. Edit this document to tweak the functionality of Bricolage. The vast majority of configuration issues can be resolved by editing this document alone.
Note: Bricolage uses the
BRICOLAGE_ROOT environment variable to determine
where to find all of its libraries and configuration files. If this environment
variable is not defined in the shell before starting Bricolage, Bricolage will
default to '/usr/local/bricolage'. If you have installed Bricolage in any other
location, you will need to set this environment variable before you start
Bricolage or use any of its tools. The value of this environment variable is
important for many of the configuration directives, as well. You will find it
represented in this document as
And now, on with the descriptions of the Bricolage configuration directives.
These settings relate the similarly-named Apache run-time configuration directives. (In fact, the descriptions here are largely cribbed from the Apache documentation.) Read the Apache documentation for more information on these and other Apache directives. Depending on your environment, changing some of these may help improve performance.
Note: These configuration settings are used directly in the Apache configuration file. Thus, advanced users can configure Apache themselves by editing the httpd.conf file directly. This is not recommended in most cases, however, as Bricolage uses Perl to configure Apache, and some of the configurations are used elsewhere, too. If you decide to edit the httpd.conf file yourself, however, be sure to also update the bricolage.conf file, so that the settings stay in sync.
/usr/local/apache/bin/httpdif not specified. This isn't portable, so we recommend you set it! Used only in bric_apachectl. APACHE_CONF: This directive sets the location of the Apache server configuration file. Defaults to
/usr/local/apache/conf/httpd.confif not specified. This isn't portable, so we recommend you set it! Used only in bric_apachectl. LISTEN_PORT: The TCP/IP Port on which the Bricolage server should listen for requests. Defaults to 80 if not specified. You must also tell Apache to listen on this port in the configuration file specified in
APACHE_CONF(using Listen, Port, or BindAddress). Note: If the
SSL_ENABLEdirective has been turned on, then
LISTEN_PORTmust be set to 80. The Bricolage server will not start if
SSL_ENABLEis on and
LISTEN_PORTis set to a value other than 80. SSL_ENABLE: Set this directive to enable SSL support. The possible values are ``Off'', ``mod_ssl'', or ``apache_ssl''. The Apache OpenSSL interface (mod_ssl or apache_ssl) is an optional part of the Bricolage application. Not only does it enable secure logins to the system, but it also allows completely secure access to the entire application, should you need it (and not need to worry about the performance overhead). Make sure you've followed the installation instructions for building a mod_ssl or apache_ssl. Disabled by default. Note: The
LISTEN_PORTdirective must be set to 80 if
SSL_ENABLEis on. The Bricolage server will not start if
SSL_ENABLEis on and
LISTEN_PORTis set to a value other than 80. SSL_CERTIFICATE_FILE: If you have enabled SSL, use this directive to set the location of the SSL certificate file. This file will be used by the Bricolage virtual host (if specified via the
VHOST_SERVER_NAMEparameters) for the SSL encryption support. Use in tandem with the
SSL_CERTIFICATE_KEY_FILEdirecive Defaults to an empty value. SSL_CERTIFICATE_KEY_FILE: If you have enabled SSL, use this directive to set the location of the SSL certificate key file. This file will be used by the Bricolage virtual host (if specified via the
VHOST_SERVER_NAMEparameters) for the SSL encryption support. Use in tandem with the
SSL_CERTIFICATE_FILEdirecive. Defaults to an empty value. ALWAYS_USE_SSL: With
SSL_ENABLEset to ``mod_ssl'' or ``apache_ssl'', this directive removes the choice of using SSL from the user's control and forces all access to the application server to use the https protocol. This approach may be valuable in those organizations that need to guarantee 100% encrypted access to Bricolage and can afford the overhead. Disabled by default. NAME_VHOST: The IP address on which the virtual host name specified in the
VHOST_SERVER_NAMEdirective will respond. Note that the syntax for this directive is identical to the syntax for Apache's
NameVirtualHostdirective. Also note that the VirtualHost record that Bricolage creates will be for
NAME_VHOST . ':' . LISTEN_PORT, so if you want to identify your own virtual hosts to listen for on the same IP address, you will need to include the port number in your
VirtualHostdeclarations. Also note that if the
SSL_ENABLEis turned on, then a
NAME_VHOST . ':443'VirtualHost directive will also be created by Bricolage. The upshot is to remember to always use the port number in your own VirtualHost declarations. Defaults to ``*'' if not specified. VHOST_SERVER_NAME: The host name under which Bricolage will run as a virtual host in the Apache server. Defaults to the default host if not specified. CHECK_PROCESS_SIZE: Turn on this feature to limit the size of Apache child processes.
MAX_PROCESS_SIZEdetermines the maximum size in KBs to which the processes will be allowed to grow.
CHECK_FREQUENCYdetermines how many requests will be handled before a process' candidacy for termination is evaluated.
MIN_SHARE_SIZEIndicates the minimum amount of shared memory the process must employ to not be a candidate for termination.
MAX_UNSHARED_SIZESets a limit on the amount of unshared memory a process may consume to not be a candidate for termination. Set
MAX_UNSHARE_SIZEto '0' to disable either respective test. All size settings are in KBs. See Apache::SizeLimit for more information. MANUAL_APACHE: Choose the Apache configuration method. As of mod_perl 1.27, Bricolage uses Apache::ReadConfig to configure the httpd daemon. If you wish have Bricolage generate an httpd.conf include file, or if you wish to manually configure your Apache server for Bricolage, set this directive to a true value. Doing so will cause Bricolage to generate
$TEMP_DIR/bricolage/bric_httpd.conf to provide a tracefile or template for your own manual httpd.conf. If no changes are made to
$BRICOLAGE_ROOT]/conf/httpd.conf, then this file will be automatically included on each startup by the last line of the httpd.conf file:
If this line is changed to
then only the contents of the httpd.conf specified by the
directive will be passed to the httpd daemon.
The database configuration directives tell Bricolage where to find its data, and
how to get it. Specifically, you want to assign to these directives the values
you passed to the -d and -m arguments of
pgimport (see above).
pgimport(see above). Defaults to ``castellan'' if not specified. DBI_PASS: The password of the PostgreSQL user as whom Bricolage should connect to the DB_NAME database. This should be the same as the password passed to the second half of the -m argument to
pgimport(see above). Defaults to ``nalletsac'' if not specified.
This is the name and group of the system user as whom Bricolage and Apache run.
Userdirective used in the Apache configuration file specified in the
APACHE_CONFconfiguration directive. Defaults to ``nobody'' if not specified. SYS_GROUP: The system group of which SYS_USER is a member. Must be the same as the
Groupdirective used in the Apache configuration file specified in the
APACHE_CONFconfiguration directive. Defaults to ``nobody'' if not specified.
SYS_USERdescribed above. May be overridden by a
$BRIC_TEMP_DIRenvironment variable. Defaults to the return value from
File::Spec->tempdirif not specified.
There are two parts to the Mason configuration. The first is for the Bricolage UI environment, and thus it needs to point to the Bricolage UI Mason elements. The second is for the Bricolage Publish environment, which is a separate environment from the Bricolage UI environment. The directives for the Publish environment will need to point to the directories where Bricolage Templates are stored.
$BRICOLAGE_ROOT/compif not specified. MASON_DATA_ROOT: Mason's data root. This where Mason stores the Bricolage UI elements once they've been compiled. Defaults to
$BRICOLAGE_ROOT/dataif not specified. Make sure that SYS_USER has permission to write to this directory. BURN_ROOT: The staging area directory where the burn system places content files upon publication or preview. Defaults to
$MASON_DATA_ROOT/burnif not specified. Make sure that SYS_USER has permission to write to this directory. TEMPLATE_QA_MODE: When enabled, this directive causes more verbose error messages to be displayed when there is an exception thrown during a publish or preview. This may be useful for debugging templates while developing them. Defaults to off if unspecified. INCLUDE_XML_WRITER: This directive, when switched on, causes Bricolage to instantiate an XML::Writer object and to include it in all templates as a global variable named $writer. See the XML::Writer documentation for more information. Defaults to off if unspecified.
Note: Only the Mason burner supports XML::Writer.XML_WRITER_ARGS: If INCLUDE_XML_WRITER is switched on, then this directive is passed to the instantiation method of the XML::Writer object. All arguments to XML::Writer->
new()are supported except the OUTPUT argument, which Bricolage handles internally to ensure that data is sent directly to the template's output file. Defaults to no arguments if not specified.
Note: Only the Mason burner supports XML::Writer.MASON_INTERP_ARGS: This directive passes arguments to the HTML::Mason::Interp constructor in Bric::Util::Burner::Mason's
burn_onemethod, which means it affects the Mason interpreter for your templates. See the HTML::Mason::Interp manpage for the list of parameters you can pass to the
newmethod. Defaults to no arguments if not specified.
Note: Only the Mason burner supports HTML::Mason::Interp. :)
These directives set rules for Bricolage user authentication.
^eFH5D,~3!f9o&3f_=dwePL3f:/.Oi|FG/3sd9=45oi%8GF*)4#0gn3)34tf\`3~fdIf^ N:LOGIN_LENGTH: The minimum length of login name allowed to users. Defaults to ``5'' if not specified. PASSWD_LENGTH: The minimum length of password allowed to users. Note that passwords can be of infinite length. Defaults to ``5'' if not specified.
These directives affect the how distribution is handled by Bricolage. There are
two basic ways to handle distribution. The first, default approach is to let the
Bricolage application server also handle distribution. In this case, the same
Apache processes that handle the UI will also handle distribution
responsibilities. The second approach is to set up a separate Apache server just
to handle distribution. That server will need access to
in order to read the files there and distribute them elsewhere. Making
$BRICOLAGE_ROOT/stage an NFS mount will do the trick.
ENABLE_SFTP_MOVERdirective) to use a particular encryption cipher. This can be useful for tuning SFTP distribution for speed. The default is 0, which allows the default cipher to be used. Consult the Net::SSH::Perl documentation for a complete list of supported ciphers for SSH-1 and SSH-2. As of this writing, the suppported ciphers are ``IDEA'', ``DES'', ``DES3'', and ``Blowfish'' for SSH-1; and ``arcfour'', ``blowfish-cbc'', and ``3des-cbc'' for SSH-2. The default SSH-1 cipher is ``IDEA''; the default SSH-2 cipher is ``3des-cbc''. ENABLE_WEBDAV_MOVER: Bricolage also supports resource distribution through the WebDAV protocol. Set this directive to ``On'' or ``Yes'' or ``1'' to enable it. You need to have installed HTTP::DAV from the CPAN, in order to use WebDAV from Bricolage. Please note that currently due to restrictions in the perl www client library (LWP), a resource must be fully loaded into memory before being uploaded to the WebDAV server. It's recommended not to use the WebDAV transport to transfer large files, such as movies. Check http://www.webdav.org/ for information on the WebDAV protocol. QUEUE_PUBLISH_JOBS. This directive indicates that all publishing should be run from a queue. If this is set to ``On'' or ``Yes'' or ``1'' then a request for publication either from a publish desk or from the story profile page will result in the creation of a Bric::Util::Job::Pub object, which will be tracked in the job list. Publish jobs can fail on
DIST_ATTEMPTSor more errors, wether cause by a template error or some other fault. In this case they will be left in the queue but marked failed to prevent further execution attempts, and the error message will be stored for debugging.
This feature can be used with either bric_queued, or with a specially tuned instance of Bricolage to limit the system resources given over to publishing.
The new queue daemon, bric_queued always executes publish jobs one at a time, while maintaining a seperate thread for distribution jobs.
If you prefer to run publish jobs from the queue concurrently you can still control the use of system resources by running a second instance of Bricolage, setting the Apache MaxClients configuration directive to control the number of Apache processes which will be used for publishing, and thus the amount of memory and processor cycles.FTP_UNLINK_BEFORE_MOVE. This directive must be set to Yes for some FTP servers (e.g. pure-ftpd has been reported to need this) to correctly handle uploads of already existing files: when publishing via FTP, Bricolage first creates a temporary file, than moves this temp file over the existing, older file, overwriting it. Some servers do not support renaming to existing files, so the original one must be deleted first.
Once it's installed and
ENABLE_HTMLAREA has been enabled, you can specify
exactly what shows up in your HTMLArea toolbar and how it is displayed. This
is useful for ensuring that content remains separate from presentation. For
example, you usually won't want to include the font control buttons, as these
are generally best managed in templates. Here is a complete list of the
In addition to the button specifications, HTMLArea configuration supports a few other toolbar configuration options:
The default value for
['bold', 'italic', 'underline', 'strikethrough', 'separator', 'subscript', 'superscript', 'separator', 'copy', 'cut', 'paste', 'space', 'undo', 'redo', 'createlink', 'htmlmode', 'separator', 'popupeditor', 'separator', 'showhelp', 'about']
Bricolage offers full support for editing documents in multiple languages and character sets. These directives can help Bricolage to be more efficient in its use of Language resources.
LOAD_LANGUAGESdefaults to ``en_us'' and
LOAD_CHAR_SETSdefaults to ``UTF-8''.
The Bricolage alerting system allows users to receive notifications upon the triggering of certain events within the system (see Bric::Util::AlertType and Bric::Util::Alert for the Alert API documentation). There are a few system-level directives that affect Bricolage Alerting.
As of Bricolage 1.8.0, media documents based on an element with its associated element type set to ``Image'' can have associated thumbnail images. These thumbail images will then be displayed in the ``Find Media'' interface in the Bricolage UI. This is an optional feature. To use the thumbnail feature, the Imager module must be installed from CPAN, along with any requisite image libraries (libpng, libjpeg, libgif, etc.). Consult the Imager README file and documentation for details.
THUMBNAIL_SIZE: Sets the size of the thumbnails generated by Bricolage. The largest dimension of the thumbnail will be no greater than this value, ensuring relative uniformity of size for display in the UI. Defaults to ``75'' if not specified.
All files burned to the file system during publishes and previews must be named (of course!), and they're named for the ``File Name'' and ``File Extension'' properties of the Output Channel they're getting burned to. You can give these properties whatever values you want (as long as they're legal on your file system!), but here you can set some defaults that all Output channels will start with.
Note: Only the Mason burner supports PERL_LOADER.
Bricolage includes a virtual FTP server that can be used to allow access to Bricolage templates. This may provide a more comfortable development environment for programmers working on templates. Many editors provide FTP modes that make editing files via FTP almost as easy as editing files locally (ange-ftp for Emacs, for example).
Whenever a user uploads a template via the FTP server, the template is checked out to her and put on her workspace and in her sandbox for testing. Repeated uploads of the template merely save it and redploy it to her sandbox. Once a user is satisfied that a template is ready for production and she wishes to deploy it, she merely has to upload it via the FTP server with the string ``.deploy'' appended to the file name. This behavior allows users to safely make changes to a template and test those changes without interfering with the publication of live documents until a user is sure a template is ready for production.
There are security risks to consider with the Bricolage virtual FTP server: FTP sends passwords unencrypted over the network. If you are running Bricolage behind a firewall this might not be a problem.
To enable the FTP server you'll need to install the Net::FTPServer Perl module. After that you can configure the FTP server with the following options:
$BRICOLAGE_ROOT/ftp.logif not set. FTP_PID_FILE: Set this to the file where you want to the FTP daemon PID stored. Defaults to
$BRICOLAGE_ROOT/ftp.pidif not set. FTP_DEPLOY_ON_UPLOAD: Prior to Bricolage. 1.8.0, the virtual FTP server deployed a template whenever it was uploaded. Beginning with Bricolage 1.8.0, templates are checked out to the user and put on her workspace and in her sandbox for testing, but they are not deployed. Enable this directive to restore the pre-1.8.0 behavior. FTP_DEBUG: If you set this to 1 you'll see a lot of useful tracing information in the FTP logfile. This can help diagnose errors but is probably only of interest to developers. Defaults to 0.
Next you'll need to start the FTP server as the same user that Apache runs as. For example, if you run Apache as ``nobody'' you would use this command to start the FTP server:
su nobody -c "/usr/local/bricolage/bin/bric_ftpd -S"
The -S option to ftpd runs the FTP server in the background. For other possibilities see the documentation for Net::FTPServer.
Once the server is up and running connect to it with an FTP client and start editing templates. For more information see Bric::Util::FTP::Server.
As noted above, you need to supply the user and group names under which
Bricolage will run. It's important that this user have permission to write to
certain directories, as Bricolage will store some data files on the file system.
So be sure to grant to SYS_USER and/or SYS_GROUP the necessary permissions to
write to the directories identified by the MASON_DATA_ROOT, BURN_ROOT, and
BURN_DATA_ROOT configuration directives. Also, Bricolage stores Media asset
$BRICOLAGE_ROOT/data/media, so be sure the necessary permissions are
set on that directory as well. If you're using the default configuration
settings, then you'll only need to ensure that the following two directories are
fully writable by SYS_USER, since the directives point either to one of these
directories or to a subdirectory of these directories:
The following addresses a number of installation issues you might face.
If you choose to create your own SSL certificate and act as your own certificate authority rather than use a known certificate authority such as VeriSign, it's possible that you'll run into issues getting the server to start up with the certificate properly. If so, you'll see errors in the Apache error log that look like this:
[Wed Jul 4 10:48:25 2001] [error] OpenSSL: error:14094412:SSL routines:SSL3_READ_BYTES:sslv3 alert bad certificate [Hint: Subject CN in certificate not server name or identical to CA!?]
This issue can be resolved by simply making sure that you enter different values for the ``Organization Unit Name'' for the certificate authority certificate and the server certificate.
If you're facing this issue, here's how to manually build a new certificate:
/usr/local/bricolage/bin/bric_apachectl stopDelete the existing installation of Apache:
rm -rf /usr/local/apache*Change directories into /usr/local/src/bricolage/apache_build/apache_1.3.xx. Execute the following command:
make certificate TYPE=custom
You will be prompted as you were during the initial installation. Follow the same instructions, but be sure to use different values for the ``Organization Unit Name'' in the two certificates. When you're prompted to encrypt the CA and Server keys, enter ``n'' to avoid having to enter a passphrase every time you start Apache, but enter ``y'' if you really don't trust your system users.Execute the following command:
This will install Apache and the new certificate.Start Apache again:
Bricolage is a big application, with big system needs. Thus it's a good idea to give some thought to system management, including disk partitioning and file maintenance.
By default, the Bricolage database is stored where all PostgreSQL databases are stored -- /usr/local/pgsql/data by default. Depending on the needs of your environment, the database can become quite large. We therefore recommend you place this directory on a separate partition. Better yet, place it on its own disk in order to optimize disk access time by preventing database access from competing with other disk processes.
A great deal more maintenance is important for the database. See the Bric::DBA manpage for more detail.
Bricolage stores all of its application files -- including the UI elements and
Perl libraries -- in
$BRICOLAGE_ROOT. Bricolage will make a lot of disk
accesses to MASON_DATA_ROOT, which is where all of the UI elements are
compiled and stored. The Perl libraries are stored in
although mostly they will only be read on startup.
Bricolage creates a great many files on the filesystem, too, however. The
$BURN_ROOT/comp directory houses the templates that are used to format
stories - you'll want to be sure to back it up regularly. The
$BURN_ROOT/preview directories will get burned files
written to them upon publish and preview, respectively. These will be good
targets for periodic cleanup if you need to reclaim disk space, as generally the
files stored there will not be much accessed after they're created. If you
decide to clean some of them out to reclaim file space, just be sure not to
delete any files for which there are executing distribution jobs, otherwise the
distribution jobs will fail!
$MASON_COMP_ROOT/data/preview directory gets formatted story files copied
to it from
$BURN_ROOT/preview if the PREVIEW_LOCAL directive is set to true.
This directory doesn't need backing up, as these files are used only for
$BRICOLAGE_ROOT/comp/data/media directory gets all media asset files
written to it. This last directory is perhaps the most important, from a system
administration perspective, because if Bricolage is used to manage large
documents (e.g., QuickTime movies), this directory will start to use a lot of
space -- and especially if the media files themselves are versioned. Thus in
environments where many large media assets will be managed, it might make sense
to put this directory on its own partition or disk, as well. And remember to
back it up to prevent the loss of all of your media assets -- they aren't stored
Bricolage also creates temporary files for caching user session data
and application data. These files are stored in subdirectories of
the directory specified by the TEMP_DIR configuration variable.
Session files are stored in
TEMP_DIR/bricolage/lock. These directories should stay relatively
free of cruft, as the session files are regularly deleted when users
logout or their login sessions expire and they attempt to log back
in. (However, in some cases we've noticed a buildup of files in the
Bricolage also uses a cross-process caching mechanism to share data between
Apache processes and applications. The data for this cache is stored in
Bricolage comes with a script that cleans out old temporary files. You can use this by adding a line to the crontab for the web server user (often ``nobody'') like this:
0 2 * * * /usr/local/bricolage/bin/bric_clean_tmp
This will run nightly at 2AM and clean out all files older than 12 hours. See bric_clean_tmp for more details.
Bricolage includes the ability to clone an existing Bricolage system. This is useful if you've developed a working Bricolage and need to copy the system into a production enviornment. Of course, you could setup a new, empty Bricolage and then use Bric::SOAP to copy over your templates, categories, elements and content, but that would still leave a lot of work left to do - users, preferences, distribution settings, workflow, etc.
Instead, you can clone an installation, which produces a distribution tar-ball that you can install on the destination server. This tar-ball includes all the contents of the Bricolage database, all files created by Bricolage and all configuration settings.
To clone an installation, first open up a fresh source distribution for the version that is installed. Then enter the source directory and type:
This will ask you for the BRICOLAGE_ROOT for the target install. It also asks you to name your clone. The name is used to generate the filename for the generated tar ball. When ``make clone'' completes it will leave a file create ``bricolage-NAME.tar.gz'', where NAME is the name you chose.
To install a cloned distribution, just take the generated tar-ball to the target machine and install it as usual:
tar zxvf bricolage-NAME.tar.gz cd bricolage-NAME make make install
That's all there is to it! Now your new installation will be an exact replica of the original.
Some of the most common problems with Bricolage installation are discussed in
Bric::FAQ which is distributed together with your Bricolage
instllation. To see it, do
perldoc lib/Bric/FAQ.pod in your Bricolage
source or installation directory.
There is also an on-line copy at http://www.bricolage.cc/docs/Bric/FAQ.html.
David Wheeler <firstname.lastname@example.org>