mirror of https://github.com/OpenVidu/openvidu.git
deployment: use the public IP directly instead of sslip.io for TLS (#904)
When no domain is provided, cloud templates now use the discovered public IP directly as the domain instead of building an openvidu-<random>-<ip>.sslip.io name, relying on Let's Encrypt IP certificates (handled by the installer/Caddy). Public IP acquisition is unchanged everywhere; only the domain construction changed. - AWS CloudFormation: derive the bare IP from the already-fetched public-hostname. - GCP Terraform: use the instance/NLB external IP already obtained. - Azure Bicep: use the public IP from get_public_ip.sh; ARM JSON regenerated from Bicep, and createUiDefinition tooltips updated. HA on AWS is unchanged: it uses an ACM certificate (which cannot cover a bare IP). Assisted-by: Anthropic - Claude Opus 4.8pull/876/merge
parent
9515db631c
commit
96b0a255f6
|
|
@ -7,7 +7,7 @@ Parameters:
|
||||||
Description: |
|
Description: |
|
||||||
[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option.
|
[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option.
|
||||||
[owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option.
|
[owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option.
|
||||||
[letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, a random sslip.io domain will be used).
|
[letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, the public IP will be used).
|
||||||
Type: String
|
Type: String
|
||||||
AllowedValues:
|
AllowedValues:
|
||||||
- selfsigned
|
- selfsigned
|
||||||
|
|
@ -707,8 +707,7 @@ Resources:
|
||||||
# Configure Domain
|
# Configure Domain
|
||||||
if [[ "${DomainName}" == '' ]]; then
|
if [[ "${DomainName}" == '' ]]; then
|
||||||
PublicHostname=$(curl -s -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/public-hostname)
|
PublicHostname=$(curl -s -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/public-hostname)
|
||||||
RANDOM_DOMAIN_STRING=$(tr -dc 'a-z' < /dev/urandom | head -c 8)
|
DOMAIN=$(echo "$PublicHostname" | cut -d'.' -f1 | sed 's/^ec2-//' | tr '-' '.')
|
||||||
DOMAIN=openvidu-$RANDOM_DOMAIN_STRING-$(echo "$PublicHostname" | cut -d'.' -f1 | sed 's/^ec2-//').sslip.io
|
|
||||||
else
|
else
|
||||||
DOMAIN=${DomainName}
|
DOMAIN=${DomainName}
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ param stackName string
|
||||||
@description('''
|
@description('''
|
||||||
[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option.
|
[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option.
|
||||||
[owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option.
|
[owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option.
|
||||||
[letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, a random sslip.io domain will be used).
|
[letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, the public IP will be used).
|
||||||
''')
|
''')
|
||||||
@allowed([
|
@allowed([
|
||||||
'selfsigned'
|
'selfsigned'
|
||||||
|
|
@ -186,8 +186,7 @@ if [[ "${domainName}" == '' ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RANDOM_DOMAIN_STRING=$(tr -dc 'a-z' < /dev/urandom | head -c 8)
|
DOMAIN="$PUBLIC_IP"
|
||||||
DOMAIN="openvidu-$RANDOM_DOMAIN_STRING-$(echo "$PUBLIC_IP" | tr '.' '-').sslip.io"
|
|
||||||
else
|
else
|
||||||
DOMAIN=${domainName}
|
DOMAIN=${domainName}
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -50,7 +50,7 @@
|
||||||
"label": "Certificate Type",
|
"label": "Certificate Type",
|
||||||
"subLabel": "",
|
"subLabel": "",
|
||||||
"defaultValue": "letsencrypt",
|
"defaultValue": "letsencrypt",
|
||||||
"toolTip": "[[selfsigned] Not recommended for production use. If you don't have a FQDN (DomainName parameter), you can use this option to generate a self-signed certificate.\n[owncert] Valid for production environments. If you have a FQDN (DomainName parameter) and an Elastic IP, you can use this option to use your own certificate.\n[letsencrypt] Valid for production environments. If you have a FQDN (DomainName parameter) and an Elastic IP, you can use this option to generate a Let's Encrypt certificate. If you don't have a FQDN, Let's Encrypt will use sslip.io to generate a valid certificate.\n",
|
"toolTip": "[[selfsigned] Not recommended for production use. If you don't have a FQDN (DomainName parameter), you can use this option to generate a self-signed certificate.\n[owncert] Valid for production environments. If you have a FQDN (DomainName parameter) and an Elastic IP, you can use this option to use your own certificate.\n[letsencrypt] Valid for production environments. If you have a FQDN (DomainName parameter) and an Elastic IP, you can use this option to generate a Let's Encrypt certificate. If you don't have a FQDN, Let's Encrypt will issue a certificate for the public IP.\n",
|
||||||
"constraints": {
|
"constraints": {
|
||||||
"required": true,
|
"required": true,
|
||||||
"allowedValues": [
|
"allowedValues": [
|
||||||
|
|
|
||||||
|
|
@ -182,8 +182,7 @@ echo 1 > /usr/local/bin/openvidu_install_counter.txt
|
||||||
if [[ "${var.domainName}" == "" ]]; then
|
if [[ "${var.domainName}" == "" ]]; then
|
||||||
[ ! -d "/usr/share/openvidu" ] && mkdir -p /usr/share/openvidu
|
[ ! -d "/usr/share/openvidu" ] && mkdir -p /usr/share/openvidu
|
||||||
EXTERNAL_IP=$(get_meta "instance/network-interfaces/0/access-configs/0/external-ip")
|
EXTERNAL_IP=$(get_meta "instance/network-interfaces/0/access-configs/0/external-ip")
|
||||||
RANDOM_DOMAIN_STRING=$(tr -dc 'a-z' < /dev/urandom | head -c 8)
|
DOMAIN="$EXTERNAL_IP"
|
||||||
DOMAIN=openvidu-$RANDOM_DOMAIN_STRING-$(echo $EXTERNAL_IP | tr '.' '-').sslip.io
|
|
||||||
else
|
else
|
||||||
DOMAIN="${var.domainName}"
|
DOMAIN="${var.domainName}"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ variable "stackName" {
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "certificateType" {
|
variable "certificateType" {
|
||||||
description = "[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option. [owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option. [letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, a random sslip.io domain will be used)."
|
description = "[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option. [owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option. [letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, the public IP will be used)."
|
||||||
type = string
|
type = string
|
||||||
default = "letsencrypt"
|
default = "letsencrypt"
|
||||||
validation {
|
validation {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ Parameters:
|
||||||
Description: |
|
Description: |
|
||||||
[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option.
|
[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option.
|
||||||
[owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option.
|
[owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option.
|
||||||
[letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, a random sslip.io domain will be used).
|
[letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, the public IP will be used).
|
||||||
Type: String
|
Type: String
|
||||||
AllowedValues:
|
AllowedValues:
|
||||||
- selfsigned
|
- selfsigned
|
||||||
|
|
@ -1469,8 +1469,7 @@ Resources:
|
||||||
# Configure Domain and other parameters
|
# Configure Domain and other parameters
|
||||||
if [[ "${DomainName}" == '' ]]; then
|
if [[ "${DomainName}" == '' ]]; then
|
||||||
PublicHostname=$(curl -s -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/public-hostname)
|
PublicHostname=$(curl -s -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/public-hostname)
|
||||||
RANDOM_DOMAIN_STRING=$(tr -dc 'a-z' < /dev/urandom | head -c 8)
|
DOMAIN=$(echo "$PublicHostname" | cut -d'.' -f1 | sed 's/^ec2-//' | tr '-' '.')
|
||||||
DOMAIN=openvidu-$RANDOM_DOMAIN_STRING-$(echo "$PublicHostname" | cut -d'.' -f1 | sed 's/^ec2-//').sslip.io
|
|
||||||
else
|
else
|
||||||
DOMAIN=${DomainName}
|
DOMAIN=${DomainName}
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ param stackName string
|
||||||
@description('''
|
@description('''
|
||||||
[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option.
|
[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option.
|
||||||
[owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option.
|
[owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option.
|
||||||
[letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, a random sslip.io domain will be used).
|
[letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, the public IP will be used).
|
||||||
''')
|
''')
|
||||||
@allowed([
|
@allowed([
|
||||||
'selfsigned'
|
'selfsigned'
|
||||||
|
|
@ -235,8 +235,7 @@ if [[ "${domainName}" == '' ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RANDOM_DOMAIN_STRING=$(tr -dc 'a-z' < /dev/urandom | head -c 8)
|
DOMAIN="$PUBLIC_IP"
|
||||||
DOMAIN="openvidu-$RANDOM_DOMAIN_STRING-$(echo "$PUBLIC_IP" | tr '.' '-').sslip.io"
|
|
||||||
else
|
else
|
||||||
DOMAIN=${domainName}
|
DOMAIN=${domainName}
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -51,7 +51,7 @@
|
||||||
"label": "Certificate Type",
|
"label": "Certificate Type",
|
||||||
"subLabel": "",
|
"subLabel": "",
|
||||||
"defaultValue": "letsencrypt",
|
"defaultValue": "letsencrypt",
|
||||||
"toolTip": "[[selfsigned] Not recommended for production use. If you don't have a FQDN (DomainName parameter), you can use this option to generate a self-signed certificate.\n[owncert] Valid for production environments. If you have a FQDN (DomainName parameter) and an Elastic IP, you can use this option to use your own certificate.\n[letsencrypt] Valid for production environments. If you have a FQDN (DomainName parameter) and an Elastic IP, you can use this option to generate a Let's Encrypt certificate. If you don't have a FQDN, Let's Encrypt will use sslip.io to generate a valid certificate.\n",
|
"toolTip": "[[selfsigned] Not recommended for production use. If you don't have a FQDN (DomainName parameter), you can use this option to generate a self-signed certificate.\n[owncert] Valid for production environments. If you have a FQDN (DomainName parameter) and an Elastic IP, you can use this option to use your own certificate.\n[letsencrypt] Valid for production environments. If you have a FQDN (DomainName parameter) and an Elastic IP, you can use this option to generate a Let's Encrypt certificate. If you don't have a FQDN, Let's Encrypt will issue a certificate for the public IP.\n",
|
||||||
"constraints": {
|
"constraints": {
|
||||||
"required": false,
|
"required": false,
|
||||||
"allowedValues": [
|
"allowedValues": [
|
||||||
|
|
|
||||||
|
|
@ -647,8 +647,7 @@ echo 1 > /usr/local/bin/openvidu_install_counter.txt
|
||||||
if [[ "${var.domainName}" == "" ]]; then
|
if [[ "${var.domainName}" == "" ]]; then
|
||||||
[ ! -d "/usr/share/openvidu" ] && mkdir -p /usr/share/openvidu
|
[ ! -d "/usr/share/openvidu" ] && mkdir -p /usr/share/openvidu
|
||||||
EXTERNAL_IP=$(get_meta "instance/network-interfaces/0/access-configs/0/external-ip")
|
EXTERNAL_IP=$(get_meta "instance/network-interfaces/0/access-configs/0/external-ip")
|
||||||
RANDOM_DOMAIN_STRING=$(tr -dc 'a-z' < /dev/urandom | head -c 8)
|
DOMAIN="$EXTERNAL_IP"
|
||||||
DOMAIN=openvidu-$RANDOM_DOMAIN_STRING-$(echo $EXTERNAL_IP | tr '.' '-').sslip.io
|
|
||||||
else
|
else
|
||||||
DOMAIN="${var.domainName}"
|
DOMAIN="${var.domainName}"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ variable "stackName" {
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "certificateType" {
|
variable "certificateType" {
|
||||||
description = "[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option. [owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option. [letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, a random sslip.io domain will be used)."
|
description = "[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option. [owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option. [letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, the public IP will be used)."
|
||||||
type = string
|
type = string
|
||||||
default = "letsencrypt"
|
default = "letsencrypt"
|
||||||
validation {
|
validation {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ param stackName string
|
||||||
@description('''
|
@description('''
|
||||||
[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option.
|
[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option.
|
||||||
[owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option.
|
[owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option.
|
||||||
[letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, a random sslip.io domain will be used).
|
[letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, the public IP will be used).
|
||||||
''')
|
''')
|
||||||
@allowed([
|
@allowed([
|
||||||
'selfsigned'
|
'selfsigned'
|
||||||
|
|
@ -350,8 +350,7 @@ if [[ $MASTER_NODE_NUM -eq 1 ]] && [[ "$ALL_SECRETS_GENERATED" == "" || "$ALL_SE
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RANDOM_DOMAIN_STRING=$(tr -dc 'a-z' < /dev/urandom | head -c 8)
|
DOMAIN="$PUBLIC_IP"
|
||||||
DOMAIN="openvidu-$RANDOM_DOMAIN_STRING-$(echo "$PUBLIC_IP" | tr '.' '-').sslip.io"
|
|
||||||
else
|
else
|
||||||
DOMAIN=${domainName}
|
DOMAIN=${domainName}
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -51,7 +51,7 @@
|
||||||
"label": "Certificate Type",
|
"label": "Certificate Type",
|
||||||
"subLabel": "",
|
"subLabel": "",
|
||||||
"defaultValue": "letsencrypt",
|
"defaultValue": "letsencrypt",
|
||||||
"toolTip": "[[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option.\n[owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option.\n[letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, a random sslip.io domain will be used).\n",
|
"toolTip": "[[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option.\n[owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option.\n[letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, the public IP will be used).\n",
|
||||||
"constraints": {
|
"constraints": {
|
||||||
"required": false,
|
"required": false,
|
||||||
"allowedValues": [
|
"allowedValues": [
|
||||||
|
|
|
||||||
|
|
@ -983,8 +983,7 @@ if [[ $MASTER_NODE_NUM -eq 1 ]] && [[ "$ALL_SECRETS_GENERATED" == "false" ]]; th
|
||||||
# Configure Domain name
|
# Configure Domain name
|
||||||
if [[ "${var.domainName}" == "" ]]; then
|
if [[ "${var.domainName}" == "" ]]; then
|
||||||
EXTERNAL_IP=$(gcloud compute addresses describe "${lower("${var.stackName}-nlb-ip")}" --region ${var.region} --format="get(address)")
|
EXTERNAL_IP=$(gcloud compute addresses describe "${lower("${var.stackName}-nlb-ip")}" --region ${var.region} --format="get(address)")
|
||||||
RANDOM_DOMAIN_STRING=$(tr -dc 'a-z' < /dev/urandom | head -c 8)
|
DOMAIN="$EXTERNAL_IP"
|
||||||
DOMAIN="openvidu-$RANDOM_DOMAIN_STRING-$(echo $EXTERNAL_IP | tr '.' '-').sslip.io"
|
|
||||||
else
|
else
|
||||||
DOMAIN="${var.domainName}"
|
DOMAIN="${var.domainName}"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ variable "stackName" {
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "certificateType" {
|
variable "certificateType" {
|
||||||
description = "[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option. [owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option. [letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, a random sslip.io domain will be used)."
|
description = "[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option. [owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option. [letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, the public IP will be used)."
|
||||||
type = string
|
type = string
|
||||||
default = "letsencrypt"
|
default = "letsencrypt"
|
||||||
validation {
|
validation {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ Parameters:
|
||||||
Description: |
|
Description: |
|
||||||
[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option.
|
[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option.
|
||||||
[owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option.
|
[owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option.
|
||||||
[letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, a random sslip.io domain will be used).
|
[letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, the public IP will be used).
|
||||||
Type: String
|
Type: String
|
||||||
AllowedValues:
|
AllowedValues:
|
||||||
- selfsigned
|
- selfsigned
|
||||||
|
|
@ -809,8 +809,7 @@ Resources:
|
||||||
# Configure Domain
|
# Configure Domain
|
||||||
if [[ "${DomainName}" == '' ]]; then
|
if [[ "${DomainName}" == '' ]]; then
|
||||||
PublicHostname=$(curl -s -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/public-hostname)
|
PublicHostname=$(curl -s -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/public-hostname)
|
||||||
RANDOM_DOMAIN_STRING=$(tr -dc 'a-z' < /dev/urandom | head -c 8)
|
DOMAIN=$(echo "$PublicHostname" | cut -d'.' -f1 | sed 's/^ec2-//' | tr '-' '.')
|
||||||
DOMAIN=openvidu-$RANDOM_DOMAIN_STRING-$(echo "$PublicHostname" | cut -d'.' -f1 | sed 's/^ec2-//').sslip.io
|
|
||||||
else
|
else
|
||||||
DOMAIN=${DomainName}
|
DOMAIN=${DomainName}
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ param stackName string
|
||||||
@description('''
|
@description('''
|
||||||
[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option.
|
[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option.
|
||||||
[owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option.
|
[owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option.
|
||||||
[letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, a random sslip.io domain will be used).
|
[letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, the public IP will be used).
|
||||||
''')
|
''')
|
||||||
@allowed([
|
@allowed([
|
||||||
'selfsigned'
|
'selfsigned'
|
||||||
|
|
@ -196,8 +196,7 @@ if [[ "${domainName}" == '' ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RANDOM_DOMAIN_STRING=$(tr -dc 'a-z' < /dev/urandom | head -c 8)
|
DOMAIN="$PUBLIC_IP"
|
||||||
DOMAIN="openvidu-$RANDOM_DOMAIN_STRING-$(echo "$PUBLIC_IP" | tr '.' '-').sslip.io"
|
|
||||||
else
|
else
|
||||||
DOMAIN=${domainName}
|
DOMAIN=${domainName}
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -50,7 +50,7 @@
|
||||||
"label": "Certificate Type",
|
"label": "Certificate Type",
|
||||||
"subLabel": "",
|
"subLabel": "",
|
||||||
"defaultValue": "letsencrypt",
|
"defaultValue": "letsencrypt",
|
||||||
"toolTip": "[[selfsigned] Not recommended for production use. If you don't have a FQDN (DomainName parameter), you can use this option to generate a self-signed certificate.\n[owncert] Valid for production environments. If you have a FQDN (DomainName parameter) and an Elastic IP, you can use this option to use your own certificate.\n[letsencrypt] Valid for production environments. If you have a FQDN (DomainName parameter) and an Elastic IP, you can use this option to generate a Let's Encrypt certificate. If you don't have a FQDN, Let's Encrypt will use sslip.io to generate a valid certificate.\n",
|
"toolTip": "[[selfsigned] Not recommended for production use. If you don't have a FQDN (DomainName parameter), you can use this option to generate a self-signed certificate.\n[owncert] Valid for production environments. If you have a FQDN (DomainName parameter) and an Elastic IP, you can use this option to use your own certificate.\n[letsencrypt] Valid for production environments. If you have a FQDN (DomainName parameter) and an Elastic IP, you can use this option to generate a Let's Encrypt certificate. If you don't have a FQDN, Let's Encrypt will issue a certificate for the public IP.\n",
|
||||||
"constraints": {
|
"constraints": {
|
||||||
"required": true,
|
"required": true,
|
||||||
"allowedValues": [
|
"allowedValues": [
|
||||||
|
|
|
||||||
|
|
@ -178,8 +178,7 @@ echo 1 > /usr/local/bin/openvidu_install_counter.txt
|
||||||
if [[ "${var.domainName}" == "" ]]; then
|
if [[ "${var.domainName}" == "" ]]; then
|
||||||
[ ! -d "/usr/share/openvidu" ] && mkdir -p /usr/share/openvidu
|
[ ! -d "/usr/share/openvidu" ] && mkdir -p /usr/share/openvidu
|
||||||
EXTERNAL_IP=$(get_meta "instance/network-interfaces/0/access-configs/0/external-ip")
|
EXTERNAL_IP=$(get_meta "instance/network-interfaces/0/access-configs/0/external-ip")
|
||||||
RANDOM_DOMAIN_STRING=$(tr -dc 'a-z' < /dev/urandom | head -c 8)
|
DOMAIN="$EXTERNAL_IP"
|
||||||
DOMAIN=openvidu-$RANDOM_DOMAIN_STRING-$(echo $EXTERNAL_IP | tr '.' '-').sslip.io
|
|
||||||
else
|
else
|
||||||
DOMAIN="${var.domainName}"
|
DOMAIN="${var.domainName}"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ variable "stackName" {
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "certificateType" {
|
variable "certificateType" {
|
||||||
description = "[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option. [owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option. [letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, a random sslip.io domain will be used)."
|
description = "[selfsigned] Not recommended for production use. Just for testing purposes or development environments. You don't need a FQDN to use this option. [owncert] Valid for production environments. Use your own certificate. You need a FQDN to use this option. [letsencrypt] Valid for production environments. Can be used with or without a FQDN (if no FQDN is provided, the public IP will be used)."
|
||||||
type = string
|
type = string
|
||||||
default = "letsencrypt"
|
default = "letsencrypt"
|
||||||
validation {
|
validation {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue