Skip to content

Commit

Permalink
Merge branch 'master' into gcp-jinja-template
Browse files Browse the repository at this point in the history
  • Loading branch information
muratugureminoglu authored May 5, 2024
2 parents 2852c04 + 87fafd8 commit 1e23889
Showing 1 changed file with 15 additions and 22 deletions.
37 changes: 15 additions & 22 deletions cloudformation/antmedia-aws-autoscale-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Description: >-
If you have any questions, please just drop a line to contact (at) antmedia.io
Parameters:
VpcCidrBlock:
Description: 'CIDR value for Wavelength Network'
Description: 'CIDR value for Network'
Type: String
MinLength: '9'
MaxLength: '18'
Expand Down Expand Up @@ -292,7 +292,7 @@ Resources:
AMSGetLatestAMI:
Type: AWS::Lambda::Function
Properties:
Runtime: python3.11
Runtime: python3.12
Handler: index.handler
Role: !Sub ${DescribeImagesRole.Arn}
Timeout: 60
Expand Down Expand Up @@ -326,7 +326,7 @@ Resources:
UbuntuGetLatestAMI:
Type: AWS::Lambda::Function
Properties:
Runtime: python3.11
Runtime: python3.12
Handler: index.handler
Role: !Sub ${DescribeImagesRole.Arn}
Timeout: 60
Expand Down Expand Up @@ -380,7 +380,7 @@ Resources:
Properties:
ServiceToken: !Sub ${UbuntuGetLatestAMI.Arn}
Owner: "099720109477"
Name: "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"
Name: "ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*"
Architecture: "x86_64"

AntMediaVPC:
Expand Down Expand Up @@ -572,12 +572,11 @@ Resources:
touch /usr/local/antmedia/conf/initialized
bash /usr/local/antmedia/change_server_mode.sh cluster ${DBInstance.PrivateIp}
apt-get update
apt-get install -y python3-pip
apt-get install -y python3-setuptools
sudo apt-get -y install python3-pip
mkdir -p /opt/aws/bin
wget https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz
python3 -m easy_install --script-dir /opt/aws/bin aws-cfn-bootstrap-py3-latest.tar.gz
/opt/aws/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource OriginGroup --region ${AWS::Region}
sudo pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz
sudo ln -s /usr/local/init/ubuntu/cfn-hup /etc/init.d/cfn-hup
/usr/local/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource OriginGroup --region ${AWS::Region}
TagSpecifications:
- ResourceType: instance
Tags:
Expand Down Expand Up @@ -647,13 +646,12 @@ Resources:
#!/bin/bash
touch /usr/local/antmedia/conf/initialized
bash /usr/local/antmedia/change_server_mode.sh cluster ${DBInstance.PrivateIp}
apt-get update
apt-get install -y python3-pip
apt-get install -y python3-setuptools
sudo apt-get update
sudo apt-get -y install python3-pip
mkdir -p /opt/aws/bin
wget https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz
python3 -m easy_install --script-dir /opt/aws/bin aws-cfn-bootstrap-py3-latest.tar.gz
/opt/aws/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource EdgeGroup --region ${AWS::Region}
sudo pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz
sudo ln -s /usr/local/init/ubuntu/cfn-hup /etc/init.d/cfn-hup
/usr/local/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource EdgeGroup --region ${AWS::Region}
TagSpecifications:
- ResourceType: instance
Tags:
Expand Down Expand Up @@ -903,13 +901,8 @@ Resources:
Fn::Base64:
!Sub |
#!/bin/bash -xe
wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org python3-pip python3-setuptools
sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mongod.conf
systemctl enable mongod
systemctl restart mongod
wget -P /tmp/ https://raw.githubusercontent.com/ant-media/Scripts/master/install_mongodb.sh
bash /tmp/install_mongodb.sh

Outputs:

Expand Down

0 comments on commit 1e23889

Please sign in to comment.