0

Hi Same hosts i want to run other recipes 2nd time but only first declared run list only running but second time declared run list for same nodes are not running from .kitchen.yml and test kitchen.

Please suggest me how can accomplish 2nd time declared run list

---
driver:
  name: vagrant

provisioner:
  name: chef_zero
  environments_path: test/integration/default/environments
  client_rb:
    environment: stg

  always_update_cookbooks: true
verifier:
  name: inspec

platforms:
  - name: centos-7.2

suites:
  - name: Host1.com
    run_list:

      - recipe[maprcluster-cookbook::mapr_install]

    data_bags_path: "test/integration/default/data_bags"

    attributes:
      zookeeper: 'true'
      cldb     : 'true'
      hive: 'true'


  - name: Host2.com
    run_list:
      - recipe[maprcluster-cookbook::mapr_install]

    data_bags_path: "test/integration/default/data_bags"

    attributes:
      zookeeper: 'true'
      cldb     : 'true'
      hive_thrift: 'true'

  - name: host3.com
    run_list:
      - recipe[maprcluster-cookbook::mapr_install] 

    data_bags_path: "test/integration/default/data_bags"


    attributes:
      zookeeper: 'true'
      cldb     : 'true'
      hive_thrift: 'true'  

  - name: Host1.com
    run_list:
      - recipe[maprcluster-cookbook::server_config]


    data_bags_path: "test/integration/default/data_bags"

  - name: Host2.com
    run_list:
      - recipe[maprcluster-cookbook::server_config]

    data_bags_path: "test/integration/default/data_bags"

  - name: Host3.com
    run_list:
      - recipe[maprcluster-cookbook::server_config]

    data_bags_path: "test/integration/default/data_bags"
Udhay
  • 7
  • 7

2 Answers2

0

You can add second recipe to the existing suite's run_list, like so

- name: Host1.com
  run_list:
    - recipe[maprcluster-cookbook::mapr_install]
    - recipe[maprcluster-cookbook::server_config]
ostap36
  • 33
  • 6
  • No i have to install packages in all nodes first then only i can run server_config hence i don't want to add like that – Udhay Mar 16 '17 at 01:16
  • Can you configure your `maprcluster-cookbook::server_config` so that it waits a bit (or for some condition) before starting? – Draco Ater Mar 17 '17 at 08:13
0

It looks like you are trying to use Test Kitchen to test a multi-server cluster of some kind. Unfortunately this is not something we currently support. It is very much on the list for the future though.

coderanger
  • 52,400
  • 4
  • 52
  • 75
  • But We could see 1st time it is going through the 3 hosts but for second time for same hosts it is not reaching – Udhay Mar 16 '17 at 01:27
  • Yes, the results of this kind of config are undefined. It will try to merge things into suites that it knows what to do with, which is not going to be the result you want. – coderanger Mar 16 '17 at 01:35
  • Basically `suites` is a list in the config, but you can't have the same suite twice because in the end it turns them into a hash. – coderanger Mar 16 '17 at 01:38
  • Thank you , I want to install only some packages on one node and some packages on 2nd node and other packages in other node where i can define this packages as array and i can call only required for particular node – Udhay Mar 16 '17 at 03:44