forked from chef-boneyard/cookbooks
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
template jdbc connection using info from data bag
refactor esb recipe w/ crazy "_modular_recipe"'s
- Loading branch information
Showing
11 changed files
with
77 additions
and
106 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# | ||
# Cookbook Name:: jboss | ||
# Recipe:: _jdbc_driver | ||
# Author:: Bryan W. Berry (<bryan.berry@gmail.com>) | ||
# Copyright 2012, Food and Agriculture Organization of the United Nations | ||
# | ||
# license Apache v2.0 | ||
# | ||
|
||
|
||
if node['jboss']['jdbc']['driver']['name'] != 'h2' | ||
maven node['jboss']['jdbc']['driver']['name'] do | ||
groupId node['jboss']['jdbc']['driver']['name'] | ||
version node['jboss']['jdbc']['driver']['version'] | ||
dest "#{node['jboss']['home']}/modules/org/#{node['jboss']['jdbc']['driver']['name']}/main" | ||
owner node['jboss']['user'] | ||
end | ||
# jboss needs module.xml that matches the jdbc driver | ||
template "#{node['jboss']['home']}/modules/org/#{node['jboss']['jdbc']['driver']['name']}/main/module.xml" do | ||
source "#{node['jboss']['jdbc']['driver']['name']}.module.xml.erb" | ||
owner node['jboss']['user'] | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# | ||
# Cookbook Name:: jboss | ||
# Recipe:: _jdbc_password | ||
# Author:: Bryan W. Berry (<bryan.berry@gmail.com>) | ||
# Copyright 2012, Food and Agriculture Organization of the United Nations | ||
# | ||
# license Apache v2.0 | ||
# | ||
|
||
app_name = node['jboss']['application'] | ||
app_env = node['app_env'] | ||
|
||
# get password | ||
bag, item = node[:passwd_data_bag].split('/') | ||
db = Chef::EncryptedDataBagItem.load(bag, item) | ||
node['jboss']['jdbc']['password'] = db[app_name][app_env]['jdbc'] | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# | ||
# Cookbook Name:: jboss | ||
# Recipe:: _load_app_params | ||
# Author:: Bryan W. Berry (<bryan.berry@gmail.com>) | ||
# Copyright 2012, Food and Agriculture Organization of the United Nations | ||
# | ||
# license Apache v2.0 | ||
# | ||
|
||
app_name = node['jboss']['application'] | ||
|
||
db = data_bag_item("apps", app_name)[node['app_env']] | ||
node['jboss']['java_opts'] = db['java_opts'] | ||
node['jboss']['jdbc']['schema'] = db['jdbc']['schema'] | ||
node['jboss']['jdbc']['user'] = db['jdbc']['user'] | ||
node['jboss']['jdbc']['host'] = db['jdbc']['host'] |
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
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
This file was deleted.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[ -f /etc/sysconfig/pgsql/postgresql ] && source /etc/sysconfig/pgsql/postgresql | ||
export PATH=$PATH:/usr/pgsql-9.0/bin/ | ||
|
||
export PGDATA | ||
export PGDATA=<%= node[:postgresql][:dir] %> | ||
|