Staging: Creating a syndication relationship from the command line

To set up a syndication relationship from the command line, use the XML configuration interface (xmlaccess command) and the ConfigEngine command to configure the subscriber.

Before you begin

Creating a syndication relationship

Procedure

To set up a syndication relationship from the command line, complete the following steps:

  1. Ensure both the subscriber and syndicator are running and that they can access each other over a network.
  2. On the subscriber server, create a shared credential vault slot with the XML configuration interface.
    1. Create the CreateVaultSlot.xml file using a text editor.
      This sample file uses the following values that you can change to reflect your environment:
      syndication-slot
      The name of the shared credential vault slot.
      wpsadmin
      The user ID for the portal administrator.
      passw0rd
      The password for the portal administrator.
      <?xml version="1.0" encoding="UTF-8"?>
      <request
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:noNamespaceSchemaLocation="PortalConfig_8.0.0.xsd"
          type="update" create-oids="true">
      
          <!-- Sample for creating a new credential vault slot. This script creates a     -->
          <!-- credential vault resource and a shared slot in the Default Admin Segment   -->
          <portal action="locate">
               <credential-segment action="locate" adapter-type="default" name="DefaultAdminSegment" 
                   user-mapped="false">
                   <description>Default Admin Segment</description>
                   <credential-slot action="update" active="false" name="syndication-slot"
                       resource="syndication-resource" secrettype="userid-password" system="true">
                       <localedata locale="en">
                           <description>used for syndicator and subscriber pair</description>
                       </localedata>
                       <password-secret action="create" external-id="wpsadmin"
      											user="uid=wpsadmin,o=defaultWIMFileBasedRealm">passw0rd</password-secret>
                   </credential-slot>
               </credential-segment>
          </portal>
      </request>
    2. Run the xmlaccess command with the CreateVaultSlot.xml file.
      AIX® Linux Solaris z/OS®
      ./xmlaccess.sh -in CreateVaultSlot.xml -out slot-out.xml -url http://localhost:10039/wps/config -user wpsadmin -password passw0rd
      IBM i
      xmlaccess.sh -in CreateVaultSlot.xml -out slot-out.xml -url http://localhost:10039/wps/config -user wpsadmin -password passw0rd
      Windows
      xmlaccess.bat -in CreateVaultSlot.xml -out slot-out.xml -url http://localhost:10039/wps/config -user wpsadmin -password passw0rd
  3. On the subscriber server, create a virtual portal on the subscriber with the create-virtual-portal task.
    This example creates a virtual portal called sample, although you can change this value to reflect your environment.
    AIX Linux Solaris z/OS
    ./ConfigEngine.sh create-virtual-portal -DPortalAdminPwd=passw0rd -DWasPassword=passw0rd -DVirtualPortalTitle=sample -DVirtualPortalContext=sample
    IBM i
    ConfigEngine.sh create-virtual-portal -DPortalAdminPwd=passw0rd -DWasPassword=passw0rd -DVirtualPortalTitle=sample -DVirtualPortalContext=sample
    Windows
    ConfigEngine.bat create-virtual-portal -DPortalAdminPwd=passw0rd -DWasPassword=passw0rd -DVirtualPortalTitle=sample -DVirtualPortalContext=sample
  4. On the subscriber server, set up the syndication relationship with the run-wcm-admin-task-subscribe-now task.
    This sample command uses the following additional values that you can change to reflect your environment:
    syndicator-hostname
    The host name of the syndicator server.
    syndicator1
    This name is used for the syndicator item that is created on the syndicator server. Enter a name that helps identify the syndication relationship you are creating. This name must be unique and cannot be the same as an existing syndicator name.
    Note: To reuse syndicator names of previously deleted syndication relationships on a subscriber, you must also delete the same relationship on the syndicator.
    subscriber1
    This name is used for the subscriber item that is created on the subscriber server. Enter a name that helps identify the syndication relationship you are creating. This name must be unique and cannot be the same as an existing subscriber name.
    In addition, use the following properties to identify the libraries to which you are subscribing and the type of syndication that you want to perform. For each syndication relationship, you can specify only one type of syndication. Separate multiple libraries with commas.
    liveItems="library_name_1,library_name_2"
    Live item syndication is mostly used when syndicating to a staging or delivery server. The following items are syndicated:
    • Published
    • Expired
    Draft items, projects and items in a project are not syndicated.
    liveProjectsItems="library_name_1,library_name_2"
    The advantage of using "Live and projects" syndication is to gradually syndicate projects to a staging or delivery server rather that waiting to syndicate all the items in a project after they all achieve a published state. The following items are syndicated:
    • Published
    • Expired
    • Projects
    • Draft items in a project
    Draft items outside of projects are not syndicated.
    allItems="library_name_1,library_name_2"
    All item syndication is mostly used when syndicating between servers within an authoring environment. The following items are syndicated:
    • Published
    • Expired
    • Projects
    • Draft items in a project
    • Other draft items
    • Versions
    • Deleted items
    Example commands:
    AIX Linux Solaris z/OS
    ./ConfigEngine.sh run-wcm-admin-task-subscribe-now -Dsyndicator=http://syndicator-hostname:10039/wps/wcm -DvaultSlotName=syndication-slot -DsyndicatorName=syndicator1 -DsubscriberName=subscriber1 -DVirtualPortalContext=sample -DliveItems="Web Content,Portal Site" -DPortalAdminPwd=passw0rd -DWasPassword=passw0rd
    IBM i
    ConfigEngine.sh run-wcm-admin-task-subscribe-now -Dsyndicator=http://syndicator-hostname:10039/wps/wcm -DvaultSlotName=syndication-slot -DsyndicatorName=syndicator1 -DsubscriberName=subscriber1 -DVirtualPortalContext=sample -DliveItems="Web Content,Portal Site" -DPortalAdminPwd=passw0rd -DWasPassword=passw0rd
    Windows
    ConfigEngine.bat run-wcm-admin-task-subscribe-now -Dsyndicator=http://syndicator-hostname:10039/wps/wcm -DvaultSlotName=syndication-slot -DsyndicatorName=syndicator1 -DsubscriberName=subscriber1 -DVirtualPortalContext=sample -DliveItems="Web Content,Portal Site" -DPortalAdminPwd=passw0rd -DWasPassword=passw0rd