Administration > Customizing Startup > Deploying a Centralized Configuration
  
Deploying a Centralized Configuration
If you have customizations and configuration information that applies to all of your users, then you can use a Deploy Directory to have centralized control over how Arbortext Editor is customized and configured. You usually employ a Deploy Directory when you are developing a compact installation of Arbortext Editor. However, you can also use the site subdirectory of a Deploy Directory with the full installation of Arbortext Editor to set up centralized customizations and configuration information. In this case, you must use the APTDEPLOYPATH environment variable to point to where the Deploy Directory is located at your site.
A template Deploy Directory and a sample site directory are included in the Arbortext Editor Deployment Kit. This kit is available from the PTC support site. Refer to the Arbortext Editor Deployment Kit Guide for more information about the Deployment Kit and its contents.
Setting up the Deploy Directory
Following is the process for developing a Deploy Directory for Arbortext Editor:
1. Download the Arbortext Editor Deployment Kit from the PTC support site and extract the contents to a local directory.
2. Determine where you want to host the Deploy Directory for your site.
You can host the directory on a web server in an HTTP virtual directory or on a shared network folder. The Deploy Directory must be available to any user that you want to use the centralized Arbortext Editor configuration.
3. Make a copy of the deploy directory in the Deployment Kit and modify it to meet your requirements.
Delete the 5.4F000 directory, as it is only used for a compact installation. Note that the name of this directory changes to match the current release of Arbortext Editor.
In the site directory, edit the siteprefs.xml file to add the customized configuration information for your installation. You can set Arbortext Editor preferences, environment variables, library files, and application and adapter parameters in this file. If you have a customized custom directory for your site, configure that as needed and create a zip archive of the custom directory. Store the zip archive in the site directory and reference the archive from the siteprefs.xml file.
When you have finished configuring and testing the deploy directory, move it to the location where you are hosting the Deploy Directory for your users.
4. Set the APTDEPLOYPATH environment variable on the users’ systems that will be using the centralized configuration in the Deploy Directory
The site directory
The site directory in the Deploy Directory enables you to have centralized control over how Arbortext Editor is customized and configured for your users. This directory initially contains just the siteprefs.xml configuration file, but you can add additional files that are referenced from the siteprefs.xml file. For example, if you have a custom directory for your site you can make a zip archive of that directory and store it in the site directory. An example site directory is included in the Arbortext Editor deployment kit in the site_sample directory.
Note that any preferences or other configuration settings you include in the siteprefs.xml file will override the same settings users have on their systems. You should only include configuration information in this file that applies to all of the users at your site.
Arbortext Editor checks the contents of the site directory every time users invoke Arbortext Editor. If you need to change your Arbortext Editor configuration, for example if you change license or Arbortext Publishing Engine servers, you just need to update the contents of your centralized site directory and that change is automatically passed along to all of the systems that are associated with the Deploy Directory.
If your network is not available to a user for some reason, that user can still use the Arbortext Editor configuration information from the Deploy Directory. Arbortext Editor stores local versions of the files in the site directory in its cache directory (.aptcache) and will use the locally cached files if the Deploy Directory is not available. However, that user might not have the latest versions of these files if you updated the site directory since the last time that user worked with Arbortext Editor. That user will get the latest configuration information the next time they start Arbortext Editor when connected to the network. The local version of the siteprefs.xml file is stored in the .aptcache\site directory.
To set up the centralized configuration and customization information for your site, you must edit the relevant parts of the siteprefs.xml file. You can use Arbortext Editor to edit the file. Following is a sample default siteprefs.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!--Arbortext, Inc., 1988-2008, v.4002-->
<SiteConfiguration
xmlns="http://www.arbortext.com/namespace/doctypes/scf">
<!--This file contains site-wide customizations.
For complete details, see the documentation that comes with the
Arbortext Editor Deployment Kit.

Generally, a 'path' attribute value is the name of a file that resides
in the same directory as this .xml file. However, if needed, a full
network file system or HTTP path to an external resource can be specified.-->

<ZippedCustomizations>
<!--This section can cite zero or more zipped customizations.
These are generally zipped 'custom' directories containing desired
site-wide customizations.
-->
<ZipFile path=""/>
</ZippedCustomizations>

