mirror of https://github.com/OpenVidu/openvidu.git
deployment: CF update launch configuration to launch template due to deprecation notice.
Link to the AWS announcement: https://aws.amazon.com/blogs/compute/amazon-ec2-auto-scaling-will-no-longer-add-support-for-new-ec2-features-to-launch-configurations/pull/816/head
parent
ca19a1235d
commit
16c417e8e4
|
@ -705,27 +705,30 @@ Resources:
|
||||||
#####
|
#####
|
||||||
# Media Node Autoscaling Group
|
# Media Node Autoscaling Group
|
||||||
#####
|
#####
|
||||||
MediaNodeAutoScalingLaunchConfiguration:
|
MediaNodeLaunchTemplateConfiguration:
|
||||||
Type: AWS::AutoScaling::LaunchConfiguration
|
Type: AWS::EC2::LaunchTemplate
|
||||||
Properties:
|
Properties:
|
||||||
LaunchConfigurationName: !Join [ "-", [ !Ref 'AWS::StackName', 'ASGMediaNodeLaunchConfiguration'] ]
|
LaunchTemplateName: !Join [ "-", [ !Ref 'AWS::StackName', 'ASGMediaNodeLaunchTemplate'] ]
|
||||||
SecurityGroups:
|
LaunchTemplateData:
|
||||||
- !Ref MediaNodeSecurityGroup
|
SecurityGroupIds:
|
||||||
ImageId: !GetAtt LambdaOnCreateInvoke.MediaNodeImageId
|
- !GetAtt MediaNodeSecurityGroup.GroupId
|
||||||
KeyName: !Ref KeyName
|
ImageId: !GetAtt LambdaOnCreateInvoke.MediaNodeImageId
|
||||||
InstanceType: !Ref AwsInstanceTypeKMS
|
KeyName: !Ref KeyName
|
||||||
BlockDeviceMappings:
|
InstanceType: !Ref AwsInstanceTypeKMS
|
||||||
- DeviceName: /dev/sda1
|
BlockDeviceMappings:
|
||||||
Ebs:
|
- DeviceName: /dev/sda1
|
||||||
VolumeType: gp2
|
Ebs:
|
||||||
DeleteOnTermination: true
|
VolumeType: gp2
|
||||||
VolumeSize: 50
|
DeleteOnTermination: true
|
||||||
|
VolumeSize: 50
|
||||||
|
|
||||||
MediaNodeAutoScalingGroup:
|
MediaNodeAutoScalingGroup:
|
||||||
Type: AWS::AutoScaling::AutoScalingGroup
|
Type: AWS::AutoScaling::AutoScalingGroup
|
||||||
Properties:
|
Properties:
|
||||||
AutoScalingGroupName: !Join [ "-", [ !Ref 'AWS::StackName', 'ASGMediaNode'] ]
|
AutoScalingGroupName: !Join [ "-", [ !Ref 'AWS::StackName', 'ASGMediaNode'] ]
|
||||||
LaunchConfigurationName: !Ref MediaNodeAutoScalingLaunchConfiguration
|
LaunchTemplate:
|
||||||
|
LaunchTemplateId: !Ref MediaNodeLaunchTemplateConfiguration
|
||||||
|
Version: !GetAtt MediaNodeLaunchTemplateConfiguration.LatestVersionNumber
|
||||||
MinSize: !Ref MinMediaNodes
|
MinSize: !Ref MinMediaNodes
|
||||||
MaxSize: !Ref MaxMediaNodes
|
MaxSize: !Ref MaxMediaNodes
|
||||||
DesiredCapacity: !Ref DesiredMediaNodes
|
DesiredCapacity: !Ref DesiredMediaNodes
|
||||||
|
@ -957,59 +960,63 @@ Resources:
|
||||||
#####
|
#####
|
||||||
# OpenVidu Pro Master AutoScaling Group
|
# OpenVidu Pro Master AutoScaling Group
|
||||||
#####
|
#####
|
||||||
OpenViduProMasterNodeAutoScalingLaunchConfiguration:
|
OpenViduProMasterNodeAutoScalingLaunchTemplate:
|
||||||
Type: AWS::AutoScaling::LaunchConfiguration
|
Type: AWS::EC2::LaunchTemplate
|
||||||
Properties:
|
Properties:
|
||||||
LaunchConfigurationName: !Join [ "-", [ !Ref 'AWS::StackName', 'ASGMasterNodeLaunchConfiguration'] ]
|
LaunchTemplateName: !Join [ "-", [ !Ref 'AWS::StackName', 'ASGMasterNodeLaunchConfiguration'] ]
|
||||||
SecurityGroups:
|
LaunchTemplateData:
|
||||||
- !Ref OpenViduSecurityGroup
|
SecurityGroupIds:
|
||||||
IamInstanceProfile: !Ref OpenViduProMasterInstanceProfile
|
- !GetAtt OpenViduSecurityGroup.GroupId
|
||||||
ImageId: !GetAtt LambdaOnCreateInvoke.MasterNodeImageId
|
IamInstanceProfile:
|
||||||
KeyName: !Ref KeyName
|
Arn: !GetAtt OpenViduProMasterInstanceProfile.Arn
|
||||||
InstanceType: !Ref AwsInstanceTypeOV
|
ImageId: !GetAtt LambdaOnCreateInvoke.MasterNodeImageId
|
||||||
BlockDeviceMappings:
|
KeyName: !Ref KeyName
|
||||||
- DeviceName: /dev/sda1
|
InstanceType: !Ref AwsInstanceTypeOV
|
||||||
Ebs:
|
BlockDeviceMappings:
|
||||||
VolumeType: gp2
|
- DeviceName: /dev/sda1
|
||||||
DeleteOnTermination: true
|
Ebs:
|
||||||
VolumeSize: 100
|
VolumeType: gp2
|
||||||
UserData:
|
DeleteOnTermination: true
|
||||||
Fn::Base64:
|
VolumeSize: 100
|
||||||
Fn::Sub:
|
UserData:
|
||||||
- |
|
Fn::Base64:
|
||||||
DOMAIN_OR_PUBLIC_IP=${DomainNameVar} | \
|
Fn::Sub:
|
||||||
OPENVIDU_ENTERPRISE_MEDIA_SERVER=${MediaServer} | \
|
- |
|
||||||
OPENVIDU_PRO_LICENSE=${OpenViduLicense} | \
|
DOMAIN_OR_PUBLIC_IP=${DomainNameVar} | \
|
||||||
OPENVIDU_SECRET=${OpenViduSecret} | \
|
OPENVIDU_ENTERPRISE_MEDIA_SERVER=${MediaServer} | \
|
||||||
OPENVIDU_PRO_CLUSTER_ID=${OpenViduProClusterId} | \
|
OPENVIDU_PRO_LICENSE=${OpenViduLicense} | \
|
||||||
OPENVIDU_PRO_ELASTICSEARCH_HOST=${ElasticsearchUrl} | \
|
OPENVIDU_SECRET=${OpenViduSecret} | \
|
||||||
OPENVIDU_PRO_KIBANA_HOST=${KibanaUrl} | \
|
OPENVIDU_PRO_CLUSTER_ID=${OpenViduProClusterId} | \
|
||||||
ELASTICSEARCH_USERNAME=${ElasticsearchUser} | \
|
OPENVIDU_PRO_ELASTICSEARCH_HOST=${ElasticsearchUrl} | \
|
||||||
ELASTICSEARCH_PASSWORD=${ElasticsearchPassword} | \
|
OPENVIDU_PRO_KIBANA_HOST=${KibanaUrl} | \
|
||||||
RM_REDIS_IP=${RedisHostName} | \
|
ELASTICSEARCH_USERNAME=${ElasticsearchUser} | \
|
||||||
RM_REDIS_PORT=${RedisPort} | \
|
ELASTICSEARCH_PASSWORD=${ElasticsearchPassword} | \
|
||||||
RM_SQS_QUEUE=${SqsQueueName} | \
|
RM_REDIS_IP=${RedisHostName} | \
|
||||||
RM_CLOUDFORMATION_ARN=${AWS::StackId} | \
|
RM_REDIS_PORT=${RedisPort} | \
|
||||||
OPENVIDU_PRO_CONFIG_S3_BUCKET=${OpenViduS3BucketParam} | \
|
RM_SQS_QUEUE=${SqsQueueName} | \
|
||||||
RM_MEDIA_NODES_AUTOSCALING_GROUP_NAME=${MediaNodesAutoscalingGroupName} | \
|
RM_CLOUDFORMATION_ARN=${AWS::StackId} | \
|
||||||
RM_MASTER_NODES_AUTOSCALING_GROUP_NAME=${MasterNodesAutoscalingGroupName} | \
|
OPENVIDU_PRO_CONFIG_S3_BUCKET=${OpenViduS3BucketParam} | \
|
||||||
OPENVIDU_RECORDING=${OpenViduRecording} | \
|
RM_MEDIA_NODES_AUTOSCALING_GROUP_NAME=${MediaNodesAutoscalingGroupName} | \
|
||||||
OPENVIDU_PRO_COTURN_IN_MEDIA_NODES=${CoturnInMediaNodes} | \
|
RM_MASTER_NODES_AUTOSCALING_GROUP_NAME=${MasterNodesAutoscalingGroupName} | \
|
||||||
OPENVIDU_ENTERPRISE_S3_CONFIG_AUTORESTART=${OpenViduS3ConfigAutoRestart} | \
|
OPENVIDU_RECORDING=${OpenViduRecording} | \
|
||||||
OPENVIDU_PRO_ELASTICSEARCH=${ElasticsearchEnabled}
|
OPENVIDU_PRO_COTURN_IN_MEDIA_NODES=${CoturnInMediaNodes} | \
|
||||||
- DomainNameVar: !Ref DomainName
|
OPENVIDU_ENTERPRISE_S3_CONFIG_AUTORESTART=${OpenViduS3ConfigAutoRestart} | \
|
||||||
RedisHostName: !GetAtt RedisCluster.RedisEndpoint.Address
|
OPENVIDU_PRO_ELASTICSEARCH=${ElasticsearchEnabled}
|
||||||
RedisPort: !GetAtt RedisCluster.RedisEndpoint.Port
|
- DomainNameVar: !Ref DomainName
|
||||||
SqsQueueName: !GetAtt SQSQueue.QueueName
|
RedisHostName: !GetAtt RedisCluster.RedisEndpoint.Address
|
||||||
MediaNodesAutoscalingGroupName: !Join [ "-", [ !Ref 'AWS::StackName', 'ASGMediaNode'] ]
|
RedisPort: !GetAtt RedisCluster.RedisEndpoint.Port
|
||||||
MasterNodesAutoscalingGroupName: !Join [ "-", [ !Ref 'AWS::StackName', 'ASGOpenViduProMasterNode'] ]
|
SqsQueueName: !GetAtt SQSQueue.QueueName
|
||||||
OpenViduS3BucketParam: !If [ CreateS3Bucket, !Ref S3OpenViduBucket, !Ref OpenViduS3BucketName ]
|
MediaNodesAutoscalingGroupName: !Join [ "-", [ !Ref 'AWS::StackName', 'ASGMediaNode'] ]
|
||||||
|
MasterNodesAutoscalingGroupName: !Join [ "-", [ !Ref 'AWS::StackName', 'ASGOpenViduProMasterNode'] ]
|
||||||
|
OpenViduS3BucketParam: !If [ CreateS3Bucket, !Ref S3OpenViduBucket, !Ref OpenViduS3BucketName ]
|
||||||
|
|
||||||
OpenViduProMasterNodeAutoScalingGroup:
|
OpenViduProMasterNodeAutoScalingGroup:
|
||||||
Type: AWS::AutoScaling::AutoScalingGroup
|
Type: AWS::AutoScaling::AutoScalingGroup
|
||||||
Properties:
|
Properties:
|
||||||
AutoScalingGroupName: !Join [ "-", [ !Ref 'AWS::StackName', 'ASGOpenViduProMasterNode'] ]
|
AutoScalingGroupName: !Join [ "-", [ !Ref 'AWS::StackName', 'ASGOpenViduProMasterNode'] ]
|
||||||
LaunchConfigurationName: !Ref OpenViduProMasterNodeAutoScalingLaunchConfiguration
|
LaunchTemplate:
|
||||||
|
LaunchTemplateId: !Ref OpenViduProMasterNodeAutoScalingLaunchTemplate
|
||||||
|
Version: !GetAtt OpenViduProMasterNodeAutoScalingLaunchTemplate.LatestVersionNumber
|
||||||
TargetGroupARNs:
|
TargetGroupARNs:
|
||||||
- !Ref TargetGroup
|
- !Ref TargetGroup
|
||||||
MinSize: !Ref MinMasterNodes
|
MinSize: !Ref MinMasterNodes
|
||||||
|
|
Loading…
Reference in New Issue