Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:docker:add-dataset [2014/10/14 16:06] – [Accessing your new experiment] admin | doc:docker:add-dataset [2014/12/07 08:30] (current) – admin | ||
---|---|---|---|
Line 19: | Line 19: | ||
The recommended procedure is to first test your data and to develop your queries locally, without using the docker virtualization environment. Once things work there, you can add your information to the right repositories and rebuild the docker containers so that your data is available in the system. | The recommended procedure is to first test your data and to develop your queries locally, without using the docker virtualization environment. Once things work there, you can add your information to the right repositories and rebuild the docker containers so that your data is available in the system. | ||
+ | |||
==== Develop and test locally (without docker) ==== | ==== Develop and test locally (without docker) ==== | ||
Line 30: | Line 31: | ||
| | ||
This will give you the identical terminal as the Prolog shell in the public Web interface, but you can use tools such as the [[http:// | This will give you the identical terminal as the Prolog shell in the public Web interface, but you can use tools such as the [[http:// | ||
+ | |||
+ | If you plan to use your own data in a MongoDB database, debugging becomes much easier if you first make sure the queries work from the Java-based MongoDBInterface (in knowrob_mongo), | ||
+ | |||
==== Add your own KnowRob package ==== | ==== Add your own KnowRob package ==== | ||
Line 37: | Line 41: | ||
== Required actions: == | == Required actions: == | ||
Add your KnowRob package to your fork of knowrob_addons and send a pull request. | Add your KnowRob package to your fork of knowrob_addons and send a pull request. | ||
+ | |||
+ | |||
+ | |||
==== Add OWL files and images ==== | ==== Add OWL files and images ==== | ||
- | The OWL files with the logged actions and plan events are the central entry point for the reasoning procedures. They can automatically be generated using the logging infrastructure described [[http:// | + | The OWL files with the logged actions and plan events are the central entry point for the reasoning procedures. They can automatically be generated using the logging infrastructure described [[http:// |
These OWL files are stored in the [[https:// | These OWL files are stored in the [[https:// | ||
Line 45: | Line 52: | ||
== Required actions: == | == Required actions: == | ||
Add your OWL files and images to a new subfolder in your fork of knowrob_data and send a pull request. | Add your OWL files and images to a new subfolder in your fork of knowrob_data and send a pull request. | ||
+ | |||
+ | |||
+ | |||
==== Add MongoDB data ==== | ==== Add MongoDB data ==== | ||
- | Currently, the MongoDB data is stored in a database that is shared among all experiments. This means we have to log into the server and import your data into this database. | + | Currently, the MongoDB data is stored in a database that is shared among all experiments. This means we have to log into the server and import your data into this database. Have a look [[/ |
== Required actions: == | == Required actions: == | ||
Line 57: | Line 67: | ||
==== Adding a query library ==== | ==== Adding a query library ==== | ||
- | The entries in the query library, that is commonly in the lower left corner of the interface, | + | The entries in the query library are generated from a JSON file of the following format. Each entry in the ' |
<code javascript> | <code javascript> | ||
Line 74: | Line 84: | ||
</ | </ | ||
- | These query library files define the entry point into your dataset, including which files and which KnowRob packages are to be loaded. They should be executable starting with a freshly launched knowrob_roslog_launch launch file. This means that the first entries in this query list usually initialize the system in the way you need it, e.g. load packages, parse OWL files etc. Currently, these queries libraries are also used to select which experiment is to be loaded: The URL http:// | + | These query library files define the entry point into your dataset, including which files and which KnowRob packages are to be loaded. They should be executable starting with a freshly launched knowrob_roslog_launch launch file. This means that the first entries in this query list usually initialize the system in the way you need it, e.g. load packages, parse OWL files etc. Currently, these queries libraries are also used to select which experiment is to be loaded: The URL http:// |
== Required actions: == | == Required actions: == | ||
Line 96: | Line 106: | ||
# build is finished. Check the build details tab here: | # build is finished. Check the build details tab here: | ||
# https:// | # https:// | ||
- | docker pull knowrob/ | + | docker pull knowrob/ |
+ | docker rm knowrob_data | ||
+ | docker run --name knowrob_data knowrob/ | ||
| | ||
# if you have added your own query library: | # if you have added your own query library: | ||
- | cd ~/docker/webapp | + | cd ~/docker/webrob |
docker build -t knowrob/ | docker build -t knowrob/ | ||
</ | </ | ||
Line 107: | Line 119: | ||
After rebuilding the containers, you can start the system locally and see if you can access your data. The // | After rebuilding the containers, you can start the system locally and see if you can access your data. The // | ||
- | | + | |
- | You should now be able to login to the system at http:// | + | You should now be able to login to the system at http:// |
Line 117: | Line 129: | ||
==== Debugging the containerized setup ==== | ==== Debugging the containerized setup ==== | ||
+ | If you have tested your code with a ' | ||
+ | |||
+ | * The terminal in which you executed the ' | ||
+ | * To inspect the output of the KnowRob container, you can use the [[https:// | ||
+ | * If you make changes to the query library and it is not reloaded, this may be related to the browser cache. Try opening that file directly (e.g. http:// | ||
+ | |||
+ | |||
+ | ==== Deploying your code to the server ==== | ||
+ | |||
+ | When everything works fine on your computer, you are ready to deploy the containers to the server at data.open-ease.org. | ||
+ | |||
+ | Please be careful with updates of the server -- only deploy well-tested code and refrain from deleting other people' | ||
+ | |||
+ | The following steps need to be performed after logging into the server: | ||
+ | - Import your data into the MongoDB on the server as described above. You will need to copy your-tf.json to the server and run the mongoimport program from there. | ||
+ | - Rebuild the containers you have changed as you have done it on your local computer (see description above) | ||
+ | - The startup script is running in a [[http:// | ||
+ | <code bash> | ||
+ | # connect to the server | ||
+ | ssh data.open-ease.org | ||
+ | |||
+ | # resume the screen session | ||
+ | screen -r | ||
+ | |||
+ | # stop the script with CRTL+C | ||
+ | |||
+ | # start the script again | ||
+ | ./ | ||
+ | |||
+ | # detach the screen session using CTRL+A+D | ||
+ | </ |