Two Isolated Containers Deployed in OptixEdge

Home / FactoryTalk Optix / OptixEdge Advanced Edge Gateway

Description
Learning how to deploy two isolated containers: InfluxDB 2.0 and Grafana in Optix Edge thru Portainer and interconnecting them. The trick is to use a common docker network to allow each one sees the other.

Download the sample code here:
https://github.com/xavierflorensa/FactoryTalkOptix_Gaussian_distribution

Contributed by Xavier Florensa – YouTube – LinkedIn – GitHub


Transcript
(00:01) Hi everyone. In this video, I will show you how to deploy Influx DB and Grafana with Docker and Portainer in the Optics Edge. So, let’s go to the Portainer environment. this port 9,000 and here we have a running docker instance of graphana and influx DB to have both this running you can start in templates go to application look for your influx DB like this one and then give a name uh username.
(00:55) Let’s username password organization and the bucket name for instance of edge. Then you deploy the stack. You just need the password here. you can deploy it and you will have your docker container of influx db running. Same with um let’s go to cancel this one. Let’s go to search for Grafana and then same if name and username password I just deploy the stack.
(01:54) Once you do this you will have those running containers. But the problem is that if you try to connect the graphana to the influx DB since they are isolated containers, they don’t see each other. Uh then you have to create a new network. You create a new network like this common influx db graphana. And then here we have those dockers containers that see one to the each other.
(02:42) And when you open of course uh we have here the optics application with a variable that it’s running in giving a value from 0 to 10 a random value with a Gaussian distribution. When you try to connect the graphana here we have the data. Okay. Each time I refresh we have one more count. So when you go to data sources to make the connection, you have to use the name here not local
(03:47) host or the IP address of the optics of instead you have to use the name of the docker instance concerning influx DB. Okay, now this is work working. Another issue I had with organization. When I put organization name, this was not working. But you just copy this organization name and then you can connect like this.
(04:26) So now it’s fine running the success. So here we have all our influx DV running with our influx DV with the dashboard interesting dashboard with so many statistical process control like the mean median variance standard deviation etc delta difference and And this is all running in the optics edge.
(05:06) This is the address of the optics edge. This is the address of the optics edge. And for the value random value, this is the address of the optics edge. Okay. Here on the application, you can take a look at the remote influx DB. This is the address of the optics edge port. um organization and bucket and in the data logger. Well, here you have variable to sample and in the data logger as store you have the remote influx database.
(05:53) Okay, variable. So this is all. I hope you enjoy. Thank you very much.