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

    bastelfreak

    05/23/2023, 6:49 PM
    sounds like your setup is different? you've multiple modules in a monorepo and want to deploy them via Puppetfile?
  • y

    Yury Bushmelev

    05/23/2023, 6:58 PM
    I saw a monorepo where all modules were vendored.. so just no Puppetfile was required
  • y

    Yury Bushmelev

    05/23/2023, 7:00 PM
    I was even able to make modules management via Bolt there.. but nobody was able to understand how great it was… :-D
  • b

    bastelfreak

    05/23/2023, 7:00 PM
    yeah. just add the correct path to environment.conf and it works out of the box
    ☝🏻 1
  • b

    bastelfreak

    05/23/2023, 7:02 PM
    I checked through https://www.puppet.com/docs/pe/2023.1/puppetfile.html#specify_installation_paths_for_repositories and I knew the option to install a module into a different directory. But I thought there's also an option to only install a subdir from a module, bu I cannot find that option
  • a

    attachmentgenie

    05/23/2023, 7:11 PM
    ah yes that version on monorepo i have done before, i am talking about https://monorepo.tools/ where all the code for all the projects (also product and infra) are in the same single git repo. Supposed benefits are that cross project changes can all land in the same MR/PR but of course kills of any chance of using a "standard" workflow. So am really trying to work out something like.
    Copy code
    mod 'profiles',
        :git => 'git@github.com:$org/monorepo.git/$infra-team/puppet/modules/$org-profiles
  • b

    bastelfreak

    05/23/2023, 7:13 PM
    I checked through https://github.com/puppetlabs/r10k/blob/main/doc/dynamic-environments/configuration.mkd and didn't find an option to deploy a control-repo from a subdir of a module
  • b

    bastelfreak

    05/23/2023, 7:13 PM
    so either I'm too stupid to find that option or you would have to implement this
  • a

    attachmentgenie

    05/23/2023, 7:15 PM
    i was afraid you were going to say that
  • b

    bastelfreak

    05/23/2023, 7:16 PM
    I'm happy to review your patches 😄
    👍 1
  • t

    Tom Hilburn

    05/23/2023, 8:30 PM
    Is there a native way to call by current module name in hiera.yaml datadir? path: "%{module_name}.yaml"
  • v

    vchepkov

    05/23/2023, 8:32 PM
    it's relative to the datadir setting, why do you need absolute path, curious ?
  • t

    Tom Hilburn

    05/23/2023, 8:35 PM
    I want to store all the data under the datadir. I have a case where I want to store data under the module name it's tied to. That way at a glance if I need to change the data for that mod it's right there.
  • t

    Tom Hilburn

    05/23/2023, 8:37 PM
    I can't seem to find a way to call by module name. I know I can place the data with the module but I was hoping to keep it all under one location
  • v

    vchepkov

    05/23/2023, 8:38 PM
    you can specify some absolute path in datadir and keep it in that location, but module_name is not available, at least I don't think so
  • v

    vchepkov

    05/23/2023, 8:39 PM
    I don't think hiera is even aware of 'module'
  • m

    Markus Zilch

    05/23/2023, 8:39 PM
    i did something similar, but that is a bit hacky. i added a facter script that read all module names from the last run report (would have to look up how i did it again). and then i used "mapped_paths: [modules_fact,module,"modules/%{module}.yaml"]" do "dynamically" load data based on the applied modules of the last run
  • m

    Markus Zilch

    05/23/2023, 8:41 PM
    the problem was that its a bit of a hen and egg problem i think, do you load the hiera facts first or apply the modules first. i think puppet usually first gets the facts and then applies the modules when it has all the "base" data
  • m

    Markus Zilch

    05/23/2023, 8:41 PM
    aditionally: i think my workaround is broken right now, so dont put too much faith in that 😛
  • t

    Tom Hilburn

    05/23/2023, 8:41 PM
    Yeah, sounds like I should just use a module yaml for this one
  • l

    Lumiere

    05/23/2023, 8:42 PM
    this seems like the entire point of the module's yaml and profiles
    👍 1
  • m

    Markus Zilch

    05/23/2023, 8:43 PM
    yea, but module yamls dont really work for official modules and profiles have their own problems ^^
  • b

    bastelfreak

    05/23/2023, 8:48 PM
    that all sounds... odd 😄
    🎯 1
    💯 2
  • b

    bastelfreak

    05/23/2023, 8:48 PM
    @Tom Hilburn why not store the data in the module itself?
  • t

    Tom Hilburn

    05/23/2023, 8:49 PM
    @bastelfreak I wanted to keep all of the data under one spot. The datadir
  • b

    bastelfreak

    05/23/2023, 8:50 PM
    mhm
  • b

    bastelfreak

    05/23/2023, 8:50 PM
    I'm not convinced!
  • d

    Dr Bunsen Honeydew

    05/23/2023, 9:45 PM
    goodnews 🧑‍🏫 Bolt is about to start up in #CFD8Z9A4T
  • s

    Slackbot

    05/23/2023, 10:01 PM
    This message was deleted.
    b
    n
    +3
    • 6
    • 21
  • d

    Dr Bunsen Honeydew

    05/23/2023, 10:01 PM
    See the
    binford2k-node_encrypt
    module at https://forge.puppet.com/binford2k/node_encrypt?src=slack&channel=puppet
1...366367368...428Latest