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

    Mike Eckerle

    10/20/2022, 1:59 PM
    hello, i am relatively new to puppet and trying to set up a test node group for some linux vdi in a configuration ive inherited. I set up a seperate environment group for dev and have mapped it to a seperate branch. Pinned my device to the new branch and that part looks correct. The problem I am running into is the current config has rules setup to match "any" of the ip ranges provided by the previous admin so If i try to set up a rule to exculde my test node it puts ALL the nodes that are not my test node into the group. Is there a better way to exclude or do i need to go back and redesign how the node group is populated for production vdi?
  • l

    Lumiere

    10/20/2022, 2:23 PM
    so, if in puppet's /etc/puppetlabs/code/manifests directory, it's going to use the most specific node definition for something, so I'd suggest setting up a node temporarily that's just the IP. beyond that we'd need to see some of the code to help understand the interactions
  • m

    Mike Eckerle

    10/20/2022, 2:44 PM
    uh, looks like we are using the puppet web console for this? is that where you can view the data in the cli?
  • m

    Mike Eckerle

    10/20/2022, 2:44 PM
    my problem is the endpoint im trying to test on is saying it cannot do a puppet run because it has conflicting values for the environment
  • m

    Mike Eckerle

    10/20/2022, 2:47 PM
    uh, looks like we are using the puppet web console for this? is that where you can view the data in the cli?
  • l

    Lumiere

    10/20/2022, 2:49 PM
    if you're in PE, I am not going to be very helpful
  • l

    Lumiere

    10/20/2022, 2:49 PM
    I am an OSS Puppet user
  • l

    Lumiere

    10/20/2022, 2:49 PM
    and haven't done any of the trainings that use PE
  • m

    Mike Eckerle

    10/20/2022, 2:50 PM
    i should probably do some trainings....
  • m

    Mike Eckerle

    10/20/2022, 2:51 PM
    but there is this whole full time job thing. Life is rough
  • m

    Marty Ewings

    10/20/2022, 2:57 PM
    @Mike Eckerle so you have 2 environment node groups, pined 1 node to one of them, and have rules on the other one that also match that node?
  • m

    Mike Eckerle

    10/20/2022, 2:58 PM
    no, I have successfully excluded the test node from the prod environment group
  • m

    Mike Eckerle

    10/20/2022, 2:59 PM
    that took an effort to redefine how the linux_prod environment group was defined but that part is working now
  • m

    Marty Ewings

    10/20/2022, 2:59 PM
    i think you a describing a situation best solved with canary node testing:
  • m

    Marty Ewings

    10/20/2022, 2:59 PM
    https://puppet.com/docs/pe/2021.7/environment_based_testing.html#test_code_one_time_run_exception
  • m

    Marty Ewings

    10/20/2022, 2:59 PM
    this whole section of the PE docs should describe best practice in this area
  • m

    Mike Eckerle

    10/20/2022, 3:00 PM
    oh wow, i didnt know you could specify an environemnt on a run
  • s

    Slackbot

    10/20/2022, 3:00 PM
    This message was deleted.
    m
    m
    • 3
    • 5
  • b

    bastelfreak

    10/20/2022, 3:01 PM
    doesn't mean that the server accepts it, but yes, you can specify it
  • c

    CVQuesty

    10/20/2022, 3:01 PM
    Hey there. Me either, but I just had to do something like this. Note that I used the Powershell provider to make it happen, so this assumes Powershell…
    Copy code
    # Retrieve Package from Trend Micro
    exec { 'get_trend':
      command  => 'Invoke-WebRequest -Uri "<https://app.deepsecurity.trendmicro.com/software/agent/Windows/x86_64/agent.msi>" -OutFile "C:\agent.msi"',
      provider => 'powershell',
      unless   => [
        'If (Test-Path -Path "C:\Program Files\Trend Micro\Deep Security Agent\dsa.exe") { exit 0 } else { exit 1 }',
        'If (Test-Path -Path "C:\agent.msi") { exit 0 } else { exit 1 }',
      ],
    }
    This allows me to test for existence of a file on a path like the “test” tool in Linux
  • m

    Mike Eckerle

    10/20/2022, 3:02 PM
    is it typical to have one puppet server maintaining mulitpe OS's off of different branches of the same code base?
  • m

    Mike Eckerle

    10/20/2022, 3:02 PM
    its taking me a while to wrap my head around just hte branching that we have in place here
  • n

    n3snah

    10/20/2022, 3:03 PM
    I guess its one way to do it but its not what I would call conventional. Puppet is designed to be OS Agnostic/Abstract so having your class's handle the different OS's is part of its primary capability
  • n

    n3snah

    10/20/2022, 3:04 PM
    It would also be harder to maintain if you have several different branches trying to serve the same purpose IMHO
  • v

    vchepkov

    10/20/2022, 3:06 PM
    I found it beneficial to have separate control repos for Unix and Windows nodes. They still can refer to common modules, but majority of them are drastically different and there is no reason to sync to Unix God awful dsc
  • m

    Mike Eckerle

    10/20/2022, 3:07 PM
    yeah, that seems to be the root of my issues. I wonder if they would let me start over in a new environment for linux
  • v

    vchepkov

    10/20/2022, 3:08 PM
    Copy code
    puppet_enterprise::master::code_manager::sources:
      unix:
        remote: "<mailto:git@gitlab.example.com|git@gitlab.example.com>:it/puppet/puppet-control.git"
      windows:
        remote: "<mailto:git@gitlab.example.com|git@gitlab.example.com>:it/puppet/puppet-win.git"
        prefix: true
      default:
        remote: "<mailto:git@gitlab.example.com|git@gitlab.example.com>:it/puppet/puppet-pe_bootstrap.git"
        prefix: true
    👀 1
  • c

    CVQuesty

    10/20/2022, 3:09 PM
    yep. I currently manage Debian, MacOSX, RedHat, Solaris, Windows (2 releases) and AIX.
  • n

    n3snah

    10/20/2022, 3:10 PM
    We have a Hybrid codebase supporting 4 different major OS's and that includes Windows/Linux... There have been some challenges especially with various Ruby compatibilities but I personally wouldn't maintain multiple branches.
  • s

    Slackbot

    10/20/2022, 4:00 PM
    This message was deleted.
    😬 2
    r
    • 2
    • 1
1...206207208...428Latest