changeset 5274:bcfb30b73f06

Merged
author Sascha L. Teichmann <teichmann@intevation.de>
date Wed, 13 Mar 2013 16:39:35 +0100
parents db196abd16ca (current diff) da3101abc9da (diff)
children 911f62917753
files
diffstat 9 files changed, 47 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/make_flys_release/README	Wed Mar 13 16:39:08 2013 +0100
+++ b/contrib/make_flys_release/README	Wed Mar 13 16:39:35 2013 +0100
@@ -8,6 +8,7 @@
 TOMCAT_PORT
 MAPSERVER_URL
 WIKI_URL
+LOG_DIR
 DEVELOPER
 DEFAULT_WD
 
@@ -58,3 +59,24 @@
 kann abhängigkeiten (gdal / proj / oracle) enthalten.
 Das skript um diesen tarball für sles zu erstellen ist
 bin/make-opt-package.sh
+
+Deployment:
+===========
+Der tarball kann auf ein Zielsystem übertragen werden und dort entpackt werden.
+Bei den testsystemen der Intevation ist der Ort der Flys installationen
+üblicherweise /opt/flys/flys-version
+
+Anschließend deployt man den flys-client im webapps verzeichnis von tomcat
+(z.b. /usr/share/tomcat6/webapps )
+ggf. in WEB-INF die web.xml überprüfen / anpassen.
+
+Bei einer konfiguration mit apache vhosts ist nun noch ein entsprechender
+vhost in der apache konfiguration einzurichten.
+
+Anschließend muss man noch sicher stellen das passende wms scripte im
+mapserver verfügbar sind. In /srv/www/cgi-bin müssen entsprechende
+river-wms und user-wms dateien liegen die auf die korrekte aktuelle version verweisen.
+Die WMS urls sind in server/conf/floodmap.xml und server/conf/rivermap.xml konfiguriert.
+
+Nun kann man den server starten. Dazu in das entsprechende server verzeichnis wechseln
+und ./bin/run ausführen. Der server muss mit diesem arbeitsverzeichnis gestartet werden.
--- a/contrib/make_flys_release/make_release.sh	Wed Mar 13 16:39:08 2013 +0100
+++ b/contrib/make_flys_release/make_release.sh	Wed Mar 13 16:39:35 2013 +0100
@@ -79,6 +79,7 @@
 BACKENDUSER=${BACKENDUSER:-flys_dami}
 BACKENDPASS=${BACKENDPASS:-flys_dami}
 INITSQLS=${INITSQLS:-}
