"Server configurations require Augeas >= 1.0.0" on Ubuntu 14.04 LTS puppetmaster

516 views
Skip to first unread message

Trey Duskin

unread,
Aug 24, 2014, 12:38:13 PM8/24/14
to puppet...@googlegroups.com
Hi all,

I'm trying to get a module to work (puppetlabs-tomcat) which uses Augeas to manage a config file.  However, whenever I try to compile the manifest which includes this module, I get an error on the puppet master:

Server configurations require Augeas >= 1.0.0 at /etc/puppet/modules/tomcat/manifests/config/server/connector.pp:28

I have installed augeas on the puppet master machine using the camptocamp-augeas module as follows in my site.pp:

node 'puppet' {
  include augeas
}

From the documentation, I think this is all I need to do to get Augeas installed on the puppet master so it can use the augeas support.  dpkg -l seems to confirm this:

ubuntu@puppet:~$ dpkg -l | grep augeas
ii  augeas-lenses                    1.2.0-0ubuntu1                all          Set of lenses needed by libaugeas0 to parse config files
ii  augeas-tools                     1.2.0-0ubuntu1.1              amd64        Augeas command line tools
ii  libaugeas-ruby1.9.1              0.5.0-2                       all          Transitional package for ruby-augeas
ii  libaugeas0                       1.2.0-0ubuntu1                amd64        Augeas configuration editing library and API
ii  ruby-augeas                      0.5.0-2                       amd64        Augeas bindings for the Ruby language

However, I keep getting this error.  Is the ">= 1.0.0" message referring to the version of the ruby bindings?  Or am I missing something else entirely?

I am using puppetmaster and puppet agent directly from the Puppet Labs APT repo, which gave me 3.6.2

Thanks in advance,
Trey

Morgan Haskel

unread,
Aug 25, 2014, 3:01:00 PM8/25/14
to puppet...@googlegroups.com
Trey,

The '>= 1.0.0' is referring to the libaugeas version, and it's based on the `augeasversion` fact.  You'll need to have augeas installed on the node you're trying to include tomcat on.

Morgan


--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/7b385fdc-8660-4765-89ae-dd7fdca2f4d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Morgan Haskel
Module Engineer

Join us at PuppetConf 2014September 20-24 in San Francisco
Register by September 8th to take advantage of the Final Countdown save $149!

Trey Duskin

unread,
Aug 26, 2014, 12:30:46 PM8/26/14
to puppet...@googlegroups.com
Morgan,

Thanks for the reply.  So, is augeas a prerequisite for Puppet?  If so, why isn't it installed as a dependency?

I have tried using the camptocamp/puppet-augeas module to install augeas for me, but it seems that I would have to comment out the tomcat stuff in my node definition and put just 'include augeas', do a puppet run, and then uncomment the tomcat stuff and do another run.  Is there a better way of doing this?

Trey

Morgan Haskel

unread,
Aug 26, 2014, 1:56:15 PM8/26/14
to puppet...@googlegroups.com
Trey,

Augeas is an optional dependency for puppet, but is a requirement for the puppetlabs-tomcat module.

You could also use chaining arrows[1] to specify the dependency, something like:

class { 'augeas': } -> class { 'tomcat': }

---

For more options, visit https://groups.google.com/d/optout.

Trey Duskin

unread,
Aug 27, 2014, 10:54:22 AM8/27/14
to puppet...@googlegroups.com
Morgan,

I tried using the chaining, but I still get the error on the client (and back on the master).  Here is what my node manifest looks like:

node 'test-rest-portal' {
  class { 'java':
    distribution => 'jre',
  }
  class{ 'augeas': }->
  class { 'tomcat': }->
  tomcat::instance { 'default':
    catalina_base => '/usr/share/tomcat7',
  }->
  tomcat::service { 'default':
    use_init => true,
    service_name => 'tomcat7',
  }->
  tomcat::config::server::connector { 'http-80':
    port => '80',
    protocol => 'HTTP/1.1',
    additional_attributes => {
      'redirectPort' => '443',
      'executor' => 'tomcatThreadPool',
      'connectionTimeout' => '20000'
    }
  }->
  tomcat::config::server::connector { 'https-443':
    port => '443',
    protocol => 'HTTP/1.1',
    additional_attributes => {
      'SSLEnabled' => 'true',
      'scheme' => 'https',
      'secure' => 'true',
      'clientAuth' => 'false',
      'sslProtocol' => 'TLS',
      'ciphers' => 'TLS_RSA_WITH_AES_128_CBC_SHA'
    }
  }
}

It seems including the connector sub class is what causes the augeas exception, which happens when the catalog is compiled:

Aug 27 14:33:57 puppet puppet-master[21853]: Server configurations require Augeas >= 1.0.0 at /etc/puppet/modules/tomcat/manifests/config/server/connector.pp:28 on node test-rest-portal

I appreciate any help you can provide.

Thanks,
Trey

Morgan Haskel

unread,
Aug 27, 2014, 2:37:37 PM8/27/14
to puppet...@googlegroups.com
Ah, ok. I see what the issue is. We're depending on the $::augeasversion fact in puppetlabs-tomcat and facts are loaded at the beginning of the run (before augeas is installed).

So, the bad news is it will require two runs. On the other hand, you can add a check that will cause it not to fail if you don't want to see the failure in the run.

