5.4 C
Friday, November 17, 2023

Speed up Trade 4.0 Adoption utilizing Containerized Gateway Providers

As a part of the Manufacturing sector’s digitization course of, Trade 4.0 automation drives real-time, information acquisition from industrial gear on the plant flooring. This information and quick suggestions have change into a mission-critical requirement. As well as, current provide chain disruptions have elevated the lead time to acquire edge {hardware} leading to a number of months delays to modernization tasks. A number of the most difficult features of the modernization course of contain organising system connectivity, establishing a number of communication protocols, and buying the fitting {hardware} to deploy at scale and throughout industrial websites. This weblog put up explains how one can deploy a number of situations of edge software program on a single system. On this answer, we deploy one occasion for every surroundings (growth and high quality) to keep away from needing to acquire further {hardware} for every surroundings. The sting software program that we talk about embrace AWS IoT SiteWise Edge utilizing AWS IoT Greengrass because the runtime surroundings and runs in a Docker container. You deploy the software program utilizing the AWS Cloud Growth Equipment (AWS CDK) and the GNU Make utility.


  1. AWS Accounts_ – Two AWS accounts with default Amazon Digital Non-public Cloud (Amazon VPC) subnet configuration. The accounts must have enough AWS Id and Entry Administration (IAM) permissions to launch Amazon EC2 situations, provision IoT Greengrass units, and arrange AWS IoT SiteWise fashions and property. Be aware that the Amazon Machine Picture (AMI) we use within the setup is offered solely within the Northern Virginia (us-east-1) Area. You will want to repeat the AMI for deployment to different Areas.
  2. Set up Docker and Docker Compose in your edge gateway system to construct and deploy containers.
  3. In your native growth machine,
    1. Set up and configure the AWS Command Line Interface (AWS CLI) following the steps offered at Arrange the AWS CLI.
    2. Set up AWS Cloud Growth Equipment (AWS CDK) to provision cloud sources. Consult with the AWS CDK Workshop to realize hands-on expertise utilizing the AWS CDK.
    3. Clone the run-multiple-sitewise-gateways-using-containers pattern repo from GitHub following the steps offered at Cloning a repository.

Resolution Walkthrough

For demonstration functions, let’s contemplate an automotive manufacturing plant with a stamping manufacturing line comprising of two stamping presses. You ingest real-time measurement information from every stamping press into two AWS environments (named growth and high quality) utilizing two situations of the sting software program operating on the identical edge {hardware}.

First, you simulate temperature and strain measurement values each 1 second utilizing Ignition software program put in on an Amazon Elastic Compute Cloud (Amazon EC2) occasion. Subsequent, you create a digital illustration of the 2 stamping presses in AWS IoT SiteWise in each the event and high quality environments.

Lastly, you put together the sting gateway system and deploy two situations of AWS IoT SiteWise Edge. You take a look at the end-to-end information circulate from the Stamping Presses to AWS IoT SiteWise in each the event and high quality environments. Beneath is the structure diagram of the answer that we simply described:

Architecture Diagram of the Solution


  1. Put together your environments

Use two AWS accounts to characterize the event and high quality environments. You possibly can both use current accounts or create new ones.

Be aware: Write down the 12-digit AWS account ID for every account as you have to them within the following steps.

   2. Simulate real-time measurement information for industrial gear

Use the Ignition software program to arrange an OPC Unified Structure (OPC UA) simulator server. Set up the software program on an Amazon EC2 occasion, and configure pattern tags to simulate temperature and strain information for the stamping presses.

   2.1 Select your goal surroundings

Choose the surroundings the place you’ll deploy your cloud sources. First, you select the AWS account that represents your growth surroundings.

Once you return to this part for deploying the answer a second time on the standard surroundings, choose the AWS account that represents your high quality surroundings.

To decide on the goal surroundings, replace the account and area parameters within the iot-factory-cdk/cdk.json file.

Be aware: The Group Amazon Machine Picture (AMI) for Ignition is presently obtainable solely within the us-east-1 Area. In the event you want to deploy the answer in one other Area, you’ll be able to copy the AMI utilizing the steps offered at Copy an AMI.

2.2 Set up Ignition software program

Launch an Amazon EC2 occasion and set up the Ignition software program utilizing AWS CDK. (In a real-world state of affairs, as an alternative of an Amazon EC2 occasion, you could possibly use edge {hardware} inside your manufacturing facility.)

Change the listing to iot-factory-cdk and situation the next command to deploy a CDK stack, which incorporates all of the sources wanted to run Ignition.

cdk deploy OPCUAInstanceStack

Navigate to the AWS CloudFormation Console to confirm the deployment and search for a stack named OPCUAInstanceStack.

Cloudformation Ouptut

Be aware: Write down the EC2IP, EC2PublicIP, and EC2Port parameter values. You’ll use them within the following steps.

2.3 Configure the Ignition software program to simulate information

