Automatic Deployment - tooltwist/documentation GitHub Wiki

Introduction

Automatic deployment allows the users to schedule automatic deployment to remote servers(e.g. SIT, UAT, Production). It usually setup in Production environment to allow the clients to automatically rollout any adhoc CMS changes.

Pre-requisite

  • Tooltwist Controller has been setup with the corresponding launchpad for deployment.
  • Tooltwist Designer has been setup.
  • Remote server has been setup.

How to Setup Auto-deployment

From the Tooltwist Controller:

  1. Select the specific Launchpad where to setup the auto-deployment.
  2. Click "View Build Log" from the sub-menu.
  3. Click the launchpad name along the top. e.g. Jenkins > launchpad-auto-deploy
  4. Select "Configure" from the drop-down menu list.
  5. Tick "Build periodically" check box.
  6. Set the schedule of auto-deployment.
  7. Apply & save changes.

From the Remote Server:

1.. Create 2 copies of ".fip-destination" in the "server" folder. Name them as ".fip-destination-manual" to be used for manual deployment and ".fip-destination-auto" for auto-deployment.

    $ cd server
    $ cp .fip-destination .fip-destination-manual
    $ cp .fip-destination .fip-destination-auto

2.. Edit ".fip-destination-auto" and replace the value of protected to

    mysql/.*,tomcat/work/.*,tomcat/logs/.*,tomcat/lib/.*,tomcat/endorsed/.*,tomcat/bin/.*,tomcat/conf/.*,tomcat/webapps/elbhc/.*,tomcat/webapps/ttsvr/WEB-INF/.*,protected/.*

This is to add protected folders and files you don't want to be replaced during auto-deployment.

3.. Replace the contents of ".fip-destination" with ".fip-destination-auto"

    $ cp .fip-destination-auto .fip-destination

4.. Run fipserver in the background by appending "&" at the end.

    $ cd ~/serverkit/fip/
    $ ./fipserver -v 39393 &

NOTES: When doing the manual deployment, make sure to replace the contents of ".fip-destination" with ".fip-destination-manual"

    $ cd ~/server
    $ cp .fip-destination-manual .fip-destination

From the Tooltwist Designer:

  1. Make sure to approve any changes you want to be included during auto-deployment.
  2. Don't forget to sync with repository.