Skip to content

Commit

Permalink
more docs and fix docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
maaikelimper committed Sep 20, 2023
1 parent 060c8f9 commit 2c05a5d
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 24 deletions.
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ services:
#image: wis2box-webapp:main
image: ghcr.io/wmo-im/wis2box-webapp:latest
env_file:
- default.env
- dev.env
- wis2box.env

# wis2box-ui-admin:
# container_name: wis2box-ui-admin
Expand Down
23 changes: 22 additions & 1 deletion docs/source/user/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ wis2box requires the following prior to installation:
Docker Engine, 20.10.14 or higher
Docker Compose, 2.0 or higher

The following commands be used to setup the required software on Ubuntu 20.04 LTS:
The following commands be used to setup the required software on Ubuntu (20.04 LTS, 22.04 LTS) systems:

(please execute the commands one by one, and do not copy-paste the entire block)

.. code-block:: bash
Expand Down Expand Up @@ -90,8 +92,27 @@ Switch to this user and check that you can run docker hello-world:

.. code-block:: bash
sudo su - $USER
docker run hello-world
You should see the following output:

.. code-block:: bash
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
(...)
Once you have verified these requirements, go to :ref:`setup` for a step-by-step guide to install and configure your wis2box.

.. _`Docker`: https://docs.docker.com/get-started/overview
Expand Down
7 changes: 4 additions & 3 deletions docs/source/user/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ wis2box implements the core WIS2 requirements of a WIS2 Node:
* MQTT broker
* HTTP endpoint to enable data download

Additional services included in wis2box include:
Additional services included in wis2box:

* Customizable plugins to transform input data
* API exposing data in GeoJSON using `pygeoapi`_
* Customizable plugins to transform input data: default plugins for synop2bufr, csv2bufr and bufr2geojson
* API using `pygeoapi`_ : to enable interaction with the wis2box-backend and exposing data in GeoJSON
* Web application to enable configuration of station metadata and posting SYNOP and CSV data
* Monitoring functions using `Prometheus`_ and `Grafana`_
* Data visualization through the wis2box user interface

Expand Down
20 changes: 4 additions & 16 deletions docs/source/user/public-services-setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,13 @@ Public services setup

To share your data with the WIS2 network, you need to expose some of your wis2box services to the Global Services:

* The Global Cache needs to be able to access to your HTTP endpoint to download data published by your wis2box instance
* The Global Broker needs to be able to subscribe to your MQTT endpoint to receive WIS2 notifications published by your wis2box instance
* The Global Cache needs to be able to access to your HTTP endpoint at port 80 to download data published by your wis2box instance
* The Global Broker needs to be able to subscribe to your MQTT endpoint at port 1883 to receive WIS2 notifications published by your wis2box instance

SSL
^^^

To enable HTTPS and MQTTS on your wis2box you can run wis2box with the option `--ssl`:

.. code-block:: bash
python3 wis2box-ctl.py --ssl start
When running wis2box with SSL, you have to set additional environment variables in your wis2box.env defining the location of your SSL certificate and private key:

.. code-block:: bash
WIS2BOX_SSL_CERT=/etc/letsencrypt/live/example.wis2box.io/fullchain.pem
WIS2BOX_SSL_KEY=/etc/letsencrypt/live/example.wis2box.io/privkey.pem
It is recommended to use a reverse proxy to route HTTP and MQTT traffic from/to your wis2box, and to enable TLS (HTTPS/MQTTS) on your wis2box.

Please remember to update the ``WIS2BOX_URL`` and ``WIS2BOX_API_URL``environment variable after enabling SSL, ensuring your URL starts with ``https://``.

Expand All @@ -31,7 +20,7 @@ Please note that after changing the ``WIS2BOX_URL`` and ``WIS2BOX_API_URL`` envi
.. code-block:: bash
python3 wis2box-ctl.py stop
python3 wis2box-ctl.py --ssl start
python3 wis2box-ctl.py start
After restarting wis2box, repeat the commands for adding your dataset and publishing your metadata, to ensure the URLs are updated accordingly:

Expand All @@ -55,7 +44,6 @@ wis2box runs a local nginx container allowing access to the following HTTP based
Storage (incoming data) (minio:wis2box-incoming),`WIS2BOX_URL/wis2box-incoming`
Storage (public data) (minio:wis2box-public),`WIS2BOX_URL/data`


You can edit ``nginx/nginx.conf`` to control which services are exposed through the nginx-container include in your stack.

You can edit ``docker-compose.override.yml`` to change the port on which the ``web-proxy`` service exposes HTTP on the localhost.
Expand Down
15 changes: 14 additions & 1 deletion docs/source/user/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,22 @@ Run the following command to create the initial configuration files for your wis
.. note::

The ``wis2box-create-config.py`` program will ask for a directory to store the configuration files.
The ``wis2box-create-config.py`` script will ask for a directory to store the configuration files.
Please provide the **absolute** path to the directory where you want to store the configuration files, for example ``/home/wis2box-user/wis2box-data``.
This directory will be mapped to ``/data/wis2box`` **inside** the wis2box-management container.

The script will also ask for the URL of your wis2box. Please provide the public URL of your wis2box, for example ``http://mywis2box.example.com``.
For testing purpose you can also provide the internal IP address you use to access the host, for example ``http://192.168.0.3`` and you change the URL in configuration files later.

The script will propose to automatically create passwords for WIS2BOX_STORAGE_PASSWORD and WIS2BOX_BROKER_PASSWORD.
These passwords are for internal use only within the wis2box, and it is recommended to accept the randomly generated passwords.

The script will ask for 3-letter ISO country code for your wis2box. Please provide the 3-letter ISO country code for your country, for example ``FRA``.
It will also ask for a center-id. Please provide a string that identifies your organization and does not use spaces or special characters, for example ``meteofrance``.
These fields will be automatically converted to lowercase.

The remaining questions will be used in the creation the discovery metadata files for the ``synop`` and ``temp`` datasets.

Discovery metadata
------------------

Expand Down
2 changes: 1 addition & 1 deletion wis2box-create-config.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ def main():
country_code, centre_id = get_country_and_centre_id()

print("*" * 80)
print("Creating initial configuration for surface and upper-air data.")
print("Creating discovery metadata files for surface and upper-air data.")
print("*" * 80)

create_metadata_files(config_dir, country_code, centre_id)
Expand Down

0 comments on commit 2c05a5d

Please sign in to comment.