This section describes how to publish changed content to an authoring Assembler in a staging environment, and how to publish all Workbench content in a staging environment to a production environment.
You need to configure your staging environment so that changes to Workbench content are automatically published to a generational store whenever the Workbench user saves them. The saved changes are immediately visible in Preview mode upon a successful publish.
To configure your staging environment to publish content changes, follow these steps:
Navigate to the Assembler context file for your application,
WEB-INF/assembler-context.xml
Open
assembler-context.xml
and find the Administration services section of the file.Scroll down and edit the properties in the
StoreFactory
bean with values that are appropriate for your site.For example, the
configurationPath
should be the location where content is extracted to when you publish content.<bean id="StoreFactory" class="com.endeca.infront.content.source.FileStoreFactory" init-method="init" destroy-method="destroy"> <property name="configurationPath" value="${repository.configuration.path}"/> <!-- The following section is needed only when you are working in an authoring environment. --> <property name="isAuthoring" value="${preview.enabled}"/> <property name="appName" value="${workbench.app.name}" /> <property name="host" value="${workbench.host}" /> <property name="clientPort" value="${workbench.publishing.clientPort}"/> <property name="serverPort" value="${workbench.publishing.serverPort}"/> </bean>
Always set the value of the
configurationPath
property to the value of theauthoringApplicationExportDirectory
property ofdeployment-settings
in thepublish
file in your exported content. If you change the value of theauthoringApplicationExportDirectory
property, be sure to set the value of the property to the changed value. For information aboutdeployment-settings
, see Public JSON Formats for deployment-settings.By default, the authoring application export directory is located at
C:/Endeca/ToolsAndFrameworks/<
. For example, the authoring application export directory for the Discover reference application isversion
>/server/workspace/state/generation_data/<application name
>C:/Endeca/ToolsAndFrameworks/<
. The generation files in the directory have the following format:version
>/server/workspace/state/generation_data/Discovergeneration_<
.date-and-timestamp
><current-time-in-milliseconds
>.zipNote
The configurationPath needs to be a directory that Workbench can write to and the Assemblers can read from.
Open the
WEB-INF/assembler.properties
file for your authoring Assembler in a text editor.Set the
preview.enabled
setting totrue
, as follows:. . . preview.enabled=true user.state.ref=previewUserState media.sources.ref=authoringMediaSources repository.configuration.path=./generation_data/${workbench.app.name} defaultSiteRootPath=/pages . . .
Note
The
repository.configuration.path
property specifies the location to which content is published. This location is set when you run the deployment template to create the application.Restart your Web application server. For Guided Search reference applications, this is controlled through the Endeca Tools Service.
Every update to an EAC application creates a new generation file. Over time, the number of files in the authoring application export directory can become quite large. Oracle recommends that you consolidate these generation files into a single generation file every night. Use the following command:
<apps directory
>/<application name
>/control/runcommand.bat/sh IFCR deployContent “Authoring”
For example:
/Endeca/Apps/Discover/control/runcommand.sh IFCR deployContent “Authoring”
When you run this command, it deletes the contents of the directory
and regenerates
generation.xml
and a generation file. It
consolidates all the existing generation files into the new single generation
file. After deploying the application content, the command notifies the
environment's content listeners such as the FileStoreFactory to process the new
content.
To promote application content from a staging environment to a production environment, follow these steps:
Open the file
WEB-INF/assembler.properties
in a text editor.Set the
preview.enabled
setting tofalse
, as follows:preview.enabled=false user.state.ref=liveUserState media.sources.ref=liveMediaSources repository.configuration.path=./repository/${workbench.app.name}
Note
The
repository.configuration.path
property specifies the location to which content is promoted. This location is set when you run the deployment template to create the application.Navigate to the Assembler context file for your application,
WEB-INF/assembler-context.xml
.Open
assembler-context.xml
and find the Administration services section of the file. For example, in the production environment for the Discovery Electronics application, the section looks like the following:<!-- ~~~~~~~~~~~~~~ Administration Service ~~~~~~~~~~~~~~~~~~ --> <bean id="adminService" class="com.endeca.infront.assembler.servlet.admin.AdministrationService"> <property name="storeFactory" ref="storeFactory"/> </bean>
Scroll down and edit the properties in the
storeFactory
bean with values that are appropriate for your site.For example, the
configurationPath
should be the location to which content is extracted when you promote content.<bean id="storeFactory" class="com.endeca.infront.content.source.FileStoreFactory" init-method="init"> <property name="configurationPath" value="${repository.configuration.path}"/> </bean>
Restart your Web application server. For Guided Search reference applications, this is controlled through the Endeca Tools Service.