geosolutions-it / MapStore2-C028

Sistema Informativo Territoriale del Comune di Bolzano
Other
2 stars 8 forks source link

GS DATADIR Migration #119

Closed tdipisa closed 4 years ago

tdipisa commented 4 years ago

In order to allow the client to update all the GeoServer configurations connected to last developments about MS locales (see #89), we need to update the data directory in test environment by aligning it to the one in production: the data directory of the production GeoServer need to be copied from PROD to TEST (geoserver02). The client will provide all needed configuration in GeoServer TEST and finally the production environment will be updated with the new data directory of TEST.

The only blocker to this activity is that all coverages are located in the PROD data directory, therefore they should be moved outside in a different location (the preferred one is a new storage that can be mounted on both machines, PROD and TEST). The client will take care of:

At the end of the update process in TEST:

Once TEST is updated with the PROD data directory the activities to do are:

After this work the following actions in production are suggested (the client will take care of this):

randomorder commented 4 years ago

A few remarks to allow flawless datadir migration between environments:

Are they using the LDAP integration? we may haev to do something as well for that IF the configuration is different between the two environments

tdipisa commented 4 years ago

Below is a more detailed description of needd actions to perform by the Comune di Bolzano team after the GS data dir update in test environment.

Once TEST is updated with the PROD data directory the activities to do are:

  1. Update of the main SLD style to use the ENV variable with reference on the quartieri SLD the relevant parts to take into account are the following.

The Title tag used in legends

<sld:Title>
     <Localized lang="de">Zentrum-Bozner Boden-Rentsch</Localized>
     <Localized lang="it">CENTRO-PIANI-RENCIO</Localized>
</sld:Title>

The Label tag of text symbolizers used for labels in tiles (the Recode function is used to get the language code from the ENV variable present in getMaps requests)

<ogc:Function name="Recode">
    <ogc:Function name="env">
          <!-- This is the default value -->
      <ogc:Literal>mapstore_language</ogc:Literal>
      <ogc:Literal>it</ogc:Literal>
    </ogc:Function>
    <ogc:Literal>it</ogc:Literal>
    <ogc:PropertyName>DESCRIZ</ogc:PropertyName>
    <ogc:Literal>de</ogc:Literal>
    <ogc:PropertyName>DESCR_TD</ogc:PropertyName>
</ogc:Function>
  1. Removal of the other SLD styles no longer needed (_it, _de) with reference on the quartieri SLD, the styles to remove are quartiery_it and quartieri_de

  2. Configuration of the ENV parameter filter for all available tile layers (this is needed to generate cached tiles in GWC according to the language specified in the new query parameter for GetMap requests _ENV=mapstorelanguage:it/de).

For each Tile Layer the parameter filter must be properly set, below is the example of the Ambiente:quartieri layer in test environment (Tile Caching section):

image

  1. Configuration of all existing MS maps to use the ENV locale for GetMap requests (catalog + layer settings). Existing maps in MapStore must be configured to use the new locale query parameter for layers already present in the map itself or new layers added from the catalog tool.

As soon as the Abilita stili di livello localizzati property is checked inside the Catalog source advanced settings, the locale query parameter will be automatically used for all layers added from that source

image

For existing layers already published in the map, it is possible to enable the use the locale query parameter by opening the layer settings

image

randomorder commented 4 years ago

I updated the Test geoserver datadir aligning it with the one from PROD with a few adjustments. I documented the procedure in the GDoc for geoserv02