Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Grow-IoT #43

Open
JakeHartnell opened this issue Oct 22, 2017 · 8 comments
Open

Grow-IoT #43

JakeHartnell opened this issue Oct 22, 2017 · 8 comments

Comments

@JakeHartnell
Copy link

Would be great to use UBOS for IoT device management. Would be great to integrate with Grow-IoT, I'm certainly willing to help!

Indie-IoT for the win.

@jernst
Copy link
Member

jernst commented Oct 23, 2017

I'm all for it! Let's make it happen!

What's the primary hardware people run Grow-IoT on? x86_64? RPI3?

@JakeHartnell
Copy link
Author

Both! The master server runs best on x86_64, but any linux system capable of running node can be used for creating IoT device currently (but lately we've mostly been using RPI3). There's an open issue for hosting the main server from a Raspberry pi, but we'll get around to that soon enough (probably by ditching meteor): CommonGarden/Grow-IoT#387

I think what would be most useful in the short term is managing the drivers running on various RPI3s.

@jernst
Copy link
Member

jernst commented Oct 23, 2017

Ditching meteor? Would make things easier for UBOS ...

What does "managing the drivers" mean exactly? Is there a set of steps ....?

@JakeHartnell
Copy link
Author

Not particularly, I'm looking to be able to manage the code that runs on embedded devices like RPI3. Basically, software update and roll out management, kind of like https://eclipse.org/hawkbit/

Now that I think about it, using UBOS to run the main Grow-IoT instance is more interesting from a data ownership perspective. So maybe we should start with that before diving into device management?

@jernst
Copy link
Member

jernst commented Oct 23, 2017

Ok, so here's how it works on UBOS:

ssh shepherd@<device> sudo ubos-admin update

is supposed to do "everything" that needs to get done in order to get the device current (which obviously it does for apps currently running on UBOS). For devices running your code, what is that "everything"? Usually it's one or more of:

  • download/upgrade of updated packages
  • download/installation of new dependencies
  • restarting of daemons
  • migrating data (databases, files, ... ) either in structure or location
  • reboot
  • and cleanly at that, so that old daemons are stopped before new code is installed etc

@JakeHartnell
Copy link
Author

For the main Grow-IoT server / app:

  • Download and install meteor: curl https://install.meteor.com/ | sh
  • Install dependencies: npm install
  • Start app: meteor

For devices:

  • Clone repo or pull in latest updates
  • Download / upgrade packages (npm install)
  • Stop and restart script so that it runs at boot or on exit

@jernst
Copy link
Member

jernst commented Nov 5, 2017

So I played with it a little and got it to run. Noticing that it is running Mongo? Is there a way of avoiding that? (Reason being that each database type we support in UBOS makes management -- like automated backups and restores -- harder. Currently MySQL and Postgresql are supported. We had early support for Mongo at some point when Known required it. But then Ben moved to MySQL -- for many of the same reasons -- and we didn't continue developing support for it.)

@JakeHartnell
Copy link
Author

Noticing that it is running Mongo? Is there a way of avoiding that?

Yeah, we'll be working on that, but for the next few months we're probably sticking with Mongo until Graph-QL makes it easier to switch out databases.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants