5 Replies Latest reply on Jan 14, 2016 8:25 AM by adamlev RSS
    adamlev Explorer

    Multiple ThingWorx instances on a single OS instance

    All,

     

    I was wondering if anyone has a way to run more than one instance of the ThingWorx platform/composer on a single operating system.

     

    The way I understand it, a ThingWorx install always creates the ThingWorxStorage and ThingWorxBackupStorage folders in the same place, making it impossible to deploy more than one ThingWorx webapp on the same machine.

     

    We need to create a multi-tenant environment where students frequently create, and destroy ThingWorx instances. 

     

    Currently, we use virtualization, but that means each ThingWorx instance has to include an operating system, Java, Tomcat, etc....  Most of our resources are just supporting extra operating systems, which could be shared among all of the instances.

     

    Does anyone have a workaround that can accomplish this?

     

    -->Adam

      • Re: Multiple ThingWorx instances on a single OS instance
        aanjan Heavyweight Champ

        Adam, you can modify the location of the ThingWorx Storage folder. Here is a link to the Help Center document on how to do so. I personally have two instances running on my local system; ThingWorx 5.4 running on Tomcat 7 (port 80) and ThingWorx 6.5 running on Tomcat 8 (port 8080), although I run only one instance at a time.

        • Re: Multiple ThingWorx instances on a single OS instance
          moritzvonh Creator

          Adam, there is an OS Env variable THINGWORX_PLATFORM_SETTINGS that drives where Tomcat will pick up the platform-settings.json and modelproviderconfig.json. These files then drive the location of the Storage and BackupStorage folders and the database connection (if you use Postgres).

          For multiple independent TWX instances on the same host you'll need multiple tomcat instances running on different ports. You can drive this setting from TOMCAT_HOME/conf/server.xml . Furthermore tomcat has a nice mechanism to start up with custom OS Env params: you can simply add a sentenv.bat (or setenv.sh) to TOMCAT_HOME/bin with a content like:

          set THINGWORX_PLATFORM_SETTINGS=D:\PTC\Thingworx\PlatformSettings\6.5

          and this Thingworx Tomcat instance will start up with its own platform settings.

           

          I use this mechanism myself to run multiple versions of ThingWorx with different databases on my laptop.