Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2024-07-20-adapt-documentation_installation #331

Merged
merged 19 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions docs/.tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ source_lang = en
file_filter = i18n/<lang>/installation-guide.po
type = PO

[o:teksi:p:tww-docs:r:vm]
source_file = i18n/pot/vm.pot
source_lang = en
file_filter = i18n/<lang>/vm.po
type = PO

[o:teksi:p:tww-docs:r:user-guide]
source_file = i18n/pot/user-guide.pot
source_lang = en
Expand Down
Binary file modified docs/en/admin-guide/pgadmin/images/sql-query4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion docs/en/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Contents
user-guide/index
admin-guide/index
extensions-guide/index
vm/index
wincan2tww/index
tww_swmm/index
translation/index
Expand Down
55 changes: 34 additions & 21 deletions docs/en/installation-guide/database-initialization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,34 @@ In pgAdmin4

* Connect to the database server

* Create a new database with UTF8 encoding (e.g. `tww_prod`).
* Create a new database with UTF8 encoding (e.g. `tww_demo`).

.. _restore-demomodel:

Restore demo datamodel
^^^^^^^^^^^^^^^^^^^^^^
Create minimal roles and access
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. note:: The TWW roles are defined in the
+ `12_0_roles.sql <https://github.com/TWW/datamodel/blob/master/12_0_roles.sql>`_ (per cluster)
+ `12_1_roles.sql <https://github.com/TWW/datamodel/blob/master/12_1_roles.sql>`_ (per database)

`12_0_roles.sql` has to be run before restoring the demodata database.
`12_1_roles.sql` has to be run if you initialize your module with with the commandline.

An evolution of the roles management is in progress and will be available soon.

It is highly recommended to use these when using TWW in a production environment.

Copy paste and run the .sql files content in the query editor of pgAdmin (Tools > Query Tool).

.. _restore-datamodel-demodata:

Restore data model with demodata
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. warning:: Demodata only available as an INTERLIS file
The undeling procedure is now providing an empty datamodel with value lists.
The demodata is now only available in INTERLIS format but can be easily imported with the plugin IMPORT tool.


Restore the latest data model that also includes demo data:

Expand All @@ -31,7 +53,7 @@ Restore the latest data model that also includes demo data:

Back in pgAdmin :

* Right click the `tww_prod` database
* Right click the `tww_demo` database

* Click `Restore`

Expand All @@ -53,6 +75,10 @@ Back in pgAdmin :

If the Restore is failed and the detail reads something like "pg_restore: [archiver] unsupported version (1.13) in file header" or in German "pg_restore: [Archivierer] nicht unterstützte Version (1.13) im Dateikopf" try updating your PostgreSQL, see https://stackoverflow.com/questions/49064209/getting-archiver-unsupported-version-1-13-in-file-header-when-running-pg-r

.. note::

If the Restore failed and the detail reads something like "pg_restore: error: could not execute query: FEHLER: role »tww_viewer« does not exist then you have not created the minimal roles (see above)

* Close the Restoring-Window

* Right click the database and click `Refresh`
Expand All @@ -70,25 +96,12 @@ There are now 6 `schemas <https://teksi.github.io/wastewater/en/user-guide/layer
+ tww_sys
+ tww_vl


Create minimal roles and access
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. note:: The TWW roles are defined in the
+ `12_0_roles.sql <https://github.com/TWW/datamodel/blob/master/12_0_roles.sql>`_ (per cluster) and
+ `12_1_roles.sql <https://github.com/TWW/datamodel/blob/master/12_1_roles.sql>`_ (per database) files.


It is recommended to use these when using TWW in a production environment.

Copy paste and run the two .sql one after the other in the query editor of pgAdmin (Tools > Query Tool).

Empty data model
^^^^^^^^^^^^^^^^

You also have the option to restore the latest empty data model (no demo data).

* Download the data model by going to https://github.com/teksi/wastewater/releases/latest
* Download the data model by going to https://github.com/teksi/wastewater/releases
and by downloading the latest `tww_vx.y.z_structure_with_value_lists.sql`.

