Sunstone Fireedge working dev environment

Hello,

I am trying to get a local (hopefully light) version of opennebula working environment focused on Fireedge.

Ideally I would like to be able to do some additions to the UI while running it in dev mode, connected to some sort of opennebula instance (local, but potentially remote). I only want to make additions/modifications to Fireedge.

So far my best attempt so far was to set a vagrant vm with:

  1. minione running with --frontend --force option
  2. Manually stopping the fireedge service with systemclt stop opennebula-fireedge
  3. Cloning 6.4 tag of one
  4. Moving to src/fireedge and running npm i and npm run dev

This sort of works but with some caveats:

  1. Depending on the actions taken in the UI, npm fails and stops the app, the log does not add a lot of information
  2. Not hot reload support (I guess I will add some sort of --watch option to the npm scripts)

Is this a good way to approach what I’m looking for? Is there a better setup for this use case?

My OS is mac. I decided to use a vagrant vm so I can reproduce this easily in other environments. My first attempt was to use docker but is was not easy to make it work with systemd out of the box, thus vagrant.

Hi,

I have the same problem that you, but i compile with “scons fireedge=yes” and run install.sh after i stopping the fireedge service.
I think we have a better option and i want to know how can my improve the develop environnement.

Hi @Antoine_2600 :wave:
What error are you getting exactly?

And just out of curiosity, what changes are you testing in FireEdge? FireEdge is currently in beta with many features yet to be implemented, but by version 7.0 it will be ready to replace the current Sunstone

Best,
Victor.

Hi vpalma,

Thanks for answering me, my question is how can improve my environment to develop on Fireedge.
how do you test your code quickly ?
Actually, I clone repository, add some functionality but i cant to test without compile.
My only method is to compile when i finish, stop service and install with ./install.sh

Is it possible to have more information about you

Regards,

Antoine

Hello @Antoine_2600!

Glad to hear you’re taking an interest in contributing to FireEdge. One quick and easy way to develop and test features without having to recompile every time is by running FireEdge in dev mode. So if you switch over to your FireEdge directory and run npm run dev, it will recompile and launch FireEdge in dev mode, this let’s you make changes to the code and every time you save, it does a hot-reload so all changes will be applied directly without having to recompile everything!

Best regards,
Hansson