Re: [Puppet Users] Deferred without result

2020-06-15 Thread Andreas Dvorak
Hi,
>
>
I have
Puppet Agent v6.14.0. and puppetserver version: 6.10.0.
Do I need to update?

Andreas

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/8c29fe24-715d-422c-86aa-939f662fedfdo%40googlegroups.com.


Re: [Puppet Users] Deferred without result

2020-06-15 Thread Josh Cooper
On Mon, Jun 15, 2020 at 4:43 AM Andreas Dvorak 
wrote:

> Hello,
>
> I am trying to use the deferred function according to the page
> http://puppet-on-the-edge.blogspot.com/2018/10/the-topic-is-deferred.html
>
> My code does not show the time. Does anybody has a solution?
>
> notify {"time_now":
>   message => Deferred('new', [TimeStamp])
> }
>
> $d = Deferred('new', [TimeStamp])
> notify {'time_now_2':
>   message => "The time is: ${d}"
> }
>
> $dd = Deferred('new', [TimeStamp])
> notify {"time_now_3":
>   message => Deferred("sprintf", ["The time is: %s", $dd])
> }
>
> notify { 'time_now_4':
>   message => Deferred('inline_epp', [@(END)])
>   The time is: <%= TimeStamp() %>
>   |- END
> }
>
>
> My result
>
> Notice: Deferred({'name' => 'new', 'arguments' => [Timestamp]})
> Notice:
> /Stage[main]/Vault::Consul_server::Install/Notify[time_now]/message:
> defined 'message' as 'Deferred({\'name\' => \'new\', \'arguments\' =>
> [Timestamp]})'
> Notice: The time is: Deferred({'name' => 'new', 'arguments' =>
> [Timestamp]})
> Notice:
> /Stage[main]/Vault::Consul_server::Install/Notify[time_now_2]/message:
> defined 'message' as 'The time is: Deferred({\'name\' => \'new\',
> \'arguments\' => [Timestamp]})'
> Notice: Deferred({'name' => 'sprintf', 'arguments' => ['The time is: %s',
> Deferred({'name' => 'new', 'arguments' => [Timestamp]})]})
> Notice:
> /Stage[main]/Vault::Consul_server::Install/Notify[time_now_3]/message:
> defined 'message' as 'Deferred({\'name\' => \'sprintf\', \'arguments\' =>
> [\'The time is: %s\', Deferred({\'name\' => \'new\', \'arguments\' =>
> [Timestamp]})]})'
> Notice: Deferred({'name' => 'inline_epp', 'arguments' => ['The time is:
> <%= TimeStamp() %>']})
> Notice:
> /Stage[main]/Vault::Consul_server::Install/Notify[time_now_4]/message:
> defined 'message' as 'Deferred({\'name\' => \'inline_epp\', \'arguments\'
> => [\'The time is: <%= TimeStamp() %>\']})'
>
>
> Andreas
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/84e6d862-2c4c-41d6-b45e-f16f94594b99o%40googlegroups.com
> 
> .
>

Deferred functions are a new feature in puppet 6. Make sure you're using
the latest version, which currently is 6.16.0.

Josh

-- 
Josh Cooper | Software Engineer
j...@puppet.com

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2Bu97u%3DJXhA0PcTjEHFi6-R-gCH2pka-TqTpW2i3pbJXyVcLUw%40mail.gmail.com.


Re: [Puppet Users] How do I install Puppetserver for Ubuntu 20.04 (focal)?

2020-06-15 Thread Justin Stoller
We shipped agent support for Focal but did not have plans to support it as
a master platform. I believe product was trying to gauge community interest
before committing to it and taking requests in
https://tickets.puppetlabs.com/browse/SERVER-2820.

>From an internal note it looks like they have decided to support it, but it
hasn't been prioritized yet. Commenting in the above ticket should help
with that.

HTH,
Justin

On Mon, Jun 15, 2020 at 1:54 AM Devminded  wrote:

> Hi.
>
> I'm trying to figure out how to install puppetserver on a Ubuntu 20.04
> (focal) but I cannot find any package.
> I have installed the https://apt.puppetlabs.com/puppet6-release-focal.deb
> but the puppetserver is not listed. In-fact the entire
> https://apt.puppetlabs.com/dists/focal/puppet6/binary-amd64/Packages file
> has very few packages listed compared to xenial and bionic.
>
> Has the puppetserver changed name, moved, merged or is it not ready until
> we have 20.04.1 in July?
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/55ce7284-9833-4bde-9e9e-e241e73f2f34o%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2B%3DBEqUzz9v3U7BY3SCssmdgWhEm99pZmyKm-PboczWA9SPRtw%40mail.gmail.com.


Re: [Puppet Users] puppetserver - Performance and tuning

2020-06-15 Thread Justin Stoller
You might want to have a target for memory per worker that you tune for.

In Puppet 5, if you are using the default JRuby 1.7 implementation, you
might start at 1/2G per JRuby on a small test box and go up in 1/4G
increments seeing how your average catalog performance changes. I want to
say most folks using JRuby 1.7 use between 0.5 and 1 G per instance (though
obviously some are going below or above that).

If you're using the optional JRuby 9k support in Puppet 5 or you've
upgraded to Puppet 6 where we use 9k by default then you will probably want
to start with a higher amount of memory to start out with (3/4 or 1G). With
9k you'll also want to make sure you have plenty of off heap CodeCache and
Metaspace available. I want to say with 9k I usually see folks with 0.75 to
1.5G and up to 100M of CodeCache per instance.

You'll basically want your memory to be large enough per jruby to hold a
catalog request in it w/o triggering a GC, though the more memory you have
allocated the longer the GC pauses.

Besides longer GC pause times there's some things to keep in mind when
scaling vertically.

After 32G of heap the JVM changes how it manages pointers and the size of
every object increases. Since every object is bigger you need more heap per
instance than you would on heaps smaller than 32G. You may need 120-150%
more per instance when using heaps larger than 32G.

If you're using 9k then there is a limit to the size of the CodeCache (2Gb,
iirc) that will effectively limit how many instances you can have per box.

CPU-wise a JRuby worker instance per [v]CPU is probably a good place to
start.

And regardless of box size, you should keep max-requests-per-instance
disabled. And while doing this it will really help to have meaningful
metrics reported. You might want to look into puppet_metrics_dashboard or
puppet_metrics_collector modules on the forge for a basic setup to get
started quickly.

HTH,
Justin

On Fri, Jun 12, 2020 at 7:04 AM Nerbolff  wrote:

> Hello, community,
>
>
> I wonder if my setup is properly thought out.
> I've got a 4000+ instance to puppetize.  and several puppetserver are
> available.
>
>
> - Ubuntu 18.04.3 LTS \n \l
> - puppetserver version: 5.3.10
>
>
> here the memory location based to 128Go installed on the machine:
> $ grep JAVA_ARGS  /etc/default/puppetserver
> JAVA_ARGS="-Xms64g -Xmx64g
> -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"
>
> $ grep MemTotal /proc/meminfo
> MemTotal:   131736260 kB
>
> based to number of 20 core available hyperthreding is OFF.
> $ sudo grep max-active-instances
>  /etc/puppetlabs/puppetserver/conf.d/puppetserver.conf |grep -v defau
> max-active-instances: 16
>
> $  lscpu | egrep 'Model name|Socket|Thread|NUMA|CPU\(s\)'
> CPU(s):  20
> On-line CPU(s) list: 0-19
> Thread(s) per core:  1
> Socket(s):   2
> NUMA node(s):2
> Model name:  Intel(R) Xeon(R) CPU E5-2630L v4 @ 1.80GHz
> NUMA node0 CPU(s):   0,2,4,6,8,10,12,14,16,18
> NUMA node1 CPU(s):   1,3,5,7,9,11,13,15,17,19
>
>
> Any advice/comments will be appreciated.
>
>
>
> Thanks
> N.
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/d9e58408-f6df-4459-b540-30849ff5715ao%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2B%3DBEqUgRbwyd%2BQdDzwcdTYCkQkb968U4XAgxqkwOx8x8OU%2BKA%40mail.gmail.com.


[Puppet Users] Re: hiera v3 to v5 with puppet apply

2020-06-15 Thread Peter Dutton
I've figured this out now - I was mistakenly using hiera.yaml to store the 
data values. Once I changed it to refer to a different file for the data it 
was running fine.

Thanks

Peter

On Monday, 15 June 2020 17:04:45 UTC+1, Peter Dutton wrote:
>
> Hi all,
>
> I am using puppet in a 'standalone', or 'masterless' capacity to manage 
> the configurations of different server roles. I'm doing this by using 
> 'puppet apply' with a different environment depending on the situation. For 
> example for local development:
>
> puppet apply --modulepath=modules --hiera_config=environments/hiera.yaml 
> --environment=devLocal manifests/init.pp
>
>
> I'm upgrading the infrastructure and am having trouble converting my 
> workflow to the newer version. I have converted the hiera() function calls 
> to lookup(), and have moved logic around in the hiera.yaml files so that 
> now it should be processing the correct file when the command runs. 
>
>
> However I currently get an error for each hiera variable, for example: 
> "The Lookup Configuration at 
> '/tmp/vagrant-puppet/environments/devLocal/hiera.yaml' has wrong type, 
> unrecognized key 'server_role'"
>
> The file itself (reduced for simplicity) looks as follows 
> (environments/devLocal/hiera.yaml):
>
>
> version: 5
>
>
> server_role: "frontend"
>
>
>
> The code in environments/hiera.yaml is as follows:
>
> version: 5
>
>
> defaults:
>   datadir: "environments"
>   data_hash: yaml_data
>
>
> hierarchy:
>   - name: "env"
> path: "%{environment}/hiera.yaml"
>
>
>
>
> Does anyone have any suggestions on how I can make this work?
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c75bf49c-fde5-4e96-a546-504ceea4e476o%40googlegroups.com.


[Puppet Users] hiera v3 to v5 with puppet apply

2020-06-15 Thread Peter Dutton
Hi all,

I am using puppet in a 'standalone', or 'masterless' capacity to manage the 
configurations of different server roles. I'm doing this by using 'puppet 
apply' with a different environment depending on the situation. For example 
for local development:

puppet apply --modulepath=modules --hiera_config=environments/hiera.yaml --
environment=devLocal manifests/init.pp


I'm upgrading the infrastructure and am having trouble converting my 
workflow to the newer version. I have converted the hiera() function calls 
to lookup(), and have moved logic around in the hiera.yaml files so that 
now it should be processing the correct file when the command runs. 


However I currently get an error for each hiera variable, for example: "The 
Lookup Configuration at 
'/tmp/vagrant-puppet/environments/devLocal/hiera.yaml' has wrong type, 
unrecognized key 'server_role'"

The file itself (reduced for simplicity) looks as follows 
(environments/devLocal/hiera.yaml):


version: 5


server_role: "frontend"



The code in environments/hiera.yaml is as follows:

version: 5


defaults:
  datadir: "environments"
  data_hash: yaml_data


hierarchy:
  - name: "env"
path: "%{environment}/hiera.yaml"




Does anyone have any suggestions on how I can make this work?

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/5f5bb8a3-26e9-4386-a961-be02583a885fo%40googlegroups.com.


[Puppet Users] Re: puppetserver - Performance and tuning

2020-06-15 Thread Andreas Dvorak
Hi,

according 
to https://puppet.com/docs/puppetserver/latest/config_file_puppetserver.html 
the maximum of max-active-instances is 4.

max-active-instances: Optional. The maximum number of JRuby instances 
allowed. The default is ‘num-cpus - 1’, with a minimum value of 1 and a 
maximum value of 4.

I have the problem that we switch from puppet 4 to puppet 6 on much faster 
hardware, but the agent runtime is longer.

Andreas

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/4064399a-9c5a-4dad-9fa2-04114266dbdao%40googlegroups.com.


[Puppet Users] Deferred without result

2020-06-15 Thread Andreas Dvorak
Hello,

I am trying to use the deferred function according to the 
page http://puppet-on-the-edge.blogspot.com/2018/10/the-topic-is-deferred.html

My code does not show the time. Does anybody has a solution?

notify {"time_now":
  message => Deferred('new', [TimeStamp])
}

$d = Deferred('new', [TimeStamp])
notify {'time_now_2':
  message => "The time is: ${d}"
}

$dd = Deferred('new', [TimeStamp])
notify {"time_now_3":
  message => Deferred("sprintf", ["The time is: %s", $dd])
}

notify { 'time_now_4':
  message => Deferred('inline_epp', [@(END)])
  The time is: <%= TimeStamp() %>
  |- END
}


My result

Notice: Deferred({'name' => 'new', 'arguments' => [Timestamp]})
Notice: 
/Stage[main]/Vault::Consul_server::Install/Notify[time_now]/message: 
defined 'message' as 'Deferred({\'name\' => \'new\', \'arguments\' => 
[Timestamp]})'
Notice: The time is: Deferred({'name' => 'new', 'arguments' => [Timestamp]})
Notice: 
/Stage[main]/Vault::Consul_server::Install/Notify[time_now_2]/message: 
defined 'message' as 'The time is: Deferred({\'name\' => \'new\', 
\'arguments\' => [Timestamp]})'
Notice: Deferred({'name' => 'sprintf', 'arguments' => ['The time is: %s', 
Deferred({'name' => 'new', 'arguments' => [Timestamp]})]})
Notice: 
/Stage[main]/Vault::Consul_server::Install/Notify[time_now_3]/message: 
defined 'message' as 'Deferred({\'name\' => \'sprintf\', \'arguments\' => 
[\'The time is: %s\', Deferred({\'name\' => \'new\', \'arguments\' => 
[Timestamp]})]})'
Notice: Deferred({'name' => 'inline_epp', 'arguments' => ['The time is: <%= 
TimeStamp() %>']})
Notice: 
/Stage[main]/Vault::Consul_server::Install/Notify[time_now_4]/message: 
defined 'message' as 'Deferred({\'name\' => \'inline_epp\', \'arguments\' 
=> [\'The time is: <%= TimeStamp() %>\']})'

 
Andreas

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/84e6d862-2c4c-41d6-b45e-f16f94594b99o%40googlegroups.com.


[Puppet Users] How do I install Puppetserver for Ubuntu 20.04 (focal)?

2020-06-15 Thread Devminded
Hi.

I'm trying to figure out how to install puppetserver on a Ubuntu 20.04 
(focal) but I cannot find any package.
I have installed the https://apt.puppetlabs.com/puppet6-release-focal.deb 
but the puppetserver is not listed. In-fact the 
entire https://apt.puppetlabs.com/dists/focal/puppet6/binary-amd64/Packages 
file has very few packages listed compared to xenial and bionic.

Has the puppetserver changed name, moved, merged or is it not ready until 
we have 20.04.1 in July?

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/55ce7284-9833-4bde-9e9e-e241e73f2f34o%40googlegroups.com.