mirror of
https://github.com/jambonz/jambonz-infrastructure.git
synced 2026-07-24 23:41:49 +00:00
This reverts commit c032c94895.
This commit is contained in:
+1
-4
@@ -5,7 +5,4 @@
|
||||
gcp.json
|
||||
|
||||
data_volume/
|
||||
tmpAudio/
|
||||
|
||||
.idea
|
||||
*.iml
|
||||
tmpAudio/
|
||||
@@ -15,26 +15,6 @@ Parameters:
|
||||
Default: "name of an aws keypair that you have downloaded and will use to access the EC2 instances via ssh"
|
||||
Type: "AWS::EC2::KeyPair::KeyName"
|
||||
|
||||
TlsDomain:
|
||||
Default: ""
|
||||
Description: "TLS domain name"
|
||||
Type: String
|
||||
|
||||
TlsKey:
|
||||
Default: ""
|
||||
Description: "TLS .key certificate"
|
||||
Type: "AWS::SSM::Parameter::Value<String>"
|
||||
|
||||
TlsCert:
|
||||
Default: ""
|
||||
Description: "TLS .cert certificate"
|
||||
Type: "AWS::SSM::Parameter::Value<String>"
|
||||
|
||||
TlsFullchain:
|
||||
Default: ""
|
||||
Description: "TLS .fullchain certificate"
|
||||
Type: "AWS::SSM::Parameter::Value<String>"
|
||||
|
||||
InstanceTypeSbcSip:
|
||||
Description: "the EC2 instance type for the SBC SIP server"
|
||||
Type: String
|
||||
@@ -1080,32 +1060,8 @@ Resources:
|
||||
sudo systemctl restart telegraf
|
||||
|
||||
echo "restarting drachtio server"
|
||||
|
||||
#If TLS build out certificates from SSM params
|
||||
if ["${TLS_DOMAIN}" != ""] && ["${TLS_KEY}" != ""] && ["${TLS_CERT}" != ""] && ["${TLS_FULLCHAIN}" != ""]; then
|
||||
|
||||
#create certificate based on SSM values
|
||||
sudo mkdir -p "/etc/certs/$TLS_DOMAIN"
|
||||
echo "$TLS_KEY" > "/etc/certs/$TLS_DOMAIN/$TLS_DOMAIN.key"
|
||||
echo "$TLS_CERT" > "/etc/certs/$TLS_DOMAIN/$TLS_DOMAIN.cert"
|
||||
echo "$TLS_FULLCHAIN" > "/etc/certs/$TLS_DOMAIN/$TLS_DOMAIN.fullchain.crt"
|
||||
|
||||
#update drachtio.conf.xml with newly created certs
|
||||
sudo sed -i "/udp-mtu/a \
|
||||
<tls>
|
||||
<key-file>/etc/certs/$TLS_DOMAIN/$TLS_DOMAIN.key</key-file>
|
||||
<cert-file>/etc/certs/$TLS_DOMAIN/$TLS_DOMAIN.crt</cert-file>
|
||||
<chain-file>/etc/certs/$TLS_DOMAIN/$TLS_DOMAIN.fullchain.crt</chain-file>
|
||||
</tls>" /etc/drachtio.conf.xml
|
||||
|
||||
#update drachtio.service add contact for tls
|
||||
sudo sed -i -e "s/--contact sip:${LOCAL_IP};transport=tcp/a --contact sips:${LOCAL_IP}:5061;transport=tls --external-ip ${PUBLIC_IP} \/g" /etc/systemd/system/drachtio.service
|
||||
sudo sed -i -e "s/--contact sip:${LOCAL_IP};transport=tcp/a --contact sips:${LOCAL_IP}:8443;transport=wss --external-ip ${PUBLIC_IP} \/g" /etc/systemd/system/drachtio.service
|
||||
fi
|
||||
|
||||
# point drachtio server to the HEP endpoint on the monitoring server
|
||||
sudo sed -i -e "s/--address 0.0.0.0 --port 9022/--address 0.0.0.0 --port 9022 --homer ${MONITORING_SERVER_IP}:9060 --homer-id 10/g" /etc/systemd/system/drachtio.service
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart drachtio
|
||||
|
||||
@@ -1126,11 +1082,6 @@ Resources:
|
||||
MONITORING_SERVER_IP: !GetAtt MonitoringServerEC2.PrivateIp
|
||||
AWS_SNS_TOPIC_ARN: !Ref SbcSipServerSNSTopic
|
||||
JAMBONES_TIME_SERIES_HOST: !GetAtt MonitoringServerEC2.PrivateIp
|
||||
TLS_DOMAIN: !Ref TlsDomain
|
||||
TLS_KEY: !Ref TlsKey
|
||||
TLS_CERT: !Ref TlsCert
|
||||
TLS_FULLCHAIN: !Ref TlsFullchain
|
||||
|
||||
SbcSipServerPlacementGroup:
|
||||
Type: AWS::EC2::PlacementGroup
|
||||
Properties:
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
<param name="ext-sip-ip" value="$${local_ip_v4}"/>
|
||||
<param name="auth-calls" value="false"/>
|
||||
<param name="enable-timer" value="false"/>
|
||||
<param name="user-agent-string" value="$${user_agent_string} media gateway"/>
|
||||
<param name="username" value="$${user_agent_string}"/>
|
||||
<param name="user-agent-string" value="Jambonz media gateway"/>
|
||||
<param name="apply-nat-acl" value="nat.auto"/>
|
||||
<param name="context" value="mrf"/>
|
||||
<param name="rtp-timer-name" value="soft"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
if [ "$1" == "yes" ] && [ "$DD_KEY" != "" ]; then
|
||||
if [ "$1" == "yes" ]; then
|
||||
echo installing datadog...
|
||||
|
||||
DD_INSTALL_ONLY=true DD_API_KEY=${DD_KEY} bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/datadog-agent/master/cmd/agent/install_script.sh)"
|
||||
DD_INSTALL_ONLY=true DD_API_KEY=your-dd-key-here bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/datadog-agent/master/cmd/agent/install_script.sh)"
|
||||
fi
|
||||
@@ -130,9 +130,8 @@ sudo cp /usr/local/src/freeswitch/conf/vanilla/autoload_configs/modules.conf.xml
|
||||
sudo cp /tmp/freeswitch.service /etc/systemd/system
|
||||
sudo chown root:root -R /usr/local/freeswitch
|
||||
sudo chmod 644 /etc/systemd/system/freeswitch.service
|
||||
sudo sed -i -e "s/global_codec_prefs=OPUS,G722,PCMU,PCMA,H264,VP8/global_codec_prefs=${CODEC_LIST}/g" /usr/local/freeswitch/conf/vars.xml
|
||||
sudo sed -i -e "s/outbound_codec_prefs=OPUS,G722,PCMU,PCMA,H264,VP8/outbound_codec_prefs=${CODEC_LIST}/g" /usr/local/freeswitch/conf/vars.xml
|
||||
sudo sed -i -e "s/outbound_codec_prefs=PCMU,PCMA,OPUS,G722/a <X-PRE-PROCESS cmd='set' data='user_agent_string=${USER_AGENT_STRING}'/>" /usr/local/freeswitch/conf/vars.xml
|
||||
sudo sed -i -e 's/global_codec_prefs=OPUS,G722,PCMU,PCMA,H264,VP8/global_codec_prefs=PCMU,PCMA,OPUS,G722/g' /usr/local/freeswitch/conf/vars.xml
|
||||
sudo sed -i -e 's/outbound_codec_prefs=OPUS,G722,PCMU,PCMA,H264,VP8/outbound_codec_prefs=PCMU,PCMA,OPUS,G722/g' /usr/local/freeswitch/conf/vars.xml
|
||||
sudo systemctl enable freeswitch
|
||||
sudo cp /tmp/freeswitch_log_rotation /etc/cron.daily/freeswitch_log_rotation
|
||||
sudo chown root:root /etc/cron.daily/freeswitch_log_rotation
|
||||
|
||||
@@ -7,10 +7,7 @@
|
||||
"drachtio_version": "v0.8.13-rc1",
|
||||
"jambonz_version": "v0.6.7-rc8",
|
||||
"install_telegraf": "yes",
|
||||
"install_datadog": "no",
|
||||
"datadog_key" : "",
|
||||
"mediaserver_name" : "jambonz",
|
||||
"preferred_codec_list" : "PCMU,PCMA,OPUS,G722"
|
||||
"install_datadog": "no"
|
||||
},
|
||||
"builders": [{
|
||||
"type": "amazon-ebs",
|
||||
@@ -66,8 +63,8 @@
|
||||
"ssh-keyscan github.com >> ~/.ssh/known_hosts",
|
||||
"mkdir ~/apps",
|
||||
"cd ~/apps",
|
||||
"git clone https://github.com/jambonz/jambonz-feature-server.git -b {{user `jambonz_version`}}",
|
||||
"git clone https://github.com/jambonz/fsw-clear-old-calls.git -b {{user `jambonz_version`}}",
|
||||
"git clone git@github.com:jambonz/jambonz-feature-server.git -b {{user `jambonz_version`}}",
|
||||
"git clone git@github.com:jambonz/fsw-clear-old-calls.git -b {{user `jambonz_version`}}",
|
||||
"sudo find / -name authorized_keys | sudo xargs -0 -r rm -Rf"
|
||||
]
|
||||
},
|
||||
@@ -86,9 +83,6 @@
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"environment_vars": [
|
||||
"DD_KEY={{user `datadog_key`}}"
|
||||
],
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `install_datadog`}}",
|
||||
"script": "scripts/install_datadog.sh"
|
||||
},
|
||||
@@ -99,10 +93,6 @@
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"environment_vars": [
|
||||
"USER_AGENT_STRING={{user `mediaserver_name`}}",
|
||||
"CODEC_LIST={{user `preferred_codec_list`}}"
|
||||
],
|
||||
"script": "scripts/install_freeswitch.sh"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$1" == "yes" ] && [ "$DD_KEY" != "" ]; then
|
||||
if [ "$1" == "yes" ]; then
|
||||
|
||||
DD_INSTALL_ONLY=true DD_API_KEY=$DD_KEY bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/datadog-agent/master/cmd/agent/install_script.sh)"
|
||||
DD_INSTALL_ONLY=true DD_API_KEY=your-dd-key-here bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/datadog-agent/master/cmd/agent/install_script.sh)"
|
||||
fi
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"drachtio_version": "v0.8.13-rc1",
|
||||
"jambonz_version": "v0.6.7-rc8",
|
||||
"install_datadog": "no",
|
||||
"datadog_key" : "",
|
||||
"install_telegraf": "yes"
|
||||
},
|
||||
"builders": [{
|
||||
@@ -64,12 +63,12 @@
|
||||
"ssh-keyscan github.com >> ~/.ssh/known_hosts",
|
||||
"mkdir ~/apps",
|
||||
"cd ~/apps",
|
||||
"git clone https://github.com/jambonz/sbc-options-handler.git",
|
||||
"git clone https://github.com/jambonz/sbc-outbound.git -b {{user `jambonz_version`}}",
|
||||
"git clone https://github.com/jambonz/sbc-inbound.git -b {{user `jambonz_version`}}",
|
||||
"git clone https://github.com/jambonz/sbc-registrar.git -b {{user `jambonz_version`}}",
|
||||
"git clone https://github.com/jambonz/jambonz-smpp-esme.git -b {{user `jambonz_version`}}",
|
||||
"git clone https://github.com/jambonz/sbc-call-router.git"
|
||||
"git clone git@github.com:jambonz/sbc-options-handler.git",
|
||||
"git clone git@github.com:jambonz/sbc-outbound.git -b {{user `jambonz_version`}}",
|
||||
"git clone git@github.com:jambonz/sbc-inbound.git -b {{user `jambonz_version`}}",
|
||||
"git clone git@github.com:jambonz/sbc-registrar.git -b {{user `jambonz_version`}}",
|
||||
"git clone git@github.com:jambonz/jambonz-smpp-esme.git -b {{user `jambonz_version`}}",
|
||||
"git clone git@github.com:jambonz/sbc-call-router.git"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -88,9 +87,6 @@
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"environment_vars": [
|
||||
"DD_KEY={{user `datadog_key`}}"
|
||||
],
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `install_datadog`}}",
|
||||
"script": "scripts/install_datadog.sh"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user