https://www.puppet.com/community logo
Join Slack
Powered by
# puppet
  • b

    bastelfreak

    05/17/2022, 3:26 PM
    'it depends'
  • s

    Slackbot

    05/17/2022, 3:26 PM
    This message was deleted.
    d
    • 2
    • 1
  • b

    bastelfreak

    05/17/2022, 3:27 PM
    also: often in a module you add a dependency that you only need in certain use cases
  • b

    bastelfreak

    05/17/2022, 3:27 PM
    so it's possible that you do not want/need to deploy every dependency in your environment
  • v

    vchepkov

    05/17/2022, 3:29 PM
    And some modules can request conflicting versions of other modules. Only you can solve those issues. Skynet is still in alpha
  • d

    David Manouchehri

    05/17/2022, 3:41 PM
    wait, so Puppet requires the system administrator to manually handle dependencies...? I must be misunderstanding.
  • r

    rnelson0

    05/17/2022, 3:42 PM
    Not manually. But you have to specify your preference.
  • r

    rnelson0

    05/17/2022, 3:42 PM
    If module1 wants v1.0.0 and module2 wants v2.0.0, the system can't figure out which is right for you.
  • y

    Yorokobi

    05/17/2022, 3:43 PM
    I have yet to use a machine-generated Puppetfile ... ¯\_(ツ)_/¯
  • d

    David Manouchehri

    05/17/2022, 3:48 PM
    Why can't we just let module1 use v1.0.0, and then when it's module2's turn, install v2.0.0?
  • l

    Lumiere

    05/17/2022, 3:49 PM
    because if module 1 can't use 2.x but module 2 can use 1.x
  • u

    Ugo Bellavance

    05/17/2022, 4:31 PM
    In hiera, can we set the value of charset in mysql::db "globally" so that all dbs are created with a specific charset? https://github.com/puppetlabs/puppetlabs-mysql/blob/main/manifests/db.pp
  • u

    Ugo Bellavance

    05/17/2022, 4:31 PM
    In hiera, can we set the value of charset in mysql::db "globally" so that all dbs are created with a specific charset? https://github.com/puppetlabs/puppetlabs-mysql/blob/main/manifests/db.pp
  • l

    Lumiere

    05/17/2022, 4:35 PM
    you could make a defaults hash that you merge over it in puppet code
  • u

    Ugo Bellavance

    05/17/2022, 4:52 PM
    So, not in hiera?
  • v

    vchepkov

    05/17/2022, 4:54 PM
    you can in hiera, you just need to write a profile module that reads that hiera
  • u

    Ugo Bellavance

    05/17/2022, 4:55 PM
    Ok
  • n

    natemccurdy

    05/17/2022, 4:55 PM
    Hiera alone can’t solve the problem. There has to be some Puppet code to take the data from Hiera and apply it to the resources correctly. The
    mysql::db
    define doesn’t have Puppet code and logic to do that, so you’ll have to write that code yourself.
  • a

    Andrew

    05/17/2022, 5:30 PM
    stupid question, but for a
    require
    statement to work does that resource that you specifying in the require statement have to be within the same class or can that resource be in a different class? I had thought that it could only be called within the same class, but wanted to verify
  • n

    natemccurdy

    05/17/2022, 5:33 PM
    That resource can be declared anywhere (i.e. not in the same class), but it has to be declared somewhere
  • a

    Andrew

    05/17/2022, 5:34 PM
    thanks for the clarification
  • b

    bastelfreak

    05/17/2022, 5:37 PM
    depending on your strictness level it doesnt even need to be in the catalog
  • b

    bastelfreak

    05/17/2022, 5:38 PM
    then the resource refence just gets ignored
  • r

    Robert Emanuele

    05/17/2022, 5:38 PM
    How do you get the ‘pdk console’ to see your new resources that you want to test and debug?
  • o

    Oleksandr Lytvyn

    05/17/2022, 6:25 PM
    Hello, just a curious question how to install Puppet 7 with Java 11? https://puppet.com/docs/puppet/7/server/install_from_packages.html I just installed Puppet 7 and after install it had Java 8. I installed Java 11, and tried to purge Java 8 and got next:
    Copy code
    root@puppet:~# dpkg -l | grep jdk
    ii  openjdk-11-jre:amd64               11.0.15+10-0ubuntu0.20.04.1        amd64        OpenJDK Java runtime, using Hotspot JIT
    ii  openjdk-11-jre-headless:amd64      11.0.15+10-0ubuntu0.20.04.1        amd64        OpenJDK Java runtime, using Hotspot JIT (headless)
    ii  openjdk-8-jre-headless:amd64       8u312-b07-0ubuntu1~20.04           amd64        OpenJDK Java runtime, using Hotspot JIT (headless)
    
    root@puppet:~# apt purge openjdk-8-jre-headless
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following package was automatically installed and is no longer required:
      net-tools
    Use 'apt autoremove' to remove it.
    The following packages will be REMOVED:
      openjdk-8-jre-headless* puppetdb* puppetserver*
    0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
    After this operation, 266 MB disk space will be freed.
    
    Do you want to continue? [Y/n] y
    (Reading database ... 127243 files and directories currently installed.)
    Removing puppetserver (7.7.0-1focal) ...
    Removing puppetdb (7.10.1-1focal) ...
    Removing openjdk-8-jre-headless:amd64 (8u312-b07-0ubuntu1~20.04) ...
    (Reading database ... 118929 files and directories currently installed.)
    Purging configuration files for puppetdb (7.10.1-1focal) ...
    dpkg: warning: while removing puppetdb, directory '/etc/puppetlabs/puppetdb/conf.d' not empty so not removed
    dpkg: warning: while removing puppetdb, directory '/opt/puppetlabs/server/data/puppetdb' not empty so not removed
    Purging configuration files for puppetserver (7.7.0-1focal) ...
    dpkg: warning: while removing puppetserver, directory '/etc/puppetlabs/puppetserver/conf.d' not empty so not removed
    dpkg: warning: while removing puppetserver, directory '/opt/puppetlabs/server/data/puppetserver' not empty so not removed
    Purging configuration files for openjdk-8-jre-headless:amd64 (8u312-b07-0ubuntu1~20.04) ...
    Processing triggers for systemd (245.4-4ubuntu3.17) ...
    W: Operation was interrupted before it could finish
    
    root@puppet:~# java -version
    openjdk version "11.0.15" 2022-04-19
    OpenJDK Runtime Environment (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1)
    OpenJDK 64-Bit Server VM (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1, mixed mode, sharing)
    root@puppet:~# which puppetserver
    root@puppet:~#
    Basically Puppet server and PuppetDB somewhat "tightly related" to Java 8 and removed when Java 8 purged (got this on ubuntu 20.04). Is it Ok? 🙂
  • o

    Oleksandr Lytvyn

    05/17/2022, 6:26 PM
    Hello, just a curious question how to install Puppet 7 with Java 11? https://puppet.com/docs/puppet/7/server/install_from_packages.html I just installed Puppet 7 and after install it had Java 8. I installed Java 11, and tried to purge Java 8 and got next:
    Copy code
    root@puppet:~# dpkg -l | grep jdk
    ii  openjdk-11-jre:amd64               11.0.15+10-0ubuntu0.20.04.1        amd64        OpenJDK Java runtime, using Hotspot JIT
    ii  openjdk-11-jre-headless:amd64      11.0.15+10-0ubuntu0.20.04.1        amd64        OpenJDK Java runtime, using Hotspot JIT (headless)
    ii  openjdk-8-jre-headless:amd64       8u312-b07-0ubuntu1~20.04           amd64        OpenJDK Java runtime, using Hotspot JIT (headless)
    
    root@puppet:~# apt purge openjdk-8-jre-headless
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following package was automatically installed and is no longer required:
      net-tools
    Use 'apt autoremove' to remove it.
    The following packages will be REMOVED:
      openjdk-8-jre-headless* puppetdb* puppetserver*
    0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
    After this operation, 266 MB disk space will be freed.
    
    Do you want to continue? [Y/n] y
    (Reading database ... 127243 files and directories currently installed.)
    Removing puppetserver (7.7.0-1focal) ...
    Removing puppetdb (7.10.1-1focal) ...
    Removing openjdk-8-jre-headless:amd64 (8u312-b07-0ubuntu1~20.04) ...
    (Reading database ... 118929 files and directories currently installed.)
    Purging configuration files for puppetdb (7.10.1-1focal) ...
    dpkg: warning: while removing puppetdb, directory '/etc/puppetlabs/puppetdb/conf.d' not empty so not removed
    dpkg: warning: while removing puppetdb, directory '/opt/puppetlabs/server/data/puppetdb' not empty so not removed
    Purging configuration files for puppetserver (7.7.0-1focal) ...
    dpkg: warning: while removing puppetserver, directory '/etc/puppetlabs/puppetserver/conf.d' not empty so not removed
    dpkg: warning: while removing puppetserver, directory '/opt/puppetlabs/server/data/puppetserver' not empty so not removed
    Purging configuration files for openjdk-8-jre-headless:amd64 (8u312-b07-0ubuntu1~20.04) ...
    Processing triggers for systemd (245.4-4ubuntu3.17) ...
    W: Operation was interrupted before it could finish
    
    root@puppet:~# java -version
    openjdk version "11.0.15" 2022-04-19
    OpenJDK Runtime Environment (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1)
    OpenJDK 64-Bit Server VM (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1, mixed mode, sharing)
    root@puppet:~# which puppetserver
    root@puppet:~#
    Basically Puppet server and PuppetDB somewhat "tightly related" to Java 8 and removed when Java 8 purged (got this on ubuntu 20.04). Is it Ok? 🙂
  • b

    bastelfreak

    05/17/2022, 6:28 PM
    dont purge java 8 :)
  • b

    bastelfreak

    05/17/2022, 6:28 PM
    just install java11 as additional java
  • v

    vchepkov

    05/17/2022, 6:29 PM
    not an expert on debian, but it's similar in rpm world :
    Copy code
    $ rpm -q --requires -p puppetserver-7.7.0-1.el8.noarch.rpm |grep java
    warning: puppetserver-7.7.0-1.el8.noarch.rpm: Header V4 RSA/SHA256 Signature, key ID 9e61ef26: NOKEY
    java-1.8.0-openjdk-headless
  • g

    Greg Bristol

    05/17/2022, 6:29 PM
    yeah, and manage them with
    update-alternatives
1...434445...428Latest