.. note::
Expand All @@ -111,7 +124,7 @@ You also have the option to restore the latest empty data model (no demo data).
set /p password="Please enter the password for user postgres? "

set port=5432
set PATH=%PATH%;C:\Program Files\PostgreSQL\12\bin
set PATH=%PATH%;C:\Program Files\PostgreSQL\15\bin
set PGPASSWORD=%password%

createdb -U postgres -p %port% %db%
Expand Down Expand Up @@ -143,7 +156,7 @@ You also have the option to restore the latest empty data model (no demo data).

You are free to choose any database name.

* Update privileges for the tww_od, tww_sys, tww_vl, tww_network, tww_import, tww_swmm schema as described in the chapter `Create minimal roles and access`.
* Update privileges for the tww_od, tww_sys, tww_vl, tww_network, tww_import, tww_swmm schema as described in the chapter `Create minimal roles and access`.


Generate the data model under Linux
Expand Down
Binary file modified docs/en/installation-guide/images/demodata-restore.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/en/installation-guide/server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Required Software
Server installation
~~~~~~~~~~~~~~~~~~~

* Install PostgreSQL (>=15.1)
* Install PostgreSQL (>=15)

* `Download page <http://www.postgresql.org/download>`_

Expand Down
13 changes: 7 additions & 6 deletions docs/en/installation-guide/workstation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Alternative: put your password directly into the ``pg_service.conf`` (on Windows
Install QGIS
------------

* Minimum requirement 3.4
* Minimum requirement 3.34.8

* We recommend using the latest master build (called qgis-dev on Windows)
which often offers a better experience in combination with TWW.
Expand All @@ -107,7 +107,7 @@ Install TWW plugin

Plugin requirements:

- `networkx <https://pypi.org/project/networkx/>`_ >= 2.1
- `networkx <https://pypi.org/project/networkx/>`_ >= 3.3

You can install them on Debian based systems with::

Expand Down Expand Up @@ -148,22 +148,23 @@ TWW uses a data historization process. The ``pg history viewer`` `plugin <http:/
Install the demo data
---------------------

as described `here <https://tww.github.io/docs/installation-guide/database-initialization.html#restore-demo-datamodel>`_
as described `here <https://tww.github.io/docs/installation-guide/database-initialization.html#restore-datamodel-demodata>`_

Install the demo project
------------------------

* Download from https://github.com/TWW/tww/releases/latest the tww.zip
* Download from https://github.com/TWW/tww/releases the qgs project file and its translations
project-translations.zip

* Extract the file

* If you leave the tww_[language].qm files in the same directory as the tww.qgs file and start QGIS with one of these languages, your tww-project will be translated to that langue when you start the project. E.g. you start tww.qgs with a QGIS Installation that is set to German, then the tww.qgs project will appear in German.
* If you leave the teksi_wastewater_[language].qm files in the same directory as the teksi_wastewater.qgs file and start QGIS with one of these languages, your project will be translated to that langue when you start the project. E.g. you start teksi_wastewater.qgs with a QGIS Installation that is set to German, then the teksi_wastewater.qgs project will appear in German.

.. note:: You need to explicitly set the language in QGIS in settings. If QGIS is configured to take the system language, the TWW translation is not loaded.

.. figure:: images/tww_project_qm_language_files.jpg

* Open `project/tww.qgs` with QGIS
* Open `project-translations/teksi_wastewater.qgs` with QGIS
* When you save that project it will keep it's language and it cannot be changed in the same way.


Expand Down
38 changes: 0 additions & 38 deletions docs/en/vm/about.rst

This file was deleted.

Binary file removed docs/en/vm/images/001_qwc.png
Binary file not shown.
Binary file removed docs/en/vm/images/vm_demo.jpg
Binary file not shown.
16 changes: 0 additions & 16 deletions docs/en/vm/index.rst

This file was deleted.

37 changes: 0 additions & 37 deletions docs/en/vm/install.rst

This file was deleted.

29 changes: 0 additions & 29 deletions docs/en/vm/server.rst

This file was deleted.