Chef Node dummy data

Hi all.

I need to generate large number of dummy Chef nodes for testing purposes,
together with automatic attributes.

Is there any existing way to do that, maybe some testing script in chef
repo?
I’ve looked in chef-server repo but haven’t found anything useful.

I can create nodes manually and add ohai attributes from fauxhai,
but it would be great if there is an existing way to do that.

Thanks,
Nenad

Have a look at test kitchen, it’s essentially the standard test suite for
Chef at the moment.

In the suites section of the .kitchen.yml you can specify nodes and each
node can have individual node level attributes set.

http://kitchen.ci/


https://docs.chef.io/config_yml_kitchen.html

On Fri, Jul 3, 2015 at 7:35 AM, Nenad Petronijevic set.krag@gmail.com
wrote:

Hi all.

I need to generate large number of dummy Chef nodes for testing purposes,
together with automatic attributes.

Is there any existing way to do that, maybe some testing script in chef
repo?
I’ve looked in chef-server repo but haven’t found anything useful.

I can create nodes manually and add ohai attributes from fauxhai,
but it would be great if there is an existing way to do that.

Thanks,
Nenad


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com

Or are you only interested in the ohai generated attributes?

On Fri, Jul 3, 2015 at 9:27 AM, Yoshi Spendiff <yoshi.spendiff@indochino.com

wrote:

Have a look at test kitchen, it’s essentially the standard test suite for
Chef at the moment.

In the suites section of the .kitchen.yml you can specify nodes and each
node can have individual node level attributes set.

http://kitchen.ci/
https://github.com/test-kitchen/test-kitchen
https://docs.chef.io/config_yml_kitchen.html

On Fri, Jul 3, 2015 at 7:35 AM, Nenad Petronijevic set.krag@gmail.com
wrote:

Hi all.

I need to generate large number of dummy Chef nodes for testing purposes,
together with automatic attributes.

Is there any existing way to do that, maybe some testing script in chef
repo?
I’ve looked in chef-server repo but haven’t found anything useful.

I can create nodes manually and add ohai attributes from fauxhai,
but it would be great if there is an existing way to do that.

Thanks,
Nenad


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com

Well, I need to generate valid nodes,
with ohai attributes included.

I thought about generating nodes
with ohai attrs filled from fauxhai,
but I still need to update fauxhai data to be unique across all nodes.
On Jul 3, 2015 6:30 PM, “Yoshi Spendiff” yoshi.spendiff@indochino.com
wrote:

Or are you only interested in the ohai generated attributes?

On Fri, Jul 3, 2015 at 9:27 AM, Yoshi Spendiff <
yoshi.spendiff@indochino.com> wrote:

Have a look at test kitchen, it’s essentially the standard test suite for
Chef at the moment.

In the suites section of the .kitchen.yml you can specify nodes and each
node can have individual node level attributes set.

http://kitchen.ci/
https://github.com/test-kitchen/test-kitchen
https://docs.chef.io/config_yml_kitchen.html

On Fri, Jul 3, 2015 at 7:35 AM, Nenad Petronijevic set.krag@gmail.com
wrote:

Hi all.

I need to generate large number of dummy Chef nodes for testing
purposes, together with automatic attributes.

Is there any existing way to do that, maybe some testing script in chef
repo?
I’ve looked in chef-server repo but haven’t found anything useful.

I can create nodes manually and add ohai attributes from fauxhai,
but it would be great if there is an existing way to do that.

Thanks,
Nenad


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com

i dont think theres anything out there. we use the same technique as you
mentioned (fauxhai) …

On Fri, Jul 3, 2015 at 9:55 AM, Nenad Petronijevic set.krag@gmail.com
wrote:

Well, I need to generate valid nodes,
with ohai attributes included.

I thought about generating nodes
with ohai attrs filled from fauxhai,
but I still need to update fauxhai data to be unique across all nodes.
On Jul 3, 2015 6:30 PM, “Yoshi Spendiff” yoshi.spendiff@indochino.com
wrote:

Or are you only interested in the ohai generated attributes?

