Configuring Publishing in CM1

In order to be able to publish your website to your chosen location, you will need to add a publishing or 'pub' server in CM1. You can add more than one pub server to a site, but only one site can be allocated the Publish Now feature,

To add a pub server, go to Publish in the Navigation bar and double click the site you would like to configure publishing for. Click the + sign next to Servers to get started.

Staging Vs Production

The first option you will be presented with is whether you would like to configure a Staging or a Production server. Details on staging can be found here

Staging or Production

 Once you have chosen what environment the pub server will be used in, you need to enter a Name, Type and Driver for the pub server. You can choose either Database or File for the Type. The most common option for standard websites is File publishing, which then gives you the option of three different driver types: Local, FTP, and Amazon S3.

Local Publishing

Percussion CMS comes packaged with an internal Tomcat instance for publishing locally instead of publishing to a remote Live server. The local server behaves just like a live web server, enabling to preview the full functionality of the site, including dynamic widgets. However, if you have any dynamic functionality that requires involves server side code such as PHP or ASP, this functionality will not display when published locally. Alternatively, it is possible to publish to another location if you do not want to use the Percussion Tomcat instance.

Local Publishing Server

In the above example, we are using the default Tomcat instance and HTML format. To support integration of content managed in the CMS to third party applications, CM1 also supports publishing to XML files. The third party application can then access this structured content and integrate your content into the application. Both XML and database options publish to a standard format or schema. There is no customizing the output for these formats. 

For example, a travel website has a hotel booking application on its home page. When a site visitor enters a city and a date range, the application returns which hotels have available rooms. The marketing team creates and manages the hotel descriptions that are displayed elsewhere on their travel site, and wants those descriptions included in the booking application results. Percussion CMS can publish their web content in a structured form like a database or to XML files, and the booking application can then access that content. That ensures a single source of content that can be used in multiple places. 

 FTP/SFTP Publishing

Both FTP and SFTP are supported to publish to a web server. You will need the URL of the FTP address and you will also need to coordinate with your IT group to know the port where the FTP server is listening. For SFTP, you can use the ssh-keygen tool in Unix to generate private/public key pairs. Once you have your keys,  you must register them on your FTP server and copy them into <CM1-Install-Directory>/rxconfig/ssh-keys.

Note that if you are editing a saved FTP configuration, and you uncheck Secure FTP, the Private key file displays the first file in the drop list, not your last saved file. If you check Secure FTP again, the Private key file continues to display the first file in the drop down list. You must click Cancel to reset the field to your previously saved choice.

In the example below, we have configured SFTP using a private key file rather than a password:

FTP Publishing

Amazon S3

If you plan to host your website using Amazon's S3 cloud service, you can publish to it directly from CM1. To understand the steps to host a static website on Amazon, see Setting Up a Static Website Using a Custom Domain (from the Amazon AWS website). Once you worked with your internal Amazon AWS/S3 administrator to configure the service and have established your Amazon account and website, you can configure publishing in Percussion by entering your S3 bucket, access key and security key. 

Publish Now

The 'Set as Publish Now Server' checkbox is only available when configuring a Production web server. Only one server can have this option checked and is indicated by a checkbox next to the server name when viewing all of the pub servers on a site. In the example below, 'IIS' is the Publish Now Server.

Publish Now

 

For more information on Publish Now, see the Publishing Pages on Demand section.

Unmodified Assets

For both Staging and Production pub servers, there is a checkbox to 'Ignore Unmodified Assets'. This only affects the Full Publish option and serves to reduce publishing time by only publishing assets that have changed since they were last published on that pub server. The example in the previous section does not have this option checked: this means that every time a Full Publish is run on this server, all assets will be published, regardless of when they were last changes.

File & Directory exclusions in Web Resources

CM1 will attempt copy everything in your web_resources directory when a Full or Incremental Publish is run. If your web resources directory is an NFS mount (.snapshot) or a source control system (Git etc.) managed location for revision tracking purposes, you should exclude the relevant file extensions and locations to minimize the time it takes to perform a publish. To add new exclusions open rx_resources/ant/excludes.txt and specify the file extensions and files/folders by name or pattern that you do not want to be published.

Note: The excludes.txt has the following file extensions by default:

  • .git/
  • .snapshot/
  • .svn/
  • .gitignore