Balena Supervisor: balena's agent on devices.
Go to file
2015-10-13 13:43:35 -03:00
automation Take the ARCH param from jenkins, so that the different archs can be separate projects (and parallelise builds) 2015-10-13 13:39:38 -03:00
bin Preserve docker env in terminal session 2015-10-13 13:43:34 -03:00
src Make resolv.conf writable from a User container 2015-10-13 13:43:35 -03:00
tools/dind Make resolv.conf writable from a User container 2015-10-13 13:43:35 -03:00
.dockerignore Allow running the supervisor in the devenv using docker in docker. 2015-10-13 13:42:23 -03:00
.editorconfig add editor config 2015-10-13 13:39:37 -03:00
.gitattributes Add a .gitattributes file to make sure files for use on linux have linux style line-endings. 2015-10-13 13:03:14 -03:00
.gitignore Don't ignore config.json 2015-10-13 13:43:35 -03:00
01_nodoc Save space by using a dpkg config to avoid installing unnecessary docs/locales. 2015-10-13 13:36:13 -03:00
CHANGELOG.md Make resolv.conf writable from a User container 2015-10-13 13:43:35 -03:00
coffeelint.json add coffeelint 2015-10-13 13:39:37 -03:00
Dockerfile.amd64 Use JOBS=MAX for npm install 2015-10-13 13:43:34 -03:00
Dockerfile.armv7hf Use JOBS=MAX for npm install 2015-10-13 13:43:34 -03:00
Dockerfile.i386 Use JOBS=MAX for npm install 2015-10-13 13:43:34 -03:00
Dockerfile.rpi Use JOBS=MAX for npm install 2015-10-13 13:43:34 -03:00
entry.sh User Supervisord for logging 2015-10-13 13:28:00 -03:00
Makefile Better volume handling 2015-10-13 13:43:35 -03:00
package.json Update pubnub (latest version doesn't seem to have the heartbeat unnecessarily) 2015-10-13 13:43:35 -03:00
postinstall.sh Save space by removing more npm install artifacts. 2015-10-13 13:36:13 -03:00
README.md More details in README 2015-10-13 13:43:35 -03:00
resin-supervisor.conf no updates 2015-10-13 13:34:23 -03:00

Running supervisor in the dev env

Deploy your local version to the devenv registry

If you haven't done so yet, login to the devenv registry:

docker login registry.resindev.io

Use username "resin" and the registry's default login details if you haven't changed them.

make ARCH=amd64 deploy

This will build the image if you haven't done it yet. A different registry can be specified with the DEPLOY_REGISTRY env var.

Set up config

Edit tools/dind/config.json to contain the values for a staging config.json.

This file can be obtained in several ways, for instance:

  • Download an Intel Edison image from staging, open config.img with an archive tool like peazip
  • Download a Raspberry Pi 2 image, flash it to an SD card, then mount partition 5 (resin-conf).

Start the supervisor instance

make ARCH=amd64 run-supervisor

This will setup a docker-in-docker instance with an image that runs the supervisor image.

By default it will pull from the devenv registry (registry.resindev.io).

A different registry can be specified with the DEPLOY_REGISTRY env var.

e.g.

make ARCH=amd64 DEPLOY_REGISTRY= run-supervisor

to pull the jenkins built images from the docker hub.

View the containers logs

logs supervisor -f

View the supervisor logs

enter supervisor
tail /var/log/supervisor-log/resin_supervisor_stdout.log -f

Stop the supervisor

make stop-supervisor

This will stop the container and remove it, also removing its volumes.