Compare commits

...

7 Commits

Author SHA1 Message Date
cruizba 8fb1fac43a Bump version 2.26.2 2023-04-04 21:17:21 +02:00
cruizba 122ac4dc6a Fix wrong elasticsearch host while using it externally 2023-04-04 21:13:19 +02:00
cruizba 66c7399005 deployment: Fix metricbeat and filebeat condition 2023-04-04 21:12:57 +02:00
cruizba 9a2803cb06 Bump installation openvidu version to 2.26.1 2023-03-18 03:43:23 +01:00
cruizba 4af3f75f1e deployment: Improve metricbeat and filebeat URL parsing 2023-03-17 22:50:25 +01:00
pabloFuente c2b392d6d8 Updated installation scripts to 2.26.0 2023-03-16 11:23:34 +01:00
cruizba aac968eaba deployment: Check that minimal version of docker is 20.10.10 2023-03-16 11:15:17 +01:00
9 changed files with 91 additions and 53 deletions

View File

@ -2,7 +2,7 @@
# Global variables
OPENVIDU_FOLDER=openvidu
OPENVIDU_VERSION=master
OPENVIDU_VERSION=v2.26.2
OPENVIDU_UPGRADABLE_VERSION="2.25"
DOWNLOAD_URL=https://raw.githubusercontent.com/OpenVidu/openvidu/${OPENVIDU_VERSION}
@ -299,17 +299,24 @@ upgrade_ov() {
# Check docker and docker-compose installation
if ! command -v docker > /dev/null; then
echo "You don't have docker installed, please install it and re-run the command"
exit 0
exit 1
else
# Check version of docker is equal or higher than 20.10.10
DOCKER_VERSION=$(docker version --format '{{.Server.Version}}' | sed "s/-rc[0-9]*//")
if ! printf '%s\n%s\n' "20.10.10" "$DOCKER_VERSION" | sort -V -C; then
echo "You need a docker version equal or higher than 20.10.10, please update your docker and re-run the command"; \
exit 1
fi
fi
if ! command -v docker-compose > /dev/null; then
echo "You don't have docker-compose installed, please install it and re-run the command"
exit 0
exit 1
else
COMPOSE_VERSION=$(docker-compose version --short | sed "s/-rc[0-9]*//")
if ! printf '%s\n%s\n' "1.24" "$COMPOSE_VERSION" | sort -V -C; then
echo "You need a docker-compose version equal or higher than 1.24, please update your docker-compose and re-run the command"; \
exit 0
exit 1
fi
fi

View File

@ -131,19 +131,18 @@ services:
/bin/bash -c 'if [[ $${OPENVIDU_PRO_ELASTICSEARCH_HOST} =~ ^(https?://)?([^:/]+)(:([0-9]+))?(/.*)?$$ ]]; then
ES_PROTO=$${BASH_REMATCH[1]}
ES_HOST=$${BASH_REMATCH[2]}
ES_PORT=$${BASH_REMATCH[4]}
ES_PATH=$${BASH_REMATCH[5]}
if [[ $$ES_PROTO == "https://" ]] && [[ -z $${BASH_REMATCH[4]} ]]; then
if [[ $$ES_PROTO == "https://" ]] && [[ -z $$ES_PORT ]]; then
ES_PORT=443
else
elif [[ $$ES_PROTO == "http://" ]] && [[ -z $$ES_PORT ]]; then
ES_PORT=80
fi;
OPENVIDU_PRO_ELASTICSEARCH_HOST=$${ES_PROTO}$${ES_HOST}:$${ES_PORT}$${ES_PATH}
fi
export OPENVIDU_PRO_ELASTICSEARCH_HOST=$${ES_PROTO}$${ES_HOST}:$${ES_PORT}$${ES_PATH}
else
echo "Invalid OPENVIDU_PRO_ELASTICSEARCH_HOST"
echo "It must be a valid URL"
exit 1
fi;
/bin/bash -c "$$@"'
exec /bin/bash -c "$$@"'
command: >
/bin/bash -c "metricbeat -e -strict.perms=false -e -system.hostfs=/hostfs
`if [ ! -z $ELASTICSEARCH_USERNAME ]; then echo '-E output.elasticsearch.username=$ELASTICSEARCH_USERNAME'; fi`
@ -169,19 +168,18 @@ services:
/bin/bash -c 'if [[ $${OPENVIDU_PRO_ELASTICSEARCH_HOST} =~ ^(https?://)?([^:/]+)(:([0-9]+))?(/.*)?$$ ]]; then
ES_PROTO=$${BASH_REMATCH[1]}
ES_HOST=$${BASH_REMATCH[2]}
ES_PORT=$${BASH_REMATCH[4]}
ES_PATH=$${BASH_REMATCH[5]}
if [[ $$ES_PROTO == "https://" ]] && [[ -z $${BASH_REMATCH[4]} ]]; then
if [[ $$ES_PROTO == "https://" ]] && [[ -z $$ES_PORT ]]; then
ES_PORT=443
else
elif [[ $$ES_PROTO == "http://" ]] && [[ -z $$ES_PORT ]]; then
ES_PORT=80
fi;
OPENVIDU_PRO_ELASTICSEARCH_HOST=$${ES_PROTO}$${ES_HOST}:$${ES_PORT}$${ES_PATH}
fi
export OPENVIDU_PRO_ELASTICSEARCH_HOST=$${ES_PROTO}$${ES_HOST}:$${ES_PORT}$${ES_PATH}
else
echo "Invalid OPENVIDU_PRO_ELASTICSEARCH_HOST"
echo "It must be a valid URL"
exit 1
fi;
/bin/bash -c "$$@"'
exec /bin/bash -c "$$@"'
command: >
/bin/bash -c "filebeat -e -strict.perms=false
`if [ ! -z $ELASTICSEARCH_USERNAME ]; then echo '-E output.elasticsearch.username=$ELASTICSEARCH_USERNAME'; fi`

View File

@ -2,7 +2,7 @@
# Global variables
OPENVIDU_FOLDER=openvidu
OPENVIDU_VERSION=master
OPENVIDU_VERSION=v2.26.2
OPENVIDU_UPGRADABLE_VERSION="2.25"
AWS_SCRIPTS_FOLDER=${OPENVIDU_FOLDER}/cluster/aws
ELASTICSEARCH_FOLDER=${OPENVIDU_FOLDER}/elasticsearch
@ -159,17 +159,24 @@ replace_variable_in_new_env_file() {
# Check docker and docker-compose installation
if ! command -v docker > /dev/null; then
echo "You don't have docker installed, please install it and re-run the command"
exit 0
exit 1
else
# Check version of docker is equal or higher than 20.10.10
DOCKER_VERSION=$(docker version --format '{{.Server.Version}}' | sed "s/-rc[0-9]*//")
if ! printf '%s\n%s\n' "20.10.10" "$DOCKER_VERSION" | sort -V -C; then
echo "You need a docker version equal or higher than 20.10.10, please update your docker and re-run the command"; \
exit 1
fi
fi
if ! command -v docker-compose > /dev/null; then
echo "You don't have docker-compose installed, please install it and re-run the command"
exit 0
exit 1
else
COMPOSE_VERSION=$(docker-compose version --short | sed "s/-rc[0-9]*//")
if ! printf '%s\n%s\n' "1.24" "$COMPOSE_VERSION" | sort -V -C; then
echo "You need a docker-compose version equal or higher than 1.24, please update your docker-compose and re-run the command"; \
exit 0
exit 1
fi
fi

View File

@ -270,8 +270,8 @@ start_openvidu() {
docker-compose up -d \
$(if [ "${COTURN_IN_MEDIA_NODES}" == "true" ]; then echo '--scale coturn=0'; fi) \
$(if [ "${RUN_LOCAL_FILEBEAT}" == "true" ]; then echo '--scale filebeat=0'; fi) \
$(if [ "${RUN_LOCAL_METRICBEAT}" == "true" ]; then echo '--scale metricbeat=0'; fi)
$(if [ "${RUN_LOCAL_FILEBEAT}" == "false" ]; then echo '--scale filebeat=0'; fi) \
$(if [ "${RUN_LOCAL_METRICBEAT}" == "false" ]; then echo '--scale metricbeat=0'; fi)
}
usage() {

View File

@ -87,17 +87,24 @@ new_coturn_installation() {
# Check docker and docker-compose installation
if ! command -v docker > /dev/null; then
echo "You don't have docker installed, please install it and re-run the command"
exit 0
exit 1
else
# Check version of docker is equal or higher than 20.10.10
DOCKER_VERSION=$(docker version --format '{{.Server.Version}}' | sed "s/-rc[0-9]*//")
if ! printf '%s\n%s\n' "20.10.10" "$DOCKER_VERSION" | sort -V -C; then
echo "You need a docker version equal or higher than 20.10.10, please update your docker and re-run the command"; \
exit 1
fi
fi
if ! command -v docker-compose > /dev/null; then
echo "You don't have docker-compose installed, please install it and re-run the command"
exit 0
exit 1
else
COMPOSE_VERSION=$(docker-compose version --short | sed "s/-rc[0-9]*//")
if ! printf '%s\n%s\n' "1.24" "$COMPOSE_VERSION" | sort -V -C; then
echo "You need a docker-compose version equal or higher than 1.24, please update your docker-compose and re-run the command"; \
exit 0
exit 1
fi
fi

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
MEDIA_NODE_FOLDER=kms
MEDIA_NODE_VERSION=master
MEDIA_NODE_VERSION=v2.26.2
OPENVIDU_UPGRADABLE_VERSION="2.25"
BEATS_FOLDER=${MEDIA_NODE_FOLDER}/beats
OPENVIDU_RECORDINGS_FOLDER="/opt/openvidu/recordings"
@ -365,17 +365,24 @@ upgrade_media_node() {
# Check docker and docker-compose installation
if ! command -v docker > /dev/null; then
echo "You don't have docker installed, please install it and re-run the command"
exit 0
exit 1
else
# Check version of docker is equal or higher than 20.10.10
DOCKER_VERSION=$(docker version --format '{{.Server.Version}}' | sed "s/-rc[0-9]*//")
if ! printf '%s\n%s\n' "20.10.10" "$DOCKER_VERSION" | sort -V -C; then
echo "You need a docker version equal or higher than 20.10.10, please update your docker and re-run the command"; \
exit 1
fi
fi
if ! command -v docker-compose > /dev/null; then
echo "You don't have docker-compose installed, please install it and re-run the command"
exit 0
exit 1
else
COMPOSE_VERSION=$(docker-compose version --short | sed "s/-rc[0-9]*//")
if ! printf '%s\n%s\n' "1.24" "$COMPOSE_VERSION" | sort -V -C; then
echo "You need a docker-compose version equal or higher than 1.24, please update your docker-compose and re-run the command"; \
exit 0
exit 1
fi
fi

View File

@ -2,7 +2,7 @@
# Global variables
OPENVIDU_FOLDER=openvidu
OPENVIDU_VERSION=master
OPENVIDU_VERSION=v2.26.2
OPENVIDU_UPGRADABLE_VERSION="2.25"
ELASTICSEARCH_FOLDER=${OPENVIDU_FOLDER}/elasticsearch
BEATS_FOLDER=${OPENVIDU_FOLDER}/beats
@ -387,17 +387,24 @@ upgrade_ov() {
# Check docker and docker-compose installation
if ! command -v docker > /dev/null; then
echo "You don't have docker installed, please install it and re-run the command"
exit 0
exit 1
else
# Check version of docker is equal or higher than 20.10.10
DOCKER_VERSION=$(docker version --format '{{.Server.Version}}' | sed "s/-rc[0-9]*//")
if ! printf '%s\n%s\n' "20.10.10" "$DOCKER_VERSION" | sort -V -C; then
echo "You need a docker version equal or higher than 20.10.10, please update your docker and re-run the command"; \
exit 1
fi
fi
if ! command -v docker-compose > /dev/null; then
echo "You don't have docker-compose installed, please install it and re-run the command"
exit 0
exit 1
else
COMPOSE_VERSION=$(docker-compose version --short | sed "s/-rc[0-9]*//")
if ! printf '%s\n%s\n' "1.24" "$COMPOSE_VERSION" | sort -V -C; then
echo "You need a docker-compose version equal or higher than 1.24, please update your docker-compose and re-run the command"; \
exit 0
exit 1
fi
fi

View File

@ -164,19 +164,18 @@ services:
/bin/bash -c 'if [[ $${OPENVIDU_PRO_ELASTICSEARCH_HOST} =~ ^(https?://)?([^:/]+)(:([0-9]+))?(/.*)?$$ ]]; then
ES_PROTO=$${BASH_REMATCH[1]}
ES_HOST=$${BASH_REMATCH[2]}
ES_PORT=$${BASH_REMATCH[4]}
ES_PATH=$${BASH_REMATCH[5]}
if [[ $$ES_PROTO == "https://" ]] && [[ -z $${BASH_REMATCH[4]} ]]; then
if [[ $$ES_PROTO == "https://" ]] && [[ -z $$ES_PORT ]]; then
ES_PORT=443
else
elif [[ $$ES_PROTO == "http://" ]] && [[ -z $$ES_PORT ]]; then
ES_PORT=80
fi;
OPENVIDU_PRO_ELASTICSEARCH_HOST=$${ES_PROTO}$${ES_HOST}:$${ES_PORT}$${ES_PATH}
fi
export OPENVIDU_PRO_ELASTICSEARCH_HOST=$${ES_PROTO}$${ES_HOST}:$${ES_PORT}$${ES_PATH}
else
echo "Invalid OPENVIDU_PRO_ELASTICSEARCH_HOST"
echo "It must be a valid URL"
exit 1
fi;
/bin/bash -c "$$@"'
exec /bin/bash -c "$$@"'
command: >
/bin/bash -c "metricbeat -e -strict.perms=false -e -system.hostfs=/hostfs
`if [ ! -z $ELASTICSEARCH_USERNAME ]; then echo '-E output.elasticsearch.username=$ELASTICSEARCH_USERNAME'; fi`
@ -202,19 +201,18 @@ services:
/bin/bash -c 'if [[ $${OPENVIDU_PRO_ELASTICSEARCH_HOST} =~ ^(https?://)?([^:/]+)(:([0-9]+))?(/.*)?$$ ]]; then
ES_PROTO=$${BASH_REMATCH[1]}
ES_HOST=$${BASH_REMATCH[2]}
ES_PORT=$${BASH_REMATCH[4]}
ES_PATH=$${BASH_REMATCH[5]}
if [[ $$ES_PROTO == "https://" ]] && [[ -z $${BASH_REMATCH[4]} ]]; then
if [[ $$ES_PROTO == "https://" ]] && [[ -z $$ES_PORT ]]; then
ES_PORT=443
else
elif [[ $$ES_PROTO == "http://" ]] && [[ -z $$ES_PORT ]]; then
ES_PORT=80
fi;
OPENVIDU_PRO_ELASTICSEARCH_HOST=$${ES_PROTO}$${ES_HOST}:$${ES_PORT}$${ES_PATH}
fi
export OPENVIDU_PRO_ELASTICSEARCH_HOST=$${ES_PROTO}$${ES_HOST}:$${ES_PORT}$${ES_PATH}
else
echo "Invalid OPENVIDU_PRO_ELASTICSEARCH_HOST"
echo "It must be a valid URL"
exit 1
fi;
/bin/bash -c "$$@"'
exec /bin/bash -c "$$@"'
command: >
/bin/bash -c "filebeat -e -strict.perms=false
`if [ ! -z $ELASTICSEARCH_USERNAME ]; then echo '-E output.elasticsearch.username=$ELASTICSEARCH_USERNAME'; fi`

View File

@ -2,7 +2,7 @@
# Global variables
OPENVIDU_FOLDER=openvidu
OPENVIDU_VERSION=master
OPENVIDU_VERSION=v2.26.2
OPENVIDU_UPGRADABLE_VERSION="2.25"
AWS_SCRIPTS_FOLDER=${OPENVIDU_FOLDER}/cluster/aws
ELASTICSEARCH_FOLDER=${OPENVIDU_FOLDER}/elasticsearch
@ -458,17 +458,24 @@ upgrade_ov() {
# Check docker and docker-compose installation
if ! command -v docker > /dev/null; then
echo "You don't have docker installed, please install it and re-run the command"
exit 0
exit 1
else
# Check version of docker is equal or higher than 20.10.10
DOCKER_VERSION=$(docker version --format '{{.Server.Version}}' | sed "s/-rc[0-9]*//")
if ! printf '%s\n%s\n' "20.10.10" "$DOCKER_VERSION" | sort -V -C; then
echo "You need a docker version equal or higher than 20.10.10, please update your docker and re-run the command"; \
exit 1
fi
fi
if ! command -v docker-compose > /dev/null; then
echo "You don't have docker-compose installed, please install it and re-run the command"
exit 0
exit 1
else
COMPOSE_VERSION=$(docker-compose version --short | sed "s/-rc[0-9]*//")
if ! printf '%s\n%s\n' "1.24" "$COMPOSE_VERSION" | sort -V -C; then
echo "You need a docker-compose version equal or higher than 1.24, please update your docker-compose and re-run the command"; \
exit 0
exit 1
fi
fi