From 19e76d05dae45761f03c907e8a4945ce6d096c54 Mon Sep 17 00:00:00 2001 From: micaelgallego Date: Sun, 29 Mar 2020 01:10:10 +0100 Subject: [PATCH] Rename docker-compose services --- .../docker-compose.yml | 7 +- .../docker/openvidu-docker-compose/readme.md | 71 +++++++++++++------ 2 files changed, 52 insertions(+), 26 deletions(-) diff --git a/openvidu-server/docker/openvidu-docker-compose/docker-compose.yml b/openvidu-server/docker/openvidu-docker-compose/docker-compose.yml index c0f2fc6a..e19617d8 100644 --- a/openvidu-server/docker/openvidu-docker-compose/docker-compose.yml +++ b/openvidu-server/docker/openvidu-docker-compose/docker-compose.yml @@ -6,7 +6,6 @@ services: # the .env file with the necessaries variables. openvidu-server: image: openvidu/openvidu-server:2.13.0-beta1 - entrypoint: ["java", "-jar", "/openvidu-server.jar"] restart: on-failure network_mode: host volumes: @@ -34,12 +33,12 @@ services: - KMS_MAX_PORT=57000 - GST_DEBUG=${KMS_DEBUG_LEVEL:-3,Kurento*:4,kms*:4,sdp*:4,webrtc*:4,*rtpendpoint:4,rtp*handler:4,rtpsynchronizer:4,agnosticbin:4} - redis-db: + redis: image: redis:5.0.7 restart: on-failure network_mode: host - openvidu-coturn: + coturn: image: openvidu/openvidu-coturn:1.0.0-beta1 restart: on-failure network_mode: host @@ -51,7 +50,7 @@ services: - MIN_PORT=57001 - MAX_PORT=65535 - openvidu-proxy: + nginx: image: openvidu/openvidu-proxy:1.0.0-beta1 restart: on-failure network_mode: host diff --git a/openvidu-server/docker/openvidu-docker-compose/readme.md b/openvidu-server/docker/openvidu-docker-compose/readme.md index f17fe981..d47ecdca 100644 --- a/openvidu-server/docker/openvidu-docker-compose/readme.md +++ b/openvidu-server/docker/openvidu-docker-compose/readme.md @@ -7,13 +7,11 @@ This document describes how to deploy OpenVidu CE alongside OpenVidu Call (a bas Services installed following these instructions are: - **OpenVidu Server (openvidu-server)**: This is the brain of OpenVidu platform. The signaling plane. - **Kurento Media Server (kms)**: This is the hearth of the OpenVidu platform. In charge of media plane. -- **TURN Server (openvidu-coturn)**: Service used to allow media communications with browsers in certain networks. -- **Redis (redis-db)**: Database to manage users in TURN server. -- **Nginx (openvidu-proxy)**: A reverse proxy used to configure SSL certificate and to allow both Openvidu Server and the Application in the standard https port (443). +- **Coturn (coturn)**: Service used to allow media communications with browsers in certain special networks. +- **Redis (redis)**: Database to manage users in Coturn server. +- **Nginx (nginx)**: A reverse proxy used to configure SSL certificate and to allow both Openvidu Server and the Application in the standard https port (443). - **Videoconference Application (app)**: A videoconference application deployed for demo porpouses. This application can be easily unistalled or changed by other application. -> TODO: Change the service names for generic ones: openvidu-coturn > coturn, redis-db > redis, openvidu-proxy > nginx. - ## 1. Prerequisites You will need docker and docker-compose installed in your linux distribution. In theory, you can use any modern linux distribution, but we have tested with Ubuntu 18.04. @@ -117,20 +115,44 @@ To download and start the services (OpenVidu platform and the application) you c `$ docker-compose up -d` -Then, all services will be downloaded (only the first time) and executed. +Then, all services will be downloaded (only the first time) and executed. -The services will be started when you see this output in the shell: +The services will start its execution when you see this output in the shell: ``` -Creating openvidu-docker-compose_openvidu-coturn_1 ... done +Creating openvidu-docker-compose_coturn_1 ... done Creating openvidu-docker-compose_app_1 ... done Creating openvidu-docker-compose_kms_1 ... done -Creating openvidu-docker-compose_openvidu-proxy_1 ... done -Creating openvidu-docker-compose_redis-db_1 ... done +Creating openvidu-docker-compose_nginx_1 ... done +Creating openvidu-docker-compose_redis_1 ... done Creating openvidu-docker-compose_openvidu-server_1 ... done ``` -Then you can visit https:/// and the application will appear. If get any error, please retry in a few seconds as it is possible that services are still starting. +Then, you should check openvidu-server logs to verify if all is configured and working as expected with the following command: + +``` +$ docker-compose logs -f openvidu-server +``` + +When OpenVidu Platform is ready you will see this message: +``` +---------------------------------------------------- + + OpenVidu Platform is ready! + --------------------------- + + * OpenVidu Server: https://server/ + + * OpenVidu Dashboard: https://server/dashboard/ + +---------------------------------------------------- +``` + +You can press `Ctrl+C` to come back to the shell. + +Then you can open OpenVidu Dashboard to verify if videoconference is working as expected. The user is `OPENVIDUAPP` and the password what you have configured in `.env` file. + +If videoconference application is started, it is available in https://server/ ### Stop services @@ -138,9 +160,7 @@ To stop the application exec this command: `docker-compose stop` -### How to operate the services - -#### Change configuration +### Change configuration To change the configuration follow this steps: * Stop the services: `$ docker-compose stop` @@ -149,20 +169,27 @@ To change the configuration follow this steps: > TODO: Review that changing domain name with CERTIFICATE_TYPE=letsencrypt regenerates the certificate. +### What to do if OpenVidu is not working + #### Show service logs -If you want to see logs of all services execute this command: - -`$ docker-compose logs -f` - -If you only want to see the logs of a service execute any of the following commands: +Take a look to service logs to see what happen. First, see openvidu-server logs: ``` $ docker-compose logs -f openvidu-server +``` + +Then, you can see all service logs togheter: + +`$ docker-compose logs -f` + +Or you can inspect one by one the other services: + +``` $ docker-compose logs -f kms -$ docker-compose logs -f openvidu-proxy -$ docker-compose logs -f openvidu-coturn -$ docker-compose logs -f redis-db +$ docker-compose logs -f nginx +$ docker-compose logs -f coturn +$ docker-compose logs -f redis $ docker-compose logs -f app ```