Administer > Deploy > Overview: WCS Build and Deployment tool > Customize the Build and Deployment tool


Customize the server deployment process

Overview

You can customize server deployment using Apache Ant.

For helper Ant targets...

WCBD_DEPLOY_SERVER/wcbd-deploy-common.xml

Refer to the comments within the file for more information.


Customize server deployment

  1. Develop custom scripts.

    If the file transfer protocol used in the customization project is not one for which sample scripts are provided, develop custom scripts...

    1. Run...

      cd $WCBD_DEPLOY_SERVER/static-web-deploy
      cp wcbd-static-web-deploy.private.properties.template ../static-web-deploy-protocol.private.properties.
      cp wcbd-static-web-deploy.properties.template ../static-web-deploy-protocol.properties
      cp wcbd-static-web-deploy.xml.template ../static-web-deploy-protocol.xml
      chmod 755 ../static-web-deploy-protocol.*

    2. Edit...

      WCBD_INSTALL/static-web-deploy-protocol.xml

      ...and replace the name attribute of the root project element from...

      wcbd-static-web-deploy

      ...to...

      static-web-deploy-protocol

      Then write the custom logic to transfer the static Web server asset to the Web server with the protocol you require. Refer to comments in the file for details.

    3. Edit...

      WCBD_INSTALL/static-web-deploy-protocol.private.properties

      ...and add any security-sensitive properties (for example, user names and passwords) that may be required by...

      WCBD_INSTALL/static-web-deploy-protocol.xml

      Properties in this file will be encoded when the deployment process is executed.

    4. Edit...

      WCBD_INSTALL/static-web-deploy-protocol.properties

      ...and add any properties that may be required by...

      WCBD_INSTALL/static-web-deploy-protocol.xml

  2. To set up synchronization script:

    1. Run...

      cd WCBD_DEPLOY_SERVER/wc-server-sync
      cp wcbd-wc-server-sync.private.properties.template ../wc-server-sync-protocol.private.properties
      cp wcbd-wc-server-sync.properties.template ../wc-server-sync-protocol.properties
      cp wcbd-wc-server-sync.xml.template ../wc-server-sync-protocol.xml
      chmod 755 ../wc-server-sync-protocol.*

    2. Edit...

      WCBD_INSTALL/wc-server-sync-protocol.xml

      ...and replace the name attribute of the root project element from...

      wcbd-wc-server-sync

      ...to...

      wc-server-sync-protocol

      Then write the custom logic to transfer the configuration file to the WCS server with the protocol you require. Refer to comments in the file for details.

    3. Edit...

      WCBD_INSTALL/wc-server-sync-protocol.private.properties

      ...add any security-sensitive properties (for example, user names and passwords) required by...

      WCBD_INSTALL/wc-server-sync-protocol.xml

      Properties in this file will be encoded when the deployment process is executed.

    4. Edit...

      WCBD_INSTALL/wc-server-sync-protocol.properties

      ...add any properties that may be required by...

      WCBD_INSTALL/wc-server-sync-protocol.xml

  3. If new functionality is required in the wsadmin deployment process:

    1. Create a new helper wsadmin Jython script...

      WCBD_DEPLOY_SERVER/project-wsadmin-common.py

      ...and add the new methods to the file.

    2. If a modified version of existing helper methods (and any method that may depend on it) is required, copy the target from...

      WCBD_DEPLOY_SERVER/wcbd-wsadmin-common.py

      ...to the new helper wsadmin Jython script, then modify the methods.

  4. To include the new or modified functionality in the wsadmin deployment process:

    1. Copy...

      WCBD_DEPLOY_SERVER/scripts/wcbd-wsadmin.py

      ...as...

      WCBD_DEPLOY_SERVER/scripts/project-wsadmin.py

    2. Modify the logic in...

      WCBD_DEPLOY_SERVER/scripts/project-wsadmin.py

      ...to incorporate the new changes. Ensure that...

      WCBD_DEPLOY_SERVER/scripts/project-wsadmin-common.py

      ...is imported using the execfile method. Refer to comments in the file for details.

  5. If new functionality is required in the build...

    1. Create a new helper Ant build file called...

      WCBD_DEPLOY_SERVER/project-deploy-common.xml

    2. Open the file with a text editor and add the following line after the root project element open tag:

      <import file="${basedir}/wcbd-deploy-common.xml" />

    3. Add new targets to the file as needed. Existing helper target and any target that may depend on it can be overridden as per specification of the Ant import task.

  6. If new security-sensitive properties (for example, user names and passwords) are required for the new changes:

    1. Copy...

      WCBD_DEPLOY_SERVER/wcbd-deploy.private.properties.template

      ...as...

      WCBD_DEPLOY_SERVER/project-deploy.private.properties.template

    2. Add the new properties to the end of the file. Refer to comments in the file for details.

    This file will become the new properties template file for configuration.

  7. If new properties are required for the new changes:

    1. Copy...

      WCBD_DEPLOY_SERVER/wcbd-deploy.properties.template

      ...as...

      WCBD_DEPLOY_SERVER/project-deploy.properties.template

    2. If the new wsadmin script...

      WCBD_DEPLOY_SERVER/scripts/project-wsadmin.py

      ...was created as above, update the property...

      wsadmin.deploy.script.file

      ...to point to the new file.

    3. Add the new properties to the end of the file. Refer to comments in the file for details.

    This file will become the new properties template file for configuration.

  8. If new libraries are required by Ant for the new changes:

    1. Run...

      cd WCBD_DEPLOY_SERVER
      cp wcbd-setenv*.template project-setenv*.template

    2. Update the CLASSPATH variable in...

      WCBD_DEPLOY_SERVER/project-setenv*.template
    These files will become the name setenv template files for configuration.

  9. To include the new or modified functionality in the overall server deployment process, run...

    cd WCBD_DEPLOY_SERVER cp wcbd-deploy.xml project-deploy.xml

    ...then edit...

    WCBD_DEPLOY_SERVER/project-deploy.xml

    ...and change...

    <import file="${basedir}/wcbd-deploy-common.xml" />

    ...to...

    <import file="${basedir}/project-deploy-common.xml" />

    Modify the logic of the server deployment process to incorporate the new changes. Refer to comments in the file for details.

    Customizing the files for...

    ...is performed in the same manner as for the default assets, except that the project-* files are used instead of the wcbd-* files.


What to do next

Once customization is completed, the new files need to be copied to...

WCBD_INSTALL/deploy/server

...on the build system and checked into SCM if applicable, to make your changes are available in subsequent builds.


+

Search Tips   |   Advanced Search