Skip to content

FabMo Engine Development Cookbook

Ryan Sturmer edited this page Nov 28, 2016 · 4 revisions

Trick a tool into performing an update (Intel Edison)

  • Shell into tool ssh root@tool-ip-address
  • Shut down updater systemctl stop fabmo-updater
  • Remount drive read-write mount -w -o remount /
  • Edit /fabmo/updater/version.json to contain number that is older than the newest - v0.0.0 will work.
  • Remount drive read only mount -r -o remount /
  • Restart updater systemctl start fabmo-updater
  • Give it a little time and the update will be downloaded and prepared. It can be applied through the dashboard or updater.

Turn a production tool into a development one (Intel Edison)

  • Connect to the dash/updater and JOIN A NETWORK. Make sure you’re on a network with internet access for the subsequent steps. If you fall off the network, or run into trouble, if you have a 1.8.0 linux image or later, you can always fall back on auto-factory-reset to restore the tool to its factory state.

Convert to a development updater

You can skip this section if you aren't developing for the updater.

  • SSH into tool ssh root@tool-ip-address
  • Stop the updater systemctl stop fabmo-updater
  • Check out the updater from source:
    • mount -w -o remount /
    • cd /fabmo
    • rm -rf ./updater
    • git clone https://github.com/fabmo/fabmo-updater ./updater
    • cd ./updater
  • Install updater dependencies
    • npm install
    • (Lots of time passes)
  • Create an install token so auto-factory-reset does not reclaim the tool on the next reboot
    • touch ./install_token
  • Flush and re-lock disk partition
    • sync
    • mount -r -o remount /

Convert to a development engine

  • Check out the engine from source:
    • mount -w -o remount /
    • cd /fabmo
    • rm -rf ./engine
    • git clone https://github.com/fabmo/fabmo-engine ./engine
    • cd ./engine
  • Intall engine dependencies
    • Install webpack globally: npm install -g webpack (only if you have a webpack build)
    • npm install
    • (Lots of time passes)
    • If you're not going to run the engine with npm run dev then you want to run webpack: webpack -p - you must have webpack installed globally (npm install -g webpack) for this to work.
  • Create an install token so auto-factory-reset does not reclaim the tool on the next reboot
    • touch ./install_token
  • Flush and re-lock disk partition
    • sync
    • mount -r -o remount /

Re-start the engine and updater

You may wish not to restart one or both services and run manually instead with npm start etc.

  • systemctl start fabmo fabmo-updater