mirror of
https://github.com/jambonz/jambonz-infrastructure.git
synced 2026-10-04 03:03:57 +00:00
update to jambonz v0.8.4-3, rtpengine mr11.4.1.3, freeswitch modules 0.7.2 and initial working version of proxmox deploy
This commit is contained in:
@@ -95,9 +95,9 @@ Conditions:
|
||||
Mappings:
|
||||
AWSRegion2AMI:
|
||||
us-east-1:
|
||||
Ami: ami-0aee73467294db8aa
|
||||
Ami: ami-039461e559b855aae
|
||||
eu-west-2:
|
||||
Ami: ami-065dc7be444b2ad3a
|
||||
Ami: ami-01bdddec97e77cb73
|
||||
|
||||
Resources:
|
||||
IamCloudwatchRole:
|
||||
@@ -285,7 +285,7 @@ Resources:
|
||||
sudo systemctl restart jaeger-collector.service
|
||||
sudo systemctl restart jaeger-query.service
|
||||
|
||||
# get an apiban key
|
||||
# get an apiban key and install it
|
||||
APIBANKEY=$(curl -X POST -u jambonz:1a074994242182a9e0b67eae93978826 -d "{\"client\": \"$INSTANCE_ID\"}" -s https://apiban.org/sponsor/newkey | jq -r '.ApiKey')
|
||||
sudo sed -i -e "s/API-KEY-HERE/$APIBANKEY/g" /usr/local/bin/apiban/config.json
|
||||
sudo /usr/local/bin/apiban/apiban-iptables-client FULL
|
||||
|
||||
@@ -1212,6 +1212,7 @@ Resources:
|
||||
max_memory_restart: '1G',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
JAMBONES_TTS_TRIM_SILENCE: 1,
|
||||
JAMBONES_MYSQL_REFRESH_TTL: ${JAMBONES_MYSQL_REFRESH_TTL},
|
||||
ENABLE_METRICS: 1,
|
||||
STATS_HOST: '127.0.0.1',
|
||||
|
||||
@@ -1075,6 +1075,7 @@ Resources:
|
||||
max_memory_restart: '1G',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
JAMBONES_TTS_TRIM_SILENCE: 1,
|
||||
ENABLE_METRICS: 1,
|
||||
STATS_HOST: '127.0.0.1',
|
||||
STATS_PORT: 8125,
|
||||
|
||||
@@ -1315,6 +1315,7 @@ Resources:
|
||||
max_memory_restart: '1G',
|
||||
env: {
|
||||
JAMBONES_LOGLEVEL: 'info',
|
||||
JAMBONES_TTS_TRIM_SILENCE: 1,
|
||||
JWT_SECRET: '${JWT_SECRET}',
|
||||
AWS_REGION: '${AWS_REGION}',
|
||||
JAMBONES_API_BASE_URL: 'http://${URLPortal}/v1',
|
||||
|
||||
BIN
Binary file not shown.
@@ -14,6 +14,7 @@ module.exports = {
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
JWT_SECRET: 'JWT-SECRET-GOES_HERE',
|
||||
JAMBONES_TTS_TRIM_SILENCE: 1,
|
||||
JAMBONES_GATHER_EARLY_HINTS_MATCH: 1,
|
||||
ENABLE_DATADOG_METRICS: 0,
|
||||
JAMBONES_NETWORK_CIDR: '172.31.32.0/24',
|
||||
|
||||
@@ -2293,10 +2293,10 @@
|
||||
[[inputs.disk]]
|
||||
## By default stats will be gathered for all mount points.
|
||||
## Set mount_points will restrict the stats to only the specified mount points.
|
||||
# mount_points = ["/"]
|
||||
mount_points = ["/"]
|
||||
|
||||
## Ignore mount points by filesystem type.
|
||||
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
|
||||
#ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
|
||||
|
||||
|
||||
# Read metrics about disk IO by device
|
||||
|
||||
@@ -6,7 +6,7 @@ GRPC_VERSION=c66d2cc
|
||||
GOOGLE_API_VERSION=e9da6f8b469c52b83f900e820be30762e9e05c57
|
||||
AWS_SDK_VERSION=1.8.129
|
||||
LWS_VERSION=v3.2.3
|
||||
MODULES_VERSION=v0.7.1
|
||||
MODULES_VERSION=v0.7.2
|
||||
|
||||
echo "freeswitch version to install is ${FREESWITCH_VERSION}"
|
||||
echo "drachtio modules version to install is ${MODULES_VERSION}"
|
||||
@@ -18,8 +18,8 @@ echo "LWS_VERSION version to install is ${LWS_VERSION}"
|
||||
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
|
||||
|
||||
cd /tmp
|
||||
tar xvfz SpeechSDK-Linux-1.29.0.tar.gz
|
||||
cd SpeechSDK-Linux-1.29.0
|
||||
tar xvfz SpeechSDK-Linux-1.30.0.tar.gz
|
||||
cd SpeechSDK-Linux-1.30.0
|
||||
sudo cp -r include /usr/local/include/MicrosoftSpeechSDK
|
||||
sudo cp -r lib/ /usr/local/lib/MicrosoftSpeechSDK
|
||||
if [ "$ARCH" == "arm64" ]; then
|
||||
@@ -34,8 +34,8 @@ if [ "$ARCH" == "amd64" ]; then
|
||||
fi
|
||||
|
||||
cd /usr/local/src
|
||||
echo remove SpeechSDK-Linux-1.29.0
|
||||
sudo rm -Rf /tmp/SpeechSDK-Linux-1.29.0.tgz /tmp/SpeechSDK-Linux-1.29.0
|
||||
echo remove SpeechSDK-Linux-1.30.0
|
||||
sudo rm -Rf /tmp/SpeechSDK-Linux-1.30.0.tgz /tmp/SpeechSDK-Linux-1.30.0
|
||||
echo done
|
||||
|
||||
echo config git
|
||||
|
||||
BIN
Binary file not shown.
@@ -40,8 +40,8 @@ module.exports = {
|
||||
err_file: '/home/admin/.pm2/logs/jambonz-api-server.log',
|
||||
combine_logs: true,
|
||||
instance_var: 'INSTANCE_ID',
|
||||
exec_mode: 'fork',
|
||||
instances: 1,
|
||||
exec_mode: 'cluster',
|
||||
instances: 0,
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
max_memory_restart: '1G',
|
||||
@@ -257,6 +257,7 @@ module.exports = {
|
||||
JAMBONES_LOGLEVEL: 'info',
|
||||
JWT_SECRET: 'JWT-SECRET-GOES_HERE',
|
||||
AUTHENTICATION_KEY: 'JWT-SECRET-GOES_HERE',
|
||||
JAMBONES_TTS_TRIM_SILENCE: 1,
|
||||
JAMBONES_OTEL_ENABLED: 1,
|
||||
OTEL_EXPORTER_JAEGER_ENDPOINT: 'http://localhost:14268/api/traces',
|
||||
OTEL_EXPORTER_OTLP_METRICS_INSECURE: 1,
|
||||
|
||||
@@ -6,7 +6,7 @@ GRPC_VERSION=c66d2cc
|
||||
GOOGLE_API_VERSION=e9da6f8b469c52b83f900e820be30762e9e05c57
|
||||
AWS_SDK_VERSION=1.8.129
|
||||
LWS_VERSION=v3.2.3
|
||||
MODULES_VERSION=v0.7.1
|
||||
MODULES_VERSION=v0.7.2
|
||||
|
||||
echo "freeswitch version to install is ${FREESWITCH_VERSION}"
|
||||
echo "drachtio modules version to install is ${MODULES_VERSION}"
|
||||
@@ -18,8 +18,8 @@ echo "LWS_VERSION version to install is ${LWS_VERSION}"
|
||||
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
|
||||
|
||||
cd /tmp
|
||||
tar xvfz SpeechSDK-Linux-1.29.0.tar.gz
|
||||
cd SpeechSDK-Linux-1.29.0
|
||||
tar xvfz SpeechSDK-Linux-1.30.0.tar.gz
|
||||
cd SpeechSDK-Linux-1.30.0
|
||||
sudo cp -r include /usr/local/include/MicrosoftSpeechSDK
|
||||
sudo cp -r lib/ /usr/local/lib/MicrosoftSpeechSDK
|
||||
if [ "$ARCH" == "arm64" ]; then
|
||||
@@ -34,8 +34,8 @@ if [ "$ARCH" == "amd64" ]; then
|
||||
fi
|
||||
|
||||
cd /usr/local/src
|
||||
echo remove SpeechSDK-Linux-1.29.0
|
||||
sudo rm -Rf /tmp/SpeechSDK-Linux-1.29.0.tgz /tmp/SpeechSDK-Linux-1.29.0
|
||||
echo remove SpeechSDK-Linux-1.30.0
|
||||
sudo rm -Rf /tmp/SpeechSDK-Linux-1.30.0.tgz /tmp/SpeechSDK-Linux-1.30.0
|
||||
echo done
|
||||
|
||||
echo config git
|
||||
|
||||
@@ -19,6 +19,8 @@ sudo apt-get install -y telegraf
|
||||
|
||||
sudo cp /tmp/telegraf.conf /etc/telegraf/telegraf.conf
|
||||
sudo sed -i -e "s/influxdb:8086/$INFLUXDB_IP:8086/g" /etc/telegraf/telegraf.conf
|
||||
sudo sed -i -e "s/# mount_points = /mount_points = /g" /etc/telegraf/telegraf.conf
|
||||
sudo sed -i -e "s/ignore_fs = /#ignore_fs = /g" /etc/telegraf/telegraf.conf
|
||||
|
||||
sudo systemctl enable telegraf
|
||||
sudo systemctl start telegraf
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"ami_description": "jambonz all-in-one AMI",
|
||||
"instance_type": "c6in.xlarge",
|
||||
"drachtio_version": "v0.8.22",
|
||||
"jambonz_version": "v0.8.4-1",
|
||||
"jambonz_version": "v0.8.4-3",
|
||||
"jambonz_user": "admin",
|
||||
"jambonz_password": "JambonzR0ck$",
|
||||
"install_telegraf": "yes",
|
||||
@@ -17,7 +17,7 @@
|
||||
"install_cloudwatch": "yes",
|
||||
"install_nodered": "no",
|
||||
"influxdb_ip": "127.0.0.1",
|
||||
"rtp_engine_version": "mr11.3.1.8",
|
||||
"rtp_engine_version": "mr11.4.1.3",
|
||||
"rtp_engine_min_port": "40000",
|
||||
"rtp_engine_max_port": "60000",
|
||||
"mediaserver_name" : "jambonz",
|
||||
@@ -68,7 +68,7 @@
|
||||
"libevent-dev libpcap-dev libxmlrpc-core-c3-dev markdown libjson-glib-dev lsb-release \\",
|
||||
"libhiredis-dev gperf libspandsp-dev default-libmysqlclient-dev htop dnsutils gdb \\",
|
||||
"gnupg2 wget pkg-config ca-certificates libjpeg-dev libsqlite3-dev libpcre3-dev libldns-dev snapd \\",
|
||||
"libspeex-dev libspeexdsp-dev libedit-dev libtiff-dev yasm libswscale-dev haveged jq fail2ban \\",
|
||||
"libspeex-dev libspeexdsp-dev libedit-dev libtiff-dev yasm libswscale-dev haveged jq fail2ban pandoc \\",
|
||||
"libopus-dev libsndfile-dev libshout3-dev libmpg123-dev libmp3lame-dev libopusfile-dev libgoogle-perftools-dev",
|
||||
"sudo chmod a+w /usr/local/src",
|
||||
"mkdir ~/apps",
|
||||
|
||||
@@ -41,8 +41,8 @@ module.exports = {
|
||||
err_file: '/home/admin/.pm2/logs/jambonz-api-server.log',
|
||||
combine_logs: true,
|
||||
instance_var: 'INSTANCE_ID',
|
||||
exec_mode: 'fork',
|
||||
instances: 1,
|
||||
exec_mode: 'cluster',
|
||||
instances: 0,
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
max_memory_restart: '1G',
|
||||
@@ -258,6 +258,7 @@ module.exports = {
|
||||
NODE_ENV: 'production',
|
||||
AUTHENTICATION_KEY: 'JWT-SECRET-GOES_HERE',
|
||||
JWT_SECRET: 'JWT-SECRET-GOES_HERE',
|
||||
JAMBONES_TTS_TRIM_SILENCE: 1,
|
||||
JAMBONES_GATHER_EARLY_HINTS_MATCH: 1,
|
||||
JAMBONES_OTEL_ENABLED: 1,
|
||||
OTEL_EXPORTER_JAEGER_ENDPOINT: 'http://localhost:14268/api/traces',
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
"ssh_username": "admin",
|
||||
"ami_description": "jambonz-mini (all-in-one server)",
|
||||
"instance_type": "c2-standard-4",
|
||||
"drachtio_version": "v0.8.21",
|
||||
"jambonz_version": "v0.8.2",
|
||||
"drachtio_version": "v0.8.22",
|
||||
"jambonz_version": "v0.8.4-3",
|
||||
"jambonz_user": "admin",
|
||||
"jambonz_password": "JambonzR0ck$",
|
||||
"install_telegraf": "yes",
|
||||
|
||||
@@ -14,7 +14,7 @@ In order to run this packer script you must first create a VM template on your P
|
||||
|
||||
Assuming that you have created a variables.json file to hold your variable values, you would simply do this:
|
||||
```
|
||||
$ packer build -color=false -var-file=variables.json template.json template.json
|
||||
$ packer build -color=false -var-file=variables.json template.json
|
||||
```
|
||||
|
||||
### variables
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Cassandra
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=admin
|
||||
Group=admin
|
||||
ExecStart=/usr/local/cassandra/bin/cassandra -f
|
||||
ExecStop=/usr/local/cassandra/bin/nodetool drain
|
||||
Type=simple
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
LimitNOFILE=32000
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,8 @@ After=syslog.target network.target local-fs.target
|
||||
[Service]
|
||||
; service
|
||||
Type=forking
|
||||
ExecStart=/usr/local/bin/drachtio --daemon -f /etc/drachtio-5070.conf.xml --contact sip:*:5070;transport=udp,tcp --address 0.0.0.0 --port 9023
|
||||
ExecStartPre=/bin/sh -c 'systemctl set-environment LOCAL_IP=`ip addr show eth1 | awk \'/inet / {print $2}\' | cut -d \'/\' -f 1`'
|
||||
ExecStart=/usr/local/bin/drachtio --daemon -f /etc/drachtio-5070.conf.xml --contact sip:${LOCAL_IP}:5070;transport=udp,tcp --address 0.0.0.0 --port 9023
|
||||
TimeoutSec=15s
|
||||
Restart=always
|
||||
; exec
|
||||
@@ -26,3 +27,4 @@ UMask=0007
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
[Unit]
|
||||
Description=drachtio
|
||||
After=syslog.target network.target local-fs.target
|
||||
|
||||
[Service]
|
||||
; service
|
||||
Type=forking
|
||||
ExecStartPre=/bin/sh -c 'systemctl set-environment LOCAL_IP=`curl -s -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ip`'
|
||||
ExecStartPre=/bin/sh -c 'systemctl set-environment PUBLIC_IP=`curl -s -H "Metadata-Flavor: Google" http://metadata/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip`'
|
||||
ExecStart=/usr/local/bin/drachtio --daemon --contact sip:${LOCAL_IP};transport=udp --external-ip ${PUBLIC_IP} \
|
||||
--contact sip:${LOCAL_IP};transport=tcp \
|
||||
--address 0.0.0.0 --port 9022 --homer 127.0.0.1:9060 --homer-id 10
|
||||
TimeoutSec=15s
|
||||
Restart=always
|
||||
; exec
|
||||
User=root
|
||||
Group=daemon
|
||||
LimitCORE=infinity
|
||||
LimitNOFILE=100000
|
||||
LimitNPROC=60000
|
||||
;LimitSTACK=240
|
||||
LimitRTPRIO=infinity
|
||||
LimitRTTIME=7000000
|
||||
IOSchedulingClass=realtime
|
||||
IOSchedulingPriority=2
|
||||
CPUSchedulingPolicy=rr
|
||||
CPUSchedulingPriority=89
|
||||
UMask=0007
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -5,11 +5,12 @@ After=syslog.target network.target local-fs.target
|
||||
[Service]
|
||||
; service
|
||||
Type=forking
|
||||
ExecStartPre=/bin/sh -c 'systemctl set-environment LOCAL_IP=$$(/bin/ip -4 addr show eth0 | grep -oP "(?<=inet )\d+(\.\d+){3}" | head -n 1)'
|
||||
ExecStartPre=/bin/sh -c "systemctl set-environment PUBLIC_IP=`/usr/bin/curl -s http://ipecho.net/plain`"
|
||||
|
||||
ExecStartPre=/bin/sh -c 'systemctl set-environment PUBLIC_IP=`ip addr show eth0 | awk \'/inet / {print $2}\' | cut -d \'/\' -f 1`'
|
||||
ExecStartPre=/bin/sh -c 'systemctl set-environment LOCAL_IP=`ip addr show eth1 | awk \'/inet / {print $2}\' | cut -d \'/\' -f 1`'
|
||||
ExecStart=/usr/local/bin/drachtio --daemon \
|
||||
--contact sip:${PUBLIC_IP};transport=udp,tcp \
|
||||
--contact sip:${LOCAL_IP};transport=udp,tcp \
|
||||
--contact sip:${PUBLIC_IP}:5060;transport=udp,tcp \
|
||||
--contact sip:${LOCAL_IP}:5060;transport=udp,tcp \
|
||||
--address 0.0.0.0 --port 9022 --homer 127.0.0.1:9060 --homer-id 10
|
||||
TimeoutSec=15s
|
||||
Restart=always
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = {
|
||||
watch: false,
|
||||
max_memory_restart: '2G',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
JAMBONES_LOGLEVEL: 'info',
|
||||
HTTP_PORT: 3020,
|
||||
AVOID_UDH: true,
|
||||
JAMBONES_MYSQL_HOST: '127.0.0.1',
|
||||
@@ -29,8 +29,7 @@ module.exports = {
|
||||
JAMBONES_MYSQL_DATABASE: 'jambones',
|
||||
JAMBONES_MYSQL_CONNECTION_LIMIT: 10,
|
||||
JAMBONES_REDIS_HOST: '127.0.0.1',
|
||||
JAMBONES_REDIS_PORT: 6379,
|
||||
JAMBONES_LOGLEVEL: 'info'
|
||||
JAMBONES_REDIS_PORT: 6379
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -41,13 +40,13 @@ module.exports = {
|
||||
err_file: '/home/admin/.pm2/logs/jambonz-api-server.log',
|
||||
combine_logs: true,
|
||||
instance_var: 'INSTANCE_ID',
|
||||
exec_mode: 'fork',
|
||||
instances: 1,
|
||||
exec_mode: 'cluster',
|
||||
instances: 0,
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
max_memory_restart: '1G',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
JAMBONES_LOGLEVEL: 'info',
|
||||
AUTHENTICATION_KEY: 'JWT-SECRET-GOES_HERE',
|
||||
JWT_SECRET: 'JWT-SECRET-GOES_HERE',
|
||||
JAMBONES_MYSQL_HOST: '127.0.0.1',
|
||||
@@ -57,7 +56,6 @@ module.exports = {
|
||||
JAMBONES_MYSQL_CONNECTION_LIMIT: 10,
|
||||
JAMBONES_REDIS_HOST: '127.0.0.1',
|
||||
JAMBONES_REDIS_PORT: 6379,
|
||||
JAMBONES_LOGLEVEL: 'info',
|
||||
JAMBONE_API_VERSION: 'v1',
|
||||
JAMBONES_TIME_SERIES_HOST: '127.0.0.1',
|
||||
ENABLE_METRICS: 1,
|
||||
@@ -67,6 +65,8 @@ module.exports = {
|
||||
STATS_TELEGRAF: 1,
|
||||
HTTP_PORT: 3002,
|
||||
JAEGER_BASE_URL: 'http://127.0.0.1:16686',
|
||||
JAMBONZ_RECORD_WS_USERNAME: 'jambonz',
|
||||
JAMBONZ_RECORD_WS_PASSWORD: 'JWT-SECRET-GOES_HERE',
|
||||
HOMER_BASE_URL: 'http://127.0.0.1:9080',
|
||||
HOMER_USERNAME: 'admin',
|
||||
HOMER_PASSWORD: 'sipcapture'
|
||||
@@ -86,7 +86,7 @@ module.exports = {
|
||||
watch: false,
|
||||
max_memory_restart: '1G',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
JAMBONES_LOGLEVEL: 'info',
|
||||
HTTP_PORT: 4000,
|
||||
JAMBONES_INBOUND_ROUTE: '127.0.0.1:4002',
|
||||
JAMBONES_OUTBOUND_ROUTE: '127.0.0.1:4003',
|
||||
@@ -113,8 +113,8 @@ module.exports = {
|
||||
watch: false,
|
||||
max_memory_restart: '1G',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
JAMBONES_LOGLEVEL: 'info',
|
||||
JWT_SECRET: 'JWT-SECRET-GOES_HERE',
|
||||
RTPENGINE_PING_INTERVAL: 30000,
|
||||
DRACHTIO_HOST: '127.0.0.1',
|
||||
DRACHTIO_PORT: 9022,
|
||||
@@ -148,8 +148,8 @@ module.exports = {
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
JAMBONES_LOGLEVEL: 'info',
|
||||
JWT_SECRET: 'JWT-SECRET-GOES_HERE',
|
||||
JAMBONES_NETWORK_CIDR: 'PRIVATE_IP/32',
|
||||
MIN_CALL_LIMIT: 9999,
|
||||
RTPENGINE_PING_INTERVAL: 30000,
|
||||
@@ -190,9 +190,9 @@ module.exports = {
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
JAMBONES_NETWORK_CIDR: 'PRIVATE_IP/32',
|
||||
JAMBONES_LOGLEVEL: 'info',
|
||||
JWT_SECRET: 'JWT-SECRET-GOES_HERE',
|
||||
JAMBONES_NETWORK_CIDR: 'PRIVATE_IP/32',
|
||||
DRACHTIO_HOST: '127.0.0.1',
|
||||
DRACHTIO_PORT: 9022,
|
||||
DRACHTIO_SECRET: 'cymru',
|
||||
@@ -231,7 +231,6 @@ module.exports = {
|
||||
watch: false,
|
||||
max_memory_restart: '1G',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
LOGLEVEL: 'info',
|
||||
DTMF_ONLY: true,
|
||||
RTPENGINE_DTMF_LOG_PORT: 22223,
|
||||
@@ -255,10 +254,10 @@ module.exports = {
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
AUTHENTICATION_KEY: 'JWT-SECRET-GOES_HERE',
|
||||
JAMBONES_LOGLEVEL: 'info',
|
||||
JWT_SECRET: 'JWT-SECRET-GOES_HERE',
|
||||
JAMBONES_GATHER_EARLY_HINTS_MATCH: 1,
|
||||
AUTHENTICATION_KEY: 'JWT-SECRET-GOES_HERE',
|
||||
JAMBONES_TTS_TRIM_SILENCE: 1,
|
||||
JAMBONES_OTEL_ENABLED: 1,
|
||||
OTEL_EXPORTER_JAEGER_ENDPOINT: 'http://localhost:14268/api/traces',
|
||||
OTEL_EXPORTER_OTLP_METRICS_INSECURE: 1,
|
||||
@@ -275,6 +274,7 @@ module.exports = {
|
||||
JAMBONES_NETWORK_CIDR: 'PRIVATE_IP/32',
|
||||
JAMBONES_API_BASE_URL: '--JAMBONES_API_BASE_URL--',
|
||||
JAMBONES_GATHER_EARLY_HINTS_MATCH: 1,
|
||||
JAMBONES_GATHER_CLEAR_GLOBAL_HINTS_ON_EMPTY_HINTS: 1,
|
||||
JAMBONES_MYSQL_HOST: '127.0.0.1',
|
||||
JAMBONES_MYSQL_USER: 'admin',
|
||||
JAMBONES_MYSQL_PASSWORD: 'JambonzR0ck$',
|
||||
@@ -282,7 +282,6 @@ module.exports = {
|
||||
JAMBONES_MYSQL_CONNECTION_LIMIT: 10,
|
||||
JAMBONES_REDIS_HOST: '127.0.0.1',
|
||||
JAMBONES_REDIS_PORT: 6379,
|
||||
JAMBONES_LOGLEVEL: 'info',
|
||||
JAMBONES_TIME_SERIES_HOST: '127.0.0.1',
|
||||
HTTP_PORT: 3000,
|
||||
DRACHTIO_HOST: '127.0.0.1',
|
||||
@@ -290,6 +289,9 @@ module.exports = {
|
||||
DRACHTIO_SECRET: 'cymru',
|
||||
JAMBONES_SBCS: 'PRIVATE_IP',
|
||||
JAMBONES_FREESWITCH: '127.0.0.1:8021:JambonzR0ck$',
|
||||
JAMBONZ_RECORD_WS_USERNAME: 'jambonz',
|
||||
JAMBONZ_RECORD_WS_PASSWORD: 'JWT-SECRET-GOES_HERE',
|
||||
JAMBONZ_RECORD_WS_BASE_URL: 'ws://127.0.0.1:3002/api/v1',
|
||||
SMPP_URL: 'http://PRIVATE_IP:3020'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Jaeger Collector
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Environment="SPAN_STORAGE_TYPE=cassandra"
|
||||
Environment="CASSANDRA_SERVERS=127.0.0.1"
|
||||
Environment="CASSANDRA_KEYSPACE=jaeger_v1_dc1"
|
||||
ExecStart=/usr/local/bin/jaeger-collector --cassandra.keyspace=jaeger_v1_dc1 --cassandra.servers=127.0.0.1 --cassandra.username=jaeger --cassandra.password=JambonzR0ck$ --collector.num-workers=50 --collector.queue-size=2000 --collector.http-server.host-port=127.0.0.1:14268
|
||||
User=admin
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Jaeger Query
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Environment="SPAN_STORAGE_TYPE=cassandra"
|
||||
Environment="CASSANDRA_SERVERS=127.0.0.1"
|
||||
Environment="CASSANDRA_KEYSPACE=jaeger_v1_dc1"
|
||||
ExecStart=/usr/local/bin/jaeger-query --cassandra.keyspace=jaeger_v1_dc1 --cassandra.servers=127.0.0.1 --cassandra.username=jaeger --cassandra.password=JambonzR0ck$
|
||||
User=admin
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -7,8 +7,8 @@ After=syslog.target network.target local-fs.target
|
||||
; service
|
||||
Type=forking
|
||||
Environment="LD_LIBRARY_PATH=/usr/local/lib/"
|
||||
ExecStartPre=/bin/sh -c 'systemctl set-environment LOCAL_IP=$$(/bin/ip -4 addr show eth0 | grep -oP "(?<=inet )\d+(\.\d+){3}" | head -n 1)'
|
||||
ExecStartPre=/bin/sh -c "systemctl set-environment PUBLIC_IP=`/usr/bin/curl -s http://ipecho.net/plain`"
|
||||
ExecStartPre=/bin/sh -c 'systemctl set-environment PUBLIC_IP=`ip addr show eth0 | awk \'/inet / {print $2}\' | cut -d \'/\' -f 1`'
|
||||
ExecStartPre=/bin/sh -c 'systemctl set-environment LOCAL_IP=`ip addr show eth1 | awk \'/inet / {print $2}\' | cut -d \'/\' -f 1`'
|
||||
ExecStartPre=echo 'del 42' > /proc/rtpengine/control
|
||||
ExecStart=/usr/local/bin/rtpengine \
|
||||
--interface private/${LOCAL_IP} \
|
||||
|
||||
@@ -10,9 +10,15 @@ cd drachtio-server
|
||||
git submodule update --init --recursive
|
||||
./autogen.sh && mkdir -p build && cd $_ && ../configure --enable-tcmalloc=yes CPPFLAGS='-DNDEBUG -g -O2' && make -j 4 && sudo make install
|
||||
|
||||
echo "installing drachtio"
|
||||
if [ "$2" = "gcp" ]; then
|
||||
echo "installing drachtio for gcp"
|
||||
sudo mv /tmp/drachtio.gcp.service /etc/systemd/system/drachtio.service
|
||||
sudo mv /tmp/drachtio-5070.gcp.service /etc/systemd/system/drachtio-5070.service
|
||||
else
|
||||
echo "installing drachtio for aws"
|
||||
sudo mv /tmp/drachtio.service /etc/systemd/system
|
||||
sudo mv /tmp/drachtio-5070.service /etc/systemd/system
|
||||
fi
|
||||
|
||||
sudo mv /tmp/drachtio.conf.xml /etc
|
||||
sudo chmod 644 /etc/drachtio.conf.xml
|
||||
|
||||
@@ -6,7 +6,7 @@ GRPC_VERSION=c66d2cc
|
||||
GOOGLE_API_VERSION=e9da6f8b469c52b83f900e820be30762e9e05c57
|
||||
AWS_SDK_VERSION=1.8.129
|
||||
LWS_VERSION=v3.2.3
|
||||
MODULES_VERSION=v0.6.15
|
||||
MODULES_VERSION=v0.7.2
|
||||
|
||||
echo "freeswitch version to install is ${FREESWITCH_VERSION}"
|
||||
echo "drachtio modules version to install is ${MODULES_VERSION}"
|
||||
@@ -18,8 +18,8 @@ echo "LWS_VERSION version to install is ${LWS_VERSION}"
|
||||
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
|
||||
|
||||
cd /tmp
|
||||
tar xvfz SpeechSDK-Linux-1.26.0.tar.gz
|
||||
cd SpeechSDK-Linux-1.26.0
|
||||
tar xvfz SpeechSDK-Linux-1.30.0.tar.gz
|
||||
cd SpeechSDK-Linux-1.30.0
|
||||
sudo cp -r include /usr/local/include/MicrosoftSpeechSDK
|
||||
sudo cp -r lib/ /usr/local/lib/MicrosoftSpeechSDK
|
||||
if [ "$ARCH" == "arm64" ]; then
|
||||
@@ -34,8 +34,8 @@ if [ "$ARCH" == "amd64" ]; then
|
||||
fi
|
||||
|
||||
cd /usr/local/src
|
||||
echo remove SpeechSDK-Linux-1.24.2
|
||||
sudo rm -Rf /tmp/SpeechSDK-Linux-1.24.2.tgz /tmp/SpeechSDK-Linux-1.24.2
|
||||
echo remove SpeechSDK-Linux-1.30.0
|
||||
sudo rm -Rf /tmp/SpeechSDK-Linux-1.30.0.tgz /tmp/SpeechSDK-Linux-1.30.0
|
||||
echo done
|
||||
|
||||
echo config git
|
||||
@@ -52,6 +52,7 @@ git clone https://github.com/drachtio/nuance-asr-grpc-api.git -b main
|
||||
git clone https://github.com/drachtio/riva-asr-grpc-api.git -b main
|
||||
git clone https://github.com/drachtio/soniox-asr-grpc-api.git -b main
|
||||
git clone https://github.com/freeswitch/spandsp.git -b master
|
||||
cd spandsp && git checkout 728b60abdd1a71e254b8e831e9156521d788b2b9 && cd ..
|
||||
git clone https://github.com/freeswitch/sofia-sip.git -b master
|
||||
git clone https://github.com/dpirch/libfvad.git
|
||||
git clone https://github.com/aws/aws-sdk-cpp.git -b ${AWS_SDK_VERSION}
|
||||
|
||||
@@ -5,13 +5,63 @@ if [ "$1" == "yes" ]; then
|
||||
cd /tmp
|
||||
|
||||
echo "installing jaeger"
|
||||
wget https://github.com/jaegertracing/jaeger/releases/download/v1.33.0/jaeger-1.33.0-linux-amd64.tar.gz
|
||||
sudo tar xvfz jaeger-1.33.0-linux-amd64.tar.gz
|
||||
sudo cp jaeger-1.33.0-linux-amd64/jaeger-all-in-one /usr/local/bin
|
||||
|
||||
sudo cp jaeger.service /etc/systemd/system
|
||||
sudo chmod 644 /etc/systemd/system/jaeger.service
|
||||
sudo systemctl enable jaeger
|
||||
sudo systemctl start jaeger
|
||||
wget https://github.com/jaegertracing/jaeger/releases/download/v1.46.0/jaeger-1.46.0-linux-amd64.tar.gz
|
||||
tar xvfz jaeger-1.46.0-linux-amd64.tar.gz
|
||||
sudo mv jaeger-1.46.0-linux-amd64/jaeger-collector /usr/local/bin/
|
||||
sudo mv jaeger-1.46.0-linux-amd64/jaeger-query /usr/local/bin/
|
||||
|
||||
sudo cp jaeger-collector.service /etc/systemd/system
|
||||
sudo chmod 644 /etc/systemd/system/jaeger-collector.service
|
||||
|
||||
sudo cp jaeger-query.service /etc/systemd/system
|
||||
sudo chmod 644 /etc/systemd/system/jaeger-query.service
|
||||
|
||||
echo "installing cassandra"
|
||||
|
||||
sudo apt-get install -y default-jdk
|
||||
|
||||
wget https://dlcdn.apache.org/cassandra/4.1.2/apache-cassandra-4.1.2-bin.tar.gz
|
||||
tar xvfz apache-cassandra-4.1.2-bin.tar.gz
|
||||
mv apache-cassandra-4.1.2 /usr/local/cassandra
|
||||
sudo cp cassandra.yaml /usr/local/cassandra/conf
|
||||
sudo chown -R admin:admin /usr/local/cassandra/
|
||||
cat /usr/local/cassandra/conf/cassandra.yaml
|
||||
|
||||
chown -R admin:admin /usr/local/cassandra/
|
||||
|
||||
echo 'export PATH=$PATH:/usr/local/cassandra/bin' | tee -a /home/admin/.bashrc
|
||||
echo 'export PATH=$PATH:/usr/local/cassandra/bin' | tee -a /etc/profile
|
||||
export PATH=$PATH:/usr/local/cassandra/bin
|
||||
|
||||
sudo cp cassandra.service /etc/systemd/system
|
||||
sudo chmod 644 /etc/systemd/system/cassandra.service
|
||||
sudo systemctl enable cassandra
|
||||
sudo systemctl start cassandra
|
||||
|
||||
echo "waiting 60 secs for cassandra to start.."
|
||||
sleep 60
|
||||
echo "create jambonz user in cassandra"
|
||||
|
||||
export CQLSH_HOST='127.0.0.1'
|
||||
export CQLSH_PORT=9042
|
||||
export USER_TO_CREATE='jaeger'
|
||||
export PASSWORD='JambonzR0ck$'
|
||||
cqlsh -u cassandra -p cassandra -e "CREATE ROLE IF NOT EXISTS $USER_TO_CREATE WITH PASSWORD = '$PASSWORD' AND LOGIN = true AND SUPERUSER = false;"
|
||||
|
||||
echo "create keyspace and schema for jaeger in cassandra"
|
||||
|
||||
export CASSANDRA_HOST="localhost"
|
||||
export CASSANDRA_PORT=9042
|
||||
echo "CREATE KEYSPACE IF NOT EXISTS jaeger_v1_dc1 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '2'} AND durable_writes = true;"
|
||||
cqlsh -u cassandra -p cassandra -e "CREATE KEYSPACE IF NOT EXISTS jaeger_v1_dc1 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '2'} AND durable_writes = true;"
|
||||
cqlsh -u cassandra -p cassandra -e "GRANT ALL PERMISSIONS ON KEYSPACE jaeger_v1_dc1 TO $USER_TO_CREATE;"
|
||||
|
||||
git clone https://github.com/jaegertracing/jaeger.git
|
||||
cd jaeger/plugin/storage/cassandra/schema
|
||||
MODE=prod DATACENTER=datacenter1 TRACE_TTL=604800 KEYSPACE=jaeger_v1_dc1 ./create.sh | cqlsh localhost -u cassandra -p cassandra
|
||||
|
||||
systemctl enable jaeger-collector
|
||||
systemctl enable jaeger-query
|
||||
|
||||
fi
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$1" == "yes" ]; then
|
||||
|
||||
#install node-red
|
||||
mkdir -p apps && cd $_
|
||||
git clone https://github.com/node-red/node-red.git
|
||||
cd node-red
|
||||
sudo npm install --unsafe-perm
|
||||
grunt build
|
||||
|
||||
sudo mv /tmp/ecosystem.config.js /home/admin/apps
|
||||
sudo chown -R admin:admin /home/admin/apps
|
||||
|
||||
sudo -u admin bash -c "pm2 start /home/admin/apps/ecosystem.config.js"
|
||||
sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u admin --hp /home/admin
|
||||
sudo -u admin bash -c "pm2 save"
|
||||
sudo systemctl enable pm2-admin.service
|
||||
|
||||
fi
|
||||
@@ -7,9 +7,6 @@ sudo sed -i s/#DefaultLimitNOFILE=/DefaultLimitNOFILE=65535/g /etc/systemd/syste
|
||||
sudo sed -i s/#DefaultLimitNOFILE=/DefaultLimitNOFILE=65535/g /etc/systemd/user.conf
|
||||
|
||||
sudo bash -c 'cat >> /etc/sysctl.conf << EOT
|
||||
net.ipv6.conf.all.disable_ipv6 = 1
|
||||
net.ipv6.conf.default.disable_ipv6 = 1
|
||||
net.ipv6.conf.lo.disable_ipv6 = 1
|
||||
net.core.rmem_max=26214400
|
||||
net.core.rmem_default=26214400
|
||||
vm.swappiness=0
|
||||
|
||||
@@ -37,7 +37,7 @@ if [ "$2" = "gcp" ]; then
|
||||
echo "installing rtpengine for gcp"
|
||||
sudo mv /tmp/rtpengine.gcp.service /etc/systemd/system/rtpengine.service
|
||||
else
|
||||
echo "installing rtpengine"
|
||||
echo "installing rtpengine for aws"
|
||||
sudo mv /tmp/rtpengine.service /etc/systemd/system/rtpengine.service
|
||||
fi
|
||||
|
||||
|
||||
@@ -10,11 +10,13 @@
|
||||
"proxmox_source_vm_private_key_file": "~/.ssh/id_rsa",
|
||||
"proxmox_memory": "8192",
|
||||
"proxmox_cores": "4",
|
||||
"proxmox_bridge": "{{user `proxmox_bridge`}}",
|
||||
"proxmox_ip": "{{user `proxmox_ip`}}",
|
||||
"proxmox_bridge_public": "{{user `proxmox_bridge_public`}}",
|
||||
"proxmox_bridge_private": "{{user `proxmox_bridge_private`}}",
|
||||
"proxmox_ip_public": "{{user `proxmox_ip_public`}}",
|
||||
"proxmox_ip_private": "{{user `proxmox_ip_private`}}",
|
||||
"proxmox_gateway": "{{user `proxmox_gateway`}}",
|
||||
"drachtio_version": "v0.8.22",
|
||||
"jambonz_version": "v0.8.3-2",
|
||||
"jambonz_version": "v0.8.4-3",
|
||||
"jambonz_user": "admin",
|
||||
"jambonz_password": "JambonzR0ck$",
|
||||
"install_telegraf": "yes",
|
||||
@@ -25,7 +27,7 @@
|
||||
"install_jaeger": "yes",
|
||||
"install_nodered": "no",
|
||||
"influxdb_ip": "127.0.0.1",
|
||||
"rtp_engine_version": "mr11.2.1.5",
|
||||
"rtp_engine_version": "mr11.4.1.3",
|
||||
"rtp_engine_min_port": "40000",
|
||||
"rtp_engine_max_port": "60000",
|
||||
"mediaserver_name": "jambonz",
|
||||
@@ -46,16 +48,22 @@
|
||||
"ssh_private_key_file": "{{user `proxmox_source_vm_private_key_file`}}",
|
||||
"template_name": "jambonz-mini-{{user `jambonz_version`}}-template",
|
||||
"nameserver": "8.8.8.8",
|
||||
"cloud_init": true,
|
||||
"cloud_init": false,
|
||||
"network_adapters": [
|
||||
{
|
||||
"bridge": "{{user `proxmox_bridge`}}"
|
||||
"bridge": "{{user `proxmox_bridge_public`}}"
|
||||
},
|
||||
{
|
||||
"bridge": "{{user `proxmox_bridge_private`}}"
|
||||
}
|
||||
],
|
||||
"ipconfig": [
|
||||
{
|
||||
"ip": "{{user `proxmox_ip`}}",
|
||||
"ip": "{{user `proxmox_ip_public`}}",
|
||||
"gateway": "{{user `proxmox_gateway`}}"
|
||||
},
|
||||
{
|
||||
"ip": "{{user `proxmox_ip_private`}}"
|
||||
}
|
||||
]
|
||||
}],
|
||||
@@ -73,7 +81,7 @@
|
||||
"libevent-dev libpcap-dev libxmlrpc-core-c3-dev markdown libjson-glib-dev lsb-release \\",
|
||||
"libhiredis-dev gperf libspandsp-dev default-libmysqlclient-dev htop dnsutils gdb \\",
|
||||
"gnupg2 wget pkg-config ca-certificates libjpeg-dev libsqlite3-dev libpcre3-dev libldns-dev snapd \\",
|
||||
"libspeex-dev libspeexdsp-dev libedit-dev libtiff-dev yasm libswscale-dev haveged jq fail2ban \\",
|
||||
"libspeex-dev libspeexdsp-dev libedit-dev libtiff-dev yasm libswscale-dev haveged jq fail2ban pandoc \\",
|
||||
"libopus-dev libsndfile-dev libshout3-dev libmpg123-dev libmp3lame-dev libopusfile-dev libgoogle-perftools-dev",
|
||||
"sudo chmod a+w /usr/local/src",
|
||||
"mkdir ~/apps",
|
||||
@@ -96,6 +104,10 @@
|
||||
"source": "files/",
|
||||
"destination": "/tmp"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"script": "scripts/install_apiban.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `rtp_engine_version`}}",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -2323,10 +2323,10 @@
|
||||
[[inputs.disk]]
|
||||
## By default stats will be gathered for all mount points.
|
||||
## Set mount_points will restrict the stats to only the specified mount points.
|
||||
# mount_points = ["/"]
|
||||
mount_points = ["/"]
|
||||
|
||||
## Ignore mount points by filesystem type.
|
||||
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
|
||||
#ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
|
||||
|
||||
|
||||
# Read metrics about disk IO by device
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"ssh_username": "admin",
|
||||
"ami_description": "jambonz monitoring server",
|
||||
"instance_type": "t2.xlarge",
|
||||
"jambonz_version": "v0.8.4-1",
|
||||
"jambonz_version": "v0.8.4-3",
|
||||
"homer_user": "homer_user",
|
||||
"homer_password": "XcapJTqy11LnsYRtxXGPTYQkAnI",
|
||||
"install_influxdb": "yes",
|
||||
|
||||
@@ -2293,10 +2293,10 @@
|
||||
[[inputs.disk]]
|
||||
## By default stats will be gathered for all mount points.
|
||||
## Set mount_points will restrict the stats to only the specified mount points.
|
||||
# mount_points = ["/"]
|
||||
mount_points = ["/"]
|
||||
|
||||
## Ignore mount points by filesystem type.
|
||||
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
|
||||
#ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
|
||||
|
||||
|
||||
# Read metrics about disk IO by device
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"ssh_username": "admin",
|
||||
"ami_description": "jambonz SBC RTP server",
|
||||
"drachtio_version": "v0.8.22",
|
||||
"jambonz_version": "v0.8.4-1",
|
||||
"jambonz_version": "v0.8.4-3",
|
||||
"ami_base_image_arch": "amd64",
|
||||
"ami_base_image_owner": "136693071363",
|
||||
"instance_type": "t3.xlarge",
|
||||
|
||||
@@ -2293,10 +2293,10 @@
|
||||
[[inputs.disk]]
|
||||
## By default stats will be gathered for all mount points.
|
||||
## Set mount_points will restrict the stats to only the specified mount points.
|
||||
# mount_points = ["/"]
|
||||
mount_points = ["/"]
|
||||
|
||||
## Ignore mount points by filesystem type.
|
||||
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
|
||||
#ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
|
||||
|
||||
|
||||
# Read metrics about disk IO by device
|
||||
|
||||
@@ -2293,11 +2293,10 @@
|
||||
[[inputs.disk]]
|
||||
## By default stats will be gathered for all mount points.
|
||||
## Set mount_points will restrict the stats to only the specified mount points.
|
||||
# mount_points = ["/"]
|
||||
mount_points = ["/"]
|
||||
|
||||
## Ignore mount points by filesystem type.
|
||||
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
|
||||
|
||||
#ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
|
||||
|
||||
# Read metrics about disk IO by device
|
||||
[[inputs.diskio]]
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
#!/bin/bash
|
||||
INSTANCE_ID=$1
|
||||
cd /usr/local/src/
|
||||
git clone https://github.com/palner/apiban.git
|
||||
sudo mkdir /usr/local/bin/apiban && sudo chmod 0755 /usr/local/bin/apiban
|
||||
sudo cp -r /usr/local/src/apiban/clients/go/apiban-iptables-client /usr/local/bin/apiban && sudo chmod +x /usr/local/bin/apiban/apiban-iptables-client
|
||||
sudo cp /tmp/config.json /usr/local/bin/apiban/config.json
|
||||
sudo chmod 0644 /usr/local/bin/apiban/config.json
|
||||
APIBANKEY=$(curl -X POST -d "{\"uuid\": \"${INSTANCE_ID}\"}" -s https://apiban.org/api/newuser/drachito/add | jq -r '.ApiKey')
|
||||
sudo sed -i -e "s/API-KEY-HERE/${APIBANKEY}/g" /usr/local/bin/apiban/config.json
|
||||
sudo cp /tmp/apiban.logrotate /etc/logrotate.d/apiban-client
|
||||
sudo chmod 0644 /etc/logrotate.d/apiban-client
|
||||
cd /usr/local/bin/apiban/
|
||||
sudo ./apiban-iptables-client FULL
|
||||
echo "*/4 * * * * root cd /usr/local/bin/apiban && ./apiban-iptables-client >/dev/null 2>&1" | sudo tee -a /etc/crontab
|
||||
@@ -5,7 +5,7 @@
|
||||
"ami_description": "jambonz SBC SIP",
|
||||
"instance_type": "t3.xlarge",
|
||||
"drachtio_version": "v0.8.22",
|
||||
"jambonz_version": "v0.8.4-1",
|
||||
"jambonz_version": "v0.8.4-3",
|
||||
"ami_base_image_arch": "amd64",
|
||||
"ami_base_image_owner": "136693071363",
|
||||
"install_datadog": "no",
|
||||
|
||||
@@ -8,8 +8,8 @@ module.exports = {
|
||||
err_file: '/home/admin/.pm2/logs/jambonz-api-server.log',
|
||||
combine_logs: true,
|
||||
instance_var: 'INSTANCE_ID',
|
||||
exec_mode: 'fork',
|
||||
instances: 1,
|
||||
exec_mode: 'cluster',
|
||||
instances: 0,
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
max_memory_restart: '1G',
|
||||
|
||||
@@ -2293,10 +2293,10 @@
|
||||
[[inputs.disk]]
|
||||
## By default stats will be gathered for all mount points.
|
||||
## Set mount_points will restrict the stats to only the specified mount points.
|
||||
# mount_points = ["/"]
|
||||
mount_points = ["/"]
|
||||
|
||||
## Ignore mount points by filesystem type.
|
||||
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
|
||||
#ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
|
||||
|
||||
|
||||
# Read metrics about disk IO by device
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"ssh_username": "admin",
|
||||
"ami_description": "jambonz webserver",
|
||||
"instance_type": "t3.xlarge",
|
||||
"jambonz_version": "v0.8.4-1",
|
||||
"jambonz_version": "v0.8.4-3",
|
||||
"ami_base_image_arch": "amd64",
|
||||
"ami_base_image_owner": "136693071363",
|
||||
"install_datadog": "no",
|
||||
|
||||
@@ -98,6 +98,10 @@ write_files:
|
||||
sudo -u admin bash -c "pm2 save"
|
||||
sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u admin --hp /home/admin
|
||||
|
||||
# restart jaeger
|
||||
sudo systemctl restart jaeger-collector.service
|
||||
sudo systemctl restart jaeger-query.service
|
||||
|
||||
# get an apiban key
|
||||
APIBANKEY=$(curl -X POST -u jambonz:1a074994242182a9e0b67eae93978826 -d "{\"client\": \"$NEW_DB_PASSWD\"}" -s https://apiban.org/sponsor/newkey | jq -r '.ApiKey')
|
||||
sudo sed -i -e "s/API-KEY-HERE/$APIBANKEY/g" /usr/local/bin/apiban/config.json
|
||||
|
||||
@@ -110,7 +110,7 @@ resource "null_resource" "cloud_init_config_files" {
|
||||
connection {
|
||||
type = "ssh"
|
||||
user = var.pve_user
|
||||
private_key = file(var.ssh_private_key_path)
|
||||
password = var.pm_password
|
||||
host = var.pve_host
|
||||
}
|
||||
|
||||
@@ -120,13 +120,13 @@ resource "null_resource" "cloud_init_config_files" {
|
||||
}
|
||||
}
|
||||
|
||||
resource "proxmox_vm_qemu" "jambonz-mini-v083-1" {
|
||||
resource "proxmox_vm_qemu" "jambonz-mini-v084-2" {
|
||||
depends_on = [
|
||||
null_resource.cloud_init_config_files,
|
||||
]
|
||||
|
||||
count = var.vm_count
|
||||
name = "jambonz-mini-v083-1"
|
||||
name = "jambonz-mini-v084-2"
|
||||
target_node = var.pm_target_node
|
||||
clone = var.pm_source_template
|
||||
full_clone = true
|
||||
@@ -139,12 +139,12 @@ resource "proxmox_vm_qemu" "jambonz-mini-v083-1" {
|
||||
|
||||
network {
|
||||
model = "virtio"
|
||||
bridge = "vmbr30"
|
||||
bridge = "vmbr0"
|
||||
}
|
||||
|
||||
network {
|
||||
model = "virtio"
|
||||
bridge = "vmbr0"
|
||||
bridge = "vmbr1"
|
||||
}
|
||||
|
||||
disk {
|
||||
@@ -158,8 +158,8 @@ resource "proxmox_vm_qemu" "jambonz-mini-v083-1" {
|
||||
ssh_private_key = file(var.ssh_private_key_path)
|
||||
|
||||
# Cloud Init settings
|
||||
ipconfig0 = var.ifpconfig_private
|
||||
ipconfig1 = var.ifpconfig_public
|
||||
ipconfig0 = var.ifpconfig_public
|
||||
ipconfig1 = var.ifpconfig_private
|
||||
sshkeys = file(var.ssh_pub_key_path)
|
||||
nameserver = var.nameserver
|
||||
|
||||
|
||||
Reference in New Issue
Block a user