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

OC 9450 - Auto generate chef node name when not input by user #30

Merged
merged 4 commits into from
Aug 30, 2013

Conversation

muktaa
Copy link

@muktaa muktaa commented Aug 19, 2013

No description provided.

@mattray
Copy link
Contributor

mattray commented Aug 19, 2013

The prefix 'os' was used to indicate 'OpenStack'. I wonder if we could make this show a prefix based on the provider? We could change the signature of

def get_node_name(chef_node_name)
to
def get_node_name(chef_node_name, prefix)
so nodes could get names like 'ec2-124326243' or 'hp-434283423' or 'rs-323423423'

@kaustubh-d
Copy link
Contributor

@adamedx @mattray - Apart from defaults it might be useful to give ability for user to specify the prefix, example user may want to create 5 instances/nodes for ec2-db-server-* and 5 for ec2-app-server-* etc...?

@mattray
Copy link
Contributor

mattray commented Aug 20, 2013

There's already support for using -N to name the nodes, I'm not sure we need to worry about multi-node naming here. This is just about automatically providing a unique name with a prefix identifying the provider.

FWIW, spiceweasel does multi-node provisioning with an iterator.

end

describe "#get_node_name" do
it "auto generates chef_node_name" do
Copy link

Choose a reason for hiding this comment

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

Can we add an additional spec that generates two names (or more) and validates that they are unique?

@siddheshwar-more
Copy link

Added rspec test to test uniqueness of auto genrated chef_node_names.
Thanks.

mattray pushed a commit that referenced this pull request Aug 30, 2013
OC 9450 - Auto generate chef node name when not input by user
@mattray mattray merged commit 3c211f1 into master Aug 30, 2013
@muktaa muktaa deleted the muktaa-oc-9450-auto-generation-names branch April 29, 2014 07:54
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