- networking
- nginx
- nodejs
+ - nominatim
- ntp
- openssh
- osmosis
- name: nodejs
run_list:
- recipe[nodejs::default]
+ - name: nominatim
+ run_list:
+ - recipe[nominatim::default]
- name: ntp
run_list:
- recipe[ntp::default]
include_recipe "apt"
include_recipe "munin"
+include_recipe "ssl"
package "nginx"
default[:nominatim][:state] = "off" # or: standalone, master, slave
default[:nominatim][:dbadmins] = []
+default[:nominatim][:dbcluster] = "12/main"
default[:nominatim][:dbname] = "nominatim"
default[:nominatim][:tablespaces] = []
+default[:nominatim][:postgis] = "2.5"
default[:nominatim][:logdir] = "/var/log/nominatim"
default[:nominatim][:repository] = "https://git.openstreetmap.org/public/nominatim.git"
default[:nominatim][:revision] = "master"
}
default[:nominatim][:redirects] = {}
+
+default[:postgresql][:versions] |= [node[:nominatim][:dbcluster].split("/").first]
+
+default[:accounts][:users][:nominatim][:status] = :role
version "1.0.0"
supports "ubuntu"
-depends "systemd"
-depends "apache"
+depends "accounts"
depends "fail2ban"
depends "git"
depends "munin"
depends "nginx"
depends "postgresql"
depends "python"
+depends "systemd"
# limitations under the License.
#
+include_recipe "accounts"
include_recipe "munin"
basedir = data_bag_item("accounts", "nominatim")["home"]
mode 0o775
end
-%w[user_agent referer email].each do |name|
+%w[user_agent referrer email].each do |name|
file "#{basedir}/etc/nginx_blocked_#{name}.conf" do
action :create_if_missing
owner "nominatim"
--- /dev/null
+{
+ "id": "lonvia",
+ "uid": "1056",
+ "comment": "Sarah Hoffmann",
+ "email": "lonvia@example.com"
+}
--- /dev/null
+{
+ "id": "nominatim",
+ "uid": "518",
+ "comment": "nominatim.openstreetmap.org",
+ "home": "/srv/nominatim.openstreetmap.org"
+}
--- /dev/null
+require "serverspec"
+
+# Required by serverspec
+set :backend, :exec
+
+describe package("nginx") do
+ it { should be_installed }
+end
+
+describe service("nginx") do
+ it { should be_enabled }
+ it { should be_running }
+end
+
+describe port(8050) do
+ it { should be_listening.with("tcp") }
+end