Custom Supervisor

resinos2x

#1

Hi - I’m running a YOCTO build of resin-os for raspberrypi3 using the barys script. I’m trying to get my own supervisor image loaded and automatically started. The first part works great - the image makes it to the sdcard image, but no container is created.

This is how I’m calling the barys script:

./barys \
    --machine raspberrypi3 \
    --shared-downloads "/home/richquackenbush/boondocks-downloads" \
    --shared-sstate "/home/richquackenbush/boondocks-sstate" \
    --supervisor-tag "v1.0.1" \
    --remove-build \
    --development-image \
    --additional-variable "SUPERVISOR_REPOSITORY_armv7ve=rquackenbush/boondocks" \
    --additional-variable "SUPERVISOR_TAG=v1.0.1" \
    --additional-variable "TARGET_REPOSITORY=rquackenbush/boondocks" \
    --additional-variable "TARGET_TAG=v1.0.1" 

The VERSION file in the ${DEPLOY} directory has the tag of my supervisor:

v1.0.1

How do I get my custom container to be automatically created?


#4

Ahh - requires the --resinio flag to be set.

This works:

./barys \
    --machine raspberrypi3 \
    --shared-downloads "/home/richquackenbush/boondocks-downloads" \
    --shared-sstate "/home/richquackenbush/boondocks-sstate" \
    --supervisor-tag "v1.0.1" \
    --remove-build \
    --development-image \
    --additional-variable "SUPERVISOR_REPOSITORY_armv7ve=rquackenbush/boondocks" \
    --additional-variable "SUPERVISOR_TAG=v1.0.1" \
    --additional-variable "TARGET_REPOSITORY=rquackenbush/boondocks" \
    --additional-variable "TARGET_TAG=v1.0.1"  \
    --resinio

Now the question is, do I need to do something in order to prevent OpenVPN from trying to contact the resin.io servers?


#5

Hi,
from https://github.com/resin-os/meta-resin/blob/master/README.md :

Example: having a connectable image with services disabled and custom docker image preloaded - add/set RESIN_CONNECTABLE_ENABLE_SERVICES = “0”, TARGET_REPOSITORY = “mycustomimage” and TARGET_TAG = “1.0” to build’s local.conf.

So you don’t need to set SUPERVISOR_REPOSITORY and SUPERVISOR_TAG and in addition you need to set RESIN_CONNECTABLE_ENABLE_SERVICES


#6

Thanks - I’ve tried that. Unfortunately, no container is created when I startup the board… Am I correct in deducing that the automatic creation of the resin_supervisor image is tied to RESIN_CONNECTABLE_ENABLE_SERVICES flag?

If that is the case, how do I get my own supervisor image installed and running as a container?


#7

Ahh - I see where this is being actively worked on:


#8

The mentioned pull request took a different direction, so I ended up making a customized YOCTO build. I disabled the resin services and added my own layer that spins up my own supervisor.