Files
geoserver/configure-all-datastores.sh

43 lines
1.3 KiB
Bash

#!/bin/bash
# Configure tous les datastores GeoServer pour Smart City Digital Twin
# Usage: bash configure-all-datastores.sh
GEOSERVER_URL="https://geoserver.digitribe.fr/geoserver"
USER="admin"
PASS="Digitribe972"
# 1. Create workspace smartcity
curl -s -u $USER:$PASS -X POST "$GEOSERVER_URL/rest/workspaces" \
-H "Content-type: text/xml" \
-d '<workspace><name>smartcity</name></workspace>'
# 2. FROST PostgreSQL (SensorThings)
curl -s -u $USER:$PASS -X POST "$GEOSERVER_URL/rest/workspaces/smartcity/datastores" \
-H "Content-type: text/xml" \
-d '<?xml version="1.0" encoding="UTF-8"?>
<dataStore>
<name>frost-sensorthings</name>
<connectionParameters>
<entry key="host">0cd2213a58ad</entry>
<entry key="port">5432</entry>
<entry key="database">sensorthings</entry>
<entry key="user">sensorthings</entry>
<entry key="passwd">Digitribe972</entry>
<entry key="dbtype">postgis</entry>
</connectionParameters>
</dataStore>'
echo "✅ FROST datastore configured"
# 3. Stellio PostgreSQL + TimescaleDB
# (À compléter avec identifiants Stellio)
# 4. MapStore PostGIS
# (À compléter avec identifiants MapStore)
# 5. Orion-LD MongoDB
# Nécessite extension MongoDB dans GeoServer
# (À installer si manquante)
echo "🎉 Configuration terminée"