FAQ
I'm trying to get a small Puppet Enterprise environment setup for testing -
just three servers: a Gitlab box for manifest/module version control, the
puppet enterprise server, and a test ubuntu box. I believe I have a pretty
decent handle on how to automatically pull down updates from the git
repository using Sinatra and a web hook, but I'm at the point where I need
to figure out how to get this new repository available for my ubuntu box to
actually use.

I believe this is the relevant information about my setup:

/etc/puppetlabs/puppet/$ tree
-- auth.conf
-- environments
`-- dev
-- README
-- apache
-- files
`-- index.html
-- manifests
`-- init.pp
`-- tests
`-- init.pp
-- site.pp `-- users
-- manifests
`-- init.pp
`-- tests
`-- init.pp
-- files
-- fileserver.conf
-- hiera.yaml
-- manifests
`-- site.pp
-- modules
`-- motd
-- stuff
`-- things
-- puppet.conf
-- puppet.conf.bak
-- puppetdb.conf
-- routes.yaml
-- ssl [error opening dir]
`-- templates


puppet.conf

[main]
     certname = puppet-test.local.dom
     vardir = /var/opt/lib/pe-puppet
     logdir = /var/log/pe-puppet
     rundir = /var/run/pe-puppet
     modulepath =
/etc/puppetlabs/puppet/modules:/opt/puppet/share/puppet/modules
     server = puppet-test.local.dom
     user = pe-puppet
     group = pe-puppet
     archive_files = true
     archive_file_server = puppet-test.local.dom

[master]
     certname = puppet-test.local.dom
     dns_alt_names = puppet-test,puppet-test.local.dom,puppet.local.dom
     ca_name = 'Puppet CA generated on puppet-test.elbiz.local at 2013-10-01
13:52:42 -0400'
     reports = http,puppetdb
     reporturl = https://localhost:443/reports/upload
     node_terminus = exec
     external_nodes = /etc/puppetlabs/puppet-dashboard/external_node
     ssl_client_header = SSL_CLIENT_S_DN
     ssl_client_verify_header = SSL_CLIENT_VERIFY
     storeconfigs_backend = puppetdb
     storeconfigs = true

[agent]
     report = true
     classfile = $vardir/classes.txt
     localconfig = $vardir/localconfig
     graph = true
     pluginsync = true
     environment = production

[dev]
     environment = dev
     manifest = /etc/puppetlabs/puppet/environments/dev/site.pp
     modulepath =
/etc/puppetlabs/puppet/environments/dev/modules:/etc/puppetlabs/puppet/modules:/opt/puppet/share/puppet/modules


Contents of ./dev/site.pp

node default {
   include apache
}


MOTD is a module pulled from Puppet Forge - and it works correctly with a puppet
agent -t command from my ubuntu test box. However, if I perform a puppet
agent -t --environment dev - things fail:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Could not find class apache for ubuntu1204-puppet.local.dom on node
ubuntu1204-puppet.local.dom
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run


I guess I'm just looking for what I might have missed. Any thoughts?


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Sneha More at Oct 11, 2013 at 11:08 am
    Hi,
       I think the problem is with your modulepath, as your apache module is
    under /etc/puppetlabs/puppet/environments/dev/, change the modulepath under
    [dev] as
    modulepath = /etc/puppetlabs/puppet/environments/dev
    I hope this will solve your problem.

    Thanks and Regards
    Sneha More.
    NTT DATA GTS, OSS Center, India (Pune)
    On Thursday, October 10, 2013 7:22:37 PM UTC+5:30, pezhore wrote:

    I'm trying to get a small Puppet Enterprise environment setup for testing
    - just three servers: a Gitlab box for manifest/module version control, the
    puppet enterprise server, and a test ubuntu box. I believe I have a pretty
    decent handle on how to automatically pull down updates from the git
    repository using Sinatra and a web hook, but I'm at the point where I need
    to figure out how to get this new repository available for my ubuntu box to
    actually use.

    I believe this is the relevant information about my setup:

    /etc/puppetlabs/puppet/$ tree
    -- auth.conf
    -- environments
    `-- dev
    -- README
    -- apache
    -- files
    `-- index.html
    -- manifests
    `-- init.pp
    `-- tests
    `-- init.pp
    -- site.pp `-- users
    -- manifests
    `-- init.pp
    `-- tests
    `-- init.pp
    -- files
    -- fileserver.conf
    -- hiera.yaml
    -- manifests
    `-- site.pp
    -- modules
    `-- motd
    -- stuff
    `-- things
    -- puppet.conf
    -- puppet.conf.bak
    -- puppetdb.conf
    -- routes.yaml
    -- ssl [error opening dir]
    `-- templates


    puppet.conf

    [main]
    certname = puppet-test.local.dom
    vardir = /var/opt/lib/pe-puppet
    logdir = /var/log/pe-puppet
    rundir = /var/run/pe-puppet
    modulepath =
    /etc/puppetlabs/puppet/modules:/opt/puppet/share/puppet/modules
    server = puppet-test.local.dom
    user = pe-puppet
    group = pe-puppet
    archive_files = true
    archive_file_server = puppet-test.local.dom

    [master]
    certname = puppet-test.local.dom
    dns_alt_names = puppet-test,puppet-test.local.dom,puppet.local.dom
    ca_name = 'Puppet CA generated on puppet-test.elbiz.local at
    2013-10-01 13:52:42 -0400'
    reports = http,puppetdb
    reporturl = https://localhost:443/reports/upload
    node_terminus = exec
    external_nodes = /etc/puppetlabs/puppet-dashboard/external_node
    ssl_client_header = SSL_CLIENT_S_DN
    ssl_client_verify_header = SSL_CLIENT_VERIFY
    storeconfigs_backend = puppetdb
    storeconfigs = true

    [agent]
    report = true
    classfile = $vardir/classes.txt
    localconfig = $vardir/localconfig
    graph = true
    pluginsync = true
    environment = production

    [dev]
    environment = dev
    manifest = /etc/puppetlabs/puppet/environments/dev/site.pp
    modulepath =
    /etc/puppetlabs/puppet/environments/dev/modules:/etc/puppetlabs/puppet/modules:/opt/puppet/share/puppet/modules


    Contents of ./dev/site.pp

    node default {
    include apache
    }


    MOTD is a module pulled from Puppet Forge - and it works correctly with a puppet
    agent -t command from my ubuntu test box. However, if I perform a puppet
    agent -t --environment dev - things fail:

    Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
    Could not find class apache for ubuntu1204-puppet.local.dom on node
    ubuntu1204-puppet.local.dom
    Warning: Not using cache on failed catalog
    Error: Could not retrieve catalog; skipping run


    I guess I'm just looking for what I might have missed. Any thoughts?

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jcbollinger at Oct 11, 2013 at 1:43 pm

    On Thursday, October 10, 2013 8:52:37 AM UTC-5, pezhore wrote:
    I'm trying to get a small Puppet Enterprise environment setup for testing
    - just three servers: a Gitlab box for manifest/module version control, the
    puppet enterprise server, and a test ubuntu box. I believe I have a pretty
    decent handle on how to automatically pull down updates from the git
    repository using Sinatra and a web hook, but I'm at the point where I need
    to figure out how to get this new repository available for my ubuntu box to
    actually use.

    I believe this is the relevant information about my setup:

    [...]
    puppet.conf

    [main]
    certname = puppet-test.local.dom
    vardir = /var/opt/lib/pe-puppet
    logdir = /var/log/pe-puppet
    rundir = /var/run/pe-puppet
    modulepath =
    /etc/puppetlabs/puppet/modules:/opt/puppet/share/puppet/modules
    server = puppet-test.local.dom
    user = pe-puppet
    group = pe-puppet
    archive_files = true
    archive_file_server = puppet-test.local.dom
    [...]


    [agent]
    report = true
    classfile = $vardir/classes.txt
    localconfig = $vardir/localconfig
    graph = true
    pluginsync = true
    environment = production

    [dev]
    environment = dev
    manifest = /etc/puppetlabs/puppet/environments/dev/site.pp
    modulepath =
    /etc/puppetlabs/puppet/environments/dev/modules:/etc/puppetlabs/puppet/modules:/opt/puppet/share/puppet/modules


    To set an environment on a per-node basis, the [agent] block in puppet.conf
    on each node should specify the correct environment setting, or else you
    should use an ENC that sets the the environment. Your configuration sets
    environment 'production' for agents, which is the default, and for which
    you have no per-environment settings defined anyway. It is useless to set
    the environment in a per-environment block (i.e. in the [dev] block),
    because the environment must have already been determined for the contents
    of a per-environment block to be used.


    Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
    Could not find class apache for ubuntu1204-puppet.local.dom on node
    ubuntu1204-puppet.local.dom
    Warning: Not using cache on failed catalog
    Error: Could not retrieve catalog; skipping run


    I guess I'm just looking for what I might have missed. Any thoughts?

    Your node is in environment 'production', and the module path for that
    environment does not contain the apache module. Your main
    manifests/site.pp file must be declaring class apache for the node, as the
    dev/site.pp will not have been consulted.


    John

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedOct 10, '13 at 8:54p
activeOct 11, '13 at 1:43p
posts3
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2021 Grokbase