]> git.openstreetmap.org Git - chef.git/blob - cookbooks/planet/recipes/current.rb
Version bump + omnipaymultiprocessor extension
[chef.git] / cookbooks / planet / recipes / current.rb
1 #
2 # Cookbook:: planet
3 # Recipe:: current
4 #
5 # Copyright:: 2018, OpenStreetMap Foundation
6 #
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
10 #
11 #     https://www.apache.org/licenses/LICENSE-2.0
12 #
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.
18 #
19
20 package %w[
21   pyosmium
22 ]
23
24 template "/usr/local/bin/planet-update" do
25   source "planet-update.erb"
26   owner "root"
27   group "root"
28   mode 0o755
29 end
30
31 template "/usr/local/bin/planet-update-file" do
32   source "planet-update-file.erb"
33   owner "root"
34   group "root"
35   mode 0o755
36 end
37
38 directory "/var/lib/planet" do
39   owner "planet"
40   group "planet"
41   mode 0o755
42 end
43
44 remote_file "/var/lib/planet/planet.pbf" do
45   action :create_if_missing
46   source "https://planet.openstreetmap.org/pbf/planet-latest.osm.pbf"
47   owner "planet"
48   group "planet"
49   mode 0o644
50 end
51
52 template "/etc/cron.d/planet-update" do
53   source "planet-update.cron.erb"
54   owner "root"
55   group "root"
56   mode 0o644
57 end
58
59 template "/etc/logrotate.d/planet-update" do
60   source "planet-update.logrotate.erb"
61   owner "root"
62   group "root"
63   mode 0o644
64 end