For some reason, it doesn't setup the cluster properly, when the AWS auto scaling initialize a new instance, however it does work if I ssh into the server and perform the command "sudo ./change_server_mode.sh cluster <MONGODB_IP>" manually.
Note that the "sudo systemctl stop apt-daily.timer" & "sudo systemctl start apt-daily.timer" commands are to solve the error that I faced earlier
Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
Question
Chungwei
#!/bin/bash
sudo systemctl stop apt-daily.timer
wget <ANT_MEDIA_SERVER_ENERPRISE_INSTALLER_URL>
wget https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh
chmod 755 install_ant-media-server.sh
sudo ./install_ant-media-server.sh ant-media-server*.zip
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 5080
sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 5443
wget https://raw.githubusercontent.com/ant-media/Scripts/master/change_server_mode.sh
chmod 755 change_server_mode.sh
sudo ./change_server_mode.sh cluster <MONGODB_IP>
sudo systemctl start apt-daily.timer
For some reason, it doesn't setup the cluster properly, when the AWS auto scaling initialize a new instance, however it does work if I ssh into the server and perform the command "sudo ./change_server_mode.sh cluster <MONGODB_IP>" manually.
Link to comment
Share on other sites
Top Posters For This Question
2
1
Popular Days
Feb 14
3
Top Posters For This Question
Chungwei 2 posts
BURAK KEKE 1 post
Popular Days
Feb 14 2019
3 posts
2 answers to this question
Recommended Posts