Skip to content

Allow additional parameters for GCE cloud profile - #22785

Merged
jfindlay merged 6 commits into
saltstack:developfrom
junckritter:cloud-gce-disks
Apr 17, 2015
Merged

jfindlay merged 6 commits into
saltstack:developfrom
junckritter:cloud-gce-disks

Conversation

@junckritter

Copy link
Copy Markdown

Right now libcloud allows to pass more parameters for creating node, especially ex_disks_gce_struct and ex_service_accounts, than salt cloud profile. In this commit, they are at least not ignored. Question is whether it is better to pass them one by one, or all parameters from profile and let libcloud check them.

Other question is if salt should provide shorter way for defining disks.

Possible base for solving #22346

@techhat

techhat commented Apr 17, 2015

Copy link
Copy Markdown
Contributor

Love the avatar, @junckritter. @jfindlay, I'm good with the code change if you're good with the tests.

@erjohnso, do you have some thoughts on the other questions presented here?

@erjohnso

Copy link
Copy Markdown
Contributor

I got pretty lazy in libcloud with that ex_disks_gce_struct. The GCE API has changed a lot with respect to disks since the original libcloud code was accepted, that I wanted a way to "future proof" it a bit more and effectively letting the programmer pass in a block of JSON that matched the public API.

Users aren't too keen on that approach [https://github.com/apache/libcloud/pull/496], unsuprisingly. I had it mind at the time, that salt-cloud could be made more user-friendly and its implementation would convert separate params to libcloud's underlying ex_disks_gce_struct.

But, in this PR, we're just propagating my laziness. :(

I think it might be better to go forward with @phildav's approach to "fixing" libcloud, and then propagate his diligent work to salt-cloud. :)

@junckritter

Copy link
Copy Markdown
Author

Thanks, @techhat :)
@erjohnso thanks for quick response. First, I'm happy to extend this PR (or code, generally). Also I can coordinate with you and @phildav and help with libcloud's part in mentioned PR. But I think it's sound to at least do not block passing ex_disks_gce_struct, because it is the quickest way (and for now only one) to create several volumes from cloud profile.

I an looking at salt's and libcloud's EC2 drivers for inspiration, because my effort sources from migration of existing infrastructure from EC2 to GCE (and because they are mostly functionally similar). And there is possible to pass raw block_device_mappings parameter. Maybe we can also make "user-friendly" version, maybe similar to EC2's volumes parameter. ex_disk... parameters are certainly useful, but in case somebody wants to create several disks at once, she is out of luck.

So what steps should I make with this PR?

@techhat

techhat commented Apr 17, 2015

Copy link
Copy Markdown
Contributor

I would be okay with merging this for now, and then updating it when libcloud is ready for it.

jfindlay added a commit that referenced this pull request Apr 17, 2015
Allow additional parameters for GCE cloud profile
@jfindlay
jfindlay merged commit 890c89c into saltstack:develop Apr 17, 2015
@junckritter
junckritter deleted the cloud-gce-disks branch April 20, 2015 07:44
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.

5 participants