Files
pygeoapi/docker/examples/mvt-elastic/ES/add_data.sh
T
Jo fc31cb3e73 MVT Provider refactoring (#1454)
* - Refactor MVTProvider, to support subclassing
- Added provider for MVT Tippecanoe

* - fixed test configuration for the MVT tippecanoe provider

* - added MVT elastic provider

* - added documentation for mvt providers
- fixed formatting

* - removed tiles publishing from elastic provider example
- updated gitignore to ignore data folder from elastic example

* - added docker example for MVT-elastic backend provider

* - Added docker example for tippecanoe MVT provider

* - updated README of the docker examples section, to catch up with the provided examples.

* - renamed mvt-elastic and mvt-tippecanoe docker example folders.

* - renamed elastic and tippecanoe folders to lower case

* - fixed formatting issue

* - s/Mabox/Mapbox/

* - put plugin provider names in single line

* - renamed MVT provider base class to BaseMVTProvider.

* - added MVT base class

* - reviwed uppercase on .gitignore
- add folder to .gitignore

* - removed new line and brackets

* - removed redundant line with base class

---------

Co-authored-by: doublebyte1 <info@doublebyte.net>
2023-12-28 22:23:54 +01:00

53 lines
2.4 KiB
Bash
Executable File

#!/bin/sh
# =================================================================
#
# Authors: Just van den Broecke <justb4@gmail.com>>
# Jorge Samuel Mendes de Jesus <jorge.dejesus@geocat.net>
#
# Copyright (c) 2019 Just van den Broecke
# Copyright (c) 2019 Jorge Samuel Mendes de Jesus
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
# =================================================================
echo "Starting script to add geojson"
# move to the directory of this setup script
cd "$(dirname "$0")"
# for some reason even when port 9200 is open Elasticsearch is unable to be accessed as authentication fails
# a few seconds later it works
# incresing to 50s for wait in a slow system /_cluster/health?wait_for_status=yellow&timeout=50s
until $(curl -sSf -XGET --insecure 'http://localhost:9200/_cluster/health?wait_for_status=yellow' > /dev/null); do
printf 'No status yellow from ES, trying again in 10 seconds \n'
sleep 10
done
echo "Elasticsearch seems to be working - Adding ne_110m_populated_places_simple.geojson to ES"
python3 /load_es_data.py /usr/share/elasticsearch/data/ne_110m_populated_places_simple.geojson geonameid
echo "Seems that data was loaded"
# create a new index with the settings in es_index_config.json
#curl -v --insecure --user elastic:changeme -XPUT '0.0.0.0:9200/test?pretty' -H 'Content-Type: application/json' -d @es_index_config.json