Fix: GeoServer credentials now admin/Digitribe972 (REST API method)
This commit is contained in:
42
configure-all-datastores.sh
Normal file
42
configure-all-datastores.sh
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
#!/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"
|
||||||
1
digital-twin-toolbox
Submodule
1
digital-twin-toolbox
Submodule
Submodule digital-twin-toolbox added at 9344695e36
1
docker
Submodule
1
docker
Submodule
Submodule docker added at cc3a5ef399
1
geoserver-cloud
Submodule
1
geoserver-cloud
Submodule
Submodule geoserver-cloud added at d5ee0d61ab
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