On Fri, Jul 3, 2015 at 9:27 AM, Yoshi Spendiff <
yoshi.spendiff@indochino.com> wrote:

Have a look at test kitchen, it’s essentially the standard test suite
for Chef at the moment.

In the suites section of the .kitchen.yml you can specify nodes and each
node can have individual node level attributes set.

http://kitchen.ci/
https://github.com/test-kitchen/test-kitchen
https://docs.chef.io/config_yml_kitchen.html

On Fri, Jul 3, 2015 at 7:35 AM, Nenad Petronijevic set.krag@gmail.com
wrote:

Hi all.

I need to generate large number of dummy Chef nodes for testing
purposes, together with automatic attributes.

Is there any existing way to do that, maybe some testing script in chef
repo?
I’ve looked in chef-server repo but haven’t found anything useful.

I can create nodes manually and add ohai attributes from fauxhai,
but it would be great if there is an existing way to do that.

Thanks,
Nenad


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com

Guess one of us will have to open source our solution :slight_smile:
On Jul 3, 2015 7:10 PM, “Ranjib Dey” dey.ranjib@gmail.com wrote:

i dont think theres anything out there. we use the same technique as you
mentioned (fauxhai) …

On Fri, Jul 3, 2015 at 9:55 AM, Nenad Petronijevic set.krag@gmail.com
wrote:

Well, I need to generate valid nodes,
with ohai attributes included.

I thought about generating nodes
with ohai attrs filled from fauxhai,
but I still need to update fauxhai data to be unique across all nodes.
On Jul 3, 2015 6:30 PM, “Yoshi Spendiff” yoshi.spendiff@indochino.com
wrote:

Or are you only interested in the ohai generated attributes?

On Fri, Jul 3, 2015 at 9:27 AM, Yoshi Spendiff <
yoshi.spendiff@indochino.com> wrote:

Have a look at test kitchen, it’s essentially the standard test suite
for Chef at the moment.

In the suites section of the .kitchen.yml you can specify nodes and
each node can have individual node level attributes set.

http://kitchen.ci/
https://github.com/test-kitchen/test-kitchen
https://docs.chef.io/config_yml_kitchen.html

On Fri, Jul 3, 2015 at 7:35 AM, Nenad Petronijevic set.krag@gmail.com
wrote:

Hi all.

I need to generate large number of dummy Chef nodes for testing
purposes, together with automatic attributes.

Is there any existing way to do that, maybe some testing script in
chef repo?
I’ve looked in chef-server repo but haven’t found anything useful.

I can create nodes manually and add ohai attributes from fauxhai,
but it would be great if there is an existing way to do that.

Thanks,
Nenad


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com

I have this for creating a bunch of nodes:

The only caveats are: you need to install fauxhai and chef-api, but you
need to install version 0.3.0 of chef-api. For whatever reason it chokes on
the most recent version. Otherwise, though, this’ll generate as many fake
nodes as you want. Change the number of nodes to create on line 31, and of
course configure the right key and hostname in the config section on line 8.

-j

On Fri, Jul 3, 2015 at 1:16 PM, Nenad Petronijevic set.krag@gmail.com
wrote:

Guess one of us will have to open source our solution :slight_smile:
On Jul 3, 2015 7:10 PM, “Ranjib Dey” dey.ranjib@gmail.com wrote:

i dont think theres anything out there. we use the same technique as you
mentioned (fauxhai) …

On Fri, Jul 3, 2015 at 9:55 AM, Nenad Petronijevic set.krag@gmail.com
wrote:

Well, I need to generate valid nodes,
with ohai attributes included.

I thought about generating nodes
with ohai attrs filled from fauxhai,
but I still need to update fauxhai data to be unique across all nodes.
On Jul 3, 2015 6:30 PM, “Yoshi Spendiff” yoshi.spendiff@indochino.com
wrote:

Or are you only interested in the ohai generated attributes?

On Fri, Jul 3, 2015 at 9:27 AM, Yoshi Spendiff <
yoshi.spendiff@indochino.com> wrote:

Have a look at test kitchen, it’s essentially the standard test suite
for Chef at the moment.