<LibraryFiles>
<!--This section can cite zero or more library files.
These are generally used to customize Applications and Adapters supplied
by PTC. In some cases, a library file requires that a certain
GlobalParameter (see below) also be specified.-->
<LibFile path=""/>
</LibraryFiles>

<Preferences>
<!--This section can specify zero or more Arbortext Editor
preference options. Be very selective about which options are
specified here because they override an end-user's own option
setting.

Typically the 'peservices' and 'peserverurl' options are set here
to inform Arbortext Editor to perform composition services via a
particular Arbortext Publishing Engine server.-->
<Option name="" value=""/>
</Preferences>

<EnvironmentVariables>
<!--This section can specify zero or more environment variables.
Any cited variable will be set in the Arbortext Editor process early
during startup.

Typically this is used to set a value for the 'PTC_D_LICENSE_FILE'
environment variable which specifies one or more license servers from
which Arbortext Editor can obtain a license.-->
<Variable name="" value=""/>
</EnvironmentVariables>

<GlobalParameters>
<!--This section can specify zero or more global parameter settings.
These settings are normally used to configure Arbortext Editor Applications
and Adapters.

As an example, this could be used to specify the list of host servers that
an Arbortext Editor adapter should present to the end-user when they try to
establish a session using that adapter.-->
<Parameter>
<ParameterName></ParameterName>
<ParameterValue></ParameterValue>
</Parameter>
</GlobalParameters>
</SiteConfiguration>
The siteprefs.xml file is divided into the following areas:
Zipped customizations
Library files
Preferences
Environment variables
Global parameters
Zipped customizations
The following section of the siteprefs.xml file is where you add zipped customizations:
<ZippedCustomizations>
<!--This section can cite zero or more zipped customizations.
These are generally zipped 'custom' directories containing desired
site-wide customizations.
-->
<ZipFile path=""/>
</ZippedCustomizations>
You can add a zipped custom directory, application directory, or adapter directory to this part of the file. If you enter a relative path in the ZipFile tag’s path attribute, the path is relative to the site directory. You can also specify a full network file system path or HTTP path to the zip file. At startup, Arbortext Editor checks whether an updated version of a zipped customization is available. If an updated version is available, it is unzipped to the local system in the .aptcache\zc directory.
Note that you cannot include the following font configuration files in the lib subdirectory of a zipped custom directory:
charent.cf
wcharent.cf
wfontsub.cf
charmap.cf
These files are processed before a zipped custom directory when Arbortext Editor starts up, so the files cannot be processed when deployed in this way.
Following is an example of how this section of the file appears when edited in Arbortext Editor:
This graphic shows the zipped customizations section of the siteprefs.xml file.
Library files
The following section of the siteprefs.xml file is where you add library files:
<LibraryFiles>
<!--This section can cite zero or more library files.
These are generally used to customize Applications and Adapters supplied
by PTC. In some cases, a library file requires that a certain
GlobalParameter (see below) also be specified.-->
<LibFile path=""/>
</LibraryFiles>
You can add library files to this section that customize or configure adapters or applications. You can also add any file that can be placed in the top level of a custom\lib directory. If you enter a relative path in the LibFile tag’s path attribute, the path is relative to the site directory. You can also specify a full network file system path or HTTP path to the file. At startup, Arbortext Editor checks whether an updated version of a library file is available. If an updated version is available, it is stored on the local system in the .aptcache\site\lib directory.
The LibFile tag also has a base attribute. This attribute enables you to supply the base name for a library file in cases where the path does not contain the file name. For example, you might be using a script to download a library file that references the file by an ID value instead of the file name. In this case, you can use the base attribute to supply the file name, as follows:
<LibraryFiles>
<LibFile path="http://server/cgi/download.pl?docId=325607" base="aptifscfg.xml"/>
</LibraryFiles>
Note that you cannot include the following font configuration files in the LibraryFiles section of a Deploy Directory’s siteprefs.xml file:
charent.cf
wcharent.cf
wfontsub.cf
charmap.cf
These files are processed before a Deploy Directory when Arbortext Editor starts up, so the files cannot be processed when deployed in this way.
Following is an example of how this section of the file appears when edited in Arbortext Editor:
This graphic shows the library files section of the siteprefs.xml file.
Preferences
The following section of the siteprefs.xml file is where you set preferences:
<Preferences>
<!--This section can specify zero or more Arbortext Editor
preference options. Be very selective about which options are
specified here because they override an end-user's own option
setting.

