From b5f1516eba7a79f6f3ec6d7eb5e3517f544cda3f Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Mon, 30 May 2016 16:23:50 +0100 Subject: [PATCH] imagery: add MVP git site support --- cookbooks/imagery/recipes/au_agri.rb | 1 + cookbooks/imagery/recipes/gb_hampshire_aerial.rb | 1 + cookbooks/imagery/recipes/gb_os_sv.rb | 1 + cookbooks/imagery/recipes/gb_surrey_aerial.rb | 1 + cookbooks/imagery/resources/site.rb | 11 ++++++++--- 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/cookbooks/imagery/recipes/au_agri.rb b/cookbooks/imagery/recipes/au_agri.rb index 85816c3f4..f2fe09bcc 100644 --- a/cookbooks/imagery/recipes/au_agri.rb +++ b/cookbooks/imagery/recipes/au_agri.rb @@ -21,6 +21,7 @@ include_recipe "imagery" imagery_site "agri.openstreetmap.org" do # aliases [ "agri.openstreetmap.org.au" ] + git_repository "https://github.com/Firefishy/osm-imagery-agri-site.git" end imagery_layer "au_ga_agri" do diff --git a/cookbooks/imagery/recipes/gb_hampshire_aerial.rb b/cookbooks/imagery/recipes/gb_hampshire_aerial.rb index a53ad56bb..d6734a420 100644 --- a/cookbooks/imagery/recipes/gb_hampshire_aerial.rb +++ b/cookbooks/imagery/recipes/gb_hampshire_aerial.rb @@ -21,6 +21,7 @@ include_recipe "imagery" imagery_site "hampshire.aerial.openstreetmap.org.uk" do # aliases + git_repository "https://github.com/Firefishy/osm-imagery-hampshire-aerial-site.git" end imagery_layer "gb_hampshire_aerial_rgb" do diff --git a/cookbooks/imagery/recipes/gb_os_sv.rb b/cookbooks/imagery/recipes/gb_os_sv.rb index c234fa7a1..40234e163 100644 --- a/cookbooks/imagery/recipes/gb_os_sv.rb +++ b/cookbooks/imagery/recipes/gb_os_sv.rb @@ -42,6 +42,7 @@ end imagery_site "os.openstreetmap.org" do aliases ["os.openstreetmap.org.uk"] + git_repository "https://github.com/Firefishy/osm-imagery-os-site.git" end imagery_layer "gb_os_sv_2010_04" do diff --git a/cookbooks/imagery/recipes/gb_surrey_aerial.rb b/cookbooks/imagery/recipes/gb_surrey_aerial.rb index a9e5cd3f0..ff82958d2 100644 --- a/cookbooks/imagery/recipes/gb_surrey_aerial.rb +++ b/cookbooks/imagery/recipes/gb_surrey_aerial.rb @@ -21,6 +21,7 @@ include_recipe "imagery" imagery_site "surrey.aerial.openstreetmap.org.uk" do # aliases + git_repository "https://github.com/Firefishy/osm-imagery-surrey-aerial-site.git" end imagery_layer "gb_surrey_aerial" do diff --git a/cookbooks/imagery/resources/site.rb b/cookbooks/imagery/resources/site.rb index 88b122097..507293e54 100644 --- a/cookbooks/imagery/resources/site.rb +++ b/cookbooks/imagery/resources/site.rb @@ -21,12 +21,17 @@ default_action :create property :name, String property :aliases, [String, Array], :default => [] +property :git_repository, String, :default => ["https://github.com/Firefishy/osm-imagery-default.git"] action :create do - directory "/srv/#{name}" do - owner "root" + git "/srv/#{name}" do + action :sync + repository "#{git_repository}" + revision "master" + enable_submodules true + retries 3 + user "root" group "root" - mode 0755 end nginx_site name do -- 2.43.2