Remove from enterprise openvidu-call. Kibana and Elasticsearch not present in docker-compose.yml, so there is no need to scale=0 the service.

pull/721/head
cruizba 2022-05-05 18:19:44 +02:00
parent 279da4eeaf
commit d7aa64fe91
3 changed files with 2 additions and 74 deletions

View File

@ -1,26 +0,0 @@
version: '3.1'
services:
# --------------------------------------------------------------
#
# Change this if your want use your own application.
# It's very important expose your application in port 5442
# and use the http protocol.
#
# Default Application
#
# Openvidu-Call Version: 2.21.0
#
# --------------------------------------------------------------
app:
image: openvidu/openvidu-call:2.21.0
restart: on-failure
network_mode: host
environment:
- SERVER_PORT=5442
- OPENVIDU_URL=http://localhost:5443
- OPENVIDU_SECRET=${OPENVIDU_SECRET}
- CALL_OPENVIDU_CERTTYPE=${CERTIFICATE_TYPE}
logging:
options:
max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"

View File

@ -80,10 +80,6 @@ new_ov_installation() {
--output "${OPENVIDU_FOLDER}/.env" || fatal_error "Error when downloading the file '.env'" --output "${OPENVIDU_FOLDER}/.env" || fatal_error "Error when downloading the file '.env'"
printf '\n - .env' printf '\n - .env'
curl --silent ${DOWNLOAD_URL}/openvidu-server/deployments/enterprise/master-node/docker-compose.override.yml \
--output "${OPENVIDU_FOLDER}/docker-compose.override.yml" || fatal_error "Error when downloading the file 'docker-compose.override.yml'"
printf '\n - docker-compose.override.yml'
curl --silent ${DOWNLOAD_URL}/openvidu-server/deployments/enterprise/master-node/docker-compose.yml \ curl --silent ${DOWNLOAD_URL}/openvidu-server/deployments/enterprise/master-node/docker-compose.yml \
--output "${OPENVIDU_FOLDER}/docker-compose.yml" || fatal_error "Error when downloading the file 'docker-compose.yml'" --output "${OPENVIDU_FOLDER}/docker-compose.yml" || fatal_error "Error when downloading the file 'docker-compose.yml'"
printf '\n - docker-compose.yml' printf '\n - docker-compose.yml'
@ -205,7 +201,6 @@ upgrade_ov() {
ROLL_BACK_FOLDER="${OPENVIDU_PREVIOUS_FOLDER}/.old-${OPENVIDU_PREVIOUS_VERSION}" ROLL_BACK_FOLDER="${OPENVIDU_PREVIOUS_FOLDER}/.old-${OPENVIDU_PREVIOUS_VERSION}"
TMP_FOLDER="${OPENVIDU_PREVIOUS_FOLDER}/tmp" TMP_FOLDER="${OPENVIDU_PREVIOUS_FOLDER}/tmp"
ACTUAL_FOLDER="${PWD}" ACTUAL_FOLDER="${PWD}"
USE_OV_CALL=$(grep -E '^ image: openvidu/openvidu-call:.*$' "${OPENVIDU_PREVIOUS_FOLDER}/docker-compose.override.yml" | tr -d '[:space:]')
printf "\n Creating rollback folder '%s'..." ".old-${OPENVIDU_PREVIOUS_VERSION}" printf "\n Creating rollback folder '%s'..." ".old-${OPENVIDU_PREVIOUS_VERSION}"
mkdir "${ROLL_BACK_FOLDER}" || fatal_error "Error while creating the folder '.old-${OPENVIDU_PREVIOUS_VERSION}'" mkdir "${ROLL_BACK_FOLDER}" || fatal_error "Error while creating the folder '.old-${OPENVIDU_PREVIOUS_VERSION}'"
@ -240,10 +235,6 @@ upgrade_ov() {
--output "${TMP_FOLDER}/.env" || fatal_error "Error when downloading the file '.env'" --output "${TMP_FOLDER}/.env" || fatal_error "Error when downloading the file '.env'"
printf '\n - .env' printf '\n - .env'
curl --silent ${DOWNLOAD_URL}/openvidu-server/deployments/enterprise/master-node/docker-compose.override.yml \
--output "${TMP_FOLDER}/docker-compose.override.yml" || fatal_error "Error when downloading the file 'docker-compose.override.yml'"
printf '\n - docker-compose.override.yml'
curl --silent ${DOWNLOAD_URL}/openvidu-server/deployments/enterprise/master-node/docker-compose.yml \ curl --silent ${DOWNLOAD_URL}/openvidu-server/deployments/enterprise/master-node/docker-compose.yml \
--output "${TMP_FOLDER}/docker-compose.yml" || fatal_error "Error when downloading the file 'docker-compose.yml'" --output "${TMP_FOLDER}/docker-compose.yml" || fatal_error "Error when downloading the file 'docker-compose.yml'"
printf '\n - docker-compose.yml' printf '\n - docker-compose.yml'
@ -283,11 +274,6 @@ upgrade_ov() {
mv "${OPENVIDU_PREVIOUS_FOLDER}/docker-compose.yml" "${ROLL_BACK_FOLDER}" || fatal_error "Error while moving previous 'docker-compose.yml'" mv "${OPENVIDU_PREVIOUS_FOLDER}/docker-compose.yml" "${ROLL_BACK_FOLDER}" || fatal_error "Error while moving previous 'docker-compose.yml'"
printf '\n - docker-compose.yml' printf '\n - docker-compose.yml'
if [ -n "${USE_OV_CALL}" ]; then
mv "${OPENVIDU_PREVIOUS_FOLDER}/docker-compose.override.yml" "${ROLL_BACK_FOLDER}" || fatal_error "Error while moving previous 'docker-compose.override.yml'"
printf '\n - docker-compose.override.yml'
fi
mv "${OPENVIDU_PREVIOUS_FOLDER}/openvidu" "${ROLL_BACK_FOLDER}" || fatal_error "Error while moving previous 'openvidu'" mv "${OPENVIDU_PREVIOUS_FOLDER}/openvidu" "${ROLL_BACK_FOLDER}" || fatal_error "Error while moving previous 'openvidu'"
printf '\n - openvidu' printf '\n - openvidu'
@ -316,14 +302,6 @@ upgrade_ov() {
mv "${TMP_FOLDER}/docker-compose.yml" "${OPENVIDU_PREVIOUS_FOLDER}" || fatal_error "Error while updating 'docker-compose.yml'" mv "${TMP_FOLDER}/docker-compose.yml" "${OPENVIDU_PREVIOUS_FOLDER}" || fatal_error "Error while updating 'docker-compose.yml'"
printf '\n - docker-compose.yml' printf '\n - docker-compose.yml'
if [ -n "${USE_OV_CALL}" ]; then
mv "${TMP_FOLDER}/docker-compose.override.yml" "${OPENVIDU_PREVIOUS_FOLDER}" || fatal_error "Error while updating 'docker-compose.override.yml'"
printf '\n - docker-compose.override.yml'
else
mv "${TMP_FOLDER}/docker-compose.override.yml" "${OPENVIDU_PREVIOUS_FOLDER}/docker-compose.override.yml-${OPENVIDU_VERSION}" || fatal_error "Error while updating 'docker-compose.override.yml'"
printf '\n - docker-compose.override.yml-%s' "${OPENVIDU_VERSION}"
fi
mv "${TMP_FOLDER}/.env" "${OPENVIDU_PREVIOUS_FOLDER}/.env-${OPENVIDU_VERSION}" || fatal_error "Error while moving previous '.env'" mv "${TMP_FOLDER}/.env" "${OPENVIDU_PREVIOUS_FOLDER}/.env-${OPENVIDU_VERSION}" || fatal_error "Error while moving previous '.env'"
printf '\n - .env-%s' "${OPENVIDU_VERSION}" printf '\n - .env-%s' "${OPENVIDU_VERSION}"
@ -427,11 +405,7 @@ upgrade_ov() {
printf "\n Transfer any configuration you wish to keep in the upgraded version from '.env' to '.env-%s'." "${OPENVIDU_VERSION}" printf "\n Transfer any configuration you wish to keep in the upgraded version from '.env' to '.env-%s'." "${OPENVIDU_VERSION}"
printf "\n When you are OK with it, rename and leave as the only '.env' file of the folder the new '.env-%s'." "${OPENVIDU_VERSION}" printf "\n When you are OK with it, rename and leave as the only '.env' file of the folder the new '.env-%s'." "${OPENVIDU_VERSION}"
printf '\n' printf '\n'
printf "\n 3. If you were using Openvidu Call application, it has been automatically updated in file 'docker-compose.override.yml'." printf '\n 3. Start new version of Openvidu'
printf "\n However, if you were using your own application, a file called 'docker-compose.override.yml-%s'" "${OPENVIDU_VERSION}"
printf "\n has been created with the latest version of Openvidu Call. If you don't plan to use it you can delete it."
printf '\n'
printf '\n 4. Start new version of Openvidu'
printf '\n $ ./openvidu start' printf '\n $ ./openvidu start'
printf '\n' printf '\n'
printf "\n If you want to rollback, all the files from the previous installation have been copied to folder '.old-%s'" "${OPENVIDU_PREVIOUS_VERSION}" printf "\n If you want to rollback, all the files from the previous installation have been copied to folder '.old-%s'" "${OPENVIDU_PREVIOUS_VERSION}"

View File

@ -207,27 +207,7 @@ is_external_url() {
} }
start_openvidu() { start_openvidu() {
local RUN_LOCAL_ES docker-compose up -d
local RUN_LOCAL_KIBANA
local CONFIGURED_ELASTICSEARCH_HOST
local CONFIGURED_KIBANA_HOST
CONFIGURED_ELASTICSEARCH_HOST=$(grep -v '^#' .env | grep OPENVIDU_PRO_ELASTICSEARCH_HOST | cut -d '=' -f2)
CONFIGURED_KIBANA_HOST=$(grep -v '^#' .env | grep OPENVIDU_PRO_KIBANA_HOST | cut -d '=' -f2)
RUN_LOCAL_ES=true
RUN_LOCAL_KIBANA=true
if is_external_url "${CONFIGURED_ELASTICSEARCH_HOST}"; then
printf "Configured external elasticsearch: %s" "${CONFIGURED_ELASTICSEARCH_HOST}"
printf "\n"
RUN_LOCAL_ES=false
fi
if is_external_url "${CONFIGURED_KIBANA_HOST}"; then
printf "Configured external kibana: %s" "${CONFIGURED_KIBANA_HOST}"
printf "\n"
RUN_LOCAL_KIBANA=false
fi
docker-compose up -d \
$(if [ "${RUN_LOCAL_ES}" == "false" ]; then echo '--scale elasticsearch=0'; fi) \
$(if [ "${RUN_LOCAL_KIBANA}" == "false" ]; then echo '--scale kibana=0'; fi)
} }
usage() { usage() {