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

Unable to supply provisioning script to softlayer create() #19947

Closed
gczuczy opened this issue Jan 22, 2015 · 6 comments
Closed

Unable to supply provisioning script to softlayer create() #19947

gczuczy opened this issue Jan 22, 2015 · 6 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix P3 Priority 3 RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. Salt-Cloud severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@gczuczy
Copy link
Contributor

gczuczy commented Jan 22, 2015

Hello,

I found it not possible to supply the post_uri parameter of [1] from the CloudClient.create() when creating softlayer VMs. This is important when a couple of settings need to be made in order to allow the freshly spawned minion to be contactable by the salt master.

An example scenario:
The fresh minion does not have a public IP. The master is on a different site (different internal subnet), and the two private subnets are connect by a VPN. In this case after SL provisions the new VM, a provisioning script is needed to set the proper routing parameters.

By being able to pass the post_uri from the cloudclient's create() to softlayer's API, it makes it possible to do the required adjustments on the freshly spawned VM, therefore saltstack will be able to reach the new VM and bootstrap the salt-minion.

[1] https://softlayer-api-python-client.readthedocs.org/en/latest/api/managers/vs/#SoftLayer.managers.vs.VSManager.create_instance

@rallytime rallytime added Bug broken, incorrect, or confusing behavior severity-low 4th level, cosemtic problems, work around exists Salt-Cloud labels Jan 22, 2015
@rallytime rallytime added this to the Approved milestone Jan 22, 2015
@rallytime
Copy link
Contributor

Thanks for filing this @gczuczy. We'll take a look.

@allmightyspiff
Copy link
Contributor

One of the "gotchas" with the SoftLayer post_uri thing is it has to be a HTTPS url. If you supply a HTTP url, your script will be downloaded to /root, but not run. Can you confirm that you are using a HTTPS url for your post_uri?

Thanks.

@techhat
Copy link
Contributor

techhat commented Feb 11, 2015

@allmightyspiff, salt-cloud SoftLayer drivers use the SoftLayer API, which seems to be hardcoded to the following URLs:

https://api.softlayer.com/xmlrpc/v3/
https://api.softlayer.com/rest/v3/

We just need to allow @gczuczy to pass through the correct parameter. @gczuczy, are you using the softlayer or softlayer_hw driver?

@allmightyspiff
Copy link
Contributor

what I mean is, the url you pass to post_uri needs to be https.
post_uri = 'http://somewhere.com/post.sh" will download the script to /root
post_uri = "https://somewhere.com/post.sh" will download the script to /root and run it.

This appears to only be actually documented on the actual order page that I can find.
screen shot 2015-02-12 at 6 59 18 am

I haven't really messed with softlayer-cloud too much, so if it just doesn't allow passing of post_uri then no worries. I just wanted to make sure you all were not doing a bunch of work because of a http vs https issue :)

@techhat
Copy link
Contributor

techhat commented Feb 11, 2015

Thanks for the clarification @allmightyspiff, it is much appreciated.

@rallytime rallytime added severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P3 Priority 3 and removed severity-low 4th level, cosemtic problems, work around exists labels Apr 16, 2015
@jfindlay jfindlay added the RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. label Jun 9, 2015
@rallytime rallytime added the fixed-pls-verify fix is linked, bug author to confirm fix label Sep 18, 2015
@rallytime rallytime modified the milestones: B 12, Approved Sep 18, 2015
@rallytime rallytime self-assigned this Sep 18, 2015
@rallytime
Copy link
Contributor

@gczuczy I've implemented this feature in PR #27251. Can you give that a try and make sure it does what you're intending? Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix P3 Priority 3 RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. Salt-Cloud severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests

5 participants