Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[KNIFE-47] Add more support for the London cloud (root dns entry) #17

Closed
wants to merge 1 commit into from

10 participants

@ahmeij

http://tickets.opscode.com/browse/KNIFE-47

Add configuration for the root dns entry for use with the london cloud:

knife[:rackspace_api_public_dns_root_url] = "static.cloud-ips.co.uk"

@ajardan

This fix looks better than mine :)

Thanks, and sorry for the duplication, I found your fix after pushing this one.

@mehlah

Anything preventing this from being merged ?
We, Rackspace UK users, want to be Chefs ! :-)

@ahmeij

If there is something specific blocking the merge I'm happy to update the pull request

@mehlah

Btw, why not setting public_dns_url behind the scenes depending on rackspace_api_auth_url ?

@ahmeij

Theoretically this could also work with other compatible cloud setups (Openstack?) but I do agree it would fit better with the current implementation of the US cloud to hardcode the url.

@djoos

+1 for this pull request!

Ran into this issue today as well: Public DNS Name returned after "knife rackspace create server [ARGS]" command was a .static.cloud-ips.com rather than the (correct) .static.cloud-ips.co.uk.

Thanks!

@mtylty

+1

@stevendanna
Owner

Thanks for working on this.

Our process has a couple prerequisites before we can merge your contribution. We need to ensure you've completed a Contributor License Agreement (CLA) and a ticket on our ticket tracker for the release workflow. Please take a moment to review the below wiki page for the appropriate steps:

http://wiki.opscode.com/display/chef/How+to+Contribute

If you open the ticket in the project: http://tickets.opscode.com/browse/KNIFE_RACKSPACE, include a link to your branch, and resolve it as "fixed" we'll take a look at an upcoming code review meeting.

@rmyates

FYI I believe this relates to http://tickets.opscode.com/browse/KNIFE_RACKSPACE-19 however the author should probably update it as the ticket itself points to pull request 14 which was closed in favour of this request instead. The ticket is also in a reopened state at present.

@stevendanna
Owner

@rmyates Thanks. Not sure how I missed that one in my search considering the project is so small. I've updated the ticket with a link to this pull request.

@mancdaz

FYI #26

Use of the static DNS entry is now deprecated in the Rackspace API. The code should be altered to use the returned IP address directly.

@vgirnet

Will this issue with DNS entries for RackSpace UK be fixed?
I see several good options, but no one was merged in latest release.

@krames
Collaborator

@vgirnet I was able to successfully provision a server in the UK. Please let me know if you are still having issues other wise I intend on closing this PR.

@krames krames closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 11 additions and 1 deletion.
  1. +4 −0 README.rdoc
  2. +7 −1 lib/chef/knife/rackspace_base.rb
View
4 README.rdoc
@@ -37,6 +37,10 @@ This plugin also has support for authenticating against an alternate API Auth UR
knife[:rackspace_api_auth_url] = "lon.auth.api.rackspacecloud.com"
+Secondly if the default root domain name of the cloud is different this can als be configured. This is useful if you are a Rackspace Cloud UK user or OpenStack early adopter. Here is an example of configuring knife for Rackspace Cloud UK:
+
+ knife[:rackspace_api_public_dns_root_url] = "static.cloud-ips.co.uk"
+
Additionally the following options may be set in your `knife.rb`:
* flavor
View
8 lib/chef/knife/rackspace_base.rb
@@ -52,6 +52,12 @@ def self.included(includer)
:description => "Your rackspace API auth url",
:default => "auth.api.rackspacecloud.com",
:proc => Proc.new { |url| Chef::Config[:knife][:rackspace_api_auth_url] = url }
+
+ option :rackspace_api_public_dns_root_url,
+ :long => "--rackspace_api_public_dns_root_url URL",
+ :description => "Your rackspace API public DNS root url",
+ :default => "static.cloud-ips.com",
+ :proc => Proc.new { |url| Chef::Config[:knife][:rackspace_api_public_dns_root_url] = url }
end
end
@@ -75,7 +81,7 @@ def public_dns_name(server)
@public_dns_name ||= begin
Resolv.getname(server.addresses["public"][0])
rescue
- "#{server.addresses["public"][0].gsub('.','-')}.static.cloud-ips.com"
+ "#{server.addresses["public"][0].gsub('.','-')}.#{Chef::Config[:knife][:rackspace_api_public_dns_root_url] || config[:rackspace_api_public_dns_root_url]}"
end
end
end
Something went wrong with that request. Please try again.