Comments (9)
I'm currently working on the next generation of Nebula (which is more or less a complete overhaul of the system architecture) & one of the changes in it is to move to a concept of "device groups", basically rather then having each device configured with a list of apps that are needed to manage on that device you start the device with a single "DEVICE_GROUP" envvar and then you have a special API endpoint in the manager which allows you to add\remove apps to that device group, every app you add\remove to that endpoint automatically gets started\removed on all devices that are configured to be part of that DEVICE_GROUP.
this also means that in 2.0.0 (which I'm expecting to be out in the next couple of weeks at most) APP_NAME will be deprecated & you will have the ability to add\remove apps from devices in a single API call.
With that feature allowing the core ability of having the to add\remove apps from running devices in a single API call I see allowing wildcard apps in the device groups as something that's more of a convenient then a necessity so if anyone wants to work on adding it I will be more then happy to include it but otherwise I'm going to keep that request as a low priority as 2.0.0 got my hands full at the moment.
from worker.
this sounds great. looking forward to 2.0!
from worker.
FYI @phynias I released 2.0.0 today if you want to check and see if it matches your use case - take into account pretty much everything changed between 1.6.0 to 2.0.0 so if you go down the route best you treat it as a fresh install (API changed, no RabbitMQ as worker uses the manager REST API to get latest status, device_group added and made mandatory & so much more).
from worker.
grabbed it and started playing around.
i can't figure out how to update a device-group though.
i tried to cli and when i do an update it seems like it is doing a create (error says device group already exists.
even the help looks like create
**create create a new nebula device_group**
delete delete a device_group
info list a device_group
list list all device_groups
**update create a new nebula device_group**
and when i try via api with http://127.0.0.1/api/v2/device_groups/wizr/update i get a 401
from worker.
also when i delete the device-group and re-create it, the workers can't seem to recover.
when i delete it the workers all say this
starting device_group wizr /info check loop, configured to check for changes every 30 seconds
Traceback (most recent call last):
File "/worker/worker.py", line 285, in <module>
for remote_nebula_app in remote_device_group_info["reply"]["apps"]:
KeyError: 'apps'
...and then just get stuck there.
from worker.
i take it back the cli works (the help just needs to be updated)
still can't figure out the api though
from worker.
Seems to me we have a few problems:
- the help in the CLI being wrong on the update field.
- the device_group update API documents being wrong, it's missing /update at the end of the path
POST /api/v2/device_groups/device_group_name/update HTTP/1.1
Host: localhost:5000
Authorization: Basic <your-token-here>
Content-Type: application/json
Cache-Control: no-cache
{
"apps": [
"test",
"test123"
]
}
- as for deleting then recreating the device_group getting stuck that's a major issue due to a very stupid mistake on my part, I simply forget to wrap a loop with a try\except and actually make that part fail hard like the previous nebula versions, it should fail and kill the container (for it to be restarted by the --restart flag of docker) rather then get stuck.
if your still having problems with the API device_group update please open a ticket with the full HTTP request your trying and I'll help you figure it out, I know that the API works as the CLI uses it and you say it works (well it uses the Python SDK which in turn uses the API).
I'll push a fix to the 3 problems found tomorrow, too late to code right now (feel free to call dibs on fixing any of them though).
Thanks for providing QA but in the future can you open a ticket for new issues rather then piggybacking on an existing ones? it will help future users find the problems (and hopefully jump in and help) much easier.
from worker.
pushed the fixes we talked about to latest and released 2.0.1 with them, let me know if you notice any other issues.
from worker.
With the new device_group concept & the deprecation of APP_NAME the need for wildcard app_name became redundant so closing this ticket, if you still see a need to have something similar inside the device_group concept please open a ticket about it with the reason it is still needed with the new design & we'll figure something out.
from worker.
Related Issues (20)
- Connecting to a nebula managr hosted at a non root path HOT 3
- Query about a container running standalone script !! HOT 3
- Dependabot couldn't authenticate with https://pypi.python.org/simple/ HOT 1
- Prune image API not working HOT 3
- Cron jobs do not work per schedule if its frequency is shorter than the check-in time of worker HOT 2
- Build breaking due to unavailable package `freeze` HOT 3
- Add automated unit tests HOT 2
- Move automatic Docker imags build from Docker Hub to Travis-CI HOT 1
- have worker have the option to connect to the managers with a UUID token instead of basic auth HOT 1
- Self update worker container on deployed remote devices HOT 11
- Add cron jobs management support HOT 1
- Auto match version to branch on deployment and have it part of the report generated for the optional reporting system HOT 1
- fix creating new branch from last push not starting travis run due to auto added changelog having the [skip travis] flag on the commit message HOT 1
- Facing issue in running worker on remote device. HOT 6
- Facing issue in creating reporting kafka connection object HOT 5
- How to check if edge device is updated successfully? HOT 6
- Feature Request: Get Update status at the reporter from worker only when update is performed ( failed or successful ). HOT 11
- Facing issue in configuring AWS ECR as a registry using credential helper for Nebula worker. HOT 7
- Consider moving ARM CI/CD build to drone.io HOT 1
- Create containers multiarch manifest file to allow single container multiarch support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from worker.