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

Migrate GCP plugin implementation to main repo#585

Merged
chungers merged 138 commits intodocker-archive:masterfrom
chungers:migration-gcp
Jun 12, 2017
Merged

Migrate GCP plugin implementation to main repo#585
chungers merged 138 commits intodocker-archive:masterfrom
chungers:migration-gcp

Conversation

@chungers
Copy link
Copy Markdown
Contributor

@chungers chungers commented Jun 10, 2017

This PR moves the code and history of the GCP (Google) instance plugin (etc.) into the main infrakit repo. With this, we are also starting a pkg/provider as the way to organize different infrastructure providers. In the future, we will migrate the provider-specific code in pkg/plugin/instance to follow this convention, because this new convention will scale better as each provider will contain implementations of multiple infrakit SPI, not just the interface SPI alone.

  • Reorganizes the docker/infrakit.GCP repo and moves the files to pkg/provider/google.
  • Contribution history is preserved
  • Updated MAINTAINERS to merge entries from source repo

@dgageot @FrenchBen

dgageot and others added 30 commits December 8, 2016 08:37
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
When on GCP, the plugin can find the project and
zone by querying the metadata server.

Signed-off-by: David Gageot <david@gageot.net>
Since it's a bit complicated to force the IP
address of a GCE instance, I decided to map the
LogicalID to the instance name.

Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Also be more lenient with provides properties.
We now better support absolute/relative URIs

Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: French Ben <frenchben@docker.com>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Chung <david.chung@docker.com>
Automation for docker image builds; proper version string
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Here's how a pet instance is different than a
cattle one:

 + It was created with a LogicalID which is mapped
   to the name of instance
 + It's boot disk shouldn't be deleted when the
   instance is deleted
 + It should try to reuse a pre-existing disk
   named after the LogicalID suffixed with `-disk`

Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Use instance's name as the disk name
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
dgageot and others added 14 commits April 6, 2017 16:25
Signed-off-by: David Gageot <david@gageot.net>
This should not be inferred from the LogicalID

Signed-off-by: David Gageot <david@gageot.net>
The spec should say if boot disks should be deleted or reused.
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
spec.Init is used by InfraKit to supply per-instance
customisation, often derived from a template. This is
not necessarily a script, so store it both under "startup-script"
and under "userdata"

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Store spec.Init under "startup-script" and "userdata"
Signed-off-by: David Gageot <david@gageot.net>
…ks-support

Improve support for multiple disks
…com/docker/infrakit.gcp into migration-gcp

Migrate GCP code into main repo.
Signed-off-by: David Chung <david.chung@docker.com>
@GordonTheTurtle
Copy link
Copy Markdown

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

$ git clone -b "migration-gcp" git@github.com:chungers/infrakit.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842353665216
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.

@chungers chungers changed the title Migration GCP plugin implementation to main repo Migrate GCP plugin implementation to main repo Jun 10, 2017
David Chung added 2 commits June 10, 2017 14:45
Signed-off-by: David Chung <david.chung@docker.com>
Signed-off-by: David Chung <david.chung@docker.com>
Signed-off-by: David Chung <david.chung@docker.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 10, 2017

Codecov Report

Merging #585 into master will decrease coverage by 1.9%.
The diff coverage is 29.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #585      +/-   ##
==========================================
- Coverage   48.86%   46.95%   -1.91%     
==========================================
  Files          78       85       +7     
  Lines        5010     5552     +542     
==========================================
+ Hits         2448     2607     +159     
- Misses       2291     2667     +376     
- Partials      271      278       +7
Impacted Files Coverage Δ
pkg/provider/google/plugin/gcloud/api.go 0% <0%> (ø)
pkg/provider/google/plugin/gcloud/apiMetadata.go 0% <0%> (ø)
pkg/provider/google/plugin/instance/util/name.go 100% <100%> (ø)
pkg/provider/google/plugin/instance/types/types.go 51.35% <51.35%> (ø)
pkg/provider/google/plugin/instance/plugin.go 72.54% <72.54%> (ø)
pkg/provider/google/plugin/metadata/plugin.go 75% <75%> (ø)
pkg/provider/google/plugin/gcloud/tags.go 82.14% <82.14%> (ø)
... and 4 more

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 7285b51...dffa586. Read the comment docs.

David Chung added 4 commits June 10, 2017 17:37
Signed-off-by: David Chung <david.chung@docker.com>
Signed-off-by: David Chung <david.chung@docker.com>
Signed-off-by: David Chung <david.chung@docker.com>
Copy link
Copy Markdown
Contributor

@FrenchBen FrenchBen left a comment

Choose a reason for hiding this comment

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

Overall LGTM but cannot be merged until the Makefile is cleaned up

Comment thread Makefile Outdated
@echo "+ $@"
wget -O tf.zip https://releases.hashicorp.com/terraform/0.9.3/terraform_0.9.3_linux_amd64.zip && unzip tf.zip && mv terraform ./build

<<<<<<< HEAD
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Invalid git merge :P
Needs to be cleaned out first.

David Chung added 2 commits June 12, 2017 12:36
Signed-off-by: David Chung <david.chung@docker.com>
@chungers chungers merged commit d596531 into docker-archive:master Jun 12, 2017
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.

5 participants