Please note that the below configuration is intended for testing purposes only.  Make sure that your final deployment is within your business security policies.

 

The installation guide can be found at: http://support.ptc.com/WCMS/files/173161/en/ThingWorxDockerInstaller.pdf

 

Postgres:

  • Reference the Installation Guide above for a supported version of Postgres
  • Once deployed, configure it to support remote connections:
    1. Navigate to: <PostgresInstallPoint>\data
    2. Open the following with a text editor: pg_hba.conf
    3. Find the line with IPv4 local connections
    4. Change 127.0.0.1/32 to 0.0.0.0/0
    5. Restart PostgreSQL server
  • NOTE: This could open up security vulnerabilities to the database, so make sure you take appropriate security measures if the data will be sensitive

 

Docker:

  • Find the appropriate Docker platform for your OS
    • Docker Community Edition
      • For Windows Server 2016, there is a download for the Edge (Windows Server 2016) under the above link -> Docker CE for Windows -> And then scroll down a little bit
    • Docker Toolbox
      • If you try to deploy the Docker Community Edition on a system that doesn't support, it will direct you to this installation instead
  • At some point during or after the installation, it will prompt you to enable Hyper-V
    • If this is a physical server, these settings will be in your Bios
    • For VMWare, while the VM is powered down, go to VM-> Virtual Machine Properties -> Hardware -> Processors -> Enable 'Virtualize Intel VT-x/EPT or AMD-V/RVI'
      • HyperV.jpg
  • Restart, and make sure Docker is running (whale icon in your system tray for the Windows Server 2016 edge version)
  • With Docker running, open a command prompt and look at your IP settings
    • For windows Server 2016, right click the start menu -> Command Prompt (admin) and run IPCONFIG
  • Write down the IP assigned to DockerNAT, as this is will be your Postgres HOST later
    • IPConfig.jpg
  • Share your main drive with Docker
    • In Windows Server 2016, right click the docker icon in the system tray -> Settings -> Shared Drives -> C:
      • SharedDrive.jpg

 

 

Thingworx Installation:

  • At this point you should have Docker installed and Postgres remotely configured with only the admin user (postgres)
    • The installer will create the image/container inside of Docker, Install Tomcat, and configure your database
  • Below is a capture of the settings used in the above screenshots.  Anything not listed (like specifying the container name, which is twxfoundation by default) was left as the default values:

 

      Installation Directory: C:\Program Files (x86)\twxEnterpriseFoundationPostgresDocker

      ThingWorx License Directory: C:\Users\Administrator\Desktop\license.bin

      Local ThingWorx Foundation Port: 8080

      Java Initial Heap setting for TWX Foundation: 1024

      Java Max Heap setting for TWX Foundation: 2048

      RDS Instance: 1

    PostgreSQL Host: 10.0.75.1

      PostgreSQL Port: 5432

      PostgreSQL Admin Schema: postgres

      PostgreSQL Admin Username: postgres

      PostgreSQL Admin Password: <see note>

      PostgreSQL ThingWorx Foundation Schema: thingworx

      PostgreSQL ThingWorx Foundation Username: thingworx

      PostgreSQL ThingWorx Foundation Password: <see note>

      PostgreSQL ThingWorx Tablespace Location: /

 

                    NOTE: It is highly recommended to use a complex password (Letters of all cases, numbers, and symbols) as we have opened up our database to remote connections

 

  • RDS was set to Yes (Default is no)
  • PostgreSQL Host is the IP taken from the earlier steps
  • In this example, the Tablespace location is defined inside of Docker, not Windows

 

Post Install:

 

 

Troubleshooting:

 

 

  • If the installation fails, refer to the end of the Installation Guide on where to look for logs, and items that need to be cleaned up before attempting to install again
  • If the install was successful, but connecting fails, run the following in the command prompt to look at the Docker Server's startup logs for hints:
    • Docker logs -f twxfoundation
      • *Note that twxfoundation is the default during installation.  If this was changed in your installation, use that instead