Skip to content

Commit

Permalink
fix: ssh keypair names should include realm and cluster name
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit cef6df75ee50f5c8be7ea763b8938e069633867a
Author: Chris Howe <howech@infochimps.com>
Date:   Wed Mar 19 11:55:15 2014 -0500

    Added a full_cluster_name method that includes the realm name and the cluster name

    Change-Id: Ifbf8c184090d2d809ca3850803d0d7cdc6ff96d8

Change-Id: I6621ed898f867a5388409da6da1856d16bad2c76
  • Loading branch information
Chris Howe committed Mar 19, 2014
1 parent c451201 commit b9b39ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ironfan/dsl/ec2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def image_id
end

def ssh_key_name(computer)
keypair ? keypair.to_s : computer.server.cluster_name
keypair ? keypair.to_s : computer.server.full_cluster_name
end

def default_region
Expand Down
6 changes: 5 additions & 1 deletion lib/ironfan/dsl/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,12 @@ def initialize(attrs={},&block)
super
end

def full_cluster_name
"#{realm_name}-#{cluster_name}"
end

def full_name
"#{realm_name}-#{cluster_name}-#{facet_name}-#{name}"
"#{full_cluster_name}-#{facet_name}-#{name}"
end
def host_name() full_name.gsub('_','-'); end;
def fqdn() [self.host_name, self.dns_domain].compact.join("."); end
Expand Down

0 comments on commit b9b39ac

Please sign in to comment.