From d43bd64c0c49fd52684f9d4bd209a7da8a6c88d8 Mon Sep 17 00:00:00 2001 From: George Hunt Date: Sun, 28 Apr 2019 16:23:48 -0700 Subject: [PATCH 01/24] test menu for osm should be in console --- roles/osm-vector/defaults/main.yml | 1 - roles/osm-vector/tasks/main.yml | 16 ---------------- 2 files changed, 17 deletions(-) diff --git a/roles/osm-vector/defaults/main.yml b/roles/osm-vector/defaults/main.yml index 797585c3f..b89c6a5bd 100644 --- a/roles/osm-vector/defaults/main.yml +++ b/roles/osm-vector/defaults/main.yml @@ -5,5 +5,4 @@ osm_vector_path: '{{ content_base }}/www/osm-vector' # All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml # If nec, change them by editing /etc/iiab/local_vars.yml prior to installing! -menu_def_dir: '{{ doc_root }}/js-menu/menu-files/menu-defs' iiab_osm_url : http://download.iiab.io/content/OSM/vector-tiles/maplist/hidden diff --git a/roles/osm-vector/tasks/main.yml b/roles/osm-vector/tasks/main.yml index e8542f62c..ce489cfa9 100644 --- a/roles/osm-vector/tasks/main.yml +++ b/roles/osm-vector/tasks/main.yml @@ -82,19 +82,3 @@ src: test-index.redirect dest: "{{ osm_vector_path }}/index.html" -- name: Create a directory for map menu-def - file: - path: '{{ menu_def_dir }}' - state: directory - -- name: Determine status of splash menu def - stat: - path: '{{ menu_def_dir }}/en-map_test.json' - ignore_errors: True - register: menu_def - -- name: Do not overwrite if it already exists - copy: - src: en-map_test.json - dest: '{{ menu_def_dir }}/en-map_test.json' - when: menu_def.stat.exists is defined and not menu_def.stat.exists From 4396116a7e86396f1c9ae91dd25bed8fffc9ff15 Mon Sep 17 00:00:00 2001 From: George Hunt Date: Sat, 4 May 2019 19:32:00 -0700 Subject: [PATCH 02/24] freeze some progress --- .../defaults/main.yml | 6 +-- .../files/countries.json | 0 .../files/en-map_test.json | 0 .../files/osm_functions.js | 4 +- roles/map-vector/files/test-index.redirect | 4 ++ .../{osm-vector => map-vector}/tasks/main.yml | 40 +++++++++---------- .../templates/iiab-update-osm | 14 +++---- .../templates/index.html | 4 +- .../templates/main.js | 0 .../templates/osm-vector.conf | 6 +-- roles/osm-vector/files/test-index.redirect | 4 -- vars/default_vars.yml | 6 +-- vars/local_vars_big.yml | 4 +- vars/local_vars_medium.yml | 4 +- vars/local_vars_min.yml | 4 +- 15 files changed, 50 insertions(+), 50 deletions(-) rename roles/{osm-vector => map-vector}/defaults/main.yml (69%) rename roles/{osm-vector => map-vector}/files/countries.json (100%) rename roles/{osm-vector => map-vector}/files/en-map_test.json (100%) rename roles/{osm-vector => map-vector}/files/osm_functions.js (98%) create mode 100644 roles/map-vector/files/test-index.redirect rename roles/{osm-vector => map-vector}/tasks/main.yml (62%) rename roles/{osm-vector => map-vector}/templates/iiab-update-osm (95%) rename roles/{osm-vector => map-vector}/templates/index.html (94%) rename roles/{osm-vector => map-vector}/templates/main.js (100%) rename roles/{osm-vector => map-vector}/templates/osm-vector.conf (56%) delete mode 100644 roles/osm-vector/files/test-index.redirect diff --git a/roles/osm-vector/defaults/main.yml b/roles/map-vector/defaults/main.yml similarity index 69% rename from roles/osm-vector/defaults/main.yml rename to roles/map-vector/defaults/main.yml index b89c6a5bd..1b51987f2 100644 --- a/roles/osm-vector/defaults/main.yml +++ b/roles/map-vector/defaults/main.yml @@ -1,6 +1,6 @@ -osm_vector_install: True -osm_vector_enabled: True -osm_vector_path: '{{ content_base }}/www/osm-vector' +map_vector_install: True +map_vector_enabled: True +map_vector_path: '{{ content_base }}/www/map-vector' # All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml # If nec, change them by editing /etc/iiab/local_vars.yml prior to installing! diff --git a/roles/osm-vector/files/countries.json b/roles/map-vector/files/countries.json similarity index 100% rename from roles/osm-vector/files/countries.json rename to roles/map-vector/files/countries.json diff --git a/roles/osm-vector/files/en-map_test.json b/roles/map-vector/files/en-map_test.json similarity index 100% rename from roles/osm-vector/files/en-map_test.json rename to roles/map-vector/files/en-map_test.json diff --git a/roles/osm-vector/files/osm_functions.js b/roles/map-vector/files/osm_functions.js similarity index 98% rename from roles/osm-vector/files/osm_functions.js rename to roles/map-vector/files/osm_functions.js index 819b76ee1..a0f958dc2 100644 --- a/roles/osm-vector/files/osm_functions.js +++ b/roles/map-vector/files/osm_functions.js @@ -7,7 +7,7 @@ var regionGeojson = {}; var regionList = []; var regionInstalled = []; var commonAssetsDir = '/common/assets/'; -var mapAssetsDir = '/osm-vector/maplist/assets/'; +var mapAssetsDir = '/map-vector/maplist/assets/'; var iiab_config_dir = '/etc/iiab/'; var onChangeFunc = "setSize"; var osmCatalog = {}; @@ -27,7 +27,7 @@ function readOsmIdx(){ //consoleLog ("in readOsmIdx"); var resp = $.ajax({ type: 'GET', - url: consoleJsonDir + 'osm-vector-idx.json', + url: consoleJsonDir + 'map-vector-idx.json', dataType: 'json' }) .done(function( data ) { diff --git a/roles/map-vector/files/test-index.redirect b/roles/map-vector/files/test-index.redirect new file mode 100644 index 000000000..5b2af4a6f --- /dev/null +++ b/roles/map-vector/files/test-index.redirect @@ -0,0 +1,4 @@ + + + + diff --git a/roles/osm-vector/tasks/main.yml b/roles/map-vector/tasks/main.yml similarity index 62% rename from roles/osm-vector/tasks/main.yml rename to roles/map-vector/tasks/main.yml index ce489cfa9..3a09b2f9a 100644 --- a/roles/osm-vector/tasks/main.yml +++ b/roles/map-vector/tasks/main.yml @@ -1,6 +1,6 @@ -- name: Make sure the osm-vector directory exists +- name: Make sure the map-vector directory exists file: - path: '{{ osm_vector_path }}/maplist/assets' + path: '{{ map_vector_path }}/maplist/assets' state: directory owner: '{{ apache_user }}' group: '{{ apache_user }}' @@ -9,30 +9,30 @@ - name: Fetch the catalog for osm maps get_url: url: "{{ iiab_osm_url }}/assets/regions.json" - dest: '{{ osm_vector_path }}/maplist/assets/' + dest: '{{ map_vector_path }}/maplist/assets/' - name: Create a link to osm catalog in /common/assets file: - src: "{{ osm_vector_path }}/maplist/assets/regions.json" + src: "{{ map_vector_path }}/maplist/assets/regions.json" dest: "{{ doc_root }}/common/assets/regions.json" state: link - name: Fetch the javascript bundle with openlayers for test page get_url: url: "{{ iiab_osm_url }}/../main.js" - dest: '{{ osm_vector_path }}/maplist/' + dest: '{{ map_vector_path }}/maplist/' - name: Fetch the index.html for test page template: src: "index.html" - dest: '{{ osm_vector_path }}/maplist/index.html' + dest: '{{ map_vector_path }}/maplist/index.html' # Bboxes (bounding boxes) are currently square. But geofabrik has non-rectangular bboxes. # So bring the bounding box definition from cloud (bboxes.geojson is big) - name: Fetch the bounding box description for osm maps get_url: url: "{{ iiab_osm_url }}/assets/bboxes.geojson" - dest: '{{ osm_vector_path }}/maplist/assets/' + dest: '{{ map_vector_path }}/maplist/assets/' - name: Install python-geojson package, that helps with geojson package: @@ -45,40 +45,40 @@ dest: /usr/bin/iiab-update-osm mode: "0755" -- name: Run the script that does osm-vector housekeeping +- name: Run the script that does map-vector housekeeping shell: /usr/bin/iiab-update-osm - name: Copy the Countries geojson to assets copy: src: countries.json - dest: '{{ osm_vector_path }}/maplist/assets' + dest: '{{ map_vector_path }}/maplist/assets' # It is too complicated to use a single file for both iiab and admin-console - name: Copy the duplicated javascript to assets copy: src: osm_functions.js - dest: '{{ osm_vector_path }}/maplist/assets' + dest: '{{ map_vector_path }}/maplist/assets' - name: Install /etc/{{ apache_config_dir }}/osm-vect.conf from template template: - src: osm-vector.conf - dest: "/etc/{{ apache_config_dir }}/osm-vector.conf" + src: map-vector.conf + dest: "/etc/{{ apache_config_dir }}/map-vector.conf" -- name: Create symlink osm-vector.conf from sites-enabled to sites-available (debuntu, not nec for redhat) +- name: Create symlink map-vector.conf from sites-enabled to sites-available (debuntu, not nec for redhat) file: - src: /etc/apache2/sites-available/osm-vector.conf - path: /etc/apache2/sites-enabled/osm-vector.conf + src: /etc/apache2/sites-available/map-vector.conf + path: /etc/apache2/sites-enabled/map-vector.conf state: link - when: osm_vector_enabled and is_debuntu + when: map_vector_enabled and is_debuntu -- name: Remove symlink /etc/apache2/sites-enabled/osm-vector.conf (debuntu) +- name: Remove symlink /etc/apache2/sites-enabled/map-vector.conf (debuntu) file: - path: /etc/apache2/sites-enabled/osm-vector.conf + path: /etc/apache2/sites-enabled/map-vector.conf state: absent - when: not osm_vector_enabled and is_debuntu + when: not map_vector_enabled and is_debuntu - name: Copy the redirect to the test page -- delete this if more than one map copy: src: test-index.redirect - dest: "{{ osm_vector_path }}/index.html" + dest: "{{ map_vector_path }}/index.html" diff --git a/roles/osm-vector/templates/iiab-update-osm b/roles/map-vector/templates/iiab-update-osm similarity index 95% rename from roles/osm-vector/templates/iiab-update-osm rename to roles/map-vector/templates/iiab-update-osm index 8d8758e21..4e5ed7905 100755 --- a/roles/osm-vector/templates/iiab-update-osm +++ b/roles/map-vector/templates/iiab-update-osm @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Scan the osm-vector directory, update the osm-vector-idx.json, add menu-defs +# Scan the map-vector directory, update the map-vector-idx.json, add menu-defs from geojson import Feature, Point, FeatureCollection, Polygon import geojson @@ -25,9 +25,9 @@ else: doc_root = get_iiab_env('WWWROOT') menuDefs = doc_root + "/js-menu/menu-files/menu-defs/" -osm_vector_idx_dir = doc_root + "/common/assets" -#map_doc_root = '{{ osm_vector_path }}' -map_doc_root = '/library/www/osm-vector' +map_vector_idx_dir = doc_root + "/common/assets" +#map_doc_root = '{{ map_vector_path }}' +map_doc_root = '/library/www/map-vector' # map_catalog will be global, assumed always available map_catalog = {} map_menu_def_list = [] @@ -43,7 +43,7 @@ def main(): installed_maps = get_installed_regions() print(installed_maps) - write_osm_vector_idx(installed_maps) + write_map_vector_idx(installed_maps) # For installed regions, check that a menu def exists, and it's on home page for fname in installed_maps: @@ -106,7 +106,7 @@ def get_installed_regions(): installed.append('maplist') return installed -def write_osm_vector_idx(installed_maps): +def write_map_vector_idx(installed_maps): map_dict ={} idx_dict = {} for fname in installed_maps: @@ -125,7 +125,7 @@ def write_osm_vector_idx(installed_maps): idx_dict[item]['region'] = region idx_dict[item]['language'] = map_dict['perma_ref'][:2] - with open(osm_vector_idx_dir + '/osm_version_idx.json','w') as idx: + with open(map_vector_idx_dir + '/osm_version_idx.json','w') as idx: idx.write(json.dumps(idx_dict,indent=2)) def create_menu_def(region,default_name,intended_use='map'): diff --git a/roles/osm-vector/templates/index.html b/roles/map-vector/templates/index.html similarity index 94% rename from roles/osm-vector/templates/index.html rename to roles/map-vector/templates/index.html index ee7592eea..bef8adf46 100644 --- a/roles/osm-vector/templates/index.html +++ b/roles/map-vector/templates/index.html @@ -46,12 +46,12 @@ return (bytes / Math.pow(1024, e)).toFixed(2) + " " + s[e]; } - + - + diff --git a/roles/osm-vector/templates/main.js b/roles/map-vector/templates/main.js similarity index 100% rename from roles/osm-vector/templates/main.js rename to roles/map-vector/templates/main.js diff --git a/roles/osm-vector/templates/osm-vector.conf b/roles/map-vector/templates/osm-vector.conf similarity index 56% rename from roles/osm-vector/templates/osm-vector.conf rename to roles/map-vector/templates/osm-vector.conf index da390760f..e03739186 100644 --- a/roles/osm-vector/templates/osm-vector.conf +++ b/roles/map-vector/templates/osm-vector.conf @@ -1,7 +1,7 @@ # For downloadable regional vector tilesets -Alias /maps {{ osm_vector_path }} -Alias /osm-vector {{ osm_vector_path }} - +Alias /maps {{ map_vector_path }} +Alias /map-vector {{ map_vector_path }} + Options Indexes FollowSymLinks AllowOverride All Require all granted diff --git a/roles/osm-vector/files/test-index.redirect b/roles/osm-vector/files/test-index.redirect deleted file mode 100644 index bc2310bcc..000000000 --- a/roles/osm-vector/files/test-index.redirect +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/vars/default_vars.yml b/vars/default_vars.yml index a9d58fbf7..c1fc1881c 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -352,9 +352,9 @@ mongodb_enabled: False mongodb_port: 27018 # Regional OSM vector maps use much less disk space than bitmap/raster versions -osm_vector_install: True -osm_vector_enabled: True -osm_vector_path: '{{ content_base }}/www/osm-vector' +map_vector_install: True +map_vector_enabled: True +map_vector_path: '{{ content_base }}/www/map-vector' # roles/sugarizer/meta/main.yml auto-invokes 2 above prereqs: mongodb & nodejs # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index 3ae4f871f..7830a81e7 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -230,8 +230,8 @@ moodle_enabled: True # If using Moodle intensively, set apache_high_php_limits in 3-BASE-SERVER # Regional OSM vector maps use much less disk space than bitmap/raster versions -osm_vector_install: True -osm_vector_enabled: True +map_vector_install: True +map_vector_enabled: True # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957 diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index 9449bedbc..943a12283 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -230,8 +230,8 @@ moodle_enabled: False # If using Moodle intensively, set apache_high_php_limits in 3-BASE-SERVER # Regional OSM vector maps use much less disk space than bitmap/raster versions -osm_vector_install: True -osm_vector_enabled: True +map_vector_install: True +map_vector_enabled: True # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957 diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index 0dff67b30..957f8cbe4 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -230,8 +230,8 @@ moodle_enabled: False # If using Moodle intensively, set apache_high_php_limits in 3-BASE-SERVER # Regional OSM vector maps use much less disk space than bitmap/raster versions -osm_vector_install: True -osm_vector_enabled: True +map_vector_install: True +map_vector_enabled: True # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957 From e773447f9a263bb57acc1e9d913f1840696f157b Mon Sep 17 00:00:00 2001 From: George Hunt Date: Sat, 4 May 2019 21:39:53 -0700 Subject: [PATCH 03/24] file name change map-vector.conf --- roles/map-vector/templates/{osm-vector.conf => map-vector.conf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename roles/map-vector/templates/{osm-vector.conf => map-vector.conf} (100%) diff --git a/roles/map-vector/templates/osm-vector.conf b/roles/map-vector/templates/map-vector.conf similarity index 100% rename from roles/map-vector/templates/osm-vector.conf rename to roles/map-vector/templates/map-vector.conf From a191c706791b223b49c905a51b9931d980a1168d Mon Sep 17 00:00:00 2001 From: George Hunt Date: Sat, 4 May 2019 22:01:08 -0700 Subject: [PATCH 04/24] include the map role --- roles/4-server-options/tasks/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/4-server-options/tasks/main.yml b/roles/4-server-options/tasks/main.yml index 4c56b0572..842c6066f 100644 --- a/roles/4-server-options/tasks/main.yml +++ b/roles/4-server-options/tasks/main.yml @@ -18,6 +18,11 @@ when: captive_portal_install tags: base, captive-portal, network, domain +- name: Installing vector maps + include_tasks: roles/map-vector/tasks/main.yml + when: map_vector_install + tags: base, map + - name: Installing dhcpd include_tasks: roles/network/tasks/dhcpd.yml when: dhcpd_install From 2088c408105427fd8fcdc7516c4e06388b5d9746 Mon Sep 17 00:00:00 2001 From: George Hunt Date: Sat, 4 May 2019 22:22:29 -0700 Subject: [PATCH 05/24] lost the last commit, 4-server-options include map --- roles/4-server-options/tasks/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/4-server-options/tasks/main.yml b/roles/4-server-options/tasks/main.yml index 4c56b0572..dd7d40233 100644 --- a/roles/4-server-options/tasks/main.yml +++ b/roles/4-server-options/tasks/main.yml @@ -13,6 +13,11 @@ when: named_install tags: base, named, network, domain +- name: Installing vector map test page + include_role: roles/map-vector + when: map_vector_install + tags: base, map, map-vector + - name: Installing captive portal include_tasks: roles/captive-portal/tasks/main.yml when: captive_portal_install From 522be2c2ec48a1ac4d5e92f47aa94374a61d12a1 Mon Sep 17 00:00:00 2001 From: George Hunt Date: Sat, 4 May 2019 22:24:37 -0700 Subject: [PATCH 06/24] duplicated commit --- roles/4-server-options/tasks/main.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/roles/4-server-options/tasks/main.yml b/roles/4-server-options/tasks/main.yml index f1fab8c3b..0640820bf 100644 --- a/roles/4-server-options/tasks/main.yml +++ b/roles/4-server-options/tasks/main.yml @@ -16,18 +16,13 @@ - name: Installing vector map test page include_role: roles/map-vector when: map_vector_install - tags: base, map, map-vector + tags: base, map - name: Installing captive portal include_tasks: roles/captive-portal/tasks/main.yml when: captive_portal_install tags: base, captive-portal, network, domain -- name: Installing vector maps - include_tasks: roles/map-vector/tasks/main.yml - when: map_vector_install - tags: base, map - - name: Installing dhcpd include_tasks: roles/network/tasks/dhcpd.yml when: dhcpd_install From aea7f1704bca935c95c90397bbd93080e7c99f07 Mon Sep 17 00:00:00 2001 From: George Hunt Date: Sat, 4 May 2019 22:37:43 -0700 Subject: [PATCH 07/24] typo on include_role --- roles/4-server-options/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/4-server-options/tasks/main.yml b/roles/4-server-options/tasks/main.yml index 0640820bf..31642295d 100644 --- a/roles/4-server-options/tasks/main.yml +++ b/roles/4-server-options/tasks/main.yml @@ -14,7 +14,7 @@ tags: base, named, network, domain - name: Installing vector map test page - include_role: roles/map-vector + include_role: map-vector when: map_vector_install tags: base, map From 582385d47f2468bb31951b6c5357bc51214ccd5e Mon Sep 17 00:00:00 2001 From: George Hunt Date: Sat, 4 May 2019 22:41:37 -0700 Subject: [PATCH 08/24] wrong syntax for include_role --- roles/4-server-options/tasks/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/4-server-options/tasks/main.yml b/roles/4-server-options/tasks/main.yml index 31642295d..b51360ae4 100644 --- a/roles/4-server-options/tasks/main.yml +++ b/roles/4-server-options/tasks/main.yml @@ -14,7 +14,8 @@ tags: base, named, network, domain - name: Installing vector map test page - include_role: map-vector + include_role: + name: map-vector when: map_vector_install tags: base, map From b9f466c0f62888161c5ec4fd945c2b76dff3154a Mon Sep 17 00:00:00 2001 From: George Hunt Date: Sat, 4 May 2019 23:04:32 -0700 Subject: [PATCH 09/24] map-vector->vector-map --- roles/4-server-options/tasks/main.yml | 4 +-- roles/map-vector/defaults/main.yml | 6 ++-- roles/map-vector/files/osm_functions.js | 4 +-- roles/map-vector/files/test-index.redirect | 2 +- roles/map-vector/tasks/main.yml | 40 +++++++++++----------- roles/map-vector/templates/iiab-update-osm | 14 ++++---- roles/map-vector/templates/index.html | 4 +-- roles/map-vector/templates/map-vector.conf | 6 ++-- vars/default_vars.yml | 6 ++-- vars/local_vars_big.yml | 4 +-- vars/local_vars_medium.yml | 4 +-- vars/local_vars_min.yml | 4 +-- 12 files changed, 49 insertions(+), 49 deletions(-) diff --git a/roles/4-server-options/tasks/main.yml b/roles/4-server-options/tasks/main.yml index b51360ae4..48b036cfc 100644 --- a/roles/4-server-options/tasks/main.yml +++ b/roles/4-server-options/tasks/main.yml @@ -15,8 +15,8 @@ - name: Installing vector map test page include_role: - name: map-vector - when: map_vector_install + name: vector-map + when: vector_map_install tags: base, map - name: Installing captive portal diff --git a/roles/map-vector/defaults/main.yml b/roles/map-vector/defaults/main.yml index 1b51987f2..d68b225b3 100644 --- a/roles/map-vector/defaults/main.yml +++ b/roles/map-vector/defaults/main.yml @@ -1,6 +1,6 @@ -map_vector_install: True -map_vector_enabled: True -map_vector_path: '{{ content_base }}/www/map-vector' +vector_map_install: True +vector_map_enabled: True +vector_map_path: '{{ content_base }}/www/vector-map' # All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml # If nec, change them by editing /etc/iiab/local_vars.yml prior to installing! diff --git a/roles/map-vector/files/osm_functions.js b/roles/map-vector/files/osm_functions.js index a0f958dc2..ed59e4807 100644 --- a/roles/map-vector/files/osm_functions.js +++ b/roles/map-vector/files/osm_functions.js @@ -7,7 +7,7 @@ var regionGeojson = {}; var regionList = []; var regionInstalled = []; var commonAssetsDir = '/common/assets/'; -var mapAssetsDir = '/map-vector/maplist/assets/'; +var mapAssetsDir = '/vector-map/maplist/assets/'; var iiab_config_dir = '/etc/iiab/'; var onChangeFunc = "setSize"; var osmCatalog = {}; @@ -27,7 +27,7 @@ function readOsmIdx(){ //consoleLog ("in readOsmIdx"); var resp = $.ajax({ type: 'GET', - url: consoleJsonDir + 'map-vector-idx.json', + url: consoleJsonDir + 'vector-map-idx.json', dataType: 'json' }) .done(function( data ) { diff --git a/roles/map-vector/files/test-index.redirect b/roles/map-vector/files/test-index.redirect index 5b2af4a6f..68cd166c6 100644 --- a/roles/map-vector/files/test-index.redirect +++ b/roles/map-vector/files/test-index.redirect @@ -1,4 +1,4 @@ - + diff --git a/roles/map-vector/tasks/main.yml b/roles/map-vector/tasks/main.yml index 3a09b2f9a..e15b7d30d 100644 --- a/roles/map-vector/tasks/main.yml +++ b/roles/map-vector/tasks/main.yml @@ -1,6 +1,6 @@ -- name: Make sure the map-vector directory exists +- name: Make sure the vector-map directory exists file: - path: '{{ map_vector_path }}/maplist/assets' + path: '{{ vector_map_path }}/maplist/assets' state: directory owner: '{{ apache_user }}' group: '{{ apache_user }}' @@ -9,30 +9,30 @@ - name: Fetch the catalog for osm maps get_url: url: "{{ iiab_osm_url }}/assets/regions.json" - dest: '{{ map_vector_path }}/maplist/assets/' + dest: '{{ vector_map_path }}/maplist/assets/' - name: Create a link to osm catalog in /common/assets file: - src: "{{ map_vector_path }}/maplist/assets/regions.json" + src: "{{ vector_map_path }}/maplist/assets/regions.json" dest: "{{ doc_root }}/common/assets/regions.json" state: link - name: Fetch the javascript bundle with openlayers for test page get_url: url: "{{ iiab_osm_url }}/../main.js" - dest: '{{ map_vector_path }}/maplist/' + dest: '{{ vector_map_path }}/maplist/' - name: Fetch the index.html for test page template: src: "index.html" - dest: '{{ map_vector_path }}/maplist/index.html' + dest: '{{ vector_map_path }}/maplist/index.html' # Bboxes (bounding boxes) are currently square. But geofabrik has non-rectangular bboxes. # So bring the bounding box definition from cloud (bboxes.geojson is big) - name: Fetch the bounding box description for osm maps get_url: url: "{{ iiab_osm_url }}/assets/bboxes.geojson" - dest: '{{ map_vector_path }}/maplist/assets/' + dest: '{{ vector_map_path }}/maplist/assets/' - name: Install python-geojson package, that helps with geojson package: @@ -45,40 +45,40 @@ dest: /usr/bin/iiab-update-osm mode: "0755" -- name: Run the script that does map-vector housekeeping +- name: Run the script that does vector-map housekeeping shell: /usr/bin/iiab-update-osm - name: Copy the Countries geojson to assets copy: src: countries.json - dest: '{{ map_vector_path }}/maplist/assets' + dest: '{{ vector_map_path }}/maplist/assets' # It is too complicated to use a single file for both iiab and admin-console - name: Copy the duplicated javascript to assets copy: src: osm_functions.js - dest: '{{ map_vector_path }}/maplist/assets' + dest: '{{ vector_map_path }}/maplist/assets' - name: Install /etc/{{ apache_config_dir }}/osm-vect.conf from template template: - src: map-vector.conf - dest: "/etc/{{ apache_config_dir }}/map-vector.conf" + src: vector-map.conf + dest: "/etc/{{ apache_config_dir }}/vector-map.conf" -- name: Create symlink map-vector.conf from sites-enabled to sites-available (debuntu, not nec for redhat) +- name: Create symlink vector-map.conf from sites-enabled to sites-available (debuntu, not nec for redhat) file: - src: /etc/apache2/sites-available/map-vector.conf - path: /etc/apache2/sites-enabled/map-vector.conf + src: /etc/apache2/sites-available/vector-map.conf + path: /etc/apache2/sites-enabled/vector-map.conf state: link - when: map_vector_enabled and is_debuntu + when: vector_map_enabled and is_debuntu -- name: Remove symlink /etc/apache2/sites-enabled/map-vector.conf (debuntu) +- name: Remove symlink /etc/apache2/sites-enabled/vector-map.conf (debuntu) file: - path: /etc/apache2/sites-enabled/map-vector.conf + path: /etc/apache2/sites-enabled/vector-map.conf state: absent - when: not map_vector_enabled and is_debuntu + when: not vector_map_enabled and is_debuntu - name: Copy the redirect to the test page -- delete this if more than one map copy: src: test-index.redirect - dest: "{{ map_vector_path }}/index.html" + dest: "{{ vector_map_path }}/index.html" diff --git a/roles/map-vector/templates/iiab-update-osm b/roles/map-vector/templates/iiab-update-osm index 4e5ed7905..817e6e6cd 100755 --- a/roles/map-vector/templates/iiab-update-osm +++ b/roles/map-vector/templates/iiab-update-osm @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Scan the map-vector directory, update the map-vector-idx.json, add menu-defs +# Scan the vector-map directory, update the vector-map-idx.json, add menu-defs from geojson import Feature, Point, FeatureCollection, Polygon import geojson @@ -25,9 +25,9 @@ else: doc_root = get_iiab_env('WWWROOT') menuDefs = doc_root + "/js-menu/menu-files/menu-defs/" -map_vector_idx_dir = doc_root + "/common/assets" -#map_doc_root = '{{ map_vector_path }}' -map_doc_root = '/library/www/map-vector' +vector_map_idx_dir = doc_root + "/common/assets" +#map_doc_root = '{{ vector_map_path }}' +map_doc_root = '/library/www/vector-map' # map_catalog will be global, assumed always available map_catalog = {} map_menu_def_list = [] @@ -43,7 +43,7 @@ def main(): installed_maps = get_installed_regions() print(installed_maps) - write_map_vector_idx(installed_maps) + write_vector_map_idx(installed_maps) # For installed regions, check that a menu def exists, and it's on home page for fname in installed_maps: @@ -106,7 +106,7 @@ def get_installed_regions(): installed.append('maplist') return installed -def write_map_vector_idx(installed_maps): +def write_vector_map_idx(installed_maps): map_dict ={} idx_dict = {} for fname in installed_maps: @@ -125,7 +125,7 @@ def write_map_vector_idx(installed_maps): idx_dict[item]['region'] = region idx_dict[item]['language'] = map_dict['perma_ref'][:2] - with open(map_vector_idx_dir + '/osm_version_idx.json','w') as idx: + with open(vector_map_idx_dir + '/osm_version_idx.json','w') as idx: idx.write(json.dumps(idx_dict,indent=2)) def create_menu_def(region,default_name,intended_use='map'): diff --git a/roles/map-vector/templates/index.html b/roles/map-vector/templates/index.html index bef8adf46..b00310b1a 100644 --- a/roles/map-vector/templates/index.html +++ b/roles/map-vector/templates/index.html @@ -46,12 +46,12 @@ return (bytes / Math.pow(1024, e)).toFixed(2) + " " + s[e]; } - + - + diff --git a/roles/map-vector/templates/map-vector.conf b/roles/map-vector/templates/map-vector.conf index e03739186..378127778 100644 --- a/roles/map-vector/templates/map-vector.conf +++ b/roles/map-vector/templates/map-vector.conf @@ -1,7 +1,7 @@ # For downloadable regional vector tilesets -Alias /maps {{ map_vector_path }} -Alias /map-vector {{ map_vector_path }} - +Alias /maps {{ vector_map_path }} +Alias /vector-map {{ vector_map_path }} + Options Indexes FollowSymLinks AllowOverride All Require all granted diff --git a/vars/default_vars.yml b/vars/default_vars.yml index c1fc1881c..b9f33c77c 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -352,9 +352,9 @@ mongodb_enabled: False mongodb_port: 27018 # Regional OSM vector maps use much less disk space than bitmap/raster versions -map_vector_install: True -map_vector_enabled: True -map_vector_path: '{{ content_base }}/www/map-vector' +vector_map_install: True +vector_map_enabled: True +vector_map_path: '{{ content_base }}/www/vector-map' # roles/sugarizer/meta/main.yml auto-invokes 2 above prereqs: mongodb & nodejs # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index 7830a81e7..b62f272af 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -230,8 +230,8 @@ moodle_enabled: True # If using Moodle intensively, set apache_high_php_limits in 3-BASE-SERVER # Regional OSM vector maps use much less disk space than bitmap/raster versions -map_vector_install: True -map_vector_enabled: True +vector_map_install: True +vector_map_enabled: True # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957 diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index 943a12283..e14f320a4 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -230,8 +230,8 @@ moodle_enabled: False # If using Moodle intensively, set apache_high_php_limits in 3-BASE-SERVER # Regional OSM vector maps use much less disk space than bitmap/raster versions -map_vector_install: True -map_vector_enabled: True +vector_map_install: True +vector_map_enabled: True # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957 diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index 957f8cbe4..324651c26 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -230,8 +230,8 @@ moodle_enabled: False # If using Moodle intensively, set apache_high_php_limits in 3-BASE-SERVER # Regional OSM vector maps use much less disk space than bitmap/raster versions -map_vector_install: True -map_vector_enabled: True +vector_map_install: True +vector_map_enabled: True # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957 From ee85ecab219f57aefa78afc95e09584a9ba5e89a Mon Sep 17 00:00:00 2001 From: George Hunt Date: Sat, 4 May 2019 23:10:47 -0700 Subject: [PATCH 10/24] change role name --- roles/{map-vector => vector-map}/defaults/main.yml | 0 roles/{map-vector => vector-map}/files/countries.json | 0 roles/{map-vector => vector-map}/files/en-map_test.json | 0 roles/{map-vector => vector-map}/files/osm_functions.js | 0 roles/{map-vector => vector-map}/files/test-index.redirect | 0 roles/{map-vector => vector-map}/tasks/main.yml | 0 roles/{map-vector => vector-map}/templates/iiab-update-osm | 0 roles/{map-vector => vector-map}/templates/index.html | 0 roles/{map-vector => vector-map}/templates/main.js | 0 roles/{map-vector => vector-map}/templates/map-vector.conf | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename roles/{map-vector => vector-map}/defaults/main.yml (100%) rename roles/{map-vector => vector-map}/files/countries.json (100%) rename roles/{map-vector => vector-map}/files/en-map_test.json (100%) rename roles/{map-vector => vector-map}/files/osm_functions.js (100%) rename roles/{map-vector => vector-map}/files/test-index.redirect (100%) rename roles/{map-vector => vector-map}/tasks/main.yml (100%) rename roles/{map-vector => vector-map}/templates/iiab-update-osm (100%) rename roles/{map-vector => vector-map}/templates/index.html (100%) rename roles/{map-vector => vector-map}/templates/main.js (100%) rename roles/{map-vector => vector-map}/templates/map-vector.conf (100%) diff --git a/roles/map-vector/defaults/main.yml b/roles/vector-map/defaults/main.yml similarity index 100% rename from roles/map-vector/defaults/main.yml rename to roles/vector-map/defaults/main.yml diff --git a/roles/map-vector/files/countries.json b/roles/vector-map/files/countries.json similarity index 100% rename from roles/map-vector/files/countries.json rename to roles/vector-map/files/countries.json diff --git a/roles/map-vector/files/en-map_test.json b/roles/vector-map/files/en-map_test.json similarity index 100% rename from roles/map-vector/files/en-map_test.json rename to roles/vector-map/files/en-map_test.json diff --git a/roles/map-vector/files/osm_functions.js b/roles/vector-map/files/osm_functions.js similarity index 100% rename from roles/map-vector/files/osm_functions.js rename to roles/vector-map/files/osm_functions.js diff --git a/roles/map-vector/files/test-index.redirect b/roles/vector-map/files/test-index.redirect similarity index 100% rename from roles/map-vector/files/test-index.redirect rename to roles/vector-map/files/test-index.redirect diff --git a/roles/map-vector/tasks/main.yml b/roles/vector-map/tasks/main.yml similarity index 100% rename from roles/map-vector/tasks/main.yml rename to roles/vector-map/tasks/main.yml diff --git a/roles/map-vector/templates/iiab-update-osm b/roles/vector-map/templates/iiab-update-osm similarity index 100% rename from roles/map-vector/templates/iiab-update-osm rename to roles/vector-map/templates/iiab-update-osm diff --git a/roles/map-vector/templates/index.html b/roles/vector-map/templates/index.html similarity index 100% rename from roles/map-vector/templates/index.html rename to roles/vector-map/templates/index.html diff --git a/roles/map-vector/templates/main.js b/roles/vector-map/templates/main.js similarity index 100% rename from roles/map-vector/templates/main.js rename to roles/vector-map/templates/main.js diff --git a/roles/map-vector/templates/map-vector.conf b/roles/vector-map/templates/map-vector.conf similarity index 100% rename from roles/map-vector/templates/map-vector.conf rename to roles/vector-map/templates/map-vector.conf From 3be9c87f3a7ef440c12897506656b48001f3ac55 Mon Sep 17 00:00:00 2001 From: George Hunt Date: Sat, 4 May 2019 23:21:34 -0700 Subject: [PATCH 11/24] rename file --- roles/vector-map/templates/{map-vector.conf => vector-map.conf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename roles/vector-map/templates/{map-vector.conf => vector-map.conf} (100%) diff --git a/roles/vector-map/templates/map-vector.conf b/roles/vector-map/templates/vector-map.conf similarity index 100% rename from roles/vector-map/templates/map-vector.conf rename to roles/vector-map/templates/vector-map.conf From 66b9e844bdc1566bf182ee37da10e3bfc2c3d77b Mon Sep 17 00:00:00 2001 From: George Hunt Date: Sun, 5 May 2019 18:51:34 -0700 Subject: [PATCH 12/24] vector-map -> vector-maps --- roles/vector-map/files/test-index.redirect | 4 ---- .../defaults/main.yml | 2 +- .../files/countries.json | 0 .../files/en-map_test.json | 0 .../files/osm_functions.js | 4 ++-- roles/vector-maps/files/test-index.redirect | 4 ++++ .../{vector-map => vector-maps}/tasks/main.yml | 18 +++++++++--------- .../templates/iiab-update-osm | 4 ++-- .../templates/index.html | 4 ++-- .../templates/main.js | 0 .../templates/vector-map.conf | 2 +- 11 files changed, 21 insertions(+), 21 deletions(-) delete mode 100644 roles/vector-map/files/test-index.redirect rename roles/{vector-map => vector-maps}/defaults/main.yml (84%) rename roles/{vector-map => vector-maps}/files/countries.json (100%) rename roles/{vector-map => vector-maps}/files/en-map_test.json (100%) rename roles/{vector-map => vector-maps}/files/osm_functions.js (98%) create mode 100644 roles/vector-maps/files/test-index.redirect rename roles/{vector-map => vector-maps}/tasks/main.yml (79%) rename roles/{vector-map => vector-maps}/templates/iiab-update-osm (98%) rename roles/{vector-map => vector-maps}/templates/index.html (92%) rename roles/{vector-map => vector-maps}/templates/main.js (100%) rename roles/{vector-map => vector-maps}/templates/vector-map.conf (83%) diff --git a/roles/vector-map/files/test-index.redirect b/roles/vector-map/files/test-index.redirect deleted file mode 100644 index 68cd166c6..000000000 --- a/roles/vector-map/files/test-index.redirect +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/roles/vector-map/defaults/main.yml b/roles/vector-maps/defaults/main.yml similarity index 84% rename from roles/vector-map/defaults/main.yml rename to roles/vector-maps/defaults/main.yml index d68b225b3..980765644 100644 --- a/roles/vector-map/defaults/main.yml +++ b/roles/vector-maps/defaults/main.yml @@ -1,6 +1,6 @@ vector_map_install: True vector_map_enabled: True -vector_map_path: '{{ content_base }}/www/vector-map' +vector_map_path: '{{ content_base }}/www/vector-maps' # All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml # If nec, change them by editing /etc/iiab/local_vars.yml prior to installing! diff --git a/roles/vector-map/files/countries.json b/roles/vector-maps/files/countries.json similarity index 100% rename from roles/vector-map/files/countries.json rename to roles/vector-maps/files/countries.json diff --git a/roles/vector-map/files/en-map_test.json b/roles/vector-maps/files/en-map_test.json similarity index 100% rename from roles/vector-map/files/en-map_test.json rename to roles/vector-maps/files/en-map_test.json diff --git a/roles/vector-map/files/osm_functions.js b/roles/vector-maps/files/osm_functions.js similarity index 98% rename from roles/vector-map/files/osm_functions.js rename to roles/vector-maps/files/osm_functions.js index ed59e4807..ba448ca01 100644 --- a/roles/vector-map/files/osm_functions.js +++ b/roles/vector-maps/files/osm_functions.js @@ -7,7 +7,7 @@ var regionGeojson = {}; var regionList = []; var regionInstalled = []; var commonAssetsDir = '/common/assets/'; -var mapAssetsDir = '/vector-map/maplist/assets/'; +var mapAssetsDir = '/vector-maps/maplist/assets/'; var iiab_config_dir = '/etc/iiab/'; var onChangeFunc = "setSize"; var osmCatalog = {}; @@ -27,7 +27,7 @@ function readOsmIdx(){ //consoleLog ("in readOsmIdx"); var resp = $.ajax({ type: 'GET', - url: consoleJsonDir + 'vector-map-idx.json', + url: consoleJsonDir + 'vector-maps-idx.json', dataType: 'json' }) .done(function( data ) { diff --git a/roles/vector-maps/files/test-index.redirect b/roles/vector-maps/files/test-index.redirect new file mode 100644 index 000000000..3d86d5480 --- /dev/null +++ b/roles/vector-maps/files/test-index.redirect @@ -0,0 +1,4 @@ + + + + diff --git a/roles/vector-map/tasks/main.yml b/roles/vector-maps/tasks/main.yml similarity index 79% rename from roles/vector-map/tasks/main.yml rename to roles/vector-maps/tasks/main.yml index e15b7d30d..b9d6dd1eb 100644 --- a/roles/vector-map/tasks/main.yml +++ b/roles/vector-maps/tasks/main.yml @@ -1,4 +1,4 @@ -- name: Make sure the vector-map directory exists +- name: Make sure the vector-maps directory exists file: path: '{{ vector_map_path }}/maplist/assets' state: directory @@ -45,7 +45,7 @@ dest: /usr/bin/iiab-update-osm mode: "0755" -- name: Run the script that does vector-map housekeeping +- name: Run the script that does vector-maps housekeeping shell: /usr/bin/iiab-update-osm - name: Copy the Countries geojson to assets @@ -61,19 +61,19 @@ - name: Install /etc/{{ apache_config_dir }}/osm-vect.conf from template template: - src: vector-map.conf - dest: "/etc/{{ apache_config_dir }}/vector-map.conf" + src: vector-maps.conf + dest: "/etc/{{ apache_config_dir }}/vector-maps.conf" -- name: Create symlink vector-map.conf from sites-enabled to sites-available (debuntu, not nec for redhat) +- name: Create symlink vector-maps.conf from sites-enabled to sites-available (debuntu, not nec for redhat) file: - src: /etc/apache2/sites-available/vector-map.conf - path: /etc/apache2/sites-enabled/vector-map.conf + src: /etc/apache2/sites-available/vector-maps.conf + path: /etc/apache2/sites-enabled/vector-maps.conf state: link when: vector_map_enabled and is_debuntu -- name: Remove symlink /etc/apache2/sites-enabled/vector-map.conf (debuntu) +- name: Remove symlink /etc/apache2/sites-enabled/vector-maps.conf (debuntu) file: - path: /etc/apache2/sites-enabled/vector-map.conf + path: /etc/apache2/sites-enabled/vector-maps.conf state: absent when: not vector_map_enabled and is_debuntu diff --git a/roles/vector-map/templates/iiab-update-osm b/roles/vector-maps/templates/iiab-update-osm similarity index 98% rename from roles/vector-map/templates/iiab-update-osm rename to roles/vector-maps/templates/iiab-update-osm index 817e6e6cd..bebb8d81a 100755 --- a/roles/vector-map/templates/iiab-update-osm +++ b/roles/vector-maps/templates/iiab-update-osm @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Scan the vector-map directory, update the vector-map-idx.json, add menu-defs +# Scan the vector-maps directory, update the vector-maps-idx.json, add menu-defs from geojson import Feature, Point, FeatureCollection, Polygon import geojson @@ -27,7 +27,7 @@ doc_root = get_iiab_env('WWWROOT') menuDefs = doc_root + "/js-menu/menu-files/menu-defs/" vector_map_idx_dir = doc_root + "/common/assets" #map_doc_root = '{{ vector_map_path }}' -map_doc_root = '/library/www/vector-map' +map_doc_root = '/library/www/vector-maps' # map_catalog will be global, assumed always available map_catalog = {} map_menu_def_list = [] diff --git a/roles/vector-map/templates/index.html b/roles/vector-maps/templates/index.html similarity index 92% rename from roles/vector-map/templates/index.html rename to roles/vector-maps/templates/index.html index b00310b1a..45573d3de 100644 --- a/roles/vector-map/templates/index.html +++ b/roles/vector-maps/templates/index.html @@ -46,12 +46,12 @@ return (bytes / Math.pow(1024, e)).toFixed(2) + " " + s[e]; } - + - + diff --git a/roles/vector-map/templates/main.js b/roles/vector-maps/templates/main.js similarity index 100% rename from roles/vector-map/templates/main.js rename to roles/vector-maps/templates/main.js diff --git a/roles/vector-map/templates/vector-map.conf b/roles/vector-maps/templates/vector-map.conf similarity index 83% rename from roles/vector-map/templates/vector-map.conf rename to roles/vector-maps/templates/vector-map.conf index 378127778..dd3d32050 100644 --- a/roles/vector-map/templates/vector-map.conf +++ b/roles/vector-maps/templates/vector-map.conf @@ -1,6 +1,6 @@ # For downloadable regional vector tilesets Alias /maps {{ vector_map_path }} -Alias /vector-map {{ vector_map_path }} +Alias /vector-maps {{ vector_map_path }} Options Indexes FollowSymLinks AllowOverride All From 812c46ada0cd6ae281e010176ab320b1d43b9bf2 Mon Sep 17 00:00:00 2001 From: George Hunt Date: Sun, 5 May 2019 19:05:32 -0700 Subject: [PATCH 13/24] vector-map -> vector-maps --- roles/4-server-options/tasks/main.yml | 4 ++-- roles/vector-maps/defaults/main.yml | 4 ++-- roles/vector-maps/tasks/main.yml | 4 ++-- vars/default_vars.yml | 4 ++-- vars/local_vars_big.yml | 4 ++-- vars/local_vars_medium.yml | 4 ++-- vars/local_vars_min.yml | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/roles/4-server-options/tasks/main.yml b/roles/4-server-options/tasks/main.yml index 48b036cfc..8da054002 100644 --- a/roles/4-server-options/tasks/main.yml +++ b/roles/4-server-options/tasks/main.yml @@ -15,8 +15,8 @@ - name: Installing vector map test page include_role: - name: vector-map - when: vector_map_install + name: vector-maps + when: vector_maps_install tags: base, map - name: Installing captive portal diff --git a/roles/vector-maps/defaults/main.yml b/roles/vector-maps/defaults/main.yml index 980765644..a25fa2f0e 100644 --- a/roles/vector-maps/defaults/main.yml +++ b/roles/vector-maps/defaults/main.yml @@ -1,5 +1,5 @@ -vector_map_install: True -vector_map_enabled: True +vector_maps_install: True +vector_maps_enabled: True vector_map_path: '{{ content_base }}/www/vector-maps' # All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml diff --git a/roles/vector-maps/tasks/main.yml b/roles/vector-maps/tasks/main.yml index b9d6dd1eb..653c583c8 100644 --- a/roles/vector-maps/tasks/main.yml +++ b/roles/vector-maps/tasks/main.yml @@ -69,13 +69,13 @@ src: /etc/apache2/sites-available/vector-maps.conf path: /etc/apache2/sites-enabled/vector-maps.conf state: link - when: vector_map_enabled and is_debuntu + when: vector_maps_enabled and is_debuntu - name: Remove symlink /etc/apache2/sites-enabled/vector-maps.conf (debuntu) file: path: /etc/apache2/sites-enabled/vector-maps.conf state: absent - when: not vector_map_enabled and is_debuntu + when: not vector_maps_enabled and is_debuntu - name: Copy the redirect to the test page -- delete this if more than one map copy: diff --git a/vars/default_vars.yml b/vars/default_vars.yml index b9f33c77c..1bac4bbdb 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -352,8 +352,8 @@ mongodb_enabled: False mongodb_port: 27018 # Regional OSM vector maps use much less disk space than bitmap/raster versions -vector_map_install: True -vector_map_enabled: True +vector_maps_install: True +vector_maps_enabled: True vector_map_path: '{{ content_base }}/www/vector-map' # roles/sugarizer/meta/main.yml auto-invokes 2 above prereqs: mongodb & nodejs diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index b62f272af..a4db50618 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -230,8 +230,8 @@ moodle_enabled: True # If using Moodle intensively, set apache_high_php_limits in 3-BASE-SERVER # Regional OSM vector maps use much less disk space than bitmap/raster versions -vector_map_install: True -vector_map_enabled: True +vector_maps_install: True +vector_maps_enabled: True # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957 diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index e14f320a4..a36c7db6e 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -230,8 +230,8 @@ moodle_enabled: False # If using Moodle intensively, set apache_high_php_limits in 3-BASE-SERVER # Regional OSM vector maps use much less disk space than bitmap/raster versions -vector_map_install: True -vector_map_enabled: True +vector_maps_install: True +vector_maps_enabled: True # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957 diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index 324651c26..548d7adc9 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -230,8 +230,8 @@ moodle_enabled: False # If using Moodle intensively, set apache_high_php_limits in 3-BASE-SERVER # Regional OSM vector maps use much less disk space than bitmap/raster versions -vector_map_install: True -vector_map_enabled: True +vector_maps_install: True +vector_maps_enabled: True # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957 From 28828136b66799c3c626ba5fe2c5cc027dd8b060 Mon Sep 17 00:00:00 2001 From: George Hunt Date: Sun, 5 May 2019 20:27:45 -0700 Subject: [PATCH 14/24] vector-map ->maps --- roles/vector-maps/templates/{iiab-update-osm => iiab-update-map} | 0 roles/vector-maps/templates/{vector-map.conf => vector-maps.conf} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename roles/vector-maps/templates/{iiab-update-osm => iiab-update-map} (100%) rename roles/vector-maps/templates/{vector-map.conf => vector-maps.conf} (100%) diff --git a/roles/vector-maps/templates/iiab-update-osm b/roles/vector-maps/templates/iiab-update-map similarity index 100% rename from roles/vector-maps/templates/iiab-update-osm rename to roles/vector-maps/templates/iiab-update-map diff --git a/roles/vector-maps/templates/vector-map.conf b/roles/vector-maps/templates/vector-maps.conf similarity index 100% rename from roles/vector-maps/templates/vector-map.conf rename to roles/vector-maps/templates/vector-maps.conf From 1350fbe1e54b56fa0f153aaa44f53659582899f6 Mon Sep 17 00:00:00 2001 From: George Hunt Date: Sun, 5 May 2019 20:41:48 -0700 Subject: [PATCH 15/24] map_url --- roles/vector-maps/defaults/main.yml | 2 +- roles/vector-maps/tasks/main.yml | 16 ++++++++-------- vars/default_vars.yml | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/roles/vector-maps/defaults/main.yml b/roles/vector-maps/defaults/main.yml index a25fa2f0e..9679a6337 100644 --- a/roles/vector-maps/defaults/main.yml +++ b/roles/vector-maps/defaults/main.yml @@ -5,4 +5,4 @@ vector_map_path: '{{ content_base }}/www/vector-maps' # All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml # If nec, change them by editing /etc/iiab/local_vars.yml prior to installing! -iiab_osm_url : http://download.iiab.io/content/OSM/vector-tiles/maplist/hidden +iiab_map_url : http://download.iiab.io/content/OSM/vector-tiles/maplist/hidden diff --git a/roles/vector-maps/tasks/main.yml b/roles/vector-maps/tasks/main.yml index 653c583c8..7cc56e962 100644 --- a/roles/vector-maps/tasks/main.yml +++ b/roles/vector-maps/tasks/main.yml @@ -8,7 +8,7 @@ - name: Fetch the catalog for osm maps get_url: - url: "{{ iiab_osm_url }}/assets/regions.json" + url: "{{ iiab_map_url }}/assets/regions.json" dest: '{{ vector_map_path }}/maplist/assets/' - name: Create a link to osm catalog in /common/assets @@ -19,7 +19,7 @@ - name: Fetch the javascript bundle with openlayers for test page get_url: - url: "{{ iiab_osm_url }}/../main.js" + url: "{{ iiab_map_url }}/../main.js" dest: '{{ vector_map_path }}/maplist/' - name: Fetch the index.html for test page @@ -31,7 +31,7 @@ # So bring the bounding box definition from cloud (bboxes.geojson is big) - name: Fetch the bounding box description for osm maps get_url: - url: "{{ iiab_osm_url }}/assets/bboxes.geojson" + url: "{{ iiab_map_url }}/assets/bboxes.geojson" dest: '{{ vector_map_path }}/maplist/assets/' - name: Install python-geojson package, that helps with geojson @@ -41,12 +41,12 @@ - name: Install the script to update osm catalog template: - src: iiab-update-osm - dest: /usr/bin/iiab-update-osm + src: iiab-update-map + dest: /usr/bin/iiab-update-map mode: "0755" - name: Run the script that does vector-maps housekeeping - shell: /usr/bin/iiab-update-osm + shell: /usr/bin/iiab-update-map - name: Copy the Countries geojson to assets copy: @@ -56,10 +56,10 @@ # It is too complicated to use a single file for both iiab and admin-console - name: Copy the duplicated javascript to assets copy: - src: osm_functions.js + src: map_functions.js dest: '{{ vector_map_path }}/maplist/assets' -- name: Install /etc/{{ apache_config_dir }}/osm-vect.conf from template +- name: Install /etc/{{ apache_config_dir }}/vector-maps.conf from template template: src: vector-maps.conf dest: "/etc/{{ apache_config_dir }}/vector-maps.conf" diff --git a/vars/default_vars.yml b/vars/default_vars.yml index 1bac4bbdb..576945d9c 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -15,7 +15,7 @@ pip_packages_dir: "{{ iiab_base }}/pip-packages" yum_packages_dir: "{{ iiab_base }}/yum-packages" downloads_dir: "{{ iiab_base }}/downloads" iiab_download_url: http://download.iiab.io/packages -iiab_osm_url : http://download.iiab.io/content/OSM/vector-tiles/maplist/hidden +iiab_map_url : http://download.iiab.io/content/OSM/vector-tiles/maplist/hidden content_base: "/library" doc_base: "{{ content_base }}/www" From e22e79bceb474416c00c80978977bc190e9a1400 Mon Sep 17 00:00:00 2001 From: George Hunt Date: Sun, 5 May 2019 20:51:45 -0700 Subject: [PATCH 16/24] map_functions.js --- roles/vector-maps/files/{osm_functions.js => map_functions.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename roles/vector-maps/files/{osm_functions.js => map_functions.js} (100%) diff --git a/roles/vector-maps/files/osm_functions.js b/roles/vector-maps/files/map_functions.js similarity index 100% rename from roles/vector-maps/files/osm_functions.js rename to roles/vector-maps/files/map_functions.js From 3032b583894c8f6de487a330f15002a338dc6145 Mon Sep 17 00:00:00 2001 From: George Hunt Date: Sun, 5 May 2019 21:18:41 -0700 Subject: [PATCH 17/24] tedious --- roles/vector-maps/files/map_functions.js | 54 ++++++++++++------------ roles/vector-maps/templates/index.html | 4 +- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/roles/vector-maps/files/map_functions.js b/roles/vector-maps/files/map_functions.js index ba448ca01..956ca01ac 100644 --- a/roles/vector-maps/files/map_functions.js +++ b/roles/vector-maps/files/map_functions.js @@ -1,6 +1,6 @@ -// osm_functions.js -- (non authoritative see below) src = iiab/roles/files/ +// map_functions.js -- (non authoritative see below) src = iiab/roles/files/ // copyright 2019 George Hunt -// CAUTION -- this file is duplicate to admin-console/console/files/js/osm_fuctions.js -- please think of admin-console as authoritative +// CAUTION -- this file is duplicate to admin-console/console/files/js/map_fuctions.js -- please think of admin-console as authoritative // Placed here in duplicate to ease debugging, and simplify dependences var regionGeojson = {}; @@ -10,7 +10,7 @@ var commonAssetsDir = '/common/assets/'; var mapAssetsDir = '/vector-maps/maplist/assets/'; var iiab_config_dir = '/etc/iiab/'; var onChangeFunc = "setSize"; -var osmCatalog = {}; +var mapCatalog = {}; // following 2 lines an experiment to see if test page and console can be common //var jquery = require("./assets/jquery.min"); @@ -19,7 +19,7 @@ var osmCatalog = {}; function getOsmStat(){ // called during the init console.log('in getOsmStat'); - readOsmCatalog( true ); // we want checkboxes + readMapCatalog( true ); // we want checkboxes readOsmIdx(); } @@ -31,21 +31,21 @@ function readOsmIdx(){ dataType: 'json' }) .done(function( data ) { - osmInstalled = data['regions']; + mapInstalled = data['regions']; regionInstalled = []; for (region in data['regions']) { if (data['regions'].hasOwnProperty(region)) { regionInstalled.push(region); } } - //consoleLog(osmInstalled + ''); + //consoleLog(mapInstalled + ''); }) .fail(jsonErrhandler); return resp; } -function readOsmCatalog(checkbox){ +function readMapCatalog(checkbox){ checkbox = checkbox || true; console.log ("in readOsmCalalog"); regionList = []; @@ -56,11 +56,11 @@ function readOsmCatalog(checkbox){ }) .done(function( data ) { regionJson = data; - osmCatalog = regionJson['regions']; - for(var key in osmCatalog){ - //console.log(key + ' ' + osmCatalog[key]['title']); - osmCatalog[key]['name'] = key; - regionList.push(osmCatalog[key]); + mapCatalog = regionJson['regions']; + for(var key in mapCatalog){ + //console.log(key + ' ' + mapCatalog[key]['title']); + mapCatalog[key]['name'] = key; + regionList.push(mapCatalog[key]); } }) .fail(jsonErrhandler); @@ -120,13 +120,13 @@ function genRegionItem(region,checkbox) { function instOsmItem(name) { var command = "INST-OSM-VECT-SET"; var cmd_args = {}; - cmd_args['osm_vect_id'] = name; + cmd_args['map_vect_id'] = name; cmd = command + " " + JSON.stringify(cmd_args); sendCmdSrvCmd(cmd, genericCmdHandler); - osmDownloading.push(name); - if ( osmWip.indexOf(name) != -1 ) - osmWip.push(osmCatalog[name]); - console.log('osmWip: ' + osmWip); + mapDownloading.push(name); + if ( mapWip.indexOf(name) != -1 ) + mapWip.push(mapCatalog[name]); + console.log('mapWip: ' + mapWip); return true; } @@ -161,19 +161,19 @@ function updateOsmSpace(cb){ } function updateOsmSpaceUtil(region, checked){ - var size = parseInt(osmCatalog[region].size); + var size = parseInt(mapCatalog[region].size); var modIdx = selectedOsmItems.indexOf(region); if (checked){ if (regionInstalled.indexOf(region) == -1){ // only update if not already installed mods - sysStorage.osm_selected_size += size; + sysStorage.map_selected_size += size; selectedOsmItems.push(region); } } else { if (modIdx != -1){ - sysStorage.osm_selected_size -= size; + sysStorage.map_selected_size -= size; selectedOsmItems.splice(modIdx, 1); } } @@ -188,29 +188,29 @@ function totalSpace(){ $( ".extract" ).each(function(ind,elem){ var data = JSON.parse($(this).attr('data-region')); var region = data.name; - var size = parseInt(osmCatalog[region]['size']); + var size = parseInt(mapCatalog[region]['size']); var chk = $( this ).find(':checkbox').prop("checked") == true; if (chk && typeof size !== 'undefined') sum += size; }); var ksize = sum / 1000; - $( "#osmDiskSpace" ).html(readableSize(ksize)); + $( "#mapDiskSpace" ).html(readableSize(ksize)); } $( '#instOsmRegion').on('click', function(evnt){ - readOsmCatalog(); - osm.render(); + readMapCatalog(); + map.render(); }); */ function renderOsm(){ console.log('in renderOsm'); - window.map.setTarget($("#osm-container")[0]); + window.map.setTarget($("#map-container")[0]); window.map.render(); renderRegionList(true); } function initOsm(){ var dummy = 0; - sysStorage.osm_selected_size = 0; - $.when(readOsmCatalog(true)).then(renderRegionList); + sysStorage.map_selected_size = 0; + $.when(readMapCatalog(true)).then(renderRegionList); } diff --git a/roles/vector-maps/templates/index.html b/roles/vector-maps/templates/index.html index 45573d3de..3e6123818 100644 --- a/roles/vector-maps/templates/index.html +++ b/roles/vector-maps/templates/index.html @@ -46,10 +46,10 @@ return (bytes / Math.pow(1024, e)).toFixed(2) + " " + s[e]; } - + From 0a115233d2dcd7d07179f967fdc3bf54ef36e635 Mon Sep 17 00:00:00 2001 From: George Hunt Date: Sun, 5 May 2019 21:54:08 -0700 Subject: [PATCH 18/24] vector_map_path in ii --- vars/default_vars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index 576945d9c..e610ce4f2 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -354,7 +354,7 @@ mongodb_port: 27018 # Regional OSM vector maps use much less disk space than bitmap/raster versions vector_maps_install: True vector_maps_enabled: True -vector_map_path: '{{ content_base }}/www/vector-map' +vector_map_path: '{{ content_base }}/www/vector-maps' # roles/sugarizer/meta/main.yml auto-invokes 2 above prereqs: mongodb & nodejs # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 From ba071002200648841d07a63f87734b287558bad9 Mon Sep 17 00:00:00 2001 From: George Hunt Date: Mon, 6 May 2019 07:23:16 -0700 Subject: [PATCH 19/24] ->osm-vector-maps --- roles/4-server-options/tasks/main.yml | 4 ++-- roles/vector-maps/defaults/main.yml | 6 ++--- roles/vector-maps/files/map_functions.js | 4 ++-- roles/vector-maps/files/test-index.redirect | 2 +- roles/vector-maps/tasks/main.yml | 24 ++++++++++---------- roles/vector-maps/templates/iiab-update-map | 4 ++-- roles/vector-maps/templates/index.html | 4 ++-- roles/vector-maps/templates/vector-maps.conf | 2 +- vars/default_vars.yml | 6 ++--- vars/local_vars_big.yml | 4 ++-- vars/local_vars_medium.yml | 4 ++-- vars/local_vars_min.yml | 4 ++-- 12 files changed, 34 insertions(+), 34 deletions(-) diff --git a/roles/4-server-options/tasks/main.yml b/roles/4-server-options/tasks/main.yml index 8da054002..8974085e3 100644 --- a/roles/4-server-options/tasks/main.yml +++ b/roles/4-server-options/tasks/main.yml @@ -15,8 +15,8 @@ - name: Installing vector map test page include_role: - name: vector-maps - when: vector_maps_install + name: osm-vector-maps + when: osm_vector_maps_install tags: base, map - name: Installing captive portal diff --git a/roles/vector-maps/defaults/main.yml b/roles/vector-maps/defaults/main.yml index 9679a6337..07882b688 100644 --- a/roles/vector-maps/defaults/main.yml +++ b/roles/vector-maps/defaults/main.yml @@ -1,6 +1,6 @@ -vector_maps_install: True -vector_maps_enabled: True -vector_map_path: '{{ content_base }}/www/vector-maps' +osm_vector_maps_install: True +osm_vector_maps_enabled: True +vector_map_path: '{{ content_base }}/www/osm-vector-maps' # All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml # If nec, change them by editing /etc/iiab/local_vars.yml prior to installing! diff --git a/roles/vector-maps/files/map_functions.js b/roles/vector-maps/files/map_functions.js index 956ca01ac..23ab66746 100644 --- a/roles/vector-maps/files/map_functions.js +++ b/roles/vector-maps/files/map_functions.js @@ -7,7 +7,7 @@ var regionGeojson = {}; var regionList = []; var regionInstalled = []; var commonAssetsDir = '/common/assets/'; -var mapAssetsDir = '/vector-maps/maplist/assets/'; +var mapAssetsDir = '/osm-vector-maps/maplist/assets/'; var iiab_config_dir = '/etc/iiab/'; var onChangeFunc = "setSize"; var mapCatalog = {}; @@ -27,7 +27,7 @@ function readOsmIdx(){ //consoleLog ("in readOsmIdx"); var resp = $.ajax({ type: 'GET', - url: consoleJsonDir + 'vector-maps-idx.json', + url: consoleJsonDir + 'osm-vector-maps-idx.json', dataType: 'json' }) .done(function( data ) { diff --git a/roles/vector-maps/files/test-index.redirect b/roles/vector-maps/files/test-index.redirect index 3d86d5480..9ad3694cc 100644 --- a/roles/vector-maps/files/test-index.redirect +++ b/roles/vector-maps/files/test-index.redirect @@ -1,4 +1,4 @@ - + diff --git a/roles/vector-maps/tasks/main.yml b/roles/vector-maps/tasks/main.yml index 7cc56e962..ca3cd9276 100644 --- a/roles/vector-maps/tasks/main.yml +++ b/roles/vector-maps/tasks/main.yml @@ -1,4 +1,4 @@ -- name: Make sure the vector-maps directory exists +- name: Make sure the osm-vector-maps directory exists file: path: '{{ vector_map_path }}/maplist/assets' state: directory @@ -45,7 +45,7 @@ dest: /usr/bin/iiab-update-map mode: "0755" -- name: Run the script that does vector-maps housekeeping +- name: Run the script that does osm-vector-maps housekeeping shell: /usr/bin/iiab-update-map - name: Copy the Countries geojson to assets @@ -59,23 +59,23 @@ src: map_functions.js dest: '{{ vector_map_path }}/maplist/assets' -- name: Install /etc/{{ apache_config_dir }}/vector-maps.conf from template +- name: Install /etc/{{ apache_config_dir }}/osm-vector-maps.conf from template template: - src: vector-maps.conf - dest: "/etc/{{ apache_config_dir }}/vector-maps.conf" + src: osm-vector-maps.conf + dest: "/etc/{{ apache_config_dir }}/osm-vector-maps.conf" -- name: Create symlink vector-maps.conf from sites-enabled to sites-available (debuntu, not nec for redhat) +- name: Create symlink osm-vector-maps.conf from sites-enabled to sites-available (debuntu, not nec for redhat) file: - src: /etc/apache2/sites-available/vector-maps.conf - path: /etc/apache2/sites-enabled/vector-maps.conf + src: /etc/apache2/sites-available/osm-vector-maps.conf + path: /etc/apache2/sites-enabled/osm-vector-maps.conf state: link - when: vector_maps_enabled and is_debuntu + when: osm_vector_maps_enabled and is_debuntu -- name: Remove symlink /etc/apache2/sites-enabled/vector-maps.conf (debuntu) +- name: Remove symlink /etc/apache2/sites-enabled/osm-vector-maps.conf (debuntu) file: - path: /etc/apache2/sites-enabled/vector-maps.conf + path: /etc/apache2/sites-enabled/osm-vector-maps.conf state: absent - when: not vector_maps_enabled and is_debuntu + when: not osm_vector_maps_enabled and is_debuntu - name: Copy the redirect to the test page -- delete this if more than one map copy: diff --git a/roles/vector-maps/templates/iiab-update-map b/roles/vector-maps/templates/iiab-update-map index bebb8d81a..23a5869c3 100755 --- a/roles/vector-maps/templates/iiab-update-map +++ b/roles/vector-maps/templates/iiab-update-map @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Scan the vector-maps directory, update the vector-maps-idx.json, add menu-defs +# Scan the osm-vector-maps directory, update the osm-vector-maps-idx.json, add menu-defs from geojson import Feature, Point, FeatureCollection, Polygon import geojson @@ -27,7 +27,7 @@ doc_root = get_iiab_env('WWWROOT') menuDefs = doc_root + "/js-menu/menu-files/menu-defs/" vector_map_idx_dir = doc_root + "/common/assets" #map_doc_root = '{{ vector_map_path }}' -map_doc_root = '/library/www/vector-maps' +map_doc_root = '/library/www/osm-vector-maps' # map_catalog will be global, assumed always available map_catalog = {} map_menu_def_list = [] diff --git a/roles/vector-maps/templates/index.html b/roles/vector-maps/templates/index.html index 3e6123818..62615ae84 100644 --- a/roles/vector-maps/templates/index.html +++ b/roles/vector-maps/templates/index.html @@ -46,12 +46,12 @@ return (bytes / Math.pow(1024, e)).toFixed(2) + " " + s[e]; } - + - + diff --git a/roles/vector-maps/templates/vector-maps.conf b/roles/vector-maps/templates/vector-maps.conf index dd3d32050..765de9874 100644 --- a/roles/vector-maps/templates/vector-maps.conf +++ b/roles/vector-maps/templates/vector-maps.conf @@ -1,6 +1,6 @@ # For downloadable regional vector tilesets Alias /maps {{ vector_map_path }} -Alias /vector-maps {{ vector_map_path }} +Alias /osm-vector-maps {{ vector_map_path }} Options Indexes FollowSymLinks AllowOverride All diff --git a/vars/default_vars.yml b/vars/default_vars.yml index e610ce4f2..fe5c32155 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -352,9 +352,9 @@ mongodb_enabled: False mongodb_port: 27018 # Regional OSM vector maps use much less disk space than bitmap/raster versions -vector_maps_install: True -vector_maps_enabled: True -vector_map_path: '{{ content_base }}/www/vector-maps' +osm_vector_maps_install: True +osm_vector_maps_enabled: True +vector_map_path: '{{ content_base }}/www/osm-vector-maps' # roles/sugarizer/meta/main.yml auto-invokes 2 above prereqs: mongodb & nodejs # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index a4db50618..016feb675 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -230,8 +230,8 @@ moodle_enabled: True # If using Moodle intensively, set apache_high_php_limits in 3-BASE-SERVER # Regional OSM vector maps use much less disk space than bitmap/raster versions -vector_maps_install: True -vector_maps_enabled: True +osm_vector_maps_install: True +osm_vector_maps_enabled: True # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957 diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index a36c7db6e..42ce9030d 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -230,8 +230,8 @@ moodle_enabled: False # If using Moodle intensively, set apache_high_php_limits in 3-BASE-SERVER # Regional OSM vector maps use much less disk space than bitmap/raster versions -vector_maps_install: True -vector_maps_enabled: True +osm_vector_maps_install: True +osm_vector_maps_enabled: True # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957 diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index 548d7adc9..66384a974 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -230,8 +230,8 @@ moodle_enabled: False # If using Moodle intensively, set apache_high_php_limits in 3-BASE-SERVER # Regional OSM vector maps use much less disk space than bitmap/raster versions -vector_maps_install: True -vector_maps_enabled: True +osm_vector_maps_install: True +osm_vector_maps_enabled: True # Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879 # Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957 From 612032da31991e28a3015004f83e45049546f79a Mon Sep 17 00:00:00 2001 From: George Hunt Date: Mon, 6 May 2019 07:29:44 -0700 Subject: [PATCH 20/24] change directory name --- roles/{vector-maps => osm-vector-maps}/defaults/main.yml | 0 roles/{vector-maps => osm-vector-maps}/files/countries.json | 0 roles/{vector-maps => osm-vector-maps}/files/en-map_test.json | 0 roles/{vector-maps => osm-vector-maps}/files/map_functions.js | 0 roles/{vector-maps => osm-vector-maps}/files/test-index.redirect | 0 roles/{vector-maps => osm-vector-maps}/tasks/main.yml | 0 roles/{vector-maps => osm-vector-maps}/templates/iiab-update-map | 0 roles/{vector-maps => osm-vector-maps}/templates/index.html | 0 roles/{vector-maps => osm-vector-maps}/templates/main.js | 0 roles/{vector-maps => osm-vector-maps}/templates/vector-maps.conf | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename roles/{vector-maps => osm-vector-maps}/defaults/main.yml (100%) rename roles/{vector-maps => osm-vector-maps}/files/countries.json (100%) rename roles/{vector-maps => osm-vector-maps}/files/en-map_test.json (100%) rename roles/{vector-maps => osm-vector-maps}/files/map_functions.js (100%) rename roles/{vector-maps => osm-vector-maps}/files/test-index.redirect (100%) rename roles/{vector-maps => osm-vector-maps}/tasks/main.yml (100%) rename roles/{vector-maps => osm-vector-maps}/templates/iiab-update-map (100%) rename roles/{vector-maps => osm-vector-maps}/templates/index.html (100%) rename roles/{vector-maps => osm-vector-maps}/templates/main.js (100%) rename roles/{vector-maps => osm-vector-maps}/templates/vector-maps.conf (100%) diff --git a/roles/vector-maps/defaults/main.yml b/roles/osm-vector-maps/defaults/main.yml similarity index 100% rename from roles/vector-maps/defaults/main.yml rename to roles/osm-vector-maps/defaults/main.yml diff --git a/roles/vector-maps/files/countries.json b/roles/osm-vector-maps/files/countries.json similarity index 100% rename from roles/vector-maps/files/countries.json rename to roles/osm-vector-maps/files/countries.json diff --git a/roles/vector-maps/files/en-map_test.json b/roles/osm-vector-maps/files/en-map_test.json similarity index 100% rename from roles/vector-maps/files/en-map_test.json rename to roles/osm-vector-maps/files/en-map_test.json diff --git a/roles/vector-maps/files/map_functions.js b/roles/osm-vector-maps/files/map_functions.js similarity index 100% rename from roles/vector-maps/files/map_functions.js rename to roles/osm-vector-maps/files/map_functions.js diff --git a/roles/vector-maps/files/test-index.redirect b/roles/osm-vector-maps/files/test-index.redirect similarity index 100% rename from roles/vector-maps/files/test-index.redirect rename to roles/osm-vector-maps/files/test-index.redirect diff --git a/roles/vector-maps/tasks/main.yml b/roles/osm-vector-maps/tasks/main.yml similarity index 100% rename from roles/vector-maps/tasks/main.yml rename to roles/osm-vector-maps/tasks/main.yml diff --git a/roles/vector-maps/templates/iiab-update-map b/roles/osm-vector-maps/templates/iiab-update-map similarity index 100% rename from roles/vector-maps/templates/iiab-update-map rename to roles/osm-vector-maps/templates/iiab-update-map diff --git a/roles/vector-maps/templates/index.html b/roles/osm-vector-maps/templates/index.html similarity index 100% rename from roles/vector-maps/templates/index.html rename to roles/osm-vector-maps/templates/index.html diff --git a/roles/vector-maps/templates/main.js b/roles/osm-vector-maps/templates/main.js similarity index 100% rename from roles/vector-maps/templates/main.js rename to roles/osm-vector-maps/templates/main.js diff --git a/roles/vector-maps/templates/vector-maps.conf b/roles/osm-vector-maps/templates/vector-maps.conf similarity index 100% rename from roles/vector-maps/templates/vector-maps.conf rename to roles/osm-vector-maps/templates/vector-maps.conf From 84220ddbb717aa1f10a64b1a40c025f2d03ec99d Mon Sep 17 00:00:00 2001 From: George Hunt Date: Mon, 6 May 2019 07:32:09 -0700 Subject: [PATCH 21/24] apache conf file --- .../templates/{vector-maps.conf => osm-vector-maps.conf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename roles/osm-vector-maps/templates/{vector-maps.conf => osm-vector-maps.conf} (100%) diff --git a/roles/osm-vector-maps/templates/vector-maps.conf b/roles/osm-vector-maps/templates/osm-vector-maps.conf similarity index 100% rename from roles/osm-vector-maps/templates/vector-maps.conf rename to roles/osm-vector-maps/templates/osm-vector-maps.conf From c90da038daab8a377580e8784cddae0e9b2b1761 Mon Sep 17 00:00:00 2001 From: George Hunt Date: Mon, 6 May 2019 12:22:57 -0700 Subject: [PATCH 22/24] buster patch in local_facts --- scripts/local_facts.fact | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/local_facts.fact b/scripts/local_facts.fact index 40d6bec1d..ce3dcce09 100755 --- a/scripts/local_facts.fact +++ b/scripts/local_facts.fact @@ -14,7 +14,12 @@ OS=${OS//\"/} VERSION_ID=`grep VERSION_ID /etc/*elease | cut -d= -f2` VERSION_ID=${VERSION_ID//\"/} VERSION_ID=${VERSION_ID%%.*} -OS_VER=$OS-$VERSION_ID +grep PRETTY_NAME /etc/*ease|grep buster +if [ $? -eq 0 ];then + OS_VER=debian-10 +else + OS_VER=$OS-$VERSION_ID +fi DHCPCD_PATH=`which dhcpcd` NM_PATH=`which NetworkManager` From 478d291320cb75af904caecbfb5e44734d865816 Mon Sep 17 00:00:00 2001 From: George Hunt Date: Mon, 6 May 2019 14:08:20 -0700 Subject: [PATCH 23/24] enable internetarchive --- vars/local_vars_min.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index 548d7adc9..51603b9f0 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -346,3 +346,5 @@ minetest_enabled: False # Unmaintained # xovis_install: False # xovis_enabled: False +internetarchive_install: True +internetarchive_enabled: True From e261f48d9a3e5be6ecb66bc2278152932a47a127 Mon Sep 17 00:00:00 2001 From: George Hunt Date: Tue, 7 May 2019 20:38:49 -0700 Subject: [PATCH 24/24] remove testing code --- scripts/local_facts.fact | 7 +------ vars/local_vars_min.yml | 2 -- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/scripts/local_facts.fact b/scripts/local_facts.fact index ce3dcce09..40d6bec1d 100755 --- a/scripts/local_facts.fact +++ b/scripts/local_facts.fact @@ -14,12 +14,7 @@ OS=${OS//\"/} VERSION_ID=`grep VERSION_ID /etc/*elease | cut -d= -f2` VERSION_ID=${VERSION_ID//\"/} VERSION_ID=${VERSION_ID%%.*} -grep PRETTY_NAME /etc/*ease|grep buster -if [ $? -eq 0 ];then - OS_VER=debian-10 -else - OS_VER=$OS-$VERSION_ID -fi +OS_VER=$OS-$VERSION_ID DHCPCD_PATH=`which dhcpcd` NM_PATH=`which NetworkManager` diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index 9bcaf333f..66384a974 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -346,5 +346,3 @@ minetest_enabled: False # Unmaintained # xovis_install: False # xovis_enabled: False -internetarchive_install: True -internetarchive_enabled: True