Typically the 'peservices' and 'peserverurl' options are set here
to inform Arbortext Editor to perform composition services via a
particular Arbortext Publishing Engine server.-->
<Option name="" value=""/>
</Preferences>
You can set the value for any set command option. Enter the name of the option in the Option tag’s name attribute and the value in the value attribute.
Note that any preferences you include in the siteprefs.xml file will override the same settings users have on their systems. You should only include preferences in this file that apply to all of the users at your site. A typical use for this section is to set the preferences for Arbortext Publishing Engine. For any preference that has a path in it’s value, you can use a special %S character in the path to represent the .aptcache\site\lib directory. This enables you to reference local library files, if necessary.
Following is an example of how this section of the file appears when edited in Arbortext Editor:
This graphic shows the preferences section of the siteprefs.xml file.
Environment variables
The following section of the siteprefs.xml file is where you add environment variables:
<EnvironmentVariables>
<!--This section can specify zero or more environment variables.
Any cited variable will be set in the Arbortext Editor process early
during startup.

Typically this is used to set a value for the 'PTC_D_LICENSE_FILE'
environment variable which specifies one or more license servers from
which Arbortext Editor can obtain a license.-->
<Variable name="" value=""/>
</EnvironmentVariables>
You can set the value for any Arbortext Editor environment variable. Enter the name of the variable in the Variable tag’s name attribute and the value in the value attribute.
Note that any environment variables you include in the siteprefs.xml file will override the same settings users have on their systems. You should only include variables in this file that apply to all of the users at your site. A typical use for this section is to set the floating license server. For any variable that has a path in it’s value, you can use a special %S character in the path to represent the .aptcache\site\lib directory.
Global parameters
The following section of the siteprefs.xml file is where you add global parameters:
<GlobalParameters>
<!--This section can specify zero or more global parameter settings.
These settings are normally used to configure Arbortext Editor Applications
and Adapters.

As an example, this could be used to specify the list of host servers that
an Arbortext Editor adapter should present to the end-user when they try to
establish a session using that adapter.-->
<Parameter>
<ParameterName></ParameterName>
<ParameterValue></ParameterValue>
</Parameter>
</GlobalParameters>
This section of the file enables you to set the global parameters for an Arbortext Editor application or CMS adapter. Each application has an application.xml configuration file. Similarly, each CMS adapter has a cms_adapters.xml configuration file. Each of these files has a section where you can set global parameters for that application or adapter. This enables you to manage those parameters in a central location for all users. Refer to the Content Management Guide for more information about the global parameters for the CMS adapters.
The global parameters section contains a series of Parameter tags. Each Parameter tag contains a ParameterName tag and one or more ParameterValue tags. Enter the name of the application or adapter in the ParameterName tag with the name of the parameter appended to the tag. For example, to set the HostList parameter for the PTC Server connection (com.ptc.prowt.arbortext) you would enter com.ptc.prowt.arbortext.HostList in the ParameterName tag. Enter the value(s) in one or more ParameterValue tags.
For any value that has a path, you can use a special %S character in the path to represent the .aptcache\site\lib directory. Some application or adapter parameters have library files associated with them that you must include in the library files section of the siteprefs.xml file. For example, the deprecated Arbortext Adapter to Oracle CM SDK had a aptifscfg.xml configuration file that was set in the ConfigFile parameter. If you included aptifscfg.xml in your site directory and referenced that file in the library files section of the siteprefs.xml file, you can use the %S character in the value for this parameter to ensure that the adapter uses the configuration file included in your centralized site directory instead of the one in the local Arbortext Editor install tree. For example:
<GlobalParameters>
<Parameter>
<ParameterName>com.ptc.arbortext.adapters.oracle.cmsdk.ConfigFile</ParameterName>
<ParameterValue>%S/aptifscfg.xml</ParameterValue>
</Parameter>
</GlobalParameters>
Following is an example of how this section of the file appears when edited in Arbortext Editor:
This graphic shows the global parameters section of the siteprefs.xml file.
This parameter is the list of hosts to which the PTC Server connection can connect.