+LOG_DIR=/var/log/flys
 
 OPTS=`getopt -o ?w:,t,o \
      -l help,oracle \
@@ -173,7 +174,7 @@
        -e "s@http://localhost:8888@http://localhost:$TOMCAT_PORT@g" \
     $FLYS_SOURCE_DIR/flys/flys-client/src/main/webapp/WEB-INF/web.xml
 
-sed -i -e "s@/tmp/flys-client.log@/var/log/flys/client-${VERSION}.log@g" \
+sed -i -e "s@/tmp/flys-client.log@${LOG_DIR}/client-${VERSION}.log@g" \
     $FLYS_SOURCE_DIR/flys/flys-client/src/main/webapp/WEB-INF/log4j.properties
 
 find $FLYS_SOURCE_DIR/flys/flys-artifacts/src/main/resources/ -name messages_\*.properties \
@@ -238,7 +239,13 @@
 sed -i -e "s@http://example.com/@http://${MAPSERVER_URL}/@g" \
     $WORK_DIR/server/conf/rivermap.xml
 
-sed "s@/tmp/flys-server-default.log@/var/log/flys/server-${VERSION}.log@" \
+sed -i -e "s@/tmp/flys-rivers-wms.log/@${LOG_DIR}/rivers-wms-${VERSION}.log@g" \
+    $WORK_DIR/server/conf/mapserver/river-mapfile.vm
+
+sed -i -e "s@/tmp/flys-user-wms.log/@${LOG_DIR}/user-wms-${VERSION}.log@g" \
+    $WORK_DIR/server/conf/mapserver/mapfile.vm
+
+sed "s@/tmp/flys-server-default.log@${LOG_DIR}/server-${VERSION}.log@" \
     $SCRIPT_DIR/confs/log4j.properties \
     > $WORK_DIR/server/conf/log4j.properties
 
--- a/flys-artifacts/doc/conf/floodmap.xml	Wed Mar 13 16:39:08 2013 +0100
+++ b/flys-artifacts/doc/conf/floodmap.xml	Wed Mar 13 16:39:35 2013 +0100
@@ -21,13 +21,13 @@
     <river name="Mosel">
         <srid value="31467"/>
         <dgm-srid value="31466"/>
-        <river-wms url="http://example.com/cgi-bin/user-wms" layers="Mosel"/>
+        <river-wms url="http://example.com/cgi-bin/river-wms" layers="Mosel"/>
         <background-wms url="http://osm.intevation.de/mapcache/?" layers="OSM-WMS-Dienst"/>
     </river>
     <river name="Elbe">
         <srid value="31467"/>
         <dgm-srid value="31467"/>
-        <river-wms url="http://example.com/cgi-bin/elbe-wms" layers="Elbe"/>
+        <river-wms url="http://example.com/cgi-bin/river-wms" layers="Elbe"/>
         <background-wms url="http://osm.intevation.de/mapcache/?" layers="OSM-WMS-Dienst"/>
     </river>
 </floodmap>
--- a/flys-artifacts/doc/conf/mapserver/river-mapfile.vm	Wed Mar 13 16:39:08 2013 +0100
+++ b/flys-artifacts/doc/conf/mapserver/river-mapfile.vm	Wed Mar 13 16:39:35 2013 +0100
@@ -14,7 +14,7 @@
     END
 
     DEBUG 3
-    CONFIG "MS_ERRORFILE" "log/rivers.log"
+    CONFIG "MS_ERRORFILE" "/tmp/flys-rivers-wms.log"
 
     WEB
       METADATA
@@ -57,4 +57,4 @@
     #foreach ($LAYER in $LAYERS)
         include "$LAYER"
     #end
-END
\ No newline at end of file
+END
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/MapArtifact.java	Wed Mar 13 16:39:08 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/MapArtifact.java	Wed Mar 13 16:39:35 2013 +0100
@@ -158,7 +158,7 @@
                 getID(), hash,
                 getUrl());
 
-            String name = type + "-" + artifact.identifier();
+            String name = artifact.getDataAsString("river");
 
             facet.addLayer(name);
             facet.setExtent(getExtent(false));
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/MapUtils.java	Wed Mar 13 16:39:08 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/MapUtils.java	Wed Mar 13 16:39:35 2013 +0100
@@ -56,15 +56,15 @@
         String connection = null;
 
         if (FLYSUtils.isUsingOracle()) {
-            if (groups < 3) {
+            if (groups < 4) {
                 logger.warn("Could only partially parse connection string.");
                 return null;
             }
 
             String host = m.group(2);
             String port = m.group(3);
-
-            connection = user + "/" + pass + "@" + host;
+            String backend = m.group(4);
+            connection = user + "/" + pass + "@" + host + "/" + backend;
         }
         else {
             if (groups < 4) {
--- a/flys-backend/contrib/shpimporter/dgm.py	Wed Mar 13 16:39:08 2013 +0100
+++ b/flys-backend/contrib/shpimporter/dgm.py	Wed Mar 13 16:39:35 2013 +0100
@@ -58,10 +58,10 @@
 
 
 NEXT_IDS = {}
-def next_id(cur, relation, oracle):
+def next_id(cur, relation):
     idx = NEXT_IDS.get(relation)
     if idx is None:
-            cur.execute(SQL_NEXT_ID % relation)
+        cur.execute(SQL_NEXT_ID % relation)
         idx = cur.fetchone()[0]
     NEXT_IDS[relation] = idx + 1
     return idx
@@ -73,7 +73,7 @@
         cur.execute(SQL_SELECT_RANGE_ID, (river_id, a, b))
     row = cur.fetchone()
     if row: return row[0]
-    idx = next_id(cur, "ranges", oracle)
+    idx = next_id(cur, "ranges")
     if oracle:
         cur.execute(SQL_INSERT_RANGE_ID_ORA, (idx, river_id, a, b))
     else:
@@ -90,7 +90,7 @@
         cur.execute(SQL_SELECT_TIME_ID, (a, b))
     row = cur.fetchone()
     if row: return row[0]
-    idx = next_id(cur, "time_intervals", oracle)
+    idx = next_id(cur, "time_intervals")
     if oracle:
         cur.execute(SQL_INSERT_TIME_ID_ORA, (idx, a, b))
     else:
--- a/flys-backend/doc/schema/oracle-drop-spatial.sql	Wed Mar 13 16:39:08 2013 +0100
+++ b/flys-backend/doc/schema/oracle-drop-spatial.sql	Wed Mar 13 16:39:35 2013 +0100
@@ -73,3 +73,5 @@
 DROP TABLE fed_states;
 DROP TABLE axis_kinds;
 DROP TABLE boundary_kinds;
+DROP TABLE cross_section_track_kinds;
+DROP TABLE floodplain_kinds;
--- a/flys-backend/doc/schema/oracle-drop.sql	Wed Mar 13 16:39:08 2013 +0100
+++ b/flys-backend/doc/schema/oracle-drop.sql	Wed Mar 13 16:39:35 2013 +0100
@@ -29,6 +29,7 @@
 ALTER TABLE wst_columns DROP CONSTRAINT cWstColumnsWsts;
 ALTER TABLE wst_q_ranges DROP CONSTRAINT cWstQRangesRanges;
 ALTER TABLE wsts DROP CONSTRAINT cWstsRivers;
+ALTER TABLE wsts DROP CONSTRAINT cWstsWstKinds;
 DROP TABLE annotation_types;
 DROP TABLE annotations;
 DROP TABLE attributes;
@@ -57,6 +58,7 @@
 DROP TABLE wst_columns;
 DROP TABLE wst_q_ranges;
 DROP TABLE wsts;
+DROP TABLE wst_kinds;
 DROP SEQUENCE ANNOTATION_TYPES_ID_SEQ;
 DROP SEQUENCE ANNOTATIONS_ID_SEQ;
 DROP SEQUENCE ATTRIBUTES_ID_SEQ;

http://dive4elements.wald.intevation.org