Git Product home page Git Product logo

Comments (6)

mr-sour avatar mr-sour commented on May 24, 2024

I would like to help with this I have a bunch of raspberry pi's I want to manage/provision and nebula seems like a good opensource fit. Any pointers on where to start?

from worker.

naorlivne avatar naorlivne commented on May 24, 2024

Hi @mr-sour,
Thanks for stepping up regarding this issue.

I think that the first step is to get a working dev env of nebula (non ARM) which basically boils down to the following steps:

  • For steps 1& 2 I've found that for a dev env registering at MongoDB Atlas free package for the Mongo backend & at CloudAMQP free package for the RabbitMQ message broker greatly simplify things (both are limited in the free offering but more then enough for a dev env).
  1. Get MongoDB installed & configured

  2. Get RabbitMQ installed & configured

  3. Run a container of the api-manager with the following envvars:

    • BASIC_AUTH_USER=admin
    • BASIC_AUTH_PASSWORD=password
    • RABBIT_HOST=<whatever_your_rabbit_host_is>
    • RABBIT_PORT=<whatever_your_rabbit_port_is>
    • RABBIT_PASSWORD=<whatever_your_rabbit_pass_is>
    • RABBIT_VHOST=<whatever_your_rabbit_vhost_is>
    • RABBIT_USER=<whatever_your_rabbit_user_is>
    • RABBIT_HEARTBEAT=3600
    • MONGO_URL= <whatever_your_mongodb_connection_string_is>
    • SCHEMA_NAME=<whatever_your_mongo_schema_name_is>
    • BASIC_AUTH_ENABLED=true
  4. Create a test Nebula app by making the following HTTP request to your api-manager

POST /api/apps/test HTTP/1.1
Host: <your_api_manager_address>
Authorization: Basic <basic_auth_token_of_your_user_pass_combo>
Content-Type: application/json
Cache-Control: no-cache

{
  "starting_ports": [80],
  "containers_per": {"server": 1},
  "env_vars": {},
  "docker_image" : "nginx",
  "running": true,
  "volumes": [],
  "networks": ["nebula"],
  "devices": [],
  "privileged": false
}
  1. You can run a non ARM based container of the worker-manager with appropriate envvars if you want to ensure everything works correctly now (if all configured correctly you will see a container of the test app started by nebula worker-manager):

    • RABBIT_HOST=<whatever_your_rabbit_host_is>
    • RABBIT_PORT=<whatever_your_rabbit_port_is>
    • RABBIT_PASSWORD=<whatever_your_rabbit_pass_is>
    • RABBIT_VHOST=<whatever_your_rabbit_vhost_is>
    • RABBIT_USER=<whatever_your_rabbit_user_is>
    • RABBIT_HEARTBEAT=3600
    • MONGO_URL= <whatever_your_mongodb_connection_string_is>
    • SCHEMA_NAME=<whatever_your_mongo_schema_name_is>
    • BASIC_AUTH_ENABLED=true
    • MAX_RESTART_WAIT_IN_SECONDS=0
    • APP_NAME=test

Now that you have a real dev env running the real work can begin (yes I know it's annoying to create a dev env but on the bright side it only has to be done once), the good news is that the Python base image that the worker-manager uses supports ARM based chipsets so the only steps needed to create the ARM based version is:

  1. Fork the worker-manager repo on the arm device - raspberry Pi in your case
  2. Run a docker build on said repo on that device - make sure to tag it with something appropiate like nebula-worker-manager:arm<whatever_arm_version_raspberry-pi_is>
  3. Checking thew new image works - just repeat step 5 from the dev env setup and use the new container image you created rather then the nebula project one.
  4. push that created Image to Docker Hub - if you give me your dockerhub username I'll create an ARM version of the worker-manager repo under the nebulaorchestrator org there and give you push access to it, another option is for you to create a repo under your own user

After this is done all that's left is a bit of bureaucracy to let the community knows there is now an ARM version available:

  • Create a pull request to add your name to the CONTRIBUTORS.md list of the project
  • Create a pull request to update the worker-manager README.md with a reference about where the ARM image can be found
  • Create a pull request to update the docs repo with reference about where the about where the ARM image can be found
  • Post a reply in this ticket referencing the pull request that refers to README.md & docs repo update.

Let me know if you need any help with any of the steps above, I know starting is always a lot harder then updating something that's already configured.

from worker.

mr-sour avatar mr-sour commented on May 24, 2024

Hopefully because its not my first rodeo with porting to arm it wont be so bad. I've got a arm cluster on order that I was going to use to experiment with so when that shows up I'm sure I'll have plenty of questions when I get into the thick of it. Ideally when Im done I want a digital ocean instance that can push updates to my devices as long as they have internet. But gotta get it working locally first. Thanks for the response!

from worker.

mr-sour avatar mr-sour commented on May 24, 2024

Also my username on the docker hub is mrsour I think my hardware is showing up midweek also I guess this will be supported and will mainly be tested on ARMv7 but I should be able to spit out builds for ARM11(legacy) to ARMv8 and get the matching hardware in to test.

from worker.

naorlivne avatar naorlivne commented on May 24, 2024

@mr-sour gave you push privileges to docker hub Nebula worker repo, let's standardize on the tag format being <nebula_version_number>-armv<arm_version>

Also please make sure not to accidentally push to any existing tag as having an ARM version on them will break workers on any existing non ARM auto-pulling system.

from worker.

naorlivne avatar naorlivne commented on May 24, 2024

Both the worker and the API now have ARM64v8 automated builds thanks to shippable - the images are stored in docker HUB and are tagged as follows:

  • nebulaorchestrator/worker:arm64v8 & nebulaorchestrator/api:arm64v8 are the latest branch
  • nebulaorchestrator/worker:branch-arm64v8 & nebulaorchestrator/api::branch-arm64v8 match branch

@mr-sour thanks for your offer to assist in that matter but as shippable allows automatic CD I think it's a better way then manually having to build each time.

At the time of writing only the latest is pushed to ARM - I'm not going to manually rebuild older version on ARM but any numbered version & pushes to latest from now on will be automatically built on ARM as well.

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.