To be clear, unique hostnames are not a must. Unique certnames are,
which by default are based on hostnames, but they don't have to be.
You can programmatically generate those using something like UUID
(Which is what Foreman uses for cloud provisioning). See the following
for more info on UUIDs:
http://en.wikipedia.org/wiki/Universally_unique_identifier

-Brian

On Fri, Jun 1, 2012 at 4:20 AM, ankush grover <ankushcen...@gmail.com> wrote:
> Thanks Brian.
>
> My issue is with OnApp the end user can give his hostname while
> configuring the details for the Cloud Instance. When the system boots
> up how do I make puppetmaster accepts this as a client without manual
> intervention from administrator and apply some default classes for
> this host.
>
> Unique hostname is must for Puppet and if the user changes the
> hostname on his own then how the puppet client will talk to
> Puppetmaster.
>
>
>
> On Fri, Jun 1, 2012 at 1:36 PM, Brian Gupta <brian.gu...@brandorr.com> wrote:
>> On Fri, Jun 1, 2012 at 3:54 AM, ankush grover <ankushcen...@gmail.com> wrote:
>>> Any update on this?
>>>
>>> On Wed, May 30, 2012 at 3:28 PM, ankush grover <ankushcen...@gmail.com> 
>>> wrote:
>>>> Hi Friends,
>>>>
>>>> My company is soon to going to deploy a private cloud from OnApp in
>>>> the infrastructure. Task given to me is to install puppet agent when
>>>> any Cloud instance boots. After searching on the google found there
>>>> are 2 ways to do this:
>>>>
>>>>
>>>> * Create a template in which puppet agent is already installed and
>>>> configured to talk to Puppetmaster. The issue is the hostnames for
>>>> these Cloud instances are given by the user and puppet requires unique
>>>> hostnames.
>>>>
>>>> * 2nd Option is run some scripts to install puppet agent, assign the
>>>> new hostname based on the ip and connect it to the Puppet Master and
>>>> on the Puppet master side accept the client without Admin
>>>> intervention.
>>>>
>>>> I somebody could share his experience in configuring Puppet for Cloud
>>>> Instances. What is the best way to configure Puppet and also if
>>>> possible please share the configuration or how to that will be very
>>>> helpful.
>>>>
>>>>
>>>> Thanks & Regards
>>>>
>>>> Ankush
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Puppet Users" group.
>>> To post to this group, send email to puppet-users@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> puppet-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/puppet-users?hl=en.
>>
>> I'm not familiar with OnApp, but the typical pattern for bootstrapping
>> cloud instances is to pass them a templated shell script that
>> bootstraps puppet onto the machine.
>>
>> Here is an example template/script which I use with Foreman
>> (http://www.theforeman.org/) ENC/provisioning system for bootstrapping
>> Ubuntu 12.04 EC2 nodes (Please feel free to follow up with any
>> questions.):
>>
>> #! /bin/bash
>>
>> echo "updating system time"
>> /usr/sbin/ntpdate -sub ntp.pool.org
>>
>> echo "<%= @host %>" > /etc/hostname
>> hostname <%= @host %>
>>
>> echo "PUT_A_DUBUG_PUBLIC_SSH_KEY_HERE" > /root/.ssh/authorized_keys
>>
>> echo "Configuring apt"
>> cat > /etc/apt/sources.list << EOF
>> <%= snippets "precise-sources" -%>
>> EOF
>>
>> apt-get update
>> apt-get -y install ruby ruby1.8 libshadow-ruby1.8 libruby1.8
>> wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.24.tgz
>> tar xvzf rubygems-1.8.24.tgz
>> pushd rubygems-1.8.24
>> ruby setup.rb
>> popd
>> gem1.8 install -v 2.6.9 --no-rdoc --no-ri puppet
>> mkdir /etc/puppet
>> # and add the puppet and ruby-shadow package
>> #apt-get -y install puppet
>>
>> echo "Configuring puppet"
>> cat > /etc/puppet/puppet.conf << EOF
>> <%= snippets "puppetbgllc.conf" -%>
>> EOF
>>
>> /usr/bin/puppetd --config /etc/puppet/puppet.conf -o --tags
>> no_such_tag --no-daemonize
>>
>> puppetd --verbose
>> exit 0
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To post to this group, send email to puppet-users@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to