ThingWorx Azure IoT Hub Connector for Microsoft Azure Industrial IoT (IIoT) for OPC UA > Step 5. Setting Up the ThingWorx Azure IoT Hub Connector
Step 5. Setting Up the ThingWorx Azure IoT Hub Connector
If you have not already done so, you need to install, configure, and start the ThingWorx Platform. Refer to Installing ThingWorx in the ThingWorx Platform Help Center.
This topic provides an overview of the steps in the section, Getting an Azure IoT Hub Connector Up and Running and points out the steps in which there are specific instructions for the Azure Industrial IoT OPC UA integration.. Make sure that you follow all of the steps as indicated here. The connections between the Azure IoT Hub and the Connector and between the Connector and ThingWorx Platform are defined in these steps.
Steps for the ThingWorx Azure IoT Hub Connector
You need to set up the ThingWorx Azure IoT Hub Connector. Follow the steps in the Getting an Azure IoT Hub Connector Up and Running section of this help center. The topics in this section include information specific to using the Connector for OPC UA:
1. Step 1. Create and Configure Items in Azure IoT — Since deploying the dependent Azure resources to your resource group in Azure Industrial IoT creates the entities for you, you do not have to create the entities discussed in this Step, However, you should make sure that you have the following configuration settings for your Azure IoT Hub and Azure Blob Storage container to use for configuring these entities in ThingWorx:
The name of your Azure IoT Hub
The consumer policy connection string for your IoT Hub
The registry policy connection string for your IoT Hub
The name of your Azure Blob Storage Account
The connection string for your Blob Storage container
The name of your Azure Blob Storage container
The name of your Event Hub and its Event Hub compatible endpoint
2. Step 2. Download and Extract the Azure IoT Hub Connector — Information for downloading ThingWorx Kepware Server, known as ThingWorx Industrial Connections in the Software Downloads pages, has been added to the procedure.
3. Step 3. Import the Extensions — You must import the two extensions provided in the Connector distribution into ThingWorx Platform before starting the Connector. The extensions create entities that the Connector needs and that you need to configure for the end-to-end connections to work.
4. Step 4. Create Security Entities for the Connector — To communicate with the ThingWorx Platform, the Connector requires security entities to be set up in ThingWorx Composer. Be sure to follow these steps as is. There is nothing special needed for the Azure Industrial IoT OPC UA integration.
5. Step 5. Create Azure IoT Entities in ThingWorx Composer — Make sure you create the entities required for the Connector. Configuring the Azure IoT Hub is critical to the integration. For example, the connection string properties enable the Connector to connect using SSL to the Azure IoT Hub. For OPC UA, there is a step to configure properties under AzureOpcUa in the Configuration page for the Azure IoT Hub Thing.
6. Step 6. Configure the Connector — Depending on the ThingWorx Platform environment you are using, select the appropriate configuration topic:
Single Server ThingWorx Platform — Minimal Configuration for Connecting to a ThingWorx Platform in Single-Server Mode. After reading the pre-requisites, follow the instructions in the topic. The steps include a step for enabling OPC UA for the Connector. You should not need to configure optional properties for the Connector; choose what is best for your environment. Then continue to Step 7 to encrypt the configuration file for the Connector.
ThingWorx High Availability (HA) Clustering — High Availability Configuration. After reading the pre-requisites, follow the instructions to set up the Connector in an HA environment. The steps include a step for enabling OPC UA for the Connector. You should not need to configure optional properties; choose what is best for your environment. Then continue to Step 7 to encrypt the configuration file for the Connector.
7. Step 7. Encrypt the Configuration File — For best security practices, encrypt the configuration file for the Connector. There is nothing specific for the OPC UA integration here. This procedure is the same whether or not the Connector is serving an OPC UA integration.
8. Step 8. Set the Environment Variables for the Azure IoT Hub Connector — You must point environment variables to the configuration file for the Connector and to the configuration file for Logback. This procedure is the same whether or not the Connector is serving an OPC UA integration.
9. Step 9. Run the Service to Grant Permissions and Visibility to the Connector — This step is critical for communications between the Connector and a ThingWorx Platform, whether or not it is used for OPC UA integration.
10. Step 10. Start the Azure IoT Hub Connector — Assuming your ThingWorx Platform and Microsoft Azure Industrial IoT environment are up and running, start the Connector to enable communications from the OPC UA Server on one end of the OPC UA integration through Azure IIoT in the middle to the Connector and finally to the ThingWorx Platform.