In the suites section of the .kitchen.yml you can specify nodes and
each node can have individual node level attributes set.

http://kitchen.ci/
https://github.com/test-kitchen/test-kitchen
https://docs.chef.io/config_yml_kitchen.html

On Fri, Jul 3, 2015 at 7:35 AM, Nenad Petronijevic <set.krag@gmail.com

wrote:

Hi all.

I need to generate large number of dummy Chef nodes for testing
purposes, together with automatic attributes.

Is there any existing way to do that, maybe some testing script in
chef repo?
I’ve looked in chef-server repo but haven’t found anything useful.

I can create nodes manually and add ohai attributes from fauxhai,
but it would be great if there is an existing way to do that.

Thanks,
Nenad


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com

Awesome sauce.
It seems just like the thing I need.

Thanks a bunch,
Nenad
On Jul 3, 2015 10:35 PM, “Jeremy Bingham” jbingham@gmail.com wrote:

I have this for creating a bunch of nodes:
https://gist.github.com/ctdk/16623c2453640448b6d6

The only caveats are: you need to install fauxhai and chef-api, but you
need to install version 0.3.0 of chef-api. For whatever reason it chokes on
the most recent version. Otherwise, though, this’ll generate as many fake
nodes as you want. Change the number of nodes to create on line 31, and of
course configure the right key and hostname in the config section on line 8.

-j

On Fri, Jul 3, 2015 at 1:16 PM, Nenad Petronijevic set.krag@gmail.com
wrote:

Guess one of us will have to open source our solution :slight_smile:
On Jul 3, 2015 7:10 PM, “Ranjib Dey” dey.ranjib@gmail.com wrote:

i dont think theres anything out there. we use the same technique as you
mentioned (fauxhai) …

On Fri, Jul 3, 2015 at 9:55 AM, Nenad Petronijevic set.krag@gmail.com
wrote:

Well, I need to generate valid nodes,
with ohai attributes included.

I thought about generating nodes
with ohai attrs filled from fauxhai,
but I still need to update fauxhai data to be unique across all nodes.
On Jul 3, 2015 6:30 PM, “Yoshi Spendiff” yoshi.spendiff@indochino.com
wrote:

Or are you only interested in the ohai generated attributes?

On Fri, Jul 3, 2015 at 9:27 AM, Yoshi Spendiff <
yoshi.spendiff@indochino.com> wrote:

Have a look at test kitchen, it’s essentially the standard test suite
for Chef at the moment.

In the suites section of the .kitchen.yml you can specify nodes and
each node can have individual node level attributes set.

http://kitchen.ci/
https://github.com/test-kitchen/test-kitchen
https://docs.chef.io/config_yml_kitchen.html

On Fri, Jul 3, 2015 at 7:35 AM, Nenad Petronijevic <
set.krag@gmail.com> wrote:

Hi all.

I need to generate large number of dummy Chef nodes for testing
purposes, together with automatic attributes.

Is there any existing way to do that, maybe some testing script in
chef repo?
I’ve looked in chef-server repo but haven’t found anything useful.

I can create nodes manually and add ohai attributes from fauxhai,
but it would be great if there is an existing way to do that.

Thanks,
Nenad


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com

i have added a comment with raw chef api, useful if you dont want to use
chef-api etc.

On Fri, Jul 3, 2015 at 1:46 PM, Nenad Petronijevic set.krag@gmail.com
wrote:

Awesome sauce.
It seems just like the thing I need.

Thanks a bunch,
Nenad
On Jul 3, 2015 10:35 PM, “Jeremy Bingham” jbingham@gmail.com wrote:

I have this for creating a bunch of nodes:
https://gist.github.com/ctdk/16623c2453640448b6d6

The only caveats are: you need to install fauxhai and chef-api, but you
need to install version 0.3.0 of chef-api. For whatever reason it chokes on
the most recent version. Otherwise, though, this’ll generate as many fake
nodes as you want. Change the number of nodes to create on line 31, and of
course configure the right key and hostname in the config section on line 8.

-j

On Fri, Jul 3, 2015 at 1:16 PM, Nenad Petronijevic set.krag@gmail.com
wrote:

