MapStore2 icon indicating copy to clipboard operation
MapStore2 copied to clipboard

Externalize localConfig.json variables on dev (qa and prod)

Open offtherailz opened this issue 4 years ago • 12 comments

Description

List of activities to be performed in order to clean up configuration and leverage the data_dir feature

  • [ ] remove references authkey to gs-stable (this repo)
    • [ ] remove authkey rule from web/client/configs/localConfig.json
  • [x] investigate how mapstore product adapts if no catalog is available (map viewer, dashboard editor)
    • [x] it works by providing an empty ui that at leas one must be added if one wants to use the services
  • [ ] remove references to DEV REST services in proxy settings (this repo)
    • [ ] dev server now points to dev-mapstore..., remove this dependency, use localhost:8080 (build/buildConfig.js)
    • [ ] create a command to start both back-end and front-end for dev instance
  • [ ] update documentation about changes of product above
    • [ ] migration guidelines?
    • [ ] dev doc
    • [ ] update ReadMe.md
    • [ ] update training?
    • [ ] release procedure - remove parts concerning auth
  • [ ] Configure DEV to use data dir with patch files
    • [x] clean up db config and move it in data dir
    • [ ] prepare patch rule to set useCors urls for (gs-stable) in the datadir_dev/configs/localConfig.json.patch
    • [ ] prepare patch rule to apply authkey changes in the datadir_dev/configs/localConfig.json.patch
    • [x] Set other specific configs for open id auth
      • [x] mapstore-ovr.properties
      • [x] configs/localConfig.json.patch
  • [ ] Configure QA to use data dir with patch files
    • [x] clean up db config and move it in data dir
    • [ ] prepare patch rule to set useCors urls for (gs-stable) in the datadir_qa/configs/localConfig.json.patch
    • [ ] prepare patch rule to apply authkey changes in the datadir_qa/configs/localConfig.json.patch
  • [ ] Configure STABLE to use data dir with patch files
    • [x] clean up db config and move it in data dir
    • [ ] prepare patch rule to set useCors urls for (gs-stable) in the datadir_release/configs/localConfig.json.patch
    • [ ] prepare patch rule to apply authkey changes in the datadir_release/configs/localConfig.json.patch
  • [ ] when everything before is done version data_dir settings in https://github.com/geosolutions-it/mapstore-datadir in the three branches
    • [ ] DEV will match datadir_dev
    • [ ] QA will match datadir_qa
    • [ ] STABLE will match datadir_release

What kind of improvement you want to add? (check one with "x", remove the others)

  • [ ] Minor changes to existing features
  • [ ] Code style update (formatting, local variables)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [x] CI related changes
  • [x] Other... Please describe: infrastructure settings

Other useful information

offtherailz avatar Jul 29 '21 16:07 offtherailz

@offtherailz is a sync up with @randomorder expected for this?

tdipisa avatar Sep 13 '21 08:09 tdipisa

@offtherailz please put here a comment reporting the current state after the migrations to the new jenkins instance.

tdipisa avatar Jul 25 '22 14:07 tdipisa

Yes, actually dev, qa and stable are running on docker, and they all have data-directory configured. I updated the checkboxes so we can unblock this task.

offtherailz avatar Jul 25 '22 16:07 offtherailz

Excluding:

  • Backup / versioning of the data dir (that can be delegated to dev ops)
  • "Remove references for gs-stable to catalog" that needs to be investigated (and the points of configuration about it, and can be done in a separate issue

The rest of the work should be straight forward. We have only to pay attention to documentation and training, to align everything (for the next version, when released).

offtherailz avatar Jul 27 '22 08:07 offtherailz

@MV88 please setup a quick call with @offtherailz if you need some clarifications to proceed with this. Thank you so much.

tdipisa avatar Jul 27 '22 08:07 tdipisa

I splitted the issue parts to clarify what parts can be postpopned. You can create another issue, or if the investigation gets well keep it in this one.

offtherailz avatar Jul 27 '22 08:07 offtherailz

@tdipisa @offtherailz

as @randomorder told me dev and qa are sharing the same datadir location

AC

  • [ ] We need to have one datadir location per istance in order to accomplish some of the tasks expected in this issue

MV88 avatar Jul 27 '22 12:07 MV88

we want to split dev and qa datadirs on the demo instance @ibrahimcengizgeo

randomorder avatar Aug 03 '22 08:08 randomorder

Hi @randomorder , @tdipisa , We'd already split for release env. I split them for dev & qa environment now.

folder structure is:

/home drwxr-xr-x 4 root root 4.0K Jun 1 12:09 mapstore_release drwxr-xr-x 5 root root 4.0K Aug 3 10:45 mapstore drwxr-xr-x 5 root root 4.0K Aug 3 10:47 mapstore_dev drwxr-xr-x 5 root root 4.0K Aug 3 10:48 mapstore_qa

and docker run commands are with volumes:

for DEV:

docker run --name mapstore_dev --restart unless-stopped
-v /home/jenkins/server.xml:/usr/local/tomcat/conf/server.xml
-v /home/mapstore_dev:/usr/local/tomcat/datadir \

for QA:

docker run --name mapstore_qa --restart unless-stopped
-v /home/jenkins/server.xml:/usr/local/tomcat/conf/server.xml
-v /home/mapstore_qa:/usr/local/tomcat/datadir \

Now, you change what you want under /home/mapstore_dev or /home/mapstore_qa folder, and must deploy in order for the changes made to be affected. be informed.

ibrahimcengizgeo avatar Aug 03 '22 11:08 ibrahimcengizgeo

Thank you @ibrahimcengizgeo. @MV88 please check the above and let @ibrahimcengizgeo if something is still needed. Moving back to Ready.

tdipisa avatar Aug 03 '22 12:08 tdipisa

@tdipisa datadir on dev and qa are split and can be used to customize config over the two instances

MV88 avatar Aug 05 '22 16:08 MV88

@ElenaGallo @tdipisa for QA I have just enabled the config patch that changes the authkeyParamName from authkey to authkey-qa

MV88 avatar Aug 08 '22 09:08 MV88

Issue successfully backported.

marthamareal avatar Oct 11 '22 14:10 marthamareal