Git Product home page Git Product logo

Comments (20)

neillturner avatar neillturner commented on August 22, 2024

it looks for the manifest in the manifests directory of the root path

from kitchen-puppet.

neillturner avatar neillturner commented on August 22, 2024

try changing
File.join(config[:root_path], 'manifests', manifest)
to
File.join(config[:root_path], 'manifests', config[:manifest])

from kitchen-puppet.

neillturner avatar neillturner commented on August 22, 2024

i don't think the above is necessary though.
try running test kitchen with the debug option

from kitchen-puppet.

ehaselwanter avatar ehaselwanter commented on August 22, 2024

I'm saying that the 'override' in the suites does not work. setting the manifest in the provisioner option does work

from kitchen-puppet.

neillturner avatar neillturner commented on August 22, 2024

Overides in suites is handled by core test kitchen code so this is not an issue in the plugin code.
It could be that because even through this is provisioner code it is using a plugin architecture designed for drivers and maybe driver parameters cannot be specified in suites?
in the longer term this code will go into code test-kitchen.
If you want to pursue this i suggest you run with debug and maybe put in puts in the test kitchen code.
you could also move my code into the provisioner part of test-kitchen and see if it works there.

from kitchen-puppet.

ehaselwanter avatar ehaselwanter commented on August 22, 2024

won't fix is ok for me. are you in conversation with @FNichols about integration?

from kitchen-puppet.

neillturner avatar neillturner commented on August 22, 2024

it is a pull request in test-kitchen

from kitchen-puppet.

PaulusTM avatar PaulusTM commented on August 22, 2024

@neillturner I still see this behavior. Putting manifest: init.pp under the provisioner options works. Do you have a status update for this pr?

from kitchen-puppet.

neillturner avatar neillturner commented on August 22, 2024

sorry don't remember this. what is the problem again so i can reproduce?

from kitchen-puppet.

grubernaut avatar grubernaut commented on August 22, 2024

@ehaselwanter I am able to set provisioner options at the suite level by adding it into the provisioner config hash. Test-kitchen reads in native YAML and setting provisioner options are allowed globally.
Try:

suites:
  - name: default
    provisioner:
      manifest: init.pp

I have found that this can work with all provisioner options to set them at the suite-level. To check, you can always run: kitchen diagnose and check the provisioner hash for the correct parameters that you wish to specify.

from kitchen-puppet.

ehaselwanter avatar ehaselwanter commented on August 22, 2024

@grubernaut: It should work as expected. Same like with chef. You have to create multiple suites in the directory. Have a look at an example, did not come around to write a blog post about it

https://github.com/ehaselwanter/puppet-kitchen-example/tree/multiple-suites

from kitchen-puppet.

neillturner avatar neillturner commented on August 22, 2024

I setup things like this in my kitchen.yml:

provisioner:
name: puppet_apply
manifests_path: manifests
modules_path: my_modules
hiera_data_path: hieradata
require_puppet_omnibus: false
require_chef_for_busser: false
puppet_omnibus_url: bad_url
puppet_debug: true
puppet_verbose: true

suites:
name: sinopia
provisioner:
custom_facts:
role_name1: base
role_name2: sinopia
driver_config:
network:
['forwarded_port', {guest: 4783, host: 4783}]
['private_network', { ip: '192.168.99.99' } ]

from kitchen-puppet.

grubernaut avatar grubernaut commented on August 22, 2024

@ehaselwanter I agree it should "Just Work". But setting the parameters under the provisioner hash does still set provisioner options per suite.

suites:
  - name: web
    provisioner:
      manifest: web.pp
  - name: database
    provisioner:
      manifest: database.pp

Having the above in my .kitchen.yml allows me to set per-suite provisioner parameters.

Unless I'm understanding the problem wrong?

from kitchen-puppet.

ehaselwanter avatar ehaselwanter commented on August 22, 2024

what do you mean by "provisioner options" ? define the manifest?

https://github.com/ehaselwanter/puppet-kitchen-example/blob/multiple-suites/.kitchen.yml

