The OPC UA Agent image has been built on Docker 18.03.0-ce and it can be deployed using the following instructions.
version: "2.3"
services:
iotage:
hostname: iotage
image: beincpps/opcuaage:latest
networks:
- hostnet
- iotnet
ports:
- "4001:4001"
- "4081:8080"
depends_on:
- iotmongo
volumes:
- ./AGECONF:/opt/iotagent-opcua/conf
iotmongo:
hostname: iotmongo
image: mongo:3.4
networks:
- iotnet
volumes:
- iotmongo_data:/data/db
- iotmongo_conf:/data/configdb
volumes:
iotmongo_data:
iotmongo_conf:
networks:
hostnet:
iotnet:
Before running containers you must create an AGECONF subdirectory in the same directory as the docker-compose.yml file and create in it a config.properties file based on the following template:
namespace-ignore=2
context-broker-host=<ORIONHOSTIP>
context-broker-port=<ORIONPORT>
server-base-root=/
server-port=4001
device-registry-type=memory
mongodb-host=iotmongo
mongodb-port=27017
mongodb-db=iotagent
mongodb-retries=5
mongodb-retry-time=5
fiware-service=<SERVICE>
fiware-service-path=<SERVICE-PATH>
provider-url=http://iotage:4001
device-registration-duration=P1M
endpoint=opc.tcp://<IPADDR>:<PORT>
log-level=DEBUG
#DATATYPE MAPPING OPCUA --> NGSI
OPC-datatype-Number=Number
OPC-datatype-Decimal128=Number
OPC-datatype-Double=Number
OPC-datatype-Float=Number
OPC-datatype-Integer=Integer
OPC-datatype-UInteger=Integer
OPC-datatype-String=Text
OPC-datatype-ByteString=Text
#END DATATYPE MAPPING OPCUA --> NGSI
#SESSION PARAMETERS
requestedPublishingInterval=500
requestedLifetimeCount=1000
requestedMaxKeepAliveCount=5
maxNotificationsPerPublish=10
publishingEnabled=true
priority=10
#SERVER CERT E AUTH
securityMode=NONE
securityPolicy=
userName=
password=
#Administration Services
api-port=4081
#End Administration Services
#POLL COMMANDS SETTINGS
polling=false
polling-commands-timer=30000
pollingDaemonFrequency=20000
pollingExpiration=200000
#END POLL COMMANDS SETTINGS
#AGENT ID
agent-id=<PREFIX>
You can set the properties according to your environment, but you should focus at least on:
context-broker-host=<ORIONHOSTIP>
context-broker-port=<ORIONPORT>
fiware-service=<SERVICE>
fiware-service-path=<SERVICE-PATH>
endpoint=opc.tcp://<IPADDR>:<PORT>
agent-id=<PREFIX>
docker-compose up -d
docker-compose down
The docker-compose is the preferred method for starting multiple containers and creating related resources, but alternatively you can use the following commands:
docker run -d --name iotmongo -h iotmongo -v iotmongo_data:/data/db -v iotmongo_conf:/data/configdb mongo:3.4
docker run -d --name iotage -h iotage -p 4001:4001 -p 4081:8080 --link iotmongo -v ./AGECONF:/opt/iotagent-opcua/conf beincpps/opcuaage:latest
Content type
Image
Digest
Size
589.8 MB
Last updated
almost 8 years ago
docker pull beincpps/opcuaage