Guess one of us will have to open source our solution :slight_smile:
On Jul 3, 2015 7:10 PM, “Ranjib Dey” dey.ranjib@gmail.com wrote:

i dont think theres anything out there. we use the same technique as
you mentioned (fauxhai) …

On Fri, Jul 3, 2015 at 9:55 AM, Nenad Petronijevic set.krag@gmail.com
wrote:

Well, I need to generate valid nodes,
with ohai attributes included.

I thought about generating nodes
with ohai attrs filled from fauxhai,
but I still need to update fauxhai data to be unique across all nodes.
On Jul 3, 2015 6:30 PM, “Yoshi Spendiff” yoshi.spendiff@indochino.com
wrote:

Or are you only interested in the ohai generated attributes?

On Fri, Jul 3, 2015 at 9:27 AM, Yoshi Spendiff <
yoshi.spendiff@indochino.com> wrote:

Have a look at test kitchen, it’s essentially the standard test
suite for Chef at the moment.

In the suites section of the .kitchen.yml you can specify nodes and
each node can have individual node level attributes set.

http://kitchen.ci/
https://github.com/test-kitchen/test-kitchen
https://docs.chef.io/config_yml_kitchen.html

On Fri, Jul 3, 2015 at 7:35 AM, Nenad Petronijevic <
set.krag@gmail.com> wrote:

Hi all.

I need to generate large number of dummy Chef nodes for testing
purposes, together with automatic attributes.

Is there any existing way to do that, maybe some testing script in
chef repo?
I’ve looked in chef-server repo but haven’t found anything useful.

I can create nodes manually and add ohai attributes from fauxhai,
but it would be great if there is an existing way to do that.

Thanks,
Nenad


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com

I believe this may be an example ChefSpec droid you’re looking for.

On Fri, Jul 3, 2015 at 4:58 PM, Ranjib Dey dey.ranjib@gmail.com wrote:

i have added a comment with raw chef api, useful if you dont want to use
chef-api etc.

On Fri, Jul 3, 2015 at 1:46 PM, Nenad Petronijevic set.krag@gmail.com
wrote:

Awesome sauce.
It seems just like the thing I need.

Thanks a bunch,
Nenad

On Jul 3, 2015 10:35 PM, “Jeremy Bingham” jbingham@gmail.com wrote:

I have this for creating a bunch of nodes:
https://gist.github.com/ctdk/16623c2453640448b6d6

The only caveats are: you need to install fauxhai and chef-api, but you
need to install version 0.3.0 of chef-api. For whatever reason it chokes on
the most recent version. Otherwise, though, this’ll generate as many fake
nodes as you want. Change the number of nodes to create on line 31, and of
course configure the right key and hostname in the config section on line 8.

-j

On Fri, Jul 3, 2015 at 1:16 PM, Nenad Petronijevic set.krag@gmail.com
wrote:

Guess one of us will have to open source our solution :slight_smile:

On Jul 3, 2015 7:10 PM, “Ranjib Dey” dey.ranjib@gmail.com wrote:

i dont think theres anything out there. we use the same technique as
you mentioned (fauxhai) …

On Fri, Jul 3, 2015 at 9:55 AM, Nenad Petronijevic set.krag@gmail.com
wrote:

Well, I need to generate valid nodes,
with ohai attributes included.

I thought about generating nodes
with ohai attrs filled from fauxhai,
but I still need to update fauxhai data to be unique across all nodes.

On Jul 3, 2015 6:30 PM, "Yoshi Spendiff"
yoshi.spendiff@indochino.com wrote:

Or are you only interested in the ohai generated attributes?

On Fri, Jul 3, 2015 at 9:27 AM, Yoshi Spendiff
yoshi.spendiff@indochino.com wrote:

Have a look at test kitchen, it’s essentially the standard test
suite for Chef at the moment.

In the suites section of the .kitchen.yml you can specify nodes and
each node can have individual node level attributes set.

http://kitchen.ci/
https://github.com/test-kitchen/test-kitchen
https://docs.chef.io/config_yml_kitchen.html

