Unable to deploy Openvidu 2.13 on AWS with CloudFormation

Hi,
i am trying to deploy Openvidu 2.13 on AWS on a dedicated VPC following the instructions here, but it fails.

Here is the log:

++ echo arn:aws:cloudformation:eu-central-1:040173031875:stack/OpenviduStackDeploy2/c56f2ae0-92be-11ea-8121-0a0c9a06689c
+ sed -i ‘s/#AWS_STACK_ID=/AWS_STACK_ID=arn:aws:cloudformation:eu-central-1:040173031875:stack/OpenviduStackDeploy2/c56f2ae0-92be-11ea-8121-0a0c9a06689c/’ /opt/openvidu/.env
+ sed -i s/#AWS_STACK_NAME=/AWS_STACK_NAME=OpenviduStackDeploy2/ /opt/openvidu/.env
++ docker run --rm amazon/aws-cli:2.0.7 ec2 describe-security-groups --output text --filters Name=tag:aws:cloudformation:logical-id,Values=KMSSecurityGroup Name=tag:aws:cloudformation:stack-id,Values=arn:aws:cloudformation:eu-central-1:0401 73031875:stack/OpenviduStackDeploy2/c56f2ae0-92be-11ea-8121-0a0c9a06689c --query ‘SecurityGroups[].GroupId[]’
You must specify a region. You can also configure your region by running “aws configure”.

Deploy does not fail on the default VPC.

Am i missing something?
Thanks.
Marco.

Hi @Marco,

The subnet you’re using most likely doesn’t have public access. Openvidu needs public access in the used subnet.

If you still have problems, please send us the complete log files ‘/var/log/cloud-init.log’ and ‘/var/log/cloud-init-output.log’, in addition to the information in the file ‘/opt/openvidu/.env’.

Regards

Hi @Oscar.Soto

i don’t think so because i could access the machine via SSH before the rollback terminated it and got the log.

