Git Product home page Git Product logo

Comments (9)

naorlivne avatar naorlivne commented on June 4, 2024

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.

phynias avatar phynias commented on June 4, 2024

this sounds great. looking forward to 2.0!

from worker.

naorlivne avatar naorlivne commented on June 4, 2024

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.

phynias avatar phynias commented on June 4, 2024

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.

phynias avatar phynias commented on June 4, 2024

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.

phynias avatar phynias commented on June 4, 2024

i take it back the cli works (the help just needs to be updated)

still can't figure out the api though

from worker.

naorlivne avatar naorlivne commented on June 4, 2024

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.

naorlivne avatar naorlivne commented on June 4, 2024

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.

naorlivne avatar naorlivne commented on June 4, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.