make Nebulaworker to update container if a Flag is set

9 views
Skip to first unread message

Mohammadjavad Ranji

unread,
Oct 15, 2019, 7:45:44 AM10/15/19
to nebula-or...@googlegroups.com
Hi Guys,

Problem:
I an novice to Nebula, I had implemented nebula in my server and worker
in my device. now I need to give the possibility to worker that when
the update from nebula manager is released, check a flag and if the
flag is set then fetch and replace the new version of container on the
device, Else do not update the new version unless the worker recieve a
trigger or the flag is set.

Questions?

1- I really dont know where should I start. is there such capability
now in worker?

2- should I manipulate worker.py in worker container based on my
need?3- if I done question 2. how do I make the iot devices to install
the new worker? i mean how should I create new worker with edited
worker.py

Thanks in advance.
emjay

naor livne

unread,
Oct 15, 2019, 7:50:53 AM10/15/19
to Mohammadjavad Ranji, nebula-or...@googlegroups.com
Hi Mohammadjavad,

I think a good starting point for you will be to read up on how to create docker images as the Nebula worker is just a Docker image (https://docs.docker.com/get-started/part2/ is an example tutorial), after that you'll need to edit worker.py to include the flag logic you desire then build a new container, publish it to a Docker registry (https://hub.docker.com/ is my personal recommendation but any registry will work, https://docs.docker.com/docker-hub/repos/#pushing-a-docker-container-image-to-docker-hub) and then you can just run the new image you created as part of the docker run command used to set up the worker rather then the official worker.

--
You received this message because you are subscribed to the Google Groups "Nebula-orchestrator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nebula-orchestr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nebula-orchestrator/ef9327626122ff5f442eda1802904b00eb7b8f59.camel%40gmail.com.
Reply all
Reply to author
Forward
0 new messages