Code Monkey home page Code Monkey logo

Comments (12)

gtmtech avatar gtmtech commented on July 17, 2024

It's a good idea.

In the meantime you can use
--pkcs7-private-key and --pkcs7-public-key to define your key locations each time. (--help for more info)

from hiera-eyaml.

TomPoulton avatar TomPoulton commented on July 17, 2024

I was thinking about using the same idea as Hiera itself. You configure hiera with the hiera.yaml conf file (in /etc/puppet) but you can pass it in (or a different one) when running hiera from the command line with the -c parameter

Would could also use the -c parameter and read a yaml file that gets passed in and extract the values. If we did it right we could even reuse the hiera.yaml config file if we wanted to?

from hiera-eyaml.

sihil avatar sihil commented on July 17, 2024

I would say definitely reuse the hiera.yaml format; that file will have the right settings in it, so could be supplied just as easily.

from hiera-eyaml.

TomPoulton avatar TomPoulton commented on July 17, 2024

I'm going to try and pick this up, mainly because it would be useful to me at the moment, but also to get more familiar with the code, it's come along way since I last had a deep dive!

To that end I've written a very basic rspec framework so that I can debug and step through the code to work out what's going on. I'll add a few tests as I see the need, but as I've never done anything with rspec up to now (apart from google what it is) I'll probably be back to get some input/help/suggestions!!

@gtmtech are you still planning on using trollop to handle parameters after you changes in #45?

from hiera-eyaml.

sihil avatar sihil commented on July 17, 2024

I don't mean to stamp on your parade @TomPoulton, but doesn't that mean we'd have two testing frameworks? I'm not familiar with Cucumber vs RSpec, but I feel like we probably only need one of the two - for clarity and ease of working with the code.

from hiera-eyaml.

TomPoulton avatar TomPoulton commented on July 17, 2024

That's a fair point, and we might end up not needing it. I've only written one small test so that I can step through the code in IntelliJ and watch how the code works, what the values are etc, I'm still getting used to ruby so I can't read it as easily as I can Java or C#

They are slightly different though from what I can tell, in that rspec is a unit testing framework and cucumber is a functional testing framework, so cucumber has to run against a built and installed gem. I've managed to programmatically set the command line arguments you would pass to the eyaml command in the tests themselves (turns out it's really easy in ruby) so I can run the eyaml command (CLI class) without creating a new gem which is making life easier for me at the moment!

Really its just a bunch of files in a directory so I can delete them when I'm done (or add to gitignore) if we feel they're not necessary or if rspec becomes a real sludge to work with and integrate with travis etc!

from hiera-eyaml.

gtmtech avatar gtmtech commented on July 17, 2024

@TomPoulton - all my code is done now - you can see it still uses Trollop, so feel free to add the -c as you wish to get values out of hiera.yaml.

from hiera-eyaml.

reinoud avatar reinoud commented on July 17, 2024

Another idea: maybe the --pkcs7-private-key and --pkcs7-public-key parameters can be read from environment variables as well. In that case people could put it in their ~/.bash_rc or a script that enables switching between different puppet projects

from hiera-eyaml.

sammcj avatar sammcj commented on July 17, 2024

It would be great if you could write out local config to something like ~/.eyaml/config

from hiera-eyaml.

sihil avatar sihil commented on July 17, 2024

So I've done some work with this drawing on @sammcj's work and @reinoud's suggestion of supporting an environment variable. I've added it to the docs but a summary can be read on pull request #76.

I'm going to tag this issue as a duplicate and persuade someone to review and merge the work.

from hiera-eyaml.

sammcj avatar sammcj commented on July 17, 2024

I'm certainly no coder so it was just my 'best effort' and first go at Ruby - This is a great fix, Thanks @sihil ,

from hiera-eyaml.

sihil avatar sihil commented on July 17, 2024

Closing this issue as I believe it is fixed with the release of 2.0.1

from hiera-eyaml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.