Skip to content
This repository has been archived by the owner on Sep 14, 2021. It is now read-only.

Docker #2

Open
simonikj opened this issue Mar 31, 2020 · 4 comments
Open

Docker #2

simonikj opened this issue Mar 31, 2020 · 4 comments

Comments

@simonikj
Copy link

Dear developers,
I´m trying to run nntool in docker containers in our test environment. I have followed instructions in support/docker folder, but I have some issues. After creating docker images with graddle wrapper and after docker compose build I have started containers (with .yml files). After that I have ran the init.couchdb script. But after running this script I´m getting error - database doesn´t exist:

Poznámka 2020-03-19 105419

I also tried access to web pages on specific ports, but only one functional web interface was Kibana app on port 15601. On pages with json data is error „404 not found“ (ports 18080, 18081, 18083, 18084).

Poznámka 2020-03-31 132052

I´m new in docker and maybe I´m doing something wrong. Thank you in advance for your support. Unfortunatelly the official Berec training about nntool was postponed, so thats the reason why I´m asking you here.
Have a nice day!!

@bpucher
Copy link
Contributor

bpucher commented Apr 1, 2020

Dear simonikj,

to help you with this issue I've also followed the instructions from support/docker/README.adoc from scratch. After building the docker images and running docker-compose up for the first time, you can check via http://localhost:15984/_utils/ if the CouchDB databases have been created automatically (this will be done when starting controller- oder collector-service without running the init_couchdb script).

You get this error message because you try to access the relative URL /, where no controller is listening. Please keep in mind, that none of the collector-, controller- etc. services have a web interface, these only expose a REST API (at the path /api/v1/*) that is used by the apps and the website. You can use the following URL to verify if the controller-service is running: http://localhost:18080/api/v1/versions . Furthermore, you can access the Swagger-UI API interface via the URL http://localhost:18080/api/v1/documentation . These version and documentation API is also available for the other services.

Now back to the init_couchdb.sh script. After running this script, you can verify that it successfully inserted data by looking for {"ok": true} in the command output or visiting http://localhost:15984/_utils/#database/settings/_all_docs .

Now you are ready to start up the website or an app and point its controller-service configuration to your docker container. I hope this helps, please comment if you have additional questions.

Unfortunatelly the official Berec training about nntool was postponed, so thats the reason why I´m asking you here.

We are just about to coordinate for a new timeslot for the training.

@simonikj
Copy link
Author

simonikj commented Apr 6, 2020

Dear Benjamin,
thanks a lot for your reply. After the first docker-compose up I'm able to reach all URLs you've mentioned above. Before running the init.couchdb script I've checked couchdb web gui, and there are two databases created - "measurement" and "settings". Controller service is also running:
Poznámka 2020-04-06 103151_web
After runnig the init.couchdb script, in output was OK statements:
Poznámka 2020-04-06 103054_script
I've also checked the Couchdb databases, their sizes and numbers of docs have increased.
But in output I'm still seeing error, that database doesn't exist:
Poznámka 2020-04-06 102910
(after running the first docker-compose up, I've opened another terminal window and wait for all services to come up, then I've run the init.couchdb script in second terminal window).
I'm little bit confused about this "database doesn't exist" statement, because everything seems to be working. I will try to run the web or app.

Just one question, the web interface is part of the ias server? So I have to follow the instructions included in the ias folder?

Thanks a lot once again and have a nice day!!

@bpucher
Copy link
Contributor

bpucher commented Apr 6, 2020

Dear simonikj,

But in output I'm still seeing error, that database doesn't exist:

I actually don't think that this error is related to the documented configuration procedure. It may be a message, that was thrown before the databases have been created by the controller/collector, or, for example, that the users or replication database is missing (e.g. see apache/couchdb#1949).
To summarize, your CouchDB instance should be fine.

Just one question, the web interface is part of the ias server? So I have to follow the instructions included in the ias folder?

The ias* folders contain code related to the IAS (internet access speed, "speedtest") module. These modules are used from the app, website and desktop app modules.
You can find the website inside the nntool-typescript folder (https://github.com/net-neutrality-tools/nntool/tree/master/nntool-typescript). After running npm i, followed by npm start you should be able to start the website on localhost:4200. Additional documentation is provided in the README file in the nntool-typescript folder.

@simonikj
Copy link
Author

simonikj commented Apr 8, 2020

Dear Benjamin,
thank you very much for your support. I have sucessfully start up the website and everything seems to be working.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants