-
Notifications
You must be signed in to change notification settings - Fork 70
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
Add Docker provider #977
Add Docker provider #977
Conversation
Can one of the admins verify this patch? |
I think this needs block: sections around the docker calls in roles/docker/tasks/provision_docker_* with code added for installing docker dependencies like we do for the other providers.
|
I just realized linchpin has a "linchpin setup " command. Btw, opened a PR to improve it #993 Taken provision/roles/libvirt/tasks/provision_libvirt_node.yml as an example, I should:
@p3ck , on regarding dependencies installation, that's all I should do? |
@wainersm sounds correct. I'll re-review when you post here. Thanks! |
79ad73c
to
5fae0b4
Compare
ci-linchpin-messageBus-trigger build #59120: FAILURE: https://jenkins-continuous-infra.cloud.continuous-infra.upshift.redhat.com/job/ci-linchpin-messageBus-trigger/59120/ |
@p3ck Updated the PR, the setup instructions are isolated in a commit. |
@wainersm Thank you. We are in the middle of releasing 1.7.2 so will look to merge this after that is finished. |
5fae0b4
to
e6f6c23
Compare
@p3ck I've just pushed the commit e6f6c23 that introduces tests to the docker provider. I tests passed on my Fedora 19 machine, where I did:
|
e6f6c23
to
820a6e8
Compare
Rebased the code to latest so that it resolved a conflict in config/Dockerfiles/tests.d/inventory/01_template_inventory file. |
ci-linchpin-messageBus-trigger build #59158: FAILURE: https://jenkins-continuous-infra.cloud.continuous-infra.upshift.redhat.com/job/ci-linchpin-messageBus-trigger/59158/ |
ci-linchpin-messageBus-trigger build #59159: FAILURE: https://jenkins-continuous-infra.cloud.continuous-infra.upshift.redhat.com/job/ci-linchpin-messageBus-trigger/59159/ |
@samvarankashyap is needed something from my side to move this PR forward? |
@wainersm can you rebase against develop? Thanks! |
moving it to 1.7.5 since we are waiting on rebase |
820a6e8
to
8a7c2ac
Compare
@14rcole @samvarankashyap I've just rebased it to latest. |
@wainersm looks like you've got some unit test/formatting errors |
@wainersm Please fix the following flake8 errors:
|
The docker provider introduced on this change allows one to provision a docker container. This implementation is a wrapper around Ansible's docker_container module. Fixes issue CentOS-PaaS-SIG#957
This filter expect a base_path and path arguments, check if path is absolute or relative to the OS filesystem then: 1. In either case, return the path as is. 2. Otherwise, return the base_path + path. Examples: -> {{ '/path/to/files' | path_relative_to('/path/to/workspace') }} <- "/path/to/files" -> {{ 'files' | path_relative_to('/path/to/workspace') }} <- "/path/to/workspace/files"
This extend the docker provider to allow creation/destroy of container images. Currently it is a wrapper around the Ansible's docker_image module, but it does not allow to push or archive an image.
Added support for installing docker dependencies with `linchpin setup docker`
Added tests for docker setup and container provisioning. It was disabled execution of general/01_general and inventory/01_template_inventory because they required docker setup correctly in the test container.
8a7c2ac
to
116d869
Compare
@samvarankashyap @14rcole ok, now I fixed all checks fail. :) |
@wainersm I see all check pass now, We will try to incorporate docker provider into 1.7.5 release. |
@samvarankashyap hello! any update on this PR? |
@wainersm now that 1.7.4 has been released, we can merge this |
[merge] |
Thanks @14rcole ! |
This set of commits add basic docker provider which is able to manage container and image resources.
On commit 79ad73c for the docker_image resource, it was used the path_relative_to filter to make some parameters relative to the workspace. Same thing could be implemented with some parameters of the docker_container resource, however I will wait the review of this set of commits before I follow up with that.
It was not implemented test cases because I still don't understand how they can be implemented. I appreciate if anyone gives some guidance on it. It could come on a follow up patch as well...
Fixes #957