cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

ThingWorx Analytics 8.0/8.1 - Installing using the Linux Docker-based installer on CentOS 7

No ratings

Preface

This guide applies to a clean installation of the CentOS 7 Minimal distribution. This is labeled as "Minimal ISO" on the CentOS.org website and the filename of the iso image used to install the operating system will resemble "CentOS-7-x86_64-Minimal-1611.iso." The machine used in this guide was a virtual machine created using Oracle VirtualBox but the same steps should apply to any machine with a clean CentOS 7 Minimal install. It is however possible that some installations may encounter slight variations due to hardware configurations.

Before starting

Unzip the downloaded "MED-..._ThingWorx-Analytics-Server-Linux-Standalone-8-0-0.zip".  Inside the unzipped directory you will find a file called "ThingWorxAnalyticsServer-8.0.0-linux-x64-installer.run". Before running step number 10, upload that file to your CentOS machine using a SFTP SCP tool of your choice.

Configuration and installation steps

Step 1: Install Docker with the following commands (these steps are presented at https://docs.docker.com/engine/installation/linux/docker-ce/centos/#install-using-the-repository😞

yum install -y yum-utils device-mapper-persistent-data lvm2

yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

yum makecache fast

yum -y install docker-ce

Step 2: Create a group called docker (If this command reports the group already exists, that is ok. You can move to the next step):

groupadd docker

Step 3: Add your non-root user to the docker group, in this example my non-root user is called "thingworx", please replace with the correct username:

usermod -aG docker thingworx

Step 4: Start the Docker service and enable it to auto start after reboot:

systemctl start docker

systemctl enable docker

Step 5: Verify that docker is working:

docker ps

Step 6: After running the above command you should see a single line output that resembles the following:

"CONTAINER ID        IMAGE              COMMAND            CREATED            STATUS              PORTS              NAMES"

Step 7: Disable selinux with the two following commands. Note by doing this you will want to make sure if this is a public facing server that you take appropriate security measures to lock down the system.

setenforce 0

sed -i -e 's/SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux

Step 8: Set the hostname of your machine to something otherthan the default which is "localhost.localdomain".  In this case I am using the name "centos", this can be replaced with a name of your choosing:

hostname centos

echo "centos" > /etc/hostname

Step 9: Allow traffic through the default CentOS firewall.  Note that in a production environment, the firewall should be configured more granular to allow incoming traffic to only the required ports (5432, 2181 and 8080). Please refer to CentOS documentation and consult security best practices within your organization for more information. The following commands will completely disable the CentOS firewall.

systemctl disable firewalld

systemctl stop firewalld

Step 10: Ensure the ThingWorx Analytics Server installer is executable then run the installer. You may have to change to the directory where the installer was uploaded to the machine, in this case I have it in the home directory of the user named thingworx.  Please replace that path with the correct path for your machine.  Note below are 3 separate commands.

cd /home/thingworx

chmod +x ThingWorxAnalyticsServer-8.0.0-linux-x64-installer.run

./ThingWorxAnalyticsServer-8.0.0-linux-x64-installer.run

Step 11: Verify that the ThingWorx Analytics Server installation is successful. Note that it may take a few minutes for the system to become available. Retry the command after a few minutes if an error is initially encountered.

curl http://127.0.0.1:8080/analytics/1.0/about/versioninfo

NOTE: The response from the above command should resemble the following: {"implementationVersion":"8.0.0"}

Comments

Great document.

But when I restart the VM, the containers don't run automatically, i.e. I have to run

     docker start community_postgres zookeeper gridworker1 analytics

manually.

How would I run this automatically on machine restart?

Roman,

You can set the auto start using the following command:

sudo /opt/ThingWorxAnalyticsServer/launcher/launcher -option=start -label=TAS


You can confirm that the label TAS is the correct one with the command:

sudo docker ps -a --format="table {{.ID}}\t{{.Labels}}\t{{.Image}}"

For reference, we have an article on the knowledge base that contains this information, that can be found here

Regards,

Neel

There is an installer for Docker CE on AWS that sets up a Managed Docker env on AWS.

Neel, could you help me run the Foundation Docker installer in AWS? We are a big TWX partner and could use your help if you work for TWX.

Eric,

 

I am with the Analytics group, but they have a technical blog similar to mine for a Foundation installation, which can be viewed here

 

Regards,

 

Neel

Version history
Last update:
‎Aug 31, 2017 10:35 AM
Updated by:
Labels (1)