IIoT Developers Rejoice! Run ThingWorx as Docker Containers

Written By: Ayush Tiwari
  • 10/18/2018
IIoT Developers Rejoice! Run ThingWorx as Docker Containers

“Gartner predicts that, by 2020, more than 50% of global organizations will be running containerized applications in production, up from less than 20% today.”

 Many enterprise organizations are beginning to appreciate the significant advantages that containers bring to the way they build, ship and run applications. Because containers are in many ways a step change in how we deliver applications, today, nearly every IaaS/PaaS provider from Amazon to Google supports Docker. PTC is at the forefront of this change empowering the digital transformation of enterprises using the ThingWorx Industrial Innovation Platform. 

Why Use ThingWorx Docker Containers?

1. Local Demos, App Development and Team Collaboration

Fig 1: Team collaboration

Since its release in 2012, Docker has become one of the fastest-growing technologies in DevOps and web development. As a Docker Container is a complete file system that packages everything needed to run an application including the code, runtime, system tools, system libraries and settings, it provides workload isolation while sharing the OS. Dependencies or settings within a container will not affect any installations or configurations on your computer, or on any other containers that may be running. By using separate containers for each component of an application (for example a web server, front end, and database for hosting a web site), you can avoid conflicting dependencies. You can also have multiple projects on a single server without worrying about creating conflicts on your system. This enables developers and operations engineers to become more efficient by freeing up time to concentrate on more value-producing activities.

Docker is also greatly used for demo purposes to reduce the install time and setup complexity. Often, the final software stack required in building a complete end-to-end IoT solution becomes heavy and bulky. Docker images are handy and act as an ideal way to package and demo these applications through laptops or remote systems.

2. Improving DevOps and Continuous Integration/Continuous Deployment (CI/CD)

The freedom to run your applications across multiple IaaS/PaaS without any extra tweaks is the ultimate dream that Docker can help you achieve. It simplifies the configuration and greatly reduces the complexity in managing the DevOps of complicated IoT solutions. Additionally, the lightweight profile of containers and their ability to spin up and down quickly make them compatible with automated continuous integration and automated testing environments for rapid software development and release. This enables:

  • system administrators and developers to run several versions of an application on the same server without interference
  • software delivery cycle times to decrease, allowing applications to be shipped earlier and more frequently
  • environments to become more consistent, driving up quality and efficiency in the software development processes
  • workloads to become more portable across servers and hosts, simplifying maintenance and improving infrastructure agility

Fig 2: Application development lifecycle pipeline illustration

3. Save Costs While Hosting Multiple ThingWorx Instances

For OEM vendors or PTC partners and customers who host many ThingWorx instances for their end users, managing large DevOps environments can be a pretty complicated and daunting task. Let’s look at a relatively simple ThingWorx deployment for a single customer on an Azure VM.

Fig 3: ThingWorx deployed as containers on Azure Virtual Machines



Let’s say you have a ThingWorx Foundation server and a database server at the very least. You may also want to use the PTC System Monitoring (PSM) tool to monitor your ThingWorx logs and server metrics. Now, if you’re running this in a High Availability environment, you’d also need Zookeeper for leader election, a load balancer for balancing the data load between ThingWorx servers, and Pgpool to achieve database-level High Availability. (For all High Availability details, please refer to our ThingWorx 8 High Availability Guide.)

Fig 4: Many ThingWorx instances running as containers

Now, deploying this system each time to host your end customers could quickly become complicated and cause a hit to your wallet. So, containerizing ThingWorx-based solutions and running them using container orchestrators (e.g., Kubernetes, OpenShift or others) would increase your margins in your infrastructure management. Machine utilization goes up due to dynamic allocation of containers, which, over time, can reduce DevOps costs as you consolidate your infrastructure. Stronger security can be achieved through process isolation and control of resources. Increased resilience and robustness in your platforms can be achieved, and developers and operations engineers can improve efficiency by focusing on the more important tasks.

What Does PTC Provide to Support Containerization?

The ThingWorx Foundation platform now supports Docker container images as a delivery medium to enable our developer ecosystem to build, run, test, and deploy their IIoT solutions as containerized applications. PTC provides the ability for IIoT developers to create their own Docker images using PTC-supported Dockerfiles, scripts, and reference guides. To further enable the developer ecosystem, we are publishing how-to blog posts on how to deploy and manage Docker containers using container orchestrators such as Kubernetes, OpenShift, Azure Kuberntes Service (AKS), and others. Please read these FAQs for a quick overview on our Docker support.

Where Can I Learn More?

You can start building ThingWorx Docker images by downloading relevant artifacts from https://support.ptc.com. Here is a reference guide to help you build ThingWorx Docker images and use proper testing processes. For a quick overview about the product and roadmap, please read our FAQs and blog post on how to deploy ThingWorx Docker images on a Kubernetes environment. You will find short how-to videos to help you out further.

  • Augmented Reality
  • Industrial Internet of Things
  • Industrial Equipment
  • Oil and Gas

About the Author

Ayush Tiwari

Ayush Tiwari is a Sr. IoT Product Manager at ThingWorx, PTC who focuses on containerization, storage, high availability, upgradability, and scalability aspects of the IIoT solutions platform. With his previous experience in software development and interests in Cloud, he is currently leading the strategy to build the next generation of the ThingWorx SaaS platform on Azure.

Ayush holds an engineering degree from the University of Mumbai, and an MBA from Babson College, Massachusetts, and currently works from the PTC Waterloo, Canada office (EST). He can be reached at atiwari@ptc.com or through LinkedIn.