Fix: GeoServer credentials now admin/Digitribe972 (REST API method)
This commit is contained in:
68
geoserver-config.sh
Normal file
68
geoserver-config.sh
Normal file
@@ -0,0 +1,68 @@
|
||||
#!/bin/bash
|
||||
# Configuration GeoServer - Smart City Digital Twin
|
||||
# À exécuter avec : bash geoserver-config.sh
|
||||
# Nécessite : admin/Digitribe972
|
||||
|
||||
GEOSERVER="https://geoserver.digitribe.fr/geoserver"
|
||||
USER="admin"
|
||||
PASS="Digitribe972"
|
||||
|
||||
echo "🗺️ Configuration GeoServer pour Smart City..."
|
||||
|
||||
# 1. Workspace smartcity
|
||||
curl -s -u $USER:$PASS -X POST "$GEOSERVER/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/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>'
|
||||
|
||||
# 3. Stellio PostgreSQL + TimescaleDB
|
||||
curl -s -u $USER:$PASS -X POST "$GEOSERVER/rest/workspaces/smartcity/datastores" \
|
||||
-H "Content-type: text/xml" \
|
||||
-d '<?xml version="1.0" encoding="UTF-8"?>
|
||||
<dataStore>
|
||||
<name>stellio-timescale</name>
|
||||
<connectionParameters>
|
||||
<entry key="host">9e24c6771977</entry>
|
||||
<entry key="port">5432</entry>
|
||||
<entry key="database">stellio</entry>
|
||||
<entry key="user">stellio</entry>
|
||||
<entry key="passwd">Digitribe972</entry>
|
||||
<entry key="dbtype">postgis</entry>
|
||||
</connectionParameters>
|
||||
</dataStore>'
|
||||
|
||||
# 4. MapStore PostGIS
|
||||
curl -s -u $USER:$PASS -X POST "$GEOSERVER/rest/workspaces/smartcity/datastores" \
|
||||
-H "Content-type: text/xml" \
|
||||
-d '<?xml version="1.0" encoding="UTF-8"?>
|
||||
<dataStore>
|
||||
<name>mapstore-postgis</name>
|
||||
<connectionParameters>
|
||||
<entry key="host">67804b3a308f</entry>
|
||||
<entry key="port">5432</entry>
|
||||
<entry key="database">mapstore</entry>
|
||||
<entry key="user">mapstore</entry>
|
||||
<entry key="passwd">Digitribe972</entry>
|
||||
<entry key="dbtype">postgis</entry>
|
||||
</connectionParameters>
|
||||
</dataStore>'
|
||||
|
||||
# 5. Orion-LD MongoDB (nécessite extension MongoDB)
|
||||
echo "⚠️ Pour Orion-LD (MongoDB), installer l'extension MongoDB dans GeoServer"
|
||||
|
||||
echo "✅ Configuration terminée ! Vérifie dans l'UI GeoServer."
|
||||
Reference in New Issue
Block a user