Something like:

node 'test-rest-portal' {
  class { 'java':
    distribution => 'jre',
  }
  class{ 'augeas': }

if versioncmp($::augeasversion, '1.0.0') >= 0 {
  class { 'tomcat': }->

will at least make tomcat not run until after augeas has been upgraded.  And looking through your node manifest, you probably want to have the tomcat::config::server::connectors before the tomcat::service, and since you're using a non-standard catalina_base you'll want to specify that in your connectors as well.





For more options, visit https://groups.google.com/d/optout.

Trey Duskin

unread,
Aug 28, 2014, 1:12:07 PM8/28/14
to puppet...@googlegroups.com
Thanks for the reply.  I tried doing this, and was able to avoid the error on the first run and see augeas installed.  However, on the second run, the tomcat section was still skipped.  Digging into it, it turns out the camptocamp-augeas module uses the OS's package manager to install augeas (instead of from source), and since my node is Ubuntu 10.04 LTS, the augeas version is too old and the puppet-tomcat module still won't work.  I think I will either need to start my node with a newer OS, or try out the camptocamp-tomcat module which (afaik) doesn't use augueas.

Anyway, thanks for all the assistance.  Hopefully this post helps someone else who wanders down the path I did!

TimR

unread,
Nov 18, 2015, 9:37:02 PM11/18/15
to Puppet Users
I am attempting to provision an Ubuntu 12.04.5 VBox basebox with Vagrant and puppet
I'm seeing the same problem as above

Error: Server configurations require Augeas >= 1.0.0

I can't figure out how to load the correct version of Augeas
I tried to add the ppa and update the version, but its not working for me

any help would be greatly appreciated.

Thanks in advance,
Tim


 ./puppet/manifest/init.pp

Exec { path => [ "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/" ] }

include java7

class { 'apt': }
apt::ppa { 'ppa:raphink/augeas':
}->
class { '::augeas':  version => '1.3.0'
}->
class { 'tomcat':
}->
tomcat::instance { 'tomcat7':
  catalina_base => '/opt/apache-tomcat/tomcat7',
  source_url  => 'http://archive.apache.org/dist/tomcat-7/v7.0.65/bin/apache-tomcat-7.0.65.tar.gz',
}->
tomcat::config::server { 'tomcat7':
  catalina_base => '/opt/apache-tomcat/tomcat7',
  port           => '8080',
}->
tomcat::service { 'default':
  catalina_base => '/opt/apache-tomcat/tomcat7',
  service_name => 'tomcat7',
}

Output:
==> default: Running provisioner: shell...
    default: Running: /tmp/vagrant-shell20151118-12525-wn5qw.sh
==> default: stdin: is not a tty
==> default: Installing librarian-puppet..
==> default: librarian-puppet installed!
==> default: Executing PuppetFile..
==> default: Running provisioner: puppet...
==> default: Running Puppet with init.pp...
==> default: stdin: is not a tty
==> default: Warning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations
==> default:    (at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1139:in `issue_deprecation_warning')
==> default: Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
==> default: Error: Server configurations require Augeas >= 1.0.0 at /tmp/vagrant-puppet/modules-330218a18f543a98f97fa29ff15cb27b/tomcat/manifests/config/server.pp:29 on node  vagrant
==> default: Error: Server configurations require Augeas >= 1.0.0 at /tmp/vagrant-puppet/modules-330218a18f543a98f97fa29ff15cb27b/tomcat/manifests/config/server.pp:29 on node  vagrant
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.


more details: ...

I started with this, it worked on my base box

Automating Development Enviroment using Vagrant and Puppet

and  arpitaggarwal/vagrant-puppet 


I wanted to use puppetlabs-tomcat, so I made changes to the init.pp as shown above and to
files listed below:

Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "timr/my-2045-puppet"
  config.vm.network :private_network, ip: "90.0.9.99"
  config.vm.provision "shell", path: "installation-script.sh"
  config.vm.provision :puppet do |puppet|
    puppet.manifests_path = 'puppet/manifests'
    puppet.module_path = 'puppet/modules'
    puppet.manifest_file ="init.pp"
  end
end


installation-script.sh
set -e
# Directory in which PuppetFile is placed to be scanned by librarian-puppet.
PUPPET_DIR=/vagrant/puppet

apt-get -qq update

RUBY_VERSION="$(ruby -e 'print RUBY_VERSION')"
RUBY_INSTALL='1.9.3'
if [ $RUBY_VERSION != $RUBY_INSTALL ]; then
  echo "Installing ruby.."
  apt-get -q -y install ruby $RUBY_INSTALL 
  update-alternatives --set ruby /usr/bin/ruby1.9.1
fi

echo "Installing librarian-puppet.."
if [ "$(gem search -i librarian-puppet)" = "false" ]; then
  gem install librarian-puppet -v 1.0.0
fi
echo "librarian-puppet installed!"
echo "Executing PuppetFile.."
cd $PUPPET_DIR && librarian-puppet install --path modules

/puppet/Puppetfile
# Puppetfile Configuration for librarian-puppet.
forge "http://forge.puppetlabs.com"
mod "puppetlabs/apt"
mod "camptocamp/augeas"
mod "puppetlabs/stdlib"
mod "puppetlabs/tomcat"




 
Reply all
Reply to author
Forward
0 new messages