Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Docker instance plugin #469

Merged
merged 3 commits into from Apr 10, 2017
Merged

Conversation

ndegory
Copy link
Contributor

@ndegory ndegory commented Apr 7, 2017

Docker instance plugin for InfraKit

  • creates containers based on specs built from Config, HostConfig and []NetworkResource.
  • LogicalIDs are Docker hostnames instead of IP (Docker's DNS brings native resolution for the hostname)
  • metadata from docker inspect

Can be used with any Docker images but can also be used with Docker in Docker containers in conjunction with the Swarm vanilla plugin.

@YujiOshima
Copy link
Contributor

@ndegory You need to edit vendor.conf and update vendored packages.
See https://github.com/rancher/trash


func TestInstanceLifecycle(t *testing.T) {
defaultHeaders := map[string]string{"User-Agent": "InfraKit"}
cli, err := client.NewClient("unix:///var/run/docker.sock", "1.25", nil, defaultHeaders)
Copy link
Contributor

Choose a reason for hiding this comment

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

May be you cannot access docker.sock in CircleCI test.

@ndegory
Copy link
Contributor Author

ndegory commented Apr 7, 2017

thanks for the review @YujiOshima , I'll take care about it.

@GordonTheTurtle
Copy link

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "instance-docker" git@github.com:ndegory/infrakit.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842353663176
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

tags = map[string]string{"group": "workers"}
)

func TestInstanceLifecycle(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

CircleCI can't really run tests with docker reliably or at all. Instead of removing this test, do this....

  1. import testutil "github.com/docker/infrakit/pkg/testing"
  2. Add a check here:
	if testutil.SkipTests("docker") {
		t.SkipNow()
	}

This will skip the test on CircleCI because there's an environment variable set when running tests on CircleCI (see the circle.yml file):

    SKIP_TESTS: "docker,etcd"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for the tip @chungers

@codecov
Copy link

codecov bot commented Apr 10, 2017

Codecov Report

Merging #469 into master will decrease coverage by 7.63%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #469      +/-   ##
==========================================
- Coverage    63.9%   56.27%   -7.64%     
==========================================
  Files          38       41       +3     
  Lines        2344     2662     +318     
==========================================
  Hits         1498     1498              
- Misses        693     1011     +318     
  Partials      153      153
Impacted Files Coverage Δ
examples/instance/docker/instance.go 0% <0%> (ø)
examples/instance/docker/builder.go 0% <0%> (ø)
examples/instance/docker/main.go 0% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update afdd155...3c03333. Read the comment docs.

Signed-off-by: Nicolas Degory <ndegory@axway.com>
@chungers chungers merged commit 6ecb296 into docker-archive:master Apr 10, 2017
chungers pushed a commit to chungers/infrakit that referenced this pull request Sep 30, 2017
Added ability to pick the size and type of the EBS volume for manager…
chungers pushed a commit to chungers/infrakit that referenced this pull request Oct 1, 2017
Added ability to pick the size and type of the EBS volume for manager…
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants