no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revisionNext revision | |||
— | doc:docker [2019/08/16 12:39] – [Setting up your own openEASE server] daniel86 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Setting up your own openEASE server ====== | ||
+ | This page collects information on the installation and usage of openEASE, a web-service based on [[http:// | ||
+ | You can follow the steps described here for any Ubuntu version that has docker independently of the Ubuntu version running inside of openEASE. | ||
+ | |||
+ | ===== Installing web-browser with WebGL support ==== | ||
+ | |||
+ | Firefox is by far the most tested browser. Packages in ubuntu repositories should work with KnowRob. | ||
+ | If you don't already have firefox installed, you can do so by calling: | ||
+ | sudo apt-get install firefox | ||
+ | |||
+ | Alternatively, | ||
+ | |||
+ | When the Browser is installed check that [[https:// | ||
+ | |||
+ | ===== Installing the docker daemon ===== | ||
+ | Install Docker following the instructions at https:// | ||
+ | |||
+ | After installation, | ||
+ | |||
+ | |||
+ | |||
+ | ===== Installing openEASE ===== | ||
+ | |||
+ | The next step is to clone the openEASE repository: | ||
+ | git clone https:// | ||
+ | |||
+ | |||
+ | ===== Setting up WebSocket authentication ===== | ||
+ | |||
+ | Clients can communicate with the openEASE webserver using SSL encryption. | ||
+ | For local testing you can generate a certificate with following commands: | ||
+ | cd ./ | ||
+ | ./ | ||
+ | |||
+ | **// | ||
+ | |||
+ | ===== Setting up experiment logs ===== | ||
+ | |||
+ | **NOTE: this is subject of change, experiment logs will be inserted differently soon (DB 08/19)** | ||
+ | |||
+ | Experiment logs can be downloaded via a public FTP server that is hosted in the network of | ||
+ | the university of Bremen. | ||
+ | The server can be accessed via following URL: ftp:// | ||
+ | The openEASE server requires experiments to be available in the local filesystem. | ||
+ | In order to download all experiments, | ||
+ | wget --mirror --no-host-directories -P episodes ftp:// | ||
+ | |||
+ | Finally, the server needs to know where the episodes are located in the local filesystem. | ||
+ | This is done using an environment variable. Add following line to your .bash.rc and | ||
+ | replace $PATH_TO_DOCKER with the corresponding path in your filesystem: | ||
+ | export OPENEASE_EPISODE_DATA=" | ||
+ | |||
+ | This directory is exposed to docker as data volume. The corresponding data volume container is called '' | ||
+ | Make sure the old data volume is deleted after modifying the episode path: | ||
+ | docker rm -f episode_data | ||
+ | The volume container is automatically created based on the environment variable next time you start the openEASE webserver. | ||
+ | |||
+ | ===== Setting up admin user ===== | ||
+ | |||
+ | The admin user is automatically created when the webserver starts for the first time. | ||
+ | The password is taken from an environment variable. Please add following environment variable to your .bashrc | ||
+ | and replace ' | ||
+ | export OPENEASE_ADMIN_PASSWORD=" | ||
+ | |||
+ | After you added the export to the .bashrc make sure to log-out and log-in again | ||
+ | (e.g., by restarting the terminal). | ||
+ | |||
+ | **// | ||
+ | |||
+ | |||
+ | ===== Selecting a ROS distribution ===== | ||
+ | |||
+ | openEASE depends on rosjava. There are ubuntu packages available for ROS **hydro** and **indigo**. | ||
+ | indigo is used by default, but you can change the ROS distribution by extending your environment: | ||
+ | export OPENEASE_ROS_DISTRIBUTION=" | ||
+ | |||
+ | ===== Setting up mesh repositories ===== | ||
+ | **NOTE: this is subject of change, meshes will be part of episodic memory soon (DB 08/19)** | ||
+ | |||
+ | Meshes can be downloaded from custom **git** or **svn** repositories. | ||
+ | This information must be included in the environment, | ||
+ | export OPENEASE_MESHES=" | ||
+ | export OPENEASE_MESHES=" | ||
+ | export OPENEASE_MESHES=" | ||
+ | export OPENEASE_MESHES=" | ||
+ | |||
+ | ===== Setting up remote login (optional) ===== | ||
+ | openEASE allows you to sign in via oAuth. | ||
+ | You have to register the openEASE app and acquire authentication and secret token from the service. | ||
+ | This information must be included in the environment: | ||
+ | export GITHUB_APP_ID " | ||
+ | export GITHUB_APP_SECRET " | ||
+ | export GOOGLE_APP_ID " | ||
+ | export GOOGLE_APP_SECRET " | ||
+ | export FACEBOOK_APP_ID " | ||
+ | export FACEBOOK_APP_SECRET " | ||
+ | export TWITTER_APP_ID " | ||
+ | export TWITTER_APP_SECRET " | ||
+ | |||
+ | ===== Setting up password recovery (optional) ===== | ||
+ | |||
+ | For production servers, you might want a working password recovery mechanism. | ||
+ | This requires a mail account that is used for sending the recovery mails. | ||
+ | Add two more environment variables to the .bash.rc: | ||
+ | export OPENEASE_MAIL_USERNAME=" | ||
+ | export OPENEASE_MAIL_PASSWORD=" | ||
+ | |||
+ | ===== Launching openEASE ===== | ||
+ | openEASE uses // | ||
+ | |||
+ | docker-compose up | ||
+ | | ||
+ | Then you can connect to the Web interface at https:// | ||
+ | |||
+ | ===== Setting up mongo server ===== | ||
+ | |||
+ | Mongo dumps are included in the episode data downloaded from the FTP. | ||
+ | This data can be imported into the mongo server using the administration | ||
+ | interface of the website. | ||
+ | Log in as admin user and select " | ||
+ | at the top of the page. | ||
+ | A table with a row for each experiment is shown then. Press the " | ||
+ | right most column in order to import the mongo logs for one of the experiments. | ||
+ | |||
+ | |||
+ | ===== Offline openEASE ===== | ||
+ | **NOTE: this is not supported as of 08/19, but the feature will be added again at a later time | ||
+ | ** | ||
+ | |||
+ | openEASE is a webapp and thus components may require active internet connection. | ||
+ | We try to keep our code offline compatible but since external libraries are used, | ||
+ | we can't ensure that all features are working without Internet connection. | ||
+ | We provide a special start script that -- additionally -- starts a dummy DNS server | ||
+ | in order to avoid timeouts when requesting DNS with no active Internet connection | ||
+ | (the dummy DNS server maps all domains to localhost). | ||
+ | |||
+ | Without active Internet connection, execute following call instead of calling ' | ||
+ | |||
+ | ./ | ||
+ | |||
+ | |||
+ | |||
+ | ===== Administration ===== | ||
+ | |||
+ | ==== PostgresDB === | ||
+ | |||
+ | Get a bash console in the postgres container | ||
+ | docker exec -it postgres_db bash | ||
+ | |||
+ | Start '' | ||
+ | psql --username=docker | ||
+ | |||
+ | Write SQL statements, e.g., add a column in the user table | ||
+ | ALTER TABLE public.user ADD column_name character varying(50) NOT NULL DEFAULT ''; | ||
+ | |||
+ | Or update text of the '' | ||
+ | UPDATE tutorial SET text=E' | ||
+ | |||
+ | ===== Troubleshooting ===== | ||
+ | |||
+ | ==== Permissions on / | ||
+ | |||
+ | You may run into permission problems when accessing / | ||
+ | This is due to an assumption that the //docker// group id is //999//. | ||
+ | In order to solve this problem you can: | ||
+ | * Manually change the group ID to //999// (preferred) | ||
+ | * Allow everyone to access docker.sock by executing following command: '' | ||
+ | |||
+ | ==== mongo address already in use ==== | ||
+ | |||
+ | Launching the // | ||
+ | |||
+ | No mongo_db container exists, creating a new one... | ||
+ | 7c67110c30f9350040298467ceaf5ab5acdf90a3ba39ad90f03934ff177c0846 | ||
+ | FATA[0000] Error response from daemon: Cannot start container | ||
+ | 7c67110c30f9350040298467ceaf5ab5acdf90a3ba39ad90f03934ff177c0846: | ||
+ | starting userland proxy: listen tcp 0.0.0.0: | ||
+ | |||
+ | This indicates that there is a mongo server running on the host machine. | ||
+ | With Ubuntu, you can stop the server by executing following command: | ||
+ | sudo service mongodb stop | ||
+ | | ||
+ | |||
+ | ==== Other docker problems ==== | ||
+ | |||
+ | In some situations it may help to start again with a clean docker installation. | ||
+ | This requires removing all containers and images. You can do that using following commands: | ||
+ | docker rm $(docker ps -a -q) | ||
+ | docker rmi $(docker images -q) | ||
+ | |||
+ | After that is done you have to begin from the start of this tutorial page again. |