2015-06-02 12:47:33 +00:00
# Running supervisor in the dev env
2015-07-16 16:27:24 +00:00
## Deploy your local version to the devenv registry
If you haven't done so yet, login to the devenv registry:
2015-07-16 20:13:39 +00:00
```bash
2015-07-16 16:58:28 +00:00
docker login registry.resindev.io
```
2015-07-16 16:27:24 +00:00
Use username "resin" and the registry's [default login details ](https://bitbucket.org/rulemotion/resin-builder/src/4594c0020dcae2c98e4b3d7bab718b088bb7e52a/config/confd/templates/env.tmpl?at=master#cl-9 ) if you haven't changed them.
2015-07-16 20:13:39 +00:00
```bash
2015-07-16 16:58:28 +00:00
make ARCH=amd64 deploy
```
2015-07-16 16:27:24 +00:00
This will build the image if you haven't done it yet.
A different registry can be specified with the DEPLOY_REGISTRY env var.
2015-06-02 12:47:33 +00:00
## Set up config
Edit `tools/dind/config.json` to contain the values for a staging config.json.
2015-07-16 16:58:28 +00:00
2015-07-16 20:13:39 +00:00
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 ](http://sourceforge.net/projects/peazip/files/ )
* Download a Raspberry Pi 2 image, flash it to an SD card, then mount partition 5 (resin-conf).
2015-06-02 12:47:33 +00:00
## Start the supervisor instance
2015-07-16 20:13:39 +00:00
```bash
2015-07-16 16:58:28 +00:00
make ARCH=amd64 run-supervisor
2015-06-02 12:47:33 +00:00
```
2015-07-16 16:58:28 +00:00
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.
2015-06-02 12:47:33 +00:00
2015-07-16 20:13:39 +00:00
e.g.
```bash
make ARCH=amd64 DEPLOY_REGISTRY= run-supervisor
2015-06-02 12:47:33 +00:00
```
2015-07-16 20:13:39 +00:00
to pull the jenkins built images from the docker hub.
## View the containers logs
```bash
2015-06-02 12:47:33 +00:00
logs supervisor -f
```
## View the supervisor logs
2015-07-16 20:16:43 +00:00
```bash
2015-06-02 12:47:33 +00:00
enter supervisor
tail /var/log/supervisor-log/resin_supervisor_stdout.log -f
```
2015-07-16 16:27:24 +00:00
## Stop the supervisor
2015-07-16 20:16:43 +00:00
```bash
make stop-supervisor
```
This will stop the container and remove it, also removing its volumes.