Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/tnation/docker py #12

Merged
merged 2 commits into from
Mar 16, 2017
Merged

Feature/tnation/docker py #12

merged 2 commits into from
Mar 16, 2017

Conversation

tnation14
Copy link
Contributor

@tnation14 tnation14 commented Mar 14, 2017

Install the Docker SDK instead of docker-py. Also, bump ansible-pip role version and update the example installation to be compatible with the new version of docker.

Fixes #11

Testing

$ cd examples
examples/ $ vagrant up --provision
$ vagrant ssh -c "docker ps"

@tnation14 tnation14 requested a review from hectcastro March 14, 2017 18:33
tasks/main.yml Outdated
@@ -26,6 +26,6 @@
- Restart Docker

- name: Install Docker API client for Python
pip: name=docker-py
pip: name=docker
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is going to break backwards compatibility anyway (major revision bump), I think that it makes sense to rename docker_py_version to something like docker_python_sdk_version or something like that.

@@ -9,8 +9,5 @@
- { role: "azavea.docker" }

tasks:
- name: Bring up a test container
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason this was taken out? I agree that it probably has little value, but given that, it at least exercises the interaction between Ansible and the Docker Engine (which happens via the Docker for Python SDK).

Copy link
Contributor Author

@tnation14 tnation14 Mar 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took it out because the Ansible docker module is deprecated. Additionally, when I was researching the replacement, docker_container, the requirements indicated that the interaction between Ansible and the Docker API are still taking place via the old docker-py module. It wasn't testing the current docker SDK installation anymore. I've updated this task to run a docker command on the VM using Ansible command, which does require the docker SDK to work properly.

@tnation14 tnation14 force-pushed the feature/tnation/docker-py branch from 6aa1f27 to 2f52b1d Compare March 15, 2017 20:32
@tnation14
Copy link
Contributor Author

Updated.

@hectcastro
Copy link
Contributor

Ugh, I think I made a mistake in the assembly of the issue that led to this PR.

I thought that swapping docker-py for docker (the Docker for Python SDK) would work based on ansible/ansible@e2a1ce2, but now I'm realizing that it won't work until Ansible 2.3.

The main goal here is to install Docker via Ansible so that it works for the follow two cases:

Perhaps the right move here is to remove the docker-py or docker Python module installation altogether, push the responsibility of installing it to the user (if they want to use the Ansible modules), and increment the major version of this role.

@tnation14
Copy link
Contributor Author

tnation14 commented Mar 16, 2017

Updated, the docker module has been removed.

Copy link
Contributor

@hectcastro hectcastro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sorry for the confusion around this issue. Please ensure that we bump the major version of this on release too.

@tnation14 tnation14 force-pushed the feature/tnation/docker-py branch from 29874dc to 2ee5eb4 Compare March 16, 2017 21:51
@tnation14 tnation14 merged commit 33e9faa into develop Mar 16, 2017
@hectcastro hectcastro deleted the feature/tnation/docker-py branch May 27, 2020 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants