Commit f3fc07fa authored by Robert Butora's avatar Robert Butora
Browse files

README update

parent f6ac918c
Loading
Loading
Loading
Loading
+9 −20
Original line number Diff line number Diff line
@@ -23,34 +23,32 @@ To build the container image:

    podman build --tag vlkb-sedmods -f ./Dockerfile

It is suggested to have a dedicated user to run this in production.
It is suggested to have a dedicated user to run in production.

Once the podman image is ready and the two directories are in place, run:
The service expects the SED models in /srv/sed-data/sim_total.dat
And to run:

    podman run -dt \
        --name sedmod-test \
        --rm \
        -v $PWD/sed-data:/sed-data:z \
        -v $PWD/sed-data:/srv/sed-data:z \
        -v $PWD/wsgi-scripts:/var/www/wsgi-scripts:z \
        -p 8080:80 vlkb-sedmods

where the name is optional and of your choice and the left-hand side of
the _:_ in the _-v_ arguments must point to the actual location of the
two folders to be mounted in the container.

In the example the _-v_ arguments are considered such as the command is
In this example the _-v_ arguments are considered such as the command is
run from the local working copy and the HDF5 SED Models file is actually
within the `sed-data` folder.

Also, _-p_ maps the 80 port of the container onto the 8080 port on the
host server, this must be changed if the host's 8080 is already in use.


### Service endpoints

The service implementation is descripbed [here](README_implementation.md).

Then the service presents the _/searchd_ endpoint. Arguments are separated
by underscore and their meaning is as in this C++ code snipped:
Then the service presents the **/searchd** endpoint. Arguments are separated
by underscore and their meaning is indicated in this C++ code snipped:

```cpp
 QString args = QString("'%1_%2_%3_%4_%5_%6_%7_0_%8_%9'")
@@ -67,17 +65,8 @@ by underscore and their meaning is as in this C++ code snipped:

Access the service by: 

    curl localhost:8080/searchd/?arg1_arg2_...-_arg9 > output.json
    curl localhost:8080/searchd/?arg0_arg1_...-_arg9 > output.json

Response is in JSON format.

### Network Proxy
The service can be made visible on a specific context path in the host
server's http using the httpd _ProxyPass_ directive, like
  
    <Location "/sedmods">
        ProxyPass "http://localhost:8080"
    </Location>
where _/sedmods_ is an example and the _8080_ port depends on the passed
parameters to the podman run command (see above).
+11 −0
Original line number Diff line number Diff line
@@ -49,6 +49,17 @@ with the same usage of the single query one.
## SED Models HDF5 file
This is preserved, currently, on the INAF ICT Owncloud instance.

### Network Proxy
The service can be made visible on a specific context path in the host
server's http using the httpd _ProxyPass_ directive, like

    <Location "/sedmods">
        ProxyPass "http://localhost:8080"
    </Location>

where _/sedmods_ is an example and the _8080_ port depends on the passed
parameters to the podman run command (see above).

## Dependencies

On the host: