From ed60e180626939fd5eddd822a2d2bb4f24ae04f8 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sat, 6 Apr 2024 19:53:19 +1100 Subject: [PATCH] feat: update jdk11 for puppetdb - specify the java_bin - specify the java_args --- Puppetfile | 1 + hieradata/roles/infra/puppetdb/api.yaml | 5 +++++ site/profiles/manifests/puppet/puppetdb_api.pp | 9 +++++++++ 3 files changed, 15 insertions(+) create mode 100644 hieradata/roles/infra/puppetdb/api.yaml diff --git a/Puppetfile b/Puppetfile index ab6ee0c..9dc00c7 100644 --- a/Puppetfile +++ b/Puppetfile @@ -16,6 +16,7 @@ mod 'puppetlabs-accounts', '8.1.0' mod 'puppetlabs-mysql', '15.0.0' mod 'puppetlabs-xinetd', '3.4.1' mod 'puppetlabs-haproxy', '8.0.0' +mod 'puppetlabs-java', '10.1.2' # puppet mod 'puppet-python', '7.0.0' diff --git a/hieradata/roles/infra/puppetdb/api.yaml b/hieradata/roles/infra/puppetdb/api.yaml new file mode 100644 index 0000000..551007e --- /dev/null +++ b/hieradata/roles/infra/puppetdb/api.yaml @@ -0,0 +1,5 @@ +--- +profiles::puppet::puppetdb_api::java_bin: /usr/lib/jvm/jre-11/bin/java +profiles::puppet::puppetdb_api::java_args: + '-Xmx': '512m' + '-Xms': '256m' diff --git a/site/profiles/manifests/puppet/puppetdb_api.pp b/site/profiles/manifests/puppet/puppetdb_api.pp index 37e8f63..214f163 100644 --- a/site/profiles/manifests/puppet/puppetdb_api.pp +++ b/site/profiles/manifests/puppet/puppetdb_api.pp @@ -2,13 +2,22 @@ class profiles::puppet::puppetdb_api ( String $postgres_host = lookup('profiles::puppet::puppetdb::postgres_host'), String $listen_address = $facts['networking']['ip'], + Stdlib::Absolutepath $java_bin = '/usr/bin/java', + Hash $java_args = {}, ) { + class { 'java': + package => 'java-11-openjdk-devel', + before => Class['puppetdb::server'], + } + class { 'puppetdb::server': database_host => $postgres_host, manage_firewall => false, ssl_listen_address => $listen_address, listen_address => $listen_address, + java_bin => $java_bin, + java_args => $java_args, } contain ::puppetdb::server