error building hub

28 views
Skip to first unread message

Scott Seidman

unread,
May 23, 2019, 10:10:20 AM5/23/19
to Rhythm Badges
using the latest hub-py, i'm using 
docker-compose build,
and getting the error 
Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a version of "2" (or "2.0") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/

Any recommendations??


Scott Seidman

unread,
May 23, 2019, 10:22:59 AM5/23/19
to Rhythm Badges


Docker version 18.09.0, build 4d60db4

Jordan Reedie

unread,
May 23, 2019, 2:00:45 PM5/23/19
to Scott Seidman, Rhythm Badges
Hi Scott, what version of docker-compose are you using (`docker-compose --version`)?

Jordan

--
You received this message because you are subscribed to the Google Groups "Rhythm Badges" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rhythm-badge...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rhythm-badges/9800cffe-c030-497d-891c-dda3cf502ad5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Scott Seidman

unread,
May 23, 2019, 3:35:20 PM5/23/19
to Rhythm Badges
1.8.0, and when I try to update, it says I'm running the newest version.   This is on the Raspberry Pi running Raspbian


On Thursday, May 23, 2019 at 2:00:45 PM UTC-4, Jordan Reedie wrote:
Hi Scott, what version of docker-compose are you using (`docker-compose --version`)?

Jordan

On Thu, May 23, 2019 at 10:23 AM Scott Seidman <shse...@gmail.com> wrote:


Docker version 18.09.0, build 4d60db4

On Thursday, May 23, 2019 at 10:10:20 AM UTC-4, Scott Seidman wrote:
using the latest hub-py, i'm using 
docker-compose build,
and getting the error 
Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a version of "2" (or "2.0") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/

Any recommendations??


--
You received this message because you are subscribed to the Google Groups "Rhythm Badges" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rhythm...@googlegroups.com.

Oren Lederman

unread,
May 23, 2019, 4:10:29 PM5/23/19
to Scott Seidman, Rhythm Badges
It's a very old version of docker-compose (and I think they changed something after 1.8). I'm running 1.21.2 on my Ubuntu laptop, for example.
If you installed it using the package manager, it might explain why it's so old. Raspberry pi's support for docker is... tricky. 

I actually haven't run docker-compose directly on a raspberry pi. They way I do it, and the way I recommend doing it, is by running everything from your own machine, and deploy code to hubs and servers using docker-machine. This way, docker-compose actually runs on your machine and communicates with a remote docker daemon.

To unsubscribe from this group and stop receiving emails from it, send an email to rhythm-badge...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rhythm-badges/980d49bf-ca7a-4ecb-b81d-58f66b634f5f%40googlegroups.com.

Scott Seidman

unread,
May 23, 2019, 4:59:28 PM5/23/19
to Rhythm Badges
Understood.  Docker machine times out waiting for the machine to be running. 

Do I need to uninstall docker on the hub??  Is the command line "docker-machine create --engine-storage-driver=overlay --driver generic --generic-ssh-user pi --generic-ip-address badgepi-xx.10.5.9.101 badgepi-xx" correct -- assuming the IP address of the pi is 10.5.9.101?  What happens if the IP address of the hub changes later?  Can I still get at it?

Oren Lederman

unread,
May 23, 2019, 5:18:04 PM5/23/19
to Rhythm Badges
ok, there are a couple of questions here. I strongly recommend following the instructions in the documentation very closely - https://github.com/HumanDynamics/openbadge-hub-py#deployment
I can't really do docker support, but here are a couple of thoughts and comments:
  • If docker-machine can't connect it usually means that the credentials you provided don't work. Did you try to SSH to the hub? Did you install your certificates using the ssh-copy-id command? If not, you'll probably need to supply a user and password to the docker-machine command. Try running docker-machine with the --debug flag to get more info on why it fails
  • If you already manually installed docker manually  (or even worse, using the raspberry pi packages...), I recommend you start with a fresh copy of raspberry pi
  • Read closely the setup procedure I recommend here https://github.com/HumanDynamics/openbadge-hub-py#setting-up-raspberry-pi-using-raspian . It designed so you only need to run minimal number of commands on the raspberry pi itself. Instead, it helps you setup your credentials and run all commands from your own machine. In particular, it shows how to tricky rapsberry pi into allowing you to install a new version of docker

As for the IP, that's a weak point of docker, but there's a workaround. 
  • First,  manually change the IP in the configuration that docker keeps on your laptop. It is stored under ~/.docker/machine/machines/<machine name>/config.json , under IPAddress
  • Then, you need to regenerate that machine. It's actually super easy (assuming that you set the ssh creds). Just run - docker-machine regenerate-certs <machine name> . It can take a minute or two, but afterwards you can recommend to that machine
Hope this helps.
Reply all
Reply to author
Forward
0 new messages