I''ve gone over the documentation several times now and I can''t figure out how to ''apply'' a manifest to a client. The client does have a signed certificate but the only thing in the /etc/puppet folder on the client is an ssl directory. I have a manifest that works fine on the puppet ''master'' I have added the client into /etc/puppet/manifests/nodes.pp I see a page on the website that talks about ''puppet device'' but i don''t seem to have that option: # puppet Usage: puppet command <space separated arguments> Available commands are: agent, apply, cert, describe, doc, filebucket, inspect, kick, master, queue, resource How do I get the puppet client to run the manifest? # cat /etc/puppet/manifests/nodes.pp node ubuntu.ttinet { include ntp } node ubuntu2.ttinet { include ntp } # cat /etc/puppet/modules/ntp/manifests/ntp.pp # ntp.pp class ntp { case $operatingsystem { centos, redhat: { $service_name = ''ntpd'' $conf_file = ''ntp.conf.el'' } debian, ubuntu: { $service_name = ''ntp'' $conf_file = ''ntp.conf.debian'' } } package { ''ntp'': ensure => installed, } service { ''ntp'': name => $service_name, ensure => running, enable => true, subscribe => File[''ntp.conf''], } file { ''ntp.conf'': path => ''/etc/ntp.conf'', ensure => file, require => Package[''ntp''], source => "puppet:///files/ntp/${conf_file}", } } # class {''ntp'': } -- Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com 1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com Need help communicating between generations at work to achieve your desired success? Let us help! -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, Jun 13, 2011 at 1:57 PM, Craig White <craig.white@ttiltd.com> wrote:> I''ve gone over the documentation several times now and I can''t figure out how to ''apply'' a manifest to a client. > > The client does have a signed certificate but the only thing in the /etc/puppet folder on the client is an ssl directory.\If you are running puppet against a remote puppet master, you should run puppet agent rather than puppet apply. puppet apply is only when you have a copy of the manifest locally.> I have a manifest that works fine on the puppet ''master'' > > I have added the client into /etc/puppet/manifests/nodes.pp > > I see a page on the website that talks about ''puppet device'' but i don''t seem to have that option:You are looking at 2.7 documentation and using an older client, run puppet --version and review the documentation from the appropriate version. Thanks, Nan -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
From a cursory glance at the new doco, I couldn''t find it either (forgive me if it is there though). I could find a ''puppet apply'' but not ''agent'' in the ''getting started'' sections. There is of course the puppet commands page but that does provide examples. Anyhoo.. puppet agent --test --verbose --noop --server <servername> That will do a ''dry-run'' on the client. To update the client remove the --noop. See the man pages for the --test switch, it bundles a few other options (but doesn''t really ''test'' anything -- it will apply your manifest on your client). Cheers, Den On 14/06/2011, at 6:57, Craig White <craig.white@ttiltd.com> wrote:> I''ve gone over the documentation several times now and I can''t figure out how to ''apply'' a manifest to a client. > > The client does have a signed certificate but the only thing in the /etc/puppet folder on the client is an ssl directory. > > I have a manifest that works fine on the puppet ''master'' > > I have added the client into /etc/puppet/manifests/nodes.pp > > I see a page on the website that talks about ''puppet device'' but i don''t seem to have that option: > > # puppet > Usage: puppet command <space separated arguments> > Available commands are: agent, apply, cert, describe, doc, filebucket, inspect, kick, master, queue, resource > > How do I get the puppet client to run the manifest? > > # cat /etc/puppet/manifests/nodes.pp > node ubuntu.ttinet { > include ntp > } > > node ubuntu2.ttinet { > include ntp > } > > # cat /etc/puppet/modules/ntp/manifests/ntp.pp > # ntp.pp > > class ntp { > case $operatingsystem { > centos, redhat: { > $service_name = ''ntpd'' > $conf_file = ''ntp.conf.el'' > } > debian, ubuntu: { > $service_name = ''ntp'' > $conf_file = ''ntp.conf.debian'' > } > } > > package { ''ntp'': > ensure => installed, > } > > service { ''ntp'': > name => $service_name, > ensure => running, > enable => true, > subscribe => File[''ntp.conf''], > } > > file { ''ntp.conf'': > path => ''/etc/ntp.conf'', > ensure => file, > require => Package[''ntp''], > source => "puppet:///files/ntp/${conf_file}", > } > } > > # class {''ntp'': } > > -- > Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com > 1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com > > Need help communicating between generations at work to achieve your desired success? Let us help! > > -- > 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+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
I can run that command no problem but it never does ''apply'' the manifest that is stated in $PUPPET_ROOT/manifests/nodes.pp which is a fairly simple ntp install. (see below for nodes.pp & modules/manifests/ntp.pp) # puppet agent --test --verbose --noop --server ubuntu.ttinet info: Caching catalog for ubuntu2.ttinet info: Applying configuration version ''1308006207'' notice: Finished catalog run in 0.01 seconds root@ubuntu2:/etc/puppet# puppet agent --test --verbose --server ubuntu.ttinet info: Caching catalog for ubuntu2.ttinet info: Applying configuration version ''1308006283'' notice: Finished catalog run in 0.01 seconds I am quite certain that the problem is me but the documentation never quite gets to the point where a manifest is actually applied to a remote client and I have struggled with this for more than 4 hours now. Thanks Craig On Jun 13, 2011, at 3:12 PM, Denmat wrote:> From a cursory glance at the new doco, I couldn''t find it either (forgive me if it is there though). I could find a ''puppet apply'' but not ''agent'' in the ''getting started'' sections. There is of course the puppet commands page but that does provide examples. Anyhoo.. > > puppet agent --test --verbose --noop --server <servername> > > That will do a ''dry-run'' on the client. To update the client remove the --noop. See the man pages for the --test switch, it bundles a few other options (but doesn''t really ''test'' anything -- it will apply your manifest on your client). > > Cheers, > Den > > On 14/06/2011, at 6:57, Craig White <craig.white@ttiltd.com> wrote: > >> I''ve gone over the documentation several times now and I can''t figure out how to ''apply'' a manifest to a client. >> >> The client does have a signed certificate but the only thing in the /etc/puppet folder on the client is an ssl directory. >> >> I have a manifest that works fine on the puppet ''master'' >> >> I have added the client into /etc/puppet/manifests/nodes.pp >> >> I see a page on the website that talks about ''puppet device'' but i don''t seem to have that option: >> >> # puppet >> Usage: puppet command <space separated arguments> >> Available commands are: agent, apply, cert, describe, doc, filebucket, inspect, kick, master, queue, resource >> >> How do I get the puppet client to run the manifest? >> >> # cat /etc/puppet/manifests/nodes.pp >> node ubuntu.ttinet { >> include ntp >> } >> >> node ubuntu2.ttinet { >> include ntp >> } >> >> # cat /etc/puppet/modules/ntp/manifests/ntp.pp >> # ntp.pp >> >> class ntp { >> case $operatingsystem { >> centos, redhat: { >> $service_name = ''ntpd'' >> $conf_file = ''ntp.conf.el'' >> } >> debian, ubuntu: { >> $service_name = ''ntp'' >> $conf_file = ''ntp.conf.debian'' >> } >> } >> >> package { ''ntp'': >> ensure => installed, >> } >> >> service { ''ntp'': >> name => $service_name, >> ensure => running, >> enable => true, >> subscribe => File[''ntp.conf''], >> } >> >> file { ''ntp.conf'': >> path => ''/etc/ntp.conf'', >> ensure => file, >> require => Package[''ntp''], >> source => "puppet:///files/ntp/${conf_file}", >> } >> } >> >> # class {''ntp'': } >> >> -- >> Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com >> 1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com >> >> Need help communicating between generations at work to achieve your desired success? Let us help! >> >> -- >> 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+unsubscribe@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+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >-- Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com 1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com Need help communicating between generations at work to achieve your desired success? Let us help! -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Jun 13, 2011, at 3:10 PM, Nan Liu wrote:> On Mon, Jun 13, 2011 at 1:57 PM, Craig White <craig.white@ttiltd.com> wrote: >> I''ve gone over the documentation several times now and I can''t figure out how to ''apply'' a manifest to a client. >> >> The client does have a signed certificate but the only thing in the /etc/puppet folder on the client is an ssl directory.\ > > If you are running puppet against a remote puppet master, you should > run puppet agent rather than puppet apply. puppet apply is only when > you have a copy of the manifest locally. > >> I have a manifest that works fine on the puppet ''master'' >> >> I have added the client into /etc/puppet/manifests/nodes.pp >> >> I see a page on the website that talks about ''puppet device'' but i don''t seem to have that option: > > You are looking at 2.7 documentation and using an older client, run > puppet --version and review the documentation from the appropriate > version. > > Thanks, > > Nan > >----- if the puppet agent command would have worked for me, I wouldn''t have asked. My puppet master has manifests/nodes.pp which lists the client fqdn (matches the cert too) and it includes ''ntp'' which is found in modules/ntp/manifests/ntp.pp (see my original e-mail) but it doesn''t seem to happen no matter how many times I invoke the ''puppet agent command from the client system). The client system did however get a certificate from the server. I guess no one will accuse you of not having up-to-date documentation and yes, I am using the 2.6.8 puppet gem on both systems (ubuntu dist was much older). Thanks Craig -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, Jun 13, 2011 at 4:19 PM, Craig White <craig.white@ttiltd.com> wrote:> > On Jun 13, 2011, at 3:10 PM, Nan Liu wrote: > >> On Mon, Jun 13, 2011 at 1:57 PM, Craig White <craig.white@ttiltd.com> wrote: >>> I''ve gone over the documentation several times now and I can''t figure out how to ''apply'' a manifest to a client. >>> >>> The client does have a signed certificate but the only thing in the /etc/puppet folder on the client is an ssl directory.\ >> >> If you are running puppet against a remote puppet master, you should >> run puppet agent rather than puppet apply. puppet apply is only when >> you have a copy of the manifest locally. >> >>> I have a manifest that works fine on the puppet ''master'' >>> >>> I have added the client into /etc/puppet/manifests/nodes.ppDidn''t notice this earlier, the default manifests file puppet master compiles is /etc/puppet/manifests/site.pp, you need to import nodes.pp in site.pp, or simply write the node information in site.pp manifest.> if the puppet agent command would have worked for me, I wouldn''t have asked. My puppet master has manifests/nodes.pp which lists the client fqdn (matches the cert too) and it includes ''ntp'' which is found in modules/ntp/manifests/ntp.pp (see my original e-mail) but it doesn''t seem to happen no matter how many times I invoke the ''puppet agent command from the client system). The client system did however get a certificate from the server.If the suggestion above doesn''t work, try to include a default node in site.pp: node default { include ntp } Beyond that, start running puppet master with the option --no-daemonize --verbose (add --debug as necessary) and send any applicable output. It should autoload classes in modules and compile catalog for the taget node successfully (see sample below): debug: importing ''/etc/puppetlabs/puppet/modules/motd/manifests/init.pp'' in environment production debug: Automatically imported motd from motd into production debug: Scope(Class[Motd]): Retrieving template motd/motd.erb debug: template[/etc/puppetlabs/puppet/modules/motd/templates/motd.erb]: Bound template variables for /etc/puppetlabs/puppet/modules/motd/templates/motd.erb in 0.00 seconds debug: template[/etc/puppetlabs/puppet/modules/motd/templates/motd.erb]: Interpolated template /etc/puppetlabs/puppet/modules/motd/templates/motd.erb in 0.00 seconds notice: Compiled catalog for node in environment production in 0.03 seconds Thanks, Nan -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
What Nan said. Personally, I would recommend just renaming nodes.pp to site.pp -- there''s not much of a reason to maintain your nodes in a separate file when you''re just getting started. And yeah, always have a node default { ... } , even if all it does is fire a notify resource saying "Hey, I''m not the node you think I am." -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Jun 13, 2011, at 5:02 PM, Nan Liu wrote:> On Mon, Jun 13, 2011 at 4:19 PM, Craig White <craig.white@ttiltd.com> wrote: >> >> On Jun 13, 2011, at 3:10 PM, Nan Liu wrote: >> >>> On Mon, Jun 13, 2011 at 1:57 PM, Craig White <craig.white@ttiltd.com> wrote: >>>> I''ve gone over the documentation several times now and I can''t figure out how to ''apply'' a manifest to a client. >>>> >>>> The client does have a signed certificate but the only thing in the /etc/puppet folder on the client is an ssl directory.\ >>> >>> If you are running puppet against a remote puppet master, you should >>> run puppet agent rather than puppet apply. puppet apply is only when >>> you have a copy of the manifest locally. >>> >>>> I have a manifest that works fine on the puppet ''master'' >>>> >>>> I have added the client into /etc/puppet/manifests/nodes.pp > > Didn''t notice this earlier, the default manifests file puppet master > compiles is /etc/puppet/manifests/site.pp, you need to import nodes.pp > in site.pp, or simply write the node information in site.pp manifest. > >> if the puppet agent command would have worked for me, I wouldn''t have asked. My puppet master has manifests/nodes.pp which lists the client fqdn (matches the cert too) and it includes ''ntp'' which is found in modules/ntp/manifests/ntp.pp (see my original e-mail) but it doesn''t seem to happen no matter how many times I invoke the ''puppet agent command from the client system). The client system did however get a certificate from the server. > > If the suggestion above doesn''t work, try to include a default node in site.pp: > node default { > include ntp > } > > Beyond that, start running puppet master with the option > --no-daemonize --verbose (add --debug as necessary) and send any > applicable output. It should autoload classes in modules and compile > catalog for the taget node successfully (see sample below):---- still no joy ;-( # cat site.pp import "templates" import "nodes" # cat nodes.pp node ubuntu.ttinet { include ntp } node ubuntu2.ttinet { include ntp package { "apt": ensure => installed, } file{"/etc/apt/sources.list": ensure => present, owner => root, require => Package["apt"] } } # cat templates.pp class baseclass { } node default { include baseclass } root@ubuntu:/etc/puppet/manifests# puppet master --no-daemonize --verbose --debug debug: Failed to load library ''shadow'' for feature ''libshadow'' debug: Puppet::Type::User::ProviderUser_role_add: file roledel does not exist debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does not exist debug: Puppet::Type::User::ProviderLdap: true value when expecting false debug: Puppet::Type::User::ProviderPw: file pw does not exist debug: Failed to load library ''selinux'' for feature ''selinux'' debug: Puppet::Type::File::ProviderMicrosoft_windows: feature microsoft_windows is missing debug: Failed to load library ''ldap'' for feature ''ldap'' debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/server_data]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/log]: Autorequiring File[/var/lib/puppet] debug: /File[/etc/puppet/ssl/public_keys/ubuntu.ttinet.pem]: Autorequiring File[/etc/puppet/ssl/public_keys] debug: /File[/etc/puppet/ssl/certs]: Autorequiring File[/etc/puppet/ssl] debug: /File[/etc/puppet/auth.conf]: Autorequiring File[/etc/puppet] debug: /File[/etc/puppet/ssl/private]: Autorequiring File[/etc/puppet/ssl] debug: /File[/var/lib/puppet/yaml]: Autorequiring File[/var/lib/puppet] debug: /File[/etc/puppet/manifests]: Autorequiring File[/etc/puppet] debug: /File[/etc/puppet/ssl/private_keys/ubuntu.ttinet.pem]: Autorequiring File[/etc/puppet/ssl/private_keys] debug: /File[/etc/puppet/ssl/certs/ubuntu.ttinet.pem]: Autorequiring File[/etc/puppet/ssl/certs] debug: /File[/var/lib/puppet/run]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/reports]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/bucket]: Autorequiring File[/var/lib/puppet] debug: /File[/etc/puppet/manifests/site.pp]: Autorequiring File[/etc/puppet/manifests] debug: /File[/etc/puppet/ssl/public_keys]: Autorequiring File[/etc/puppet/ssl] debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet] debug: /File[/etc/puppet/ssl]: Autorequiring File[/etc/puppet] debug: /File[/etc/puppet/ssl/crl.pem]: Autorequiring File[/etc/puppet/ssl] debug: /File[/var/lib/puppet/log/masterhttp.log]: Autorequiring File[/var/lib/puppet/log] debug: /File[/etc/puppet/ssl/certs/ca.pem]: Autorequiring File[/etc/puppet/ssl/certs] debug: /File[/var/lib/puppet/rrd]: Autorequiring File[/var/lib/puppet] debug: /File[/etc/puppet/ssl/private_keys]: Autorequiring File[/etc/puppet/ssl] debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet] debug: /File[/etc/puppet/ssl/certificate_requests]: Autorequiring File[/etc/puppet/ssl] debug: /File[/etc/puppet/fileserver.conf]: Autorequiring File[/etc/puppet] debug: Finishing transaction 33589420 debug: /File[/etc/puppet/ssl/ca/private/ca.pass]: Autorequiring File[/etc/puppet/ssl/ca/private] debug: /File[/etc/puppet/ssl/ca/ca_pub.pem]: Autorequiring File[/etc/puppet/ssl/ca] debug: /File[/etc/puppet/ssl/ca/serial]: Autorequiring File[/etc/puppet/ssl/ca] debug: /File[/etc/puppet/ssl/ca/ca_key.pem]: Autorequiring File[/etc/puppet/ssl/ca] debug: /File[/etc/puppet/ssl/ca/signed]: Autorequiring File[/etc/puppet/ssl/ca] debug: /File[/etc/puppet/ssl/ca/ca_crt.pem]: Autorequiring File[/etc/puppet/ssl/ca] debug: /File[/etc/puppet/ssl/ca/ca_crl.pem]: Autorequiring File[/etc/puppet/ssl/ca] debug: /File[/etc/puppet/ssl/ca/inventory.txt]: Autorequiring File[/etc/puppet/ssl/ca] debug: /File[/etc/puppet/ssl/ca/requests]: Autorequiring File[/etc/puppet/ssl/ca] debug: /File[/etc/puppet/ssl/ca/private]: Autorequiring File[/etc/puppet/ssl/ca] debug: Finishing transaction 32855280 debug: Using cached certificate for ca debug: Using cached certificate for ca debug: Using cached certificate for ubuntu.ttinet notice: Starting Puppet master version 2.6.8 debug: Finishing transaction 31427660 info: mount[files]: allowing 10.0.0.0/8 access debug: No modules mount given; autocreating with default permissions debug: No path given for plugins mount; creating a special PluginMount info: access[^/catalog/([^/]+)$]: allowing ''method'' find info: access[^/catalog/([^/]+)$]: allowing $1 access info: access[/certificate_revocation_list/ca]: allowing ''method'' find info: access[/certificate_revocation_list/ca]: allowing * access info: access[/report]: allowing ''method'' save info: access[/report]: allowing * access info: access[/file]: allowing * access info: access[/certificate/ca]: adding authentication no info: access[/certificate/ca]: allowing ''method'' find info: access[/certificate/ca]: allowing * access info: access[/certificate/]: adding authentication no info: access[/certificate/]: allowing ''method'' find info: access[/certificate/]: allowing * access info: access[/certificate_request]: adding authentication no info: access[/certificate_request]: allowing ''method'' find info: access[/certificate_request]: allowing ''method'' save info: access[/certificate_request]: allowing * access info: access[/]: adding authentication any info: Inserting default ''/status''(auth) ACL because none were found in ''/etc/puppet/auth.conf'' info: Expiring the node cache of ubuntu2.ttinet info: Not using expired node for ubuntu2.ttinet from cache; expired at Tue Jun 14 08:16:51 -0700 2011 info: Caching node for ubuntu2.ttinet debug: importing ''/etc/puppet/manifests/templates.pp'' in environment production debug: importing ''/etc/puppet/manifests/nodes.pp'' in environment production err: Could not parse for environment production: Syntax error at ''.'' at /etc/puppet/manifests/nodes.pp:1 on node ubuntu2.ttinet err: Could not parse for environment production: Syntax error at ''.'' at /etc/puppet/manifests/nodes.pp:1 on node ubuntu2.ttinet -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Try quoting your node names, e.g. node ''ubuntu2.ttinet'' { -- Peter M. Bukowinski Systems Engineer Janelia Farm Research Campus, HHMI On Tuesday, June 14, 2011 at 11:26 AM, Craig White wrote:> > On Jun 13, 2011, at 5:02 PM, Nan Liu wrote: > > > On Mon, Jun 13, 2011 at 4:19 PM, Craig White <craig.white@ttiltd.com (mailto:craig.white@ttiltd.com)> wrote: > > > > > > On Jun 13, 2011, at 3:10 PM, Nan Liu wrote: > > > > > > > On Mon, Jun 13, 2011 at 1:57 PM, Craig White <craig.white@ttiltd.com (mailto:craig.white@ttiltd.com)> wrote: > > > > > I''ve gone over the documentation several times now and I can''t figure out how to ''apply'' a manifest to a client. > > > > > > > > > > The client does have a signed certificate but the only thing in the /etc/puppet folder on the client is an ssl directory.\ > > > > > > > > If you are running puppet against a remote puppet master, you should > > > > run puppet agent rather than puppet apply. puppet apply is only when > > > > you have a copy of the manifest locally. > > > > > > > > > I have a manifest that works fine on the puppet ''master'' > > > > > > > > > > I have added the client into /etc/puppet/manifests/nodes.pp > > > > Didn''t notice this earlier, the default manifests file puppet master > > compiles is /etc/puppet/manifests/site.pp, you need to import nodes.pp > > in site.pp, or simply write the node information in site.pp manifest. > > > > > if the puppet agent command would have worked for me, I wouldn''t have asked. My puppet master has manifests/nodes.pp which lists the client fqdn (matches the cert too) and it includes ''ntp'' which is found in modules/ntp/manifests/ntp.pp (see my original e-mail) but it doesn''t seem to happen no matter how many times I invoke the ''puppet agent command from the client system). The client system did however get a certificate from the server. > > > > If the suggestion above doesn''t work, try to include a default node in site.pp: > > node default { > > include ntp > > } > > > > Beyond that, start running puppet master with the option > > --no-daemonize --verbose (add --debug as necessary) and send any > > applicable output. It should autoload classes in modules and compile > > catalog for the taget node successfully (see sample below): > ---- > still no joy ;-( > > # cat site.pp > import "templates" > import "nodes" > > # cat nodes.pp > node ubuntu.ttinet { > include ntp > } > > node ubuntu2.ttinet { > include ntp > package { "apt": > ensure => installed, > } > file{"/etc/apt/sources.list": > ensure => present, > owner => root, > require => Package["apt"] > } > } > > # cat templates.pp > class baseclass { > } > > node default { > include baseclass > } > > root@ubuntu:/etc/puppet/manifests# puppet master --no-daemonize --verbose --debug > debug: Failed to load library ''shadow'' for feature ''libshadow'' > debug: Puppet::Type::User::ProviderUser_role_add: file roledel does not exist > debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does not exist > debug: Puppet::Type::User::ProviderLdap: true value when expecting false > debug: Puppet::Type::User::ProviderPw: file pw does not exist > debug: Failed to load library ''selinux'' for feature ''selinux'' > debug: Puppet::Type::File::ProviderMicrosoft_windows: feature microsoft_windows is missing > debug: Failed to load library ''ldap'' for feature ''ldap'' > debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet] > debug: /File[/var/lib/puppet/server_data]: Autorequiring File[/var/lib/puppet] > debug: /File[/var/lib/puppet/log]: Autorequiring File[/var/lib/puppet] > debug: /File[/etc/puppet/ssl/public_keys/ubuntu.ttinet.pem]: Autorequiring File[/etc/puppet/ssl/public_keys] > debug: /File[/etc/puppet/ssl/certs]: Autorequiring File[/etc/puppet/ssl] > debug: /File[/etc/puppet/auth.conf]: Autorequiring File[/etc/puppet] > debug: /File[/etc/puppet/ssl/private]: Autorequiring File[/etc/puppet/ssl] > debug: /File[/var/lib/puppet/yaml]: Autorequiring File[/var/lib/puppet] > debug: /File[/etc/puppet/manifests]: Autorequiring File[/etc/puppet] > debug: /File[/etc/puppet/ssl/private_keys/ubuntu.ttinet.pem]: Autorequiring File[/etc/puppet/ssl/private_keys] > debug: /File[/etc/puppet/ssl/certs/ubuntu.ttinet.pem]: Autorequiring File[/etc/puppet/ssl/certs] > debug: /File[/var/lib/puppet/run]: Autorequiring File[/var/lib/puppet] > debug: /File[/var/lib/puppet/reports]: Autorequiring File[/var/lib/puppet] > debug: /File[/var/lib/puppet/bucket]: Autorequiring File[/var/lib/puppet] > debug: /File[/etc/puppet/manifests/site.pp]: Autorequiring File[/etc/puppet/manifests] > debug: /File[/etc/puppet/ssl/public_keys]: Autorequiring File[/etc/puppet/ssl] > debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet] > debug: /File[/etc/puppet/ssl]: Autorequiring File[/etc/puppet] > debug: /File[/etc/puppet/ssl/crl.pem]: Autorequiring File[/etc/puppet/ssl] > debug: /File[/var/lib/puppet/log/masterhttp.log]: Autorequiring File[/var/lib/puppet/log] > debug: /File[/etc/puppet/ssl/certs/ca.pem]: Autorequiring File[/etc/puppet/ssl/certs] > debug: /File[/var/lib/puppet/rrd]: Autorequiring File[/var/lib/puppet] > debug: /File[/etc/puppet/ssl/private_keys]: Autorequiring File[/etc/puppet/ssl] > debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet] > debug: /File[/etc/puppet/ssl/certificate_requests]: Autorequiring File[/etc/puppet/ssl] > debug: /File[/etc/puppet/fileserver.conf]: Autorequiring File[/etc/puppet] > debug: Finishing transaction 33589420 > debug: /File[/etc/puppet/ssl/ca/private/ca.pass]: Autorequiring File[/etc/puppet/ssl/ca/private] > debug: /File[/etc/puppet/ssl/ca/ca_pub.pem]: Autorequiring File[/etc/puppet/ssl/ca] > debug: /File[/etc/puppet/ssl/ca/serial]: Autorequiring File[/etc/puppet/ssl/ca] > debug: /File[/etc/puppet/ssl/ca/ca_key.pem]: Autorequiring File[/etc/puppet/ssl/ca] > debug: /File[/etc/puppet/ssl/ca/signed]: Autorequiring File[/etc/puppet/ssl/ca] > debug: /File[/etc/puppet/ssl/ca/ca_crt.pem]: Autorequiring File[/etc/puppet/ssl/ca] > debug: /File[/etc/puppet/ssl/ca/ca_crl.pem]: Autorequiring File[/etc/puppet/ssl/ca] > debug: /File[/etc/puppet/ssl/ca/inventory.txt]: Autorequiring File[/etc/puppet/ssl/ca] > debug: /File[/etc/puppet/ssl/ca/requests]: Autorequiring File[/etc/puppet/ssl/ca] > debug: /File[/etc/puppet/ssl/ca/private]: Autorequiring File[/etc/puppet/ssl/ca] > debug: Finishing transaction 32855280 > debug: Using cached certificate for ca > debug: Using cached certificate for ca > debug: Using cached certificate for ubuntu.ttinet > notice: Starting Puppet master version 2.6.8 > debug: Finishing transaction 31427660 > info: mount[files]: allowing 10.0.0.0/8 access > debug: No modules mount given; autocreating with default permissions > debug: No path given for plugins mount; creating a special PluginMount > info: access[^/catalog/([^/]+)$]: allowing ''method'' find > info: access[^/catalog/([^/]+)$]: allowing $1 access > info: access[/certificate_revocation_list/ca]: allowing ''method'' find > info: access[/certificate_revocation_list/ca]: allowing * access > info: access[/report]: allowing ''method'' save > info: access[/report]: allowing * access > info: access[/file]: allowing * access > info: access[/certificate/ca]: adding authentication no > info: access[/certificate/ca]: allowing ''method'' find > info: access[/certificate/ca]: allowing * access > info: access[/certificate/]: adding authentication no > info: access[/certificate/]: allowing ''method'' find > info: access[/certificate/]: allowing * access > info: access[/certificate_request]: adding authentication no > info: access[/certificate_request]: allowing ''method'' find > info: access[/certificate_request]: allowing ''method'' save > info: access[/certificate_request]: allowing * access > info: access[/]: adding authentication any > info: Inserting default ''/status''(auth) ACL because none were found in ''/etc/puppet/auth.conf'' > info: Expiring the node cache of ubuntu2.ttinet > info: Not using expired node for ubuntu2.ttinet from cache; expired at Tue Jun 14 08:16:51 -0700 2011 > info: Caching node for ubuntu2.ttinet > debug: importing ''/etc/puppet/manifests/templates.pp'' in environment production > debug: importing ''/etc/puppet/manifests/nodes.pp'' in environment production > err: Could not parse for environment production: Syntax error at ''.'' at /etc/puppet/manifests/nodes.pp:1 on node ubuntu2.ttinet > err: Could not parse for environment production: Syntax error at ''.'' at /etc/puppet/manifests/nodes.pp:1 on node ubuntu2.ttinet > > -- > 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 (mailto:puppet-users@googlegroups.com). > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com (mailto:puppet-users+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Jun 14, 2011, at 8:33 AM, Peter Bukowinski wrote:> Try quoting your node names, e.g. > > node ''ubuntu2.ttinet'' {---- trying to keep this as simple as possible just to get one client to work. # cat site.pp import "templates" import "nodes" # cat nodes.pp node ''ubuntu.ttinet'' { include ntp. } node ''ubuntu2.ttinet'' { include ntp, } # cat templates.pp class baseclass { } node default { include baseclass } info: Not using expired node for ubuntu2.ttinet from cache; expired at Tue Jun 14 09:23:28 -0700 2011 info: Caching node for ubuntu2.ttinet debug: importing ''/etc/puppet/manifests/templates.pp'' in environment production debug: importing ''/etc/puppet/manifests/nodes.pp'' in environment production err: Could not parse for environment production: Syntax error at ''.''; expected ''}'' at /etc/puppet/manifests/nodes.pp:2 on node ubuntu2.ttinet err: Could not parse for environment production: Syntax error at ''.''; expected ''}'' at /etc/puppet/manifests/nodes.pp:2 on node ubuntu2.ttinet ^Cnotice: Caught INT; calling stop quoting the node names changed nothing If there is actually some tutorial somewhere that actually shows me what it is I need to do to connect in a second computer beyond just getting the certificate, please let me know but I have been working on this since last Friday. I am not that stupid. I got Chef working in just 2 or 3 hours. Thanks Craig -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Is it just my imagination, or are you putting a full stop/period/comma after the ''include ntp'' lines in nodes.pp? On Tue, Jun 14, 2011 at 5:30 PM, Craig White <craig.white@ttiltd.com> wrote:> > On Jun 14, 2011, at 8:33 AM, Peter Bukowinski wrote: > >> Try quoting your node names, e.g. >> >> node ''ubuntu2.ttinet'' { > ---- > trying to keep this as simple as possible just to get one client to work. > > # cat site.pp > import "templates" > import "nodes" > > # cat nodes.pp > node ''ubuntu.ttinet'' { > include ntp. > } > > node ''ubuntu2.ttinet'' { > include ntp, > } > > # cat templates.pp > class baseclass { > } > > node default { > include baseclass > } > > info: Not using expired node for ubuntu2.ttinet from cache; expired at Tue Jun 14 09:23:28 -0700 2011 > info: Caching node for ubuntu2.ttinet > debug: importing ''/etc/puppet/manifests/templates.pp'' in environment production > debug: importing ''/etc/puppet/manifests/nodes.pp'' in environment production > err: Could not parse for environment production: Syntax error at ''.''; expected ''}'' at /etc/puppet/manifests/nodes.pp:2 on node ubuntu2.ttinet > err: Could not parse for environment production: Syntax error at ''.''; expected ''}'' at /etc/puppet/manifests/nodes.pp:2 on node ubuntu2.ttinet > ^Cnotice: Caught INT; calling stop > > quoting the node names changed nothing > > If there is actually some tutorial somewhere that actually shows me what it is I need to do to connect in a second computer beyond just getting the certificate, please let me know but I have been working on this since last Friday. I am not that stupid. I got Chef working in just 2 or 3 hours. > > Thanks > > Craig > > -- > 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+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
The error message says: err: Could not parse for environment production: Syntax error at ''.''; expected ''}'' at /etc/puppet/manifests/nodes.pp:2 on node ubuntu2.ttinet and your file in question:> # cat nodes.pp > node ''ubuntu.ttinet'' { > include ntp. > }So what''s on line 2? a "." at the end, and the error tells you it did not expect the ".". Did you remove the "."? -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Jun 14, 2011, at 9:35 AM, R.I.Pienaar wrote:> The error message says: > > err: Could not parse for environment production: Syntax error at ''.''; expected ''}'' at /etc/puppet/manifests/nodes.pp:2 on node ubuntu2.ttinet > > and your file in question: > >> # cat nodes.pp >> node ''ubuntu.ttinet'' { >> include ntp. >> } > > > So what''s on line 2? a "." at the end, and the error tells you it did not expect the ".". > > Did you remove the "."? > > -- > 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+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >---- the period was indeed a typo but I had to remove the '','' (comma) as well to make it work. It finally worked! I guess you always need the commas except when they toss you errors. I''m sure I will have more questions but I will exhaust Google and the documentation first. I''ve been able to install packages now and see somewhat where this is leading. Thanks all Craig -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
I will also mention that there are now a few books on Puppet. I''m currently reading through Pro Puppet by James Turnbull (who wrote the original Pulling Strings with Puppet book), and it''s quite good. The original book was a bit light on some details, Pro Puppet really dives in and shows how all the pieces fit together. http://www.apress.com/catalogsearch/result/?q=puppet&submit=Go -- Nathan Clemons http://www.livemocha.com The worlds largest online language learning community On Tue, Jun 14, 2011 at 10:02 AM, Craig White <craig.white@ttiltd.com>wrote:> > On Jun 14, 2011, at 9:35 AM, R.I.Pienaar wrote: > > > The error message says: > > > > err: Could not parse for environment production: Syntax error at ''.''; > expected ''}'' at /etc/puppet/manifests/nodes.pp:2 on node ubuntu2.ttinet > > > > and your file in question: > > > >> # cat nodes.pp > >> node ''ubuntu.ttinet'' { > >> include ntp. > >> } > > > > > > So what''s on line 2? a "." at the end, and the error tells you it did not > expect the ".". > > > > Did you remove the "."? > > > > -- > > 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+unsubscribe@googlegroups.com. > > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > > > ---- > the period was indeed a typo but I had to remove the '','' (comma) as well to > make it work. It finally worked! I guess you always need the commas except > when they toss you errors. > > I''m sure I will have more questions but I will exhaust Google and the > documentation first. I''ve been able to install packages now and see somewhat > where this is leading. > > Thanks all > > Craig > > -- > 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+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Thanks - asked my company to buy it but I might just buy it myself if they aren''t interested. Sounds like just the ticket for me... progress has been really slow. Craig On Jun 14, 2011, at 10:32 AM, Nathan Clemons wrote:> I will also mention that there are now a few books on Puppet. I''m currently reading through Pro Puppet by James Turnbull (who wrote the original Pulling Strings with Puppet book), and it''s quite good. The original book was a bit light on some details, Pro Puppet really dives in and shows how all the pieces fit together. > > http://www.apress.com/catalogsearch/result/?q=puppet&submit=Go > > -- > Nathan Clemons > http://www.livemocha.com > The worlds largest online language learning community > > > > On Tue, Jun 14, 2011 at 10:02 AM, Craig White <craig.white@ttiltd.com> wrote: > > On Jun 14, 2011, at 9:35 AM, R.I.Pienaar wrote: > > > The error message says: > > > > err: Could not parse for environment production: Syntax error at ''.''; expected ''}'' at /etc/puppet/manifests/nodes.pp:2 on node ubuntu2.ttinet > > > > and your file in question: > > > >> # cat nodes.pp > >> node ''ubuntu.ttinet'' { > >> include ntp. > >> } > > > > > > So what''s on line 2? a "." at the end, and the error tells you it did not expect the ".". > > > > Did you remove the "."? > > > > -- > > 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+unsubscribe@googlegroups.com. > > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > > > > ---- > the period was indeed a typo but I had to remove the '','' (comma) as well to make it work. It finally worked! I guess you always need the commas except when they toss you errors. > > I''m sure I will have more questions but I will exhaust Google and the documentation first. I''ve been able to install packages now and see somewhat where this is leading. > > Thanks all > > Craig > > -- > 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+unsubscribe@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+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.-- Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com 1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com Need help communicating between generations at work to achieve your desired success? Let us help! -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
You''ve got a full stop ''.'' at the include ntp line. Cheers, Den On 15/06/2011, at 2:30, Craig White <craig.white@ttiltd.com> wrote:> > On Jun 14, 2011, at 8:33 AM, Peter Bukowinski wrote: > >> Try quoting your node names, e.g. >> >> node ''ubuntu2.ttinet'' { > ---- > trying to keep this as simple as possible just to get one client to work. > > # cat site.pp > import "templates" > import "nodes" > > # cat nodes.pp > node ''ubuntu.ttinet'' { > include ntp. > } > > node ''ubuntu2.ttinet'' { > include ntp, > } > > # cat templates.pp > class baseclass { > } > > node default { > include baseclass > } > > info: Not using expired node for ubuntu2.ttinet from cache; expired at Tue Jun 14 09:23:28 -0700 2011 > info: Caching node for ubuntu2.ttinet > debug: importing ''/etc/puppet/manifests/templates.pp'' in environment production > debug: importing ''/etc/puppet/manifests/nodes.pp'' in environment production > err: Could not parse for environment production: Syntax error at ''.''; expected ''}'' at /etc/puppet/manifests/nodes.pp:2 on node ubuntu2.ttinet > err: Could not parse for environment production: Syntax error at ''.''; expected ''}'' at /etc/puppet/manifests/nodes.pp:2 on node ubuntu2.ttinet > ^Cnotice: Caught INT; calling stop > > quoting the node names changed nothing > > If there is actually some tutorial somewhere that actually shows me what it is I need to do to connect in a second computer beyond just getting the certificate, please let me know but I have been working on this since last Friday. I am not that stupid. I got Chef working in just 2 or 3 hours. > > Thanks > > Craig > > -- > 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+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.