Now that you’ve got put in Ignition software program, let’s configure it to simulate the information for the stamping presses. (In a real-world state of affairs, Ignition usually collects information from industrial gear, resembling stamping presses, via Programmable Logic Controllers (PLCs).

To configure Ignition, entry an online browser. Enable inbound HTTP visitors to the underlying Amazon EC2 occasion internet hosting Ignition by following the directions at Authorize inbound visitors on your Linux situations. Alternatively, you might contemplate organising port forwarding as demonstrated in this weblog put up to keep away from entry to the occasion from the general public IP tackle by securely create tunnels between your situations.

Launch Ignition utilizing the URL http://<EC2PublicIP> and log in utilizing the default credentials (username: admin, password: password). Substitute EC2PublicIP with the worth famous in step 2.2.

You could need to change the default credentials following the directions at Gateway Safety earlier than continuing.

Now, create a knowledge simulator system to characterize manufacturing line 1 and two stamping presses following the steps beneath:

  • Navigate to Config > OPC UA > Machine Connections.
  • Create a brand new system utilizing Create new Machine > Programmable Machine Simulator > Subsequent and use Manufacturing Line 1 as its identify. Then, select Create New Machine.
  • Load an current program to simulate information for temperature and strain measurements.
    • Select Extra > edit program > Load Simulator Program > Load from CSV choice.
    • Browse to iot-factory-cdk/iot_factory_cdk/stacks/opcua_datasource /simulator_program_instructions.csv and choose Load Simulator Program.
    • Select Save Program.

Your information simulator system is prepared. Ignition begins simulating information for all 4 measurements each 1 second.

3.Create a digital illustration of commercial gear

Create asset fashions and property to digitally characterize your stamping line and two stamping presses.

Situation the next command to deploy a CDK stack. This contains all of the sources wanted from AWS IoT SiteWise.

cdk deploy SiteWiseAssetStack

Confirm the AWS IoT SiteWise sources by navigating to the AWS IoT SiteWise consoleBelongings. It is best to see the property arrange as proven within the following screenshot.

Fig: AWS IoT SiteWise console with assets and asset hierarchy displayed

AWS IoT SiteWise console with property and asset hierarchy displayed

4.Provision the required edge and cloud sources to ingest information from OPC UA Server

Arrange the AWS IoT SiteWise Edge Gateway on the sting gateway system and set up connectivity with the Ignition OPC UA server you arrange earlier.

Replace the iot-factory-cdk/env.sh with the next parameters

  • Surroundings: Any lowercase string that represents your surroundings, resembling dev.
  • OPCUAIP: The IP tackle of the OPC UA server. EC2IP from Step 2.2
  • OPCUAPort: The port used for the OPC UA server. That is the Amazon EC2Port from Step 2.2

Use the next instructions to deploy the sources:

supply iot-factory-cdk/env.sh

cdk deploy IotFactoryCdkStack

Confirm the deployment by navigating to the [AWS CloudFormation Console](https://console.aws.amazon.com/cloudformation/house) and on the lookout for a stack named IotFactoryCdkStack

Cloudformation Stack

4.1 Put together the Docker compose file

Situation the next command to create a Docker compose file.

Make sure you run the script from the identical surroundings the place your ran cdk deploy within the prior step.

The python script depends on parameters from the cdk.out, which is a replica of the asset created by AWS CDK. Learn extra about CDK property at Belongings.

python3 greengrassv2-installation/docker/config_docker.py

Overview the docker-compose.yml file that’s created belowgreengrassv2-installation/dockerlisting.

The docker-compose file comprises a reference to the Docker picture for IoT Greengrass v2, together with the required configurations resembling surroundings variables, file path for the certificates required for IoT Greengrass v2 to register a core system.

4.2 Construct a Docker picture and run the container

Be aware: You could copy the greengrassv2-installation/docker folder to your edge gateway system as a result of it comprises the required configurations and certificates to register the IoT Greengrass v2 core system.

Situation the next instructions on the sting gateway system the place the Docker daemon runs. It usually runs on edge {hardware} in your on-premises information middle that has community connectivity with each your information supply (Ignition or any OPC UA suitable server) and the AWS Cloud.

Situation the next to construct a Docker picture

cd greengrassv2-installation/docker/

make construct

Run the Docker container

cd greengrassv2-installation/docker/

make begin

4.3 Enable incoming visitors to the OPC UA server

Enable incoming connections from the AWS IoT SiteWise gateway (operating on the sting gateway system) to the Ignition OPC UA server.

Consult with the Gateway Port Reference to know the ports you have to open.

5.Validate the Information Movement

To date, you deployed and configured all of the sources wanted to gather information out of your industrial gear at edge and ship it to AWS IoT SiteWise. Now, take a look at the end-to-end information circulate utilizing the AWS IoT SiteWise console.

  • Navigate to AWS IoT SiteWise console > Belongings.
  • Navigate to Sample_Site1 > Sample_Area1 > Sample_Line1 > Pattern StampingPress1.
  • Swap to the Measurements tab and search for values below the Newest worth column.
  • Be certain that you discover the real-time temperature and strain values.
  • Repeat these steps for the Pattern StampingPress2 asset.

6.Create a brand new system simulation for the High quality surroundings

Repeat steps 2 via 5 within the second AWS account to characterize your High quality surroundings.

After you validate the outcomes, you’ll be able to delete the deployed CDK stacks to keep away from incurring further prices.

  • cdk destroy IotFactoryCdkStack
  • cdk destroy SiteWiseAssetStack
  • cdk destroy OPCUAInstanceStack


On this weblog, you discovered how you can use a single edge gateway system for a number of environments, resembling growth and high quality. This answer prevented the necessity to dedicate further {hardware} to every surroundings. Whereas finishing the method, you deployed a number of situations of the software program on the identical edge system – one occasion for every surroundings. Utilizing the sting software program, you had been in a position to ingest real-time information from an OPC UA server on the edge and ship it to AWS IoT SiteWise. To Be taught extra, checkout AWS IoT SiteWise Assets.

Creator biographies

Latest news
Related news


Please enter your comment!
Please enter your name here