Skip to content
This repository was archived by the owner on Mar 28, 2019. It is now read-only.

Puppetserver support (third try) #200

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

danieldreier
Copy link
Contributor

This is my third try at adding basic puppetserver support. This works under Debian Wheezy when I apply tests/puppetserver.pp; a very basic puppetserver setup comes up, though I haven't done more extensive testing to validate it in real depth.

@igalic - this isn't really intended to compete with PR #193 - I just wanted to clean up what I'd done previously so we could collaborate more effectively.

As I described in that PR, there are a ton more settings we could manage, but as an MVP this should be enough to get us started.

Any review would be much appreciated.

Daniel Dreier added 4 commits March 20, 2015 23:06
Provide rudimentary tests for installing puppetserver. Not expected to
pass yet. This is likely to run into memory size issues because beaker
VMs are created with 512mb and I'm not aware of an obvious way to change
that.
Configure a basic puppetserver. This puts just enough configuration in
place to get a basic running instance.

Some of the configuration parameters are not implemented yet; they're
placeholders to facilitate future development.
value => $jvm_memory,
}
ini_subsetting {'puppetserver_maxpermsize':
subsetting => '-XX:MaxPermSize=',
Copy link
Contributor

Choose a reason for hiding this comment

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

this will not work in java8


well, it'll work, but it'll be ignored with a warning.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm pretty ignorant of java version differences; what would we need to do for java 8? I'm simply re-implementing the stock puppetserver configuration here. I'd be glad to switch based on java version, or to parameterize it.

Copy link
Contributor

Choose a reason for hiding this comment

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

the equivalent in java 8 is: -XX:MaxMetaspaceSize=256m

Copy link
Contributor

Choose a reason for hiding this comment

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

we can use $::java_major_version to distinguish this.

perm = $::java_major_version ? {
  8       => '-XX:MaxMetaspaceSize=',
  default => '-XX:MaxPermSize=',
}

i hope this also works if someone's not using puppetlabs-java, while using puppet 4 ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion - added it.

Actually - our travis-ci tests do a required test iteration with future parser enabled. Puppet 3.7.3 future parser and puppet 4 syntax should be virtually identical. The agent install will be a bit different - facter, puppet, etc all bundled together in one package and paths will be different. The recent abstraction work we've done on this module should help, too.

I'm also not sure I want to add a dependency on puppetlabs-java. I've wrapped the whole thing in a conditional; if we end up needing to manage java further we can circle back.

Based on @igalic's suggestion, this sets the puppetserver_maxpermsize
ini subsetting conditionally based on java version if the
java_major_version fact from the puppetlabs-java module is available.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants