Auto generating json data


#1

Hello Chefs,

OPs guy here.

I’m trying to write a simple tool to auto generate json roles and
environments as manually editing/upping json files has proven a fruitless
venture for some of my team members.

I’ve looked at a couple of OS level tools that might do the trick such as
jsontools and possibly jq. but i’d like to hear some ideas from the
community.

Thanks in advanced.

Elvin Abordo


#2

Just use one of the native Chef API clients like Chef itself or PyChef to talk to the chef server from a script.

–Noah

On Mar 18, 2014, at 6:12 AM, Elvin Abordo elvin159@gmail.com wrote:

Hello Chefs,

OPs guy here.

I’m trying to write a simple tool to auto generate json roles and environments as manually editing/upping json files has proven a fruitless venture for some of my team members.

I’ve looked at a couple of OS level tools that might do the trick such as jsontools and possibly jq. but i’d like to hear some ideas from the community.

Thanks in advanced.

Elvin Abordo


#3

If you want to stay with Ruby, ChefAPI can do this easily: https://github.com/sethvargo/chef-api

Thanks,
Seth

On Mar 18, 2014, at 1:15 PM, Noah Kantrowitz noah@coderanger.net wrote:

Just use one of the native Chef API clients like Chef itself or PyChef to talk to the chef server from a script.

–Noah

On Mar 18, 2014, at 6:12 AM, Elvin Abordo elvin159@gmail.com wrote:

Hello Chefs,

OPs guy here.

I’m trying to write a simple tool to auto generate json roles and environments as manually editing/upping json files has proven a fruitless venture for some of my team members.

I’ve looked at a couple of OS level tools that might do the trick such as jsontools and possibly jq. but i’d like to hear some ideas from the community.

Thanks in advanced.

Elvin Abordo