ubuntu@ip-172-17-0-120:/var/log$ cat cloud-init-output.log
Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~16.04.1 running ‘init-local’ at Sun, 10 May 2020 13:07:52 +0000. Up 18.94 seconds.
Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~16.04.1 running ‘init’ at Sun, 10 May 2020 13:07:53 +0000. Up 20.31 seconds.
ci-info: +++++++++++++++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++++++++++++++
ci-info: ±-------±-----±---------------------------±----------------±-------±------------------+
ci-info: | Device | Up | Address | Mask | Scope | Hw-Address |
ci-info: ±-------±-----±---------------------------±----------------±-------±------------------+
ci-info: | ens5 | True | 172.17.0.120 | 255.255.255.128 | global | 02:93:65:d7:8d:82 |
ci-info: | ens5 | True | fe80::93:65ff:fed7:8d82/64 | . | link | 02:93:65:d7:8d:82 |
ci-info: | lo | True | 127.0.0.1 | 255.0.0.0 | host | . |
ci-info: | lo | True | ::1/128 | . | host | . |
ci-info: ±-------±-----±---------------------------±----------------±-------±------------------+
ci-info: +++++++++++++++++++++++++++++Route IPv4 info++++++++++++++++++++++++++++++
ci-info: ±------±------------±-----------±----------------±----------±------+
ci-info: | Route | Destination | Gateway | Genmask | Interface | Flags |
ci-info: ±------±------------±-----------±----------------±----------±------+
ci-info: | 0 | 0.0.0.0 | 172.17.0.1 | 0.0.0.0 | ens5 | UG |
ci-info: | 1 | 172.17.0.0 | 0.0.0.0 | 255.255.255.128 | ens5 | U |
ci-info: ±------±------------±-----------±----------------±----------±------+
ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++
ci-info: ±------±------------±--------±----------±------+
ci-info: | Route | Destination | Gateway | Interface | Flags |
ci-info: ±------±------------±--------±----------±------+
ci-info: | 0 | fe80::/64 | :: | ens5 | U |
ci-info: | 3 | ff00::/8 | :: | ens5 | U |
ci-info: ±------±------------±--------±----------±------+
Generating public/private rsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_rsa_key.
Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.
The key fingerprint is:
SHA256:Efpvrku9dhWggsamvQx+7whURYtFJNRAjZ9wX3WJpV8 root@ip-172-17-0-120
The key’s randomart image is:
±–[RSA 2048]----+
| o=OB .+.o|
| o*+o o…o |
| .+=oo o o E|
| .=.+.o o .|
| .= S. o |
| .o . o . |
| …o … + . |
| …+o o… |
| …o=+o. |
±—[SHA256]-----+
Generating public/private dsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_dsa_key.
Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub.
The key fingerprint is:
SHA256:Eypb9dwrnQ6V14jdIh8pBAOx1IZ6LKf0KyB64aGKXqc root@ip-172-17-0-120
The key’s randomart image is:
±–[DSA 1024]----+
| +=o |
| …oo |
| o+. . |
| +o++ o + = |
| …o*S o B B o|
| + .+. … o B o |
| + =.o .o + . |
|+ + o . . + |
|=o E . . |
±—[SHA256]-----+
Generating public/private ecdsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_ecdsa_key.
Your public key has been saved in /etc/ssh/ssh_host_ecdsa_key.pub.
The key fingerprint is:
SHA256:wEX6DlZ2XrvRwG6sVp6hqfTTpXYFht3lGWLTGyMyEyo root@ip-172-17-0-120
The key’s randomart image is:
±–[ECDSA 256]—+
| .o … . |
| . o .= = =.|
| +Eo… Oo+oB|
| =.o +.++oo|
| o S . O… |
| . o B =. .|
| o =.+o . |
| . +. + . |
| . .o . |
±—[SHA256]-----+
Generating public/private ed25519 key pair.
Your identification has been saved in /etc/ssh/ssh_host_ed25519_key.
Your public key has been saved in /etc/ssh/ssh_host_ed25519_key.pub.
The key fingerprint is:
SHA256:Ynf+KuMb+iGGaBT/lZfBsfhJtDoOzag9ALPI+857pGE root@ip-172-17-0-120
The key’s randomart image is:
±-[ED25519 256]–+
| o |
| + + |
| + . * |
|… * + = + |
|…o o = S * |
| …E O * = |
| .+ * * + . |
| .o. o +oo . |
| .=o .o++… |
±—[SHA256]-----+
Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~16.04.1 running ‘modules:config’ at Sun, 10 May 2020 13:08:03 +0000. Up 30.42 seconds.

  • cfn-init --region eu-central-1 --stack arn:aws:cloudformation:eu-central-1:040173031875:stack/OpenviduStackDeploy2/c56f2ae0-92be-11ea-8121-0a0c9a06689c --resource OpenViduServer
  • /usr/local/bin/feedGroupVars.sh
  • WORKINGDIR=/opt/openvidu
  • sed -i s/OPENVIDU_PRO_LICENSE=/OPENVIDU_PRO_LICENSE=XXXXXXX/ /opt/openvidu/.env
  • sed -i s/OPENVIDU_SECRET=/OPENVIDU_SECRET=eAZ9ltBbg6GBY4QQmolA/ /opt/openvidu/.env
  • [[ letsencrypt == \l\e\t\s\e\n\c\r\y\p\t ]]
  • sed -i s/OPENVIDU_DOMAIN_OR_PUBLIC_IP=/OPENVIDU_DOMAIN_OR_PUBLIC_IP=openvidu.dexie.it/ /opt/openvidu/.env
  • sed -i s/OPENVIDU_PRO_CLUSTER_MODE=manual/OPENVIDU_PRO_CLUSTER_MODE=auto/ /opt/openvidu/.env
  • sed -i s/#OPENVIDU_PRO_CLUSTER_MEDIA_NODES=/OPENVIDU_PRO_CLUSTER_MEDIA_NODES=1/ /opt/openvidu/.env
  • sed -i s/OPENVIDU_PRO_CLUSTER_ENVIRONMENT=on_premise/OPENVIDU_PRO_CLUSTER_ENVIRONMENT=aws/ /opt/openvidu/.env
  • sed -i s/CERTIFICATE_TYPE=selfsigned/CERTIFICATE_TYPE=letsencrypt/ /opt/openvidu/.env
  • sed -i s/LETSENCRYPT_EMAIL=user@example.com/LETSENCRYPT_EMAIL=m.chiaravalloti@gsnetitalia.it/ /opt/openvidu/.env
  • sed -i s/KIBANA_USER=kibanaadmin/KIBANA_USER=kibanaadmin/ /opt/openvidu/.env
  • sed -i s/KIBANA_PASSWORD=/KIBANA_PASSWORD=1deDec36292944cb5cca8c8c7Cb18022/ /opt/openvidu/.env
  • sed -i s/#AWS_DEFAULT_REGION=/AWS_DEFAULT_REGION=eu-central-1/ /opt/openvidu/.env
  • sed -i s/#AWS_IMAGE_ID=/AWS_IMAGE_ID=ami-00e8de73a56620da5/ /opt/openvidu/.env
  • sed -i s/#AWS_INSTANCE_TYPE=/AWS_INSTANCE_TYPE=c5.xlarge/ /opt/openvidu/.env
  • sed -i s/#AWS_KEY_NAME=/AWS_KEY_NAME=openviduServer/ /opt/openvidu/.env
  • sed -i s/#AWS_SUBNET_ID=/AWS_SUBNET_ID=subnet-0879bdff7292a0812/ /opt/openvidu/.env
    ++ sed ‘s#/#\/#g
    ++ echo arn:aws:cloudformation:eu-central-1:040173031875:stack/OpenviduStackDeploy2/c56f2ae0-92be-11ea-8121-0a0c9a06689c
  • sed -i ‘s/#AWS_STACK_ID=/AWS_STACK_ID=arn:aws:cloudformation:eu-central-1:040173031875:stack/OpenviduStackDeploy2/c56f2ae0-92be-11ea-8121-0a0c9a06689c/’ /opt/openvidu/.env
  • sed -i s/#AWS_STACK_NAME=/AWS_STACK_NAME=OpenviduStackDeploy2/ /opt/openvidu/.env
    ++ docker run --rm amazon/aws-cli:2.0.7 ec2 describe-security-groups --output text --filters Name=tag:aws:cloudformation:logical-id,Values=KMSSecurityGroup Name=tag:aws:cloudformation:stack-id,Values=arn:aws:cloudformation:eu-central-1:0401 73031875:stack/OpenviduStackDeploy2/c56f2ae0-92be-11ea-8121-0a0c9a06689c --query ‘SecurityGroups.GroupId
    You must specify a region. You can also configure your region by running “aws configure”.
  • SECGRPID=
  • echo ‘[Openvidu] Parameters incorrect/insufficient’
    [Openvidu] Parameters incorrect/insufficient
  • exit 1
    Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~16.04.1 running ‘modules:final’ at Sun, 10 May 2020 13:08:17 +0000. Up 44.57 seconds.
    2020-05-10 13:08:42,031 - util.py[WARNING]: Failed running /var/lib/cloud/instance/scripts/part-001 [1]
    2020-05-10 13:08:42,037 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
    2020-05-10 13:08:42,040 - util.py[WARNING]: Running module scripts-user (<module ‘cloudinit.config.cc_scripts_user’ from ‘/usr/lib/python3/dist-packages/cloudinit/config/cc_scripts_user.py’>) failed
    Cloud-init v. 19.4-33-gbb4131a2-0ubuntu1~16.04.1 finished at Sun, 10 May 2020 13:08:42 +0000. Datasource DataSourceEc2Local. Up 68.92 seconds
    ubuntu@ip-172-17-0-120:/var/log$

Sorry, i do not have “/var/log/cloud-init.log” and "/opt/openvidu/.env’ cause the rollback terminated the machine.
Thank for the reply.
Marco.

Hi @Marco ,

Try the following, deploy the CF by making a small change in the configuration of the CF.

First add the URL of the PRO’s CF and then press the “View in Designer” button as you can see in the picture:

Then go to line 449 and add the following

--region ${AWS::Region} \

as you can see in the picture:

Finally press the button that you will see in the next image and continue the configuration as usual.

Greetings

Ok @Oscar.Soto,
i’ ll try that when i’ll deploy Openvidu on production environment.
Right now i’m running correctly Openvidu on test environment on the default VPC.
I’ ll let you know.
Thank you for the support.
Greetings.
Marco