Skip to content
This repository was archived by the owner on May 5, 2022. It is now read-only.

Conversation

@migurski
Copy link
Member

@migurski migurski commented Mar 24, 2017

This in-progress PR will address issue #562, and after merge will likely mark version 5.0.0 of OA Machine.

These two recent CI builds for commit 251a194 demonstrate working use of Docker:

@migurski migurski self-assigned this Mar 24, 2017
@migurski migurski mentioned this pull request Mar 24, 2017
@migurski migurski force-pushed the migurski/docker-docker-docker branch from 8541429 to 22ba027 Compare March 24, 2017 23:50
@trescube
Copy link
Member

trescube commented Apr 13, 2017

Hey, sorry, this fell off my radar. I tested this tonight and followed what I gathered are the instructions:

  1. ran docker pull openaddr/prereqs || true
  2. ran docker build -f Dockerfile-prereqs -t openaddr/prereqs:latest .
  3. ran docker build -f Dockerfile-testing -t openaddr/testing:latest .
  4. ran docker-compose up -d && sleep 15 (apparently postgres needs a little time)
  5. ran docker-compose run machine python3 /usr/local/src/openaddr/test.py

Here's the output of the last command:

[stephenhess@slumlord machine (migurski/docker-docker-docker)]$ docker-compose run machine python3 /usr/local/src/openaddr/test.py
.............................................................................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 269 tests in 70.808s

OK

That all looks great! Now, what do I do with it? Can I submit sources to the local machine or do machine dev work?

@migurski
Copy link
Member Author

Thanks @trescube, that’s perfect! In theory, you should be able to do both. I’m not 100% clear on how to best configure or recommend volume mapping as with the Vagrant setup, but that would be the right thing to set up. Could I talk to you about this sometime?

@trescube
Copy link
Member

Absolutely, you're west coast and I'm east coast, so pretty much any time after 1:30pm eastern works for me. It's pretty easy to use on vagrant now but any way to make it even easier is great with me. Just hit me up on slack! I'm off on Friday but available on Thursday (3/13).

@migurski
Copy link
Member Author

Okay — I'm running from thing to thing tomorrow, but I might be able to carve out some time to hang out and chat.

@migurski
Copy link
Member Author

I rewrote the Vagrant portions of the installation docs to reflect possible new Docker behavior:

I’d love a review on this from @trescube and @jalessio — I’m a bit stuck on the role of Docker vs. Docker-compose here, and could use some advice on how to think about this. For example, we use Docker-compose to supply PostGIS so that the tests all pass, but it’s not obvious to me how to also use it to support a volume-mapping workflow so that local changes can be run and checked.

@migurski
Copy link
Member Author

Based on advice, I rewrote the local development instructions to use docker-compose instead of plain Docker:

@migurski
Copy link
Member Author

This seems to work well in EC2 instance user data:

#!/bin/sh
apt-get update -y
apt-get install -y docker.io
docker pull openaddr/machine

@migurski
Copy link
Member Author

This is working well for userdata:

#!/bin/sh -ex
apt-get update -y
apt-get install -y docker.io awscli

docker pull openaddr/machine
aws s3 cp s3://data.openaddresses.io/… /tmp/environment
docker run --env-file /tmp/environment openaddr/machine openaddr-ci-worker -b data.openaddresses.io -v &
docker run --env-file /tmp/environment openaddr/machine openaddr-ci-worker -b data.openaddresses.io -v &
wait

Possible changes:

  • Map /tmp volume to let the larger space be used
  • Build an AMI with docker.io and awscli installed

@migurski migurski force-pushed the migurski/docker-docker-docker branch 8 times, most recently from 2261e9f to 084c1af Compare April 19, 2017 22:56
@migurski
Copy link
Member Author

I am likely to go live with this as version 5.0.0 of Machine, initially applying it to Worker instances only. I’m planning a crossover period, and then getting rid of the Chef stuff at the end of the crossover at 6.0.0.

@nvkelso
Copy link
Member

nvkelso commented Apr 20, 2017 via email

@migurski migurski force-pushed the migurski/docker-docker-docker branch 2 times, most recently from c561b00 to 084c1af Compare April 20, 2017 04:02
@migurski migurski force-pushed the migurski/docker-docker-docker branch from 084c1af to aeaaa7a Compare April 20, 2017 04:05
@migurski migurski merged commit 533135a into master Apr 20, 2017
@migurski migurski deleted the migurski/docker-docker-docker branch April 20, 2017 21:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants