From 958a645195d7c9bacc82d3229d96a13dcd9eddd5 Mon Sep 17 00:00:00 2001 From: cruizba Date: Tue, 24 Nov 2020 20:44:48 +0100 Subject: [PATCH] openvidu-deployment: Support external ELK from cloudformation parameters --- ...penvidu-server-pro-no-market.yaml.template | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/openvidu-server/deployments/pro/aws/cfn-openvidu-server-pro-no-market.yaml.template b/openvidu-server/deployments/pro/aws/cfn-openvidu-server-pro-no-market.yaml.template index be514e33..24b27b66 100644 --- a/openvidu-server/deployments/pro/aws/cfn-openvidu-server-pro-no-market.yaml.template +++ b/openvidu-server/deployments/pro/aws/cfn-openvidu-server-pro-no-market.yaml.template @@ -94,6 +94,19 @@ Parameters: NoEcho: true ConstraintDescription: Elasticsearch password is mandatory (no whitespaces or quotations allowed) + # Elasticsearch configuration + ElasticsearchUrl: + Description: "If you have an external Elasticsearch service running, put here the url to the service. If empty, an Elasticsearch service will be deployed next to OpenVidu." + Type: String + AllowedPattern: (^(http|https):\/\/.*:[1-9]{1,5}+.*$|^$) + ConstraintDescription: "It is very important to specify the Elasticsearch URL with the port used by this service. For example: https://es-example:443" + + KibanaUrl: + Description: "If you have an external Kibana service running, put here the url to the service. If empty, a Kibana service will be deployed next to OpenVidu." + Type: String + AllowedPattern: (^(http|https):\/\/.*:[1-9]{1,5}+.*$|^$) + ConstraintDescription: "It is very important to specify the url with port used by this service. For example: https://kibana-example:443" + # EC2 Instance configuration AwsInstanceTypeOV: @@ -236,8 +249,11 @@ Metadata: - Label: default: Elasticsearch and Kibana configuration Parameters: + - ElasticsearchUrl + - KibanaUrl - ElasticsearchUser - ElasticsearchPassword + - Label: default: EC2 Instance configuration Parameters: @@ -280,6 +296,10 @@ Metadata: OpenViduSecret: default: "Openvidu Secret" # Kibana configuration + ElasticsearchUrl: + default: "Elasticsearch URL" + KibanaUrl: + default: "Kibana URL" ElasticsearchUser: default: "Elasticsearch and Kibana username" ElasticsearchPassword: @@ -476,6 +496,12 @@ Resources: sed -i "s/LETSENCRYPT_EMAIL=user@example.com/LETSENCRYPT_EMAIL=${LetsEncryptEmail}/" $WORKINGDIR/.env # Replace Elastic Search Conf + if [[ ! -z ${ElasticsearchUrl} ]]; then + sed -i "s/#OPENVIDU_PRO_ELASTICSEARCH_HOST=/OPENVIDU_PRO_ELASTICSEARCH_HOST=${ElasticsearchUrl}/" $WORKINGDIR/.env + fi + if [[ ! -z ${KibanaUrl} ]]; then + sed -i "s/#OPENVIDU_PRO_KIBANA_HOST=/OPENVIDU_PRO_KIBANA_HOST=${KibanaUrl}/" $WORKINGDIR/.env + fi sed -i "s/ELASTICSEARCH_USERNAME=elasticadmin/ELASTICSEARCH_USERNAME=${ElasticsearchUser}/" $WORKINGDIR/.env sed -i "s/ELASTICSEARCH_PASSWORD=/ELASTICSEARCH_PASSWORD=${ElasticsearchPassword}/" $WORKINGDIR/.env