SOS icon indicating copy to clipboard operation
SOS copied to clipboard

Docker container with example data

Open nuest opened this issue 4 years ago • 3 comments

Hi!

Is there an easy way to run an SOS container and have it include the small test data that is part of the demo deployment at http://sensorweb.demo.52north.org/52n-sos-webapp/client ? So, including the test procedures http://www.52north.org/test/procedure/<n> and dummy FOIs/observed properties?

nuest avatar Jun 08 '20 06:06 nuest

Hi,

you can run a SOS container by using the docker configuration files from the development bracnch:

https://github.com/52North/SOS/tree/develop/docker/default-config

and run the following command:

docker run -p 8080:8080 -v ./config:/etc/sos 52north/sos:latest

After the SOS has started you can execute the Batch - Example Data request in the test client to insert the test data you mentioned.

CarstenHollmann avatar Jun 10 '20 06:06 CarstenHollmann

Thanks for the help - that get's me a little bit further with the following Dockerfile:

# See https://github.com/52North/SOS/issues/842#issuecomment-641746547
FROM 52north/sos:5.1.0

RUN wget -O /etc/sos/configuration.json https://raw.githubusercontent.com/52North/SOS/develop/docker/default-config/configuration.json
RUN wget -O /etc/sos/datasource.properties https://raw.githubusercontent.com/52North/SOS/develop/docker/default-config/datasource.properties

Is this really different from having no configuration file? As per the readme, these files seem to be used as well when I don't mount anything.

However, I don't see the batch request. Do I need to enable transactional operations, maybe?

image

When opening http://localhost:8080/client?load=exampleData I get the error message

image

nuest avatar Jun 10 '20 08:06 nuest

The config file which is used in the last image (5.1.0) does not enable the transactional operations by default and the transactional security is activated.

Therefore, we have updated the config in https://github.com/52North/SOS/tree/develop/docker/default-config which has disabled transactional security and enabled transactional operations.

If you use the image without defining the local config files, you can access the admin interface wiht admin:password (fixed in the documentation), enable the operations and disable the transactionals security. Then you should see the transactional examples in the test client

CarstenHollmann avatar Jun 10 '20 13:06 CarstenHollmann