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

    bastelfreak

    05/10/2022, 5:33 PM
    even better
  • j

    josh

    05/10/2022, 5:33 PM
    We've talked about precalculating all of the file metadata & checksums during a code deploy for an environment, like how you can run
    puppet resource generate
    to generate the pcore resource types.
  • l

    Lumiere

    05/10/2022, 5:34 PM
    please feature flag that if you do it
  • l

    Lumiere

    05/10/2022, 5:35 PM
    otherwise someone's going to get a real nightmare troubleshooting situation if they don't realize that cache is happening
  • b

    bastelfreak

    05/10/2022, 5:35 PM
    if there isnt somethi g precalculated to deliver the puppetserver could still do it on the fly (just for the requested file )
  • l

    Lumiere

    05/10/2022, 5:36 PM
    right, I am thinking about the opposite problem, someone deploys and then tweaks a file to test a small change (which is a terrible strategy, but it happens)
  • b

    bastelfreak

    05/10/2022, 5:36 PM
    ah cache invalidation is one of the easiest things in the world @Lumiere!
  • l

    Lumiere

    05/10/2022, 5:36 PM
    lul
  • l

    Lumiere

    05/10/2022, 5:36 PM
    inotify all the things!
  • b

    bastelfreak

    05/10/2022, 5:37 PM
    putting nginx with some lua in front of puppetsetver sounds like a solution for most issues
  • l

    Lumiere

    05/10/2022, 5:37 PM
    I'm throwing you out an airlock in my mind right now
  • b

    bastelfreak

    05/10/2022, 5:37 PM
    I will assume thats something positive!
  • b

    bastelfreak

    05/10/2022, 5:38 PM
    nginx could serve all the static files and even calculate the checksums on the fly + cache them and PE even already ships an nginx. and it can handle TLS offloading way better than the jvm
  • b

    binford2k

    05/10/2022, 5:40 PM
    tbh, if https://github.com/puppetlabs/docs-archive/blob/main/puppet/4.4/configuration.md#pluginsync wasn't deprecated, you could just turn off pluginsync and replicate it by having r10k build a tarball on deploy, then manage a file resource and an exec resource to uncompress it in a run stage. 🤷
  • b

    binford2k

    05/10/2022, 5:40 PM
    tbh, if https://github.com/puppetlabs/docs-archive/blob/main/puppet/4.4/configuration.md#pluginsync wasn't deprecated, you could just turn off pluginsync and replicate it by having r10k build a tarball on deploy, then manage a file resource and an exec resource to uncompress it in a run stage. 🤷
  • j

    josh

    05/10/2022, 5:45 PM
    Yeah I think all of those have pluses and minuses. Using something-other-than-puppetserver for fileserving is a big win. But the
    recurse => true
    behavior complicates things and the response needs to conform to the fileserving REST API
  • b

    bastelfreak

    05/10/2022, 5:46 PM
    I think the majority of the resources do not use recurse => true
  • j

    josh

    05/10/2022, 5:46 PM
    The tarball approach is nice when deploying a new agent, but you also don't want to download everything again when a single fact changes.
  • b

    bastelfreak

    05/10/2022, 5:46 PM
    and if they do, that could still be forwarded to puppetserver
  • j

    josh

    05/10/2022, 5:46 PM
    @bastelfreak ah sorry I mean pluginsync is implemented as a recursive file resource
  • b

    bastelfreak

    05/10/2022, 5:47 PM
    ah okay
  • b

    bastelfreak

    05/10/2022, 5:47 PM
    I used the nginx in front of puppetserver in the past to terminate tls and serve static file resources and that worked really well
    ➕ 1
  • b

    binford2k

    05/10/2022, 5:47 PM
    I'd prefer to download the whole tarball when a single fact changes over a recursive file resource.
  • b

    bastelfreak

    05/10/2022, 5:50 PM
    mhm not sure. extracting that on the agent is also expensive
  • b

    bastelfreak

    05/10/2022, 5:50 PM
    still votes for nginx
  • b

    binford2k

    05/10/2022, 5:51 PM
    sure, but how often does the extraction happen compared to the recursive checksums that happen every time?
  • b

    bastelfreak

    05/10/2022, 5:52 PM
    mhm
  • b

    bastelfreak

    05/10/2022, 5:52 PM
    good question
  • c

    csharpsteen

    05/10/2022, 5:52 PM
    Lifting File Serving out of Ruby and into Java would also help, similar to an NGINX offload but without an external dependency. Last time I looked, it was about 10x faster and there are 10x more threads available if you’re not queuing for the JRuby pool.
  • s

    Slackbot

    05/10/2022, 5:53 PM
    This message was deleted.
    ☝️ 1
    💯 1
    🎉 1
    c
    b
    • 3
    • 3
1...567...78Latest