5 # Copyright 2011, OpenStreetMap Foundation
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # https://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
20 include_recipe "db::base"
22 passwords = data_bag_item("db", "passwords")
24 postgresql_user "tomh" do
25 cluster node[:db][:cluster]
29 postgresql_user "matt" do
30 cluster node[:db][:cluster]
34 postgresql_user "openstreetmap" do
35 cluster node[:db][:cluster]
36 password passwords["openstreetmap"]
39 postgresql_user "rails" do
40 cluster node[:db][:cluster]
41 password passwords["rails"]
44 postgresql_user "planetdump" do
45 cluster node[:db][:cluster]
46 password passwords["planetdump"]
49 postgresql_user "planetdiff" do
50 cluster node[:db][:cluster]
51 password passwords["planetdiff"]
54 postgresql_user "backup" do
55 cluster node[:db][:cluster]
56 password passwords["backup"]
59 postgresql_user "gpximport" do
60 cluster node[:db][:cluster]
61 password passwords["gpximport"]
64 postgresql_user "munin" do
65 cluster node[:db][:cluster]
66 password passwords["munin"]
69 postgresql_user "replication" do
70 cluster node[:db][:cluster]
71 password passwords["replication"]
75 postgresql_database "openstreetmap" do
76 cluster node[:db][:cluster]
80 postgresql_extension "btree_gist" do
81 cluster node[:db][:cluster]
82 database "openstreetmap"
83 only_if { node[:postgresql][:clusters][node[:db][:cluster]] && node[:postgresql][:clusters][node[:db][:cluster]][:version] >= 9.0 }
86 template "/etc/cron.daily/rails-db" do