Also, avoid building the dind builder twice, and try to get a reusable docker instance.
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
This makes it easier to use, as it's meant to be used constantly when developing. No need to change PATH
or type `./tools/dev/dindctl`, just run `./dindctl` now.
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
We change the Makefile and dinctl so that instead of having to deploy and then pull a supervisor image, we save it from the local
docker images and load it inside the dind container.
We also fix dind so that it uses the dind hack script from the docker repo as official dind images do (this avoids breaking the
permissions of /dev/pts/ptmx in the host as in https://github.com/kubernetes/kubernetes/issues/18230).
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
The current setup would cause the check to always fail - the consequence is not *that* bad since
the provisioning key still gets overwritten, but it's better to delete it if we can.
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
Setting DELTA_ENDPOINT as meta-resin does allows the dev dind supervisor to use the correct
delta server.
Inserting a VARIANT_ID into /etc/os-release allows treating this device as a dev build of Resin OS
(and avoids an unhandled exception).
Changing the precedence for device/provisioning apikeys in the vpn-init script allows the device
to connect to the VPN when a key exchange is still pending (as meta-resin does - though this is getting
replaced by watching config.json for changes).
This at least makes the development supervisor functional for now, but I'll work on improving the dind setup soon.
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
This allows us to also remove a few npm dependencies and the docker compose binary.
Change-Type: major
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
We've been deleting images by id and forcing removal, which might not play
nicely with other processes using images with shared parents. Now we don't force removal
and remove by tag and not by id, which should play more nicely with others. We also ensure
all the tags we use/create are removed so that images are actually deleted if not used.
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
The supervisor uses an `API_ENDPOINT` environment variable to define what API to register to. Up to now this has been defaulted to `https://api.resin.io`.
(In Resin OS devices this environment variable ultimately comes from config.json).
This commit changes the behavior so that an empty value of that environment variable causes the supervisor to work in "offline mode", i.e. not connected to a remote server.
Basically only preloaded apps and the supervisor API work in this mode.
The config.json `supervisorOfflineMode` field still works for backwards compatibility, but we'll treat it as deprecated and it should be removed eventually.
Change-Type: minor
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
The logic to disable mixpanel initialization in offline mode was inverted :S causing mixpanel
to *only* be initialized when in offline mode.
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>