First off, I'm using Chef Solo and I would like things to stay as automated as possible. So I have a problem that I'm not quite sure how to solve. I'm setting up the deployment of a lot of different Linux boxes, and all of them are going to require custom installation nodes/roles. Example:
/nodes/app_server.json
{
"run_list": [ "role[app_server]" ]
}
/roles/app_server.rb
name 'app_server'
description 'App_Server'
override_attributes({ "apache" => {
"proxypass" => [" / http://localhost:8080/"]
}
})
run_list 'recipe[app_server]'
My issue is that I'm going to be running a script to install chef on all these different boxes, but each one is going to have a different ip in-between http://[xxxxxx]:8080/
I need a way to be able to -via command line- specify those ip's without having to create like a hundred node or role files.
I've looked at an example on their website that shows:
The Web Server Role
description "The base role for systems that serve HTTP traffic"
run_list "recipe[apache2]", "recipe[apache2::mod_ssl]", "role[monitor]"
env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"],"_default" => []
default_attributes "apache2" => { "listen_ports" => [ "80", "443" ] }
override_attributes "apache2" => { "max_children" => "50" }
which seems like it would be useful, but I would like to set different override set's for each env_run_list config and then when I run all the chef commands, be able to target each one that I want.
Am I going about this in the wrong fashion? I've scoured all of the docs for nodes/roles/environments etc and haven't found any solution that requires me to not have to make a dozen different files.