My experience running the pms_agent under Ubuntu Core 18

BTW, I was able to manually setup a python3 docker container from scratch just checking if it can works under Ubuntu Core 18, and what I can say IT WORKS :slight_smile:

The only thing I am missing is timedatectl! Can you use tzdata instead?
Solved by using -v /run/dbus/system_bus_socket:/run/dbus/system_bus_socket:ro

Can you build a docker container and release it on GitHub or should I provide one that other can easily use inside IoT OS like Ubuntu Core 18?

I like it better than the native pms_agent service, the docker contains everything it needs for that specific task.

root@0839a11ed79c:/opt/sixfab/pms/agent# python3 -u agent.py
Sending CONNECT (u1, p1, wr1, wq0, wf1, c1, k30) client_id=b’device/’
Received CONNACK (0, 0)
Connected to the server
Sending SUBSCRIBE (d0, m1) [(b’/device/…censored_uuid…/directives’, 0)]
Sending SUBSCRIBE (d0, m2) [(b’/device/…censored_uuid…/status’, 0)]
Sending PUBLISH (d0, q0, r1, m3), ‘b’/device/…censored_uuid…/status’’, … (19 bytes)
Received SUBACK
Received SUBACK
Received PUBLISH (d0, q0, r1, m0), ‘/device/…censored_uuid…/status’, … (20 bytes)
Sending PUBLISH (d0, q0, r1, m4), ‘b’/device/…censored_uuid…/status’’, … (19 bytes)
Received PUBLISH (d0, q0, r0, m0), ‘/device/…censored_uuid…/status’, … (19 bytes)
Received PUBLISH (d0, q0, r0, m0), ‘/device/…censored_uuid…/status’, … (19 bytes)
Sending PUBLISH (d0, q0, r0, m5), ‘b’/device/…censored_uuid…/feed’’, … (134 bytes)
Received PUBLISH (d0, q0, r0, m0), ‘/device/…censored_uuid…/directives’, … (58 bytes)
Received PUBLISH (d0, q0, r0, m0), ‘/device/…censored_uuid…/directives’, … (58 bytes)
Sending PUBLISH (d0, q0, r0, m6), ‘b’/device/…censored_uuid…/feed’’, … (135 bytes)
Sending PUBLISH (d0, q0, r0, m7), ‘b’/device/…censored_uuid…/feed’’, … (135 bytes)
Sending PUBLISH (d0, q0, r0, m8), ‘b’/device/…censored_uuid…/feed’’, … (134 bytes)
Sending PINGREQ
Received PINGRESP
…

UPDATED: Could build the docker container using a docker file for Ubuntu Core 18 without building a snap. It is more a workaround, it uses local bind mount volumes for libs and integrates timedatectl into the docker container itself.

d59589eaa2a3   giminni/pmsagent_armhf:latest 
  "/usr/local/bin/entr…"   7 hours ago   Up 7 hours  pmsagentp01

Working on building a docker container with external timedatectl reference.

My question to the devs, can we avoid the usage of timedatectl?