Created
October 13, 2010 05:48
-
-
Save cliffdickerson/623534 to your computer and use it in GitHub Desktop.
stuff.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
** Role env_sandcastle1 | |
{ | |
"name": "env_sandcastle1", | |
"default_attributes": { | |
"cluster": "sandcastle1" | |
}, | |
"json_class": "Chef::Role", | |
"run_list": [ | |
"recipe[base::default]", | |
"recipe[java::default]" | |
], | |
"description": "", | |
"chef_type": "role", | |
"override_attributes": { | |
} | |
} | |
** data bag | |
{ | |
"id": "sandcastle1", | |
"chat": "10.20.30.148", | |
"primary_database": "10.20.30.147", | |
"primary_stats_database": "10.20.30.147", | |
"store_processor": "10.20.30.148", | |
"jms_broker": "10.20.30.144", | |
} | |
** recipe resource Template using data bag 'sandcastle1' from group 'cluster' | |
template "/etc/platform.properties" do | |
source "etc/platform.properties.erb" | |
mode "0644" | |
variables( :tomcat_config => node[:tomcat][:config], | |
:cluster => data_bag_item('clusters', node[:cluster]) | |
) | |
** template using databag info | |
TOMCAT_LCDS_KEYSTORE_PASS="<%= @cluster['lcds_keystore_pass'] %>" | |
TOMCAT_JGROUPS_CLUSTER_NAME="<%= @cluster['jgroups_cluster_name'] %>" | |
TOMCAT_JGROUPS_CLUSTER_PORT="<%= @cluster['jgroups_cluster_port'] %>" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment