Closed Bug 1080955 Opened 8 years ago Closed 8 years ago
version-control-tools create-test-environment always reports "Docker is not available!"
I've run ./create-test-environment on both Ubuntu and OS X several times and always get the "Docker is not available!" error, even when I have docker installed (on Ubuntu (in a VM), I ran "apt-get install docker.io" and on OS X "brew install docker"). I've attached the output as run on OS X. If there's something other than those packages that I need (I haven't used docker much), please add it to the README.
set -e bites again. I made the error non-fatal and added some instructions to point you to the install docs. https://hg.mozilla.org/hgcustom/version-control-tools/rev/494614661684 My guess is it isn't detecting your Docker because your user doesn't have permission to use Docker. There's room to make this detection and error message better. Let's keep this bug open until you are happy.
Assignee: nobody → gps
Status: NEW → ASSIGNED
I followed the instructions at https://docs.docker.com/installation/mac/ and verified that "docker version" works, although I need to set DOCKER_HOST first. create-test-environment fails at the same place. Running that command manually, I get $ DOCKER_STATE_FILE=.docker-state.json testing/docker-control.py build-bmo Traceback (most recent call last): File "testing/docker-control.py", line 12, in <module> from vcttesting.docker import Docker File "/Users/mcote/projects/version-control-tools/testing/vcttesting/docker.py", line 10, in <module> import docker ImportError: No module named docker
If you `source venv/bin/activate` and then run the command manually, that ImportError should go away. If that doesn't work, the logic at https://hg.mozilla.org/hgcustom/version-control-tools/file/0c82510c18fb/testing/docker-control.py#l23 will need supplemented to work on Ubuntu. The Jenkins VM (testing/jenkins) is using Ubuntu and it "just works." Although, it's installing Docker from the Docker Apt repository, not the default Ubuntu one. Maybe the non-Ubuntu package is doing something different?
This is all on OS X btw. Aha, I ran it again, after I had done the exported the DOCKER_HOST env var, and it completed successfully. I'm running the tests now.
\o/ $ ./run-mercurial-tests.py WARNING: Not running tests optimally. Specify -j to run tests in parallel. Building Docker image bmodb-volatile Building Docker image bmoweb ...................s............... Skipped test-case-only-rename.t: irrelevant # Ran 34 tests, 1 skipped, 0 warned, 0 failed.
On OS X, I recommend running boot2docker. When you run `boot2docker up`, it will ensure your DOCKER_HOST environment is set correctly or print an export command you should run to ensure it is. Not that things are working, should we close this bug?
Yeah I ran boot2docker, but I didn't realize I needed to run it in the same terminal (until I realized it was setting an environment variable). So yeah, I think we can close this out.
Closing per last comment.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.