suites:
  - name: default
    manifest: site.pp
  - name: the_other_suite
    manifest: site.pp
± kitchen list
Instance                          Driver   Provisioner  Last Action
default-nocm-ubuntu-1204          Vagrant  PuppetApply  <Not Created>
the-other-suite-nocm-ubuntu-1204  Vagrant  PuppetApply  <Not Created>
± tree test/integration
test/integration
├── default
│   ├── Modulefile
│   ├── Puppetfile
│   ├── Puppetfile.lock
│   ├── bats
│   │   └── verify_installed.bats
│   ├── puppet
│   │   └── manifests
│   │       └── site.pp
│   └── serverspec
│       ├── ntp_spec.rb
│       └── spec_helper.rb
└── the_other_suite
    ├── puppet
    │   ├── Modulefile
    │   ├── Puppetfile
    │   ├── Puppetfile.lock
    │   └── manifests
    │       └── site.pp
    └── serverspec
        ├── ntp_spec.rb
        └── spec_helper.rb

9 directories, 13 files

from kitchen-puppet.

neillturner avatar neillturner commented on August 22, 2024

thanks for that. when i get a moment i will test.

from kitchen-puppet.

ehaselwanter avatar ehaselwanter commented on August 22, 2024

hm. @neillturner : Maybe I did not express myself clearly: it just works. you do not need to re-open. I'm using it that way.

or I miss understood. (@grubernaut: does the example work for you, is it what you expect?)

checkout the testrepo/branch to see it working:

https://github.com/ehaselwanter/puppet-kitchen-example/blob/multiple-suites/

I really have to write a blog post for this example ...

from kitchen-puppet.

grubernaut avatar grubernaut commented on August 22, 2024

@ehaselwanter yeah, that works for me as well.

I was just mentioning that you can set suite-specific parameters for the provisioner hash.

---
driver_plugin: docker

provisioner:
  name: puppet_apply
  puppet_version: 3.5.1-1puppetlabs1
  manifests_path: manifests
  modules_path: 'modules/minted'
  hiera_config_path: .kitchen_hiera.yaml
  hiera_data_path: hieradata
  puppet_config_path: puppet.conf
  resolve_with_librarian_puppet: true
  require_chef_for_busser: true

platforms:
  - name: ubuntu-12.04
    driver_config:
      socket: <%= ENV['DOCKER_HOST'] %>
      use_cache: true
      provision_command:
        - dpkg-reconfigure -au
        - apt-get install -y apt-utils
        - apt-get install -y python-software-properties

suites:
  - name: web
    provisioner:
      manifest: web.pp
      custom_facts:
        role: website
  - name: database
    provisioner:
      manifest: database.pp
      custom_facts:
        role: database

Yields suite-specific provisioner parameters. (I've removed a lot of the cruft from the kitchen diagnose output, but it's showing the same:

instances:
  web-ubuntu-1204:
    state_file:
    driver:
    provisioner:
      custom_facts:
        role: website
      manifest: web.pp
  database-ubuntu-1204:
    state_file: 
    driver:
    provisioner:
      custom_facts:
        role: database
      manifest: database.pp

This is the same as setting suite-specific attribute values with chef shown here. Our provisioner just doesn't have an attributes hash to set common values such as a run_list.
But by adding any provisioner parameters that you wish to set at the suite level to a provisioner hash, you can set suite-specific provisioner parameters.

from kitchen-puppet.

ehaselwanter avatar ehaselwanter commented on August 22, 2024

@neillturner @grubernaut : I lost track, what is not working then?

from kitchen-puppet.

grubernaut avatar grubernaut commented on August 22, 2024

@ehaselwanter @neillturner It is working, and I believe we can close the issue. Just was making the point that we can set provisioner attributes at a suite level as well. There's no documentation for it though, and it may be a good thing to highlight in your blog @ehaselwanter, as that helped me a whole lot when I was digging into kitchen-puppet.

from kitchen-puppet.

neillturner avatar neillturner commented on August 22, 2024

closed again

from kitchen-puppet.

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.