On Fri, Jul 3, 2015 at 7:35 AM, Nenad Petronijevic
set.krag@gmail.com wrote:

Hi all.

I need to generate large number of dummy Chef nodes for testing
purposes, together with automatic attributes.

Is there any existing way to do that, maybe some testing script in
chef repo?
I’ve looked in chef-server repo but haven’t found anything useful.

I can create nodes manually and add ohai attributes from fauxhai,
but it would be great if there is an existing way to do that.

Thanks,
Nenad


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com

Well, not really. Jeremy’s script is pretty close to the thing I need.
There are some issues with Fauxhai aproach, since all nodes have similar
attributes.
I need diverse nodes, various CPU, memory, network and disk configurations,
cloud and physical, etc, so I could test the script I’m building.

I’ve thought that Ohai specs will have what I need, but no luck there also.
Also, I hoped that there would be some example Chef server running online
with nodes entered,
but couldn’t find anything.

On Sat, Jul 4, 2015 at 11:14 AM, Sean OMeara someara@chef.io wrote:

I believe this may be an example ChefSpec droid you’re looking for.

https://github.com/chef-cookbooks/mysql/blob/e13c394c0e7cce1ff720632f9ed098f6766403de/spec/mysql_service/rhel/amazon_201409_service_55_multi_spec.rb

On Fri, Jul 3, 2015 at 4:58 PM, Ranjib Dey dey.ranjib@gmail.com wrote:

i have added a comment with raw chef api, useful if you dont want to use
chef-api etc.

On Fri, Jul 3, 2015 at 1:46 PM, Nenad Petronijevic set.krag@gmail.com
wrote:

Awesome sauce.
It seems just like the thing I need.

Thanks a bunch,
Nenad

On Jul 3, 2015 10:35 PM, “Jeremy Bingham” jbingham@gmail.com wrote:

I have this for creating a bunch of nodes:
https://gist.github.com/ctdk/16623c2453640448b6d6

The only caveats are: you need to install fauxhai and chef-api, but you
need to install version 0.3.0 of chef-api. For whatever reason it
chokes on

the most recent version. Otherwise, though, this’ll generate as many
fake

nodes as you want. Change the number of nodes to create on line 31,
and of

course configure the right key and hostname in the config section on
line 8.

-j

On Fri, Jul 3, 2015 at 1:16 PM, Nenad Petronijevic <set.krag@gmail.com

wrote:

Guess one of us will have to open source our solution :slight_smile:

On Jul 3, 2015 7:10 PM, “Ranjib Dey” dey.ranjib@gmail.com wrote:

i dont think theres anything out there. we use the same technique as
you mentioned (fauxhai) …

On Fri, Jul 3, 2015 at 9:55 AM, Nenad Petronijevic <
set.krag@gmail.com>

wrote:

Well, I need to generate valid nodes,
with ohai attributes included.

I thought about generating nodes
with ohai attrs filled from fauxhai,
but I still need to update fauxhai data to be unique across all
nodes.

On Jul 3, 2015 6:30 PM, "Yoshi Spendiff"
yoshi.spendiff@indochino.com wrote:

Or are you only interested in the ohai generated attributes?

On Fri, Jul 3, 2015 at 9:27 AM, Yoshi Spendiff
yoshi.spendiff@indochino.com wrote:

Have a look at test kitchen, it’s essentially the standard test
suite for Chef at the moment.

In the suites section of the .kitchen.yml you can specify nodes
and

each node can have individual node level attributes set.

http://kitchen.ci/
https://github.com/test-kitchen/test-kitchen
https://docs.chef.io/config_yml_kitchen.html

On Fri, Jul 3, 2015 at 7:35 AM, Nenad Petronijevic
set.krag@gmail.com wrote:

Hi all.

I need to generate large number of dummy Chef nodes for testing
purposes, together with automatic attributes.

Is there any existing way to do that, maybe some testing script
in

chef repo?
I’ve looked in chef-server repo but haven’t found anything
useful.

I can create nodes manually and add ohai attributes from fauxhai,
but it would be great if there is an existing way to do that.

Thanks,
Nenad


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com