mirror of
https://github.com/jambonz/jambonz-infrastructure.git
synced 2026-07-24 15:51:48 +00:00
updates for 0.8.4
This commit is contained in:
@@ -95,7 +95,9 @@ Conditions:
|
||||
Mappings:
|
||||
AWSRegion2AMI:
|
||||
us-east-1:
|
||||
Ami: ami-00d771ac0ee2a4774
|
||||
Ami: ami-045c73965222f6e15
|
||||
eu-west-2:
|
||||
Ami: ami-01b49ce6a07a8b520
|
||||
|
||||
Resources:
|
||||
IamCloudwatchRole:
|
||||
@@ -279,6 +281,10 @@ Resources:
|
||||
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\": \"$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
|
||||
@@ -334,11 +340,6 @@ Resources:
|
||||
FromPort: 9080
|
||||
ToPort: 9080
|
||||
CidrIp: !Ref AllowedHttpCidr
|
||||
- Description: jaeger
|
||||
IpProtocol: tcp
|
||||
FromPort: 16686
|
||||
ToPort: 16686
|
||||
CidrIp: !Ref AllowedHttpCidr
|
||||
- Description: grafana
|
||||
IpProtocol: tcp
|
||||
FromPort: 3000
|
||||
|
||||
@@ -8,7 +8,13 @@ Mappings:
|
||||
SbcRtpAmi: ami-0954b7e5aaf4ee966
|
||||
FsAmi: ami-0afdc9cef2c7e3e24
|
||||
WebserverAmi: ami-0b0b877726e51a31c
|
||||
MonitoringServerAmi: ami-0b9fe2fe66ff1ad62
|
||||
MonitoringServerAmi: ami-0aaa644b8462b7a6b
|
||||
eu-central-1:
|
||||
SbcSipAmi: ami-0eb4a42513512f83c
|
||||
SbcRtpAmi: ami-0193b4d53092ab162
|
||||
FsAmi: ami-096cfff649d965aef
|
||||
WebserverAmi: ami-0ad690b17d163c794
|
||||
MonitoringServerAmi: ami-010baeedfe1041c1b
|
||||
|
||||
Parameters:
|
||||
KeyName:
|
||||
@@ -268,13 +274,6 @@ Parameters:
|
||||
Type: Number
|
||||
Description: Number of seconds to cache results from DB queries (0=no caching)
|
||||
Default: 0
|
||||
EnableTracing:
|
||||
Type: Number
|
||||
Description: enable opentelemetry application tracing?
|
||||
AllowedValues:
|
||||
- 0
|
||||
- 1
|
||||
Default: 1
|
||||
Cloudwatch:
|
||||
Description: Send jambonz logs to cloudwatch
|
||||
Type: String
|
||||
@@ -704,31 +703,16 @@ Resources:
|
||||
ToPort: 9060
|
||||
CidrIp: !Ref VpcCIDR
|
||||
Description: Allow access to homer HEP
|
||||
- IpProtocol: tcp
|
||||
FromPort: 1880
|
||||
ToPort: 1880
|
||||
CidrIp: !Ref AllowedHttpCidr
|
||||
Description: Allow access to Node-RED
|
||||
- IpProtocol: tcp
|
||||
FromPort: 16686
|
||||
ToPort: 16686
|
||||
CidrIp: !Ref VpcCIDR
|
||||
Description: Allow access to Jaeger
|
||||
- IpProtocol: udp
|
||||
FromPort: 6831
|
||||
ToPort: 6831
|
||||
CidrIp: !Ref VpcCIDR
|
||||
Description: Jaeger collector - compact
|
||||
- IpProtocol: udp
|
||||
FromPort: 6832
|
||||
ToPort: 6832
|
||||
CidrIp: !Ref VpcCIDR
|
||||
Description: Jaeger collector (udp)
|
||||
Description: jaeger-query
|
||||
- IpProtocol: tcp
|
||||
FromPort: 14268
|
||||
ToPort: 14268
|
||||
ToPort: 14269
|
||||
CidrIp: !Ref VpcCIDR
|
||||
Description: Jaeger collector (http)
|
||||
Description: jaeger-collector (jaeger-thrift, health check)
|
||||
SecurityGroupEgress:
|
||||
- IpProtocol: -1
|
||||
FromPort: 0
|
||||
@@ -757,9 +741,9 @@ Resources:
|
||||
Type: AWS::RDS::DBCluster
|
||||
Properties:
|
||||
DBClusterIdentifier: !Sub '${Prefix}-aurora-mysql-cluster'
|
||||
Engine: aurora
|
||||
EngineVersion: '5.6.10a'
|
||||
EngineMode: 'serverless'
|
||||
Engine: aurora-mysql
|
||||
EngineMode: serverless
|
||||
EngineVersion: '5.7'
|
||||
MasterUsername: !Ref MySQLUsername
|
||||
MasterUserPassword: !Ref MySQLPassword
|
||||
DatabaseName: 'jambones'
|
||||
@@ -823,18 +807,19 @@ Resources:
|
||||
KeyName: !Ref KeyName
|
||||
Monitoring: true
|
||||
UserData:
|
||||
Fn::Base64:
|
||||
Fn::Sub:
|
||||
- |
|
||||
#!/bin/bash -xe
|
||||
# restart heplify-server
|
||||
sudo systemctl restart heplify-server
|
||||
- EnableTracing: !Ref EnableTracing
|
||||
Fn::Base64: |
|
||||
#!/bin/bash -xe
|
||||
# restart heplify-server
|
||||
sudo systemctl restart heplify-server.service
|
||||
sudo systemctl restart cassandra.service
|
||||
sleep 15
|
||||
sudo systemctl restart jaeger-collector.service
|
||||
sudo systemctl restart jaeger-query.service
|
||||
Tags:
|
||||
-
|
||||
Key: Name
|
||||
Value: !Sub '${Prefix}-monitoring-server'
|
||||
|
||||
|
||||
|
||||
###########################################
|
||||
# New SBC SIP instances
|
||||
@@ -959,7 +944,6 @@ Resources:
|
||||
watch: false,
|
||||
max_memory_restart: '1G',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
JAMBONES_LOGLEVEL: 'info',
|
||||
JAMBONES_CLUSTER_ID: '${JAMBONES_CLUSTER_ID}',
|
||||
AVOID_UDH: true,
|
||||
@@ -987,9 +971,10 @@ Resources:
|
||||
watch: false,
|
||||
max_memory_restart: '1G',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
JAMBONES_CLUSTER_ID: '${JAMBONES_CLUSTER_ID}',
|
||||
JAMBONES_LOGLEVEL: 'info',
|
||||
JWT_SECRET: '${JWT_SECRET}',
|
||||
JAMBONES_CLUSTER_ID: '${JAMBONES_CLUSTER_ID}',
|
||||
RTPENGINE_PING_INTERVAL: 30000,
|
||||
DRACHTIO_HOST: '127.0.0.1',
|
||||
DRACHTIO_PORT: 9022,
|
||||
DRACHTIO_SECRET: 'cymru',
|
||||
@@ -1024,7 +1009,7 @@ Resources:
|
||||
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',
|
||||
@@ -1051,9 +1036,10 @@ Resources:
|
||||
watch: false,
|
||||
max_memory_restart: '1G',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
JAMBONES_LOGLEVEL: 'info',
|
||||
JWT_SECRET: '${JWT_SECRET}',
|
||||
JAMBONES_NETWORK_CIDR: '${VPC_CIDR}',
|
||||
JAMBONES_RTPENGINE_UDP_PORT: 6000,
|
||||
MIN_CALL_LIMIT: 9999,
|
||||
RTPENGINE_PING_INTERVAL: 30000,
|
||||
DRACHTIO_HOST: '127.0.0.1',
|
||||
@@ -1069,6 +1055,9 @@ Resources:
|
||||
JAMBONES_REDIS_PORT: 6379,
|
||||
JAMBONES_CLUSTER_ID: '${JAMBONES_CLUSTER_ID}',
|
||||
JAMBONES_TIME_SERIES_HOST: '${JAMBONES_TIME_SERIES_HOST}',
|
||||
JAMBONES_TRACK_ACCOUNT_CALLS: 0,
|
||||
JAMBONES_TRACK_SP_CALLS: 0,
|
||||
JAMBONES_TRACK_APP_CALLS: 0,
|
||||
ENABLE_METRICS: 1,
|
||||
STATS_HOST: '127.0.0.1',
|
||||
STATS_PORT: 8125,
|
||||
@@ -1090,10 +1079,11 @@ Resources:
|
||||
watch: false,
|
||||
max_memory_restart: '1G',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
JAMBONES_NETWORK_CIDR: '${VPC_CIDR}',
|
||||
JAMBONES_LOGLEVEL: 'info',
|
||||
JWT_SECRET: '${JWT_SECRET}',
|
||||
AWS_REGION: '${AWS_REGION}',
|
||||
JAMBONES_NETWORK_CIDR: '${VPC_CIDR}',
|
||||
JAMBONES_RTPENGINE_UDP_PORT: 7000,
|
||||
DRACHTIO_HOST: '127.0.0.1',
|
||||
DRACHTIO_PORT: 9022,
|
||||
DRACHTIO_SECRET: 'cymru',
|
||||
@@ -1113,6 +1103,9 @@ Resources:
|
||||
JAMBONES_CLUSTER_ID: '${JAMBONES_CLUSTER_ID}',
|
||||
JAMBONES_TIME_SERIES_HOST: '${JAMBONES_TIME_SERIES_HOST}',
|
||||
ENABLE_METRICS: 1,
|
||||
JAMBONES_TRACK_ACCOUNT_CALLS: 0,
|
||||
JAMBONES_TRACK_SP_CALLS: 0,
|
||||
JAMBONES_TRACK_APP_CALLS: 0,
|
||||
STATS_HOST: '127.0.0.1',
|
||||
STATS_PORT: 8125,
|
||||
STATS_PROTOCOL: 'tcp',
|
||||
@@ -1169,6 +1162,9 @@ Resources:
|
||||
MONITORING_SERVER_IP: !GetAtt MonitoringServerEC2.PrivateIp
|
||||
AWS_SNS_TOPIC_ARN: !Ref SbcSipServerSNSTopic
|
||||
JAMBONES_TIME_SERIES_HOST: !GetAtt MonitoringServerEC2.PrivateIp
|
||||
JWT_SECRET: !Ref EncryptionSecret
|
||||
AWS_REGION: !Ref AWS::Region
|
||||
Cloudwatch: !Ref Cloudwatch
|
||||
CloudwatchLogRetention: !Ref CloudwatchLogRetention
|
||||
DbCachingTTS: !Ref DbCachingTTS
|
||||
|
||||
@@ -1318,14 +1314,17 @@ Resources:
|
||||
watch: false,
|
||||
max_memory_restart: '1G',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
JAMBONES_LOGLEVEL: 'info',
|
||||
JWT_SECRET: '${JWT_SECRET}',
|
||||
AWS_REGION: '${AWS_REGION}',
|
||||
JAMBONES_API_BASE_URL: 'http://${URLPortal}/v1',
|
||||
ENABLE_METRICS: 1,
|
||||
STATS_HOST: '127.0.0.1',
|
||||
STATS_PORT: 8125,
|
||||
STATS_PROTOCOL: 'tcp',
|
||||
STATS_TELEGRAF: 1,
|
||||
STATS_SAMPLE_RATE: ${JAMBONES_SAMPLE_RATE},
|
||||
JAMBONES_OTEL_ENABLED: ${OTEL_TRACING},
|
||||
JAMBONES_OTEL_ENABLED: 1,
|
||||
OTEL_EXPORTER_JAEGER_ENDPOINT: 'http://${MONITORING_SERVER_IP}:14268/api/traces',
|
||||
OTEL_EXPORTER_OTLP_METRICS_INSECURE: 1,
|
||||
OTEL_EXPORTER_JAEGER_GRPC_INSECURE: 1,
|
||||
@@ -1353,7 +1352,9 @@ Resources:
|
||||
JAMBONES_FEATURE_SERVERS: '127.0.0.1:9022:cymru',
|
||||
JAMBONES_FREESWITCH: '127.0.0.1:8021:JambonzR0ck$',
|
||||
AUTHENTICATION_KEY: '${JWT_SECRET}',
|
||||
JWT_SECRET: '${JWT_SECRET}'
|
||||
JAMBONZ_RECORD_WS_USERNAME: 'jambonz',
|
||||
JAMBONZ_RECORD_WS_PASSWORD: '${JWT_SECRET}',
|
||||
JAMBONZ_RECORD_WS_BASE_URL: 'ws://${WebServerPrivateIP}:3000/api/v1'
|
||||
}
|
||||
}]
|
||||
};
|
||||
@@ -1389,13 +1390,15 @@ Resources:
|
||||
AWS_SNS_TOPIC_ARN: !Ref FeatureServerSNSTopic
|
||||
AWS_REGION: !Ref AWS::Region
|
||||
JAMBONES_SAMPLE_RATE: !Ref StatsSampleRate
|
||||
OTEL_TRACING: !Ref EnableTracing
|
||||
JAMBONES_CLUSTER_ID: !Ref Prefix
|
||||
MONITORING_SERVER_IP: !GetAtt MonitoringServerEC2.PrivateIp
|
||||
URLPortal: !Ref URLPortal
|
||||
JAMBONES_TIME_SERIES_HOST: !GetAtt MonitoringServerEC2.PrivateIp
|
||||
JWT_SECRET: !Ref EncryptionSecret
|
||||
Cloudwatch: !Ref Cloudwatch
|
||||
CloudwatchLogRetention: !Ref CloudwatchLogRetention
|
||||
DbCachingTTS: !Ref DbCachingTTS
|
||||
WebServerPrivateIP: !GetAtt WebServerEC2.PrivateIp
|
||||
|
||||
FeatureServerPlacementGroup:
|
||||
Type: AWS::EC2::PlacementGroup
|
||||
@@ -1535,7 +1538,6 @@ Resources:
|
||||
watch: false,
|
||||
max_memory_restart: '1G',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
LOGLEVEL: 'info',
|
||||
RTPENGINE_DTMF_LOG_PORT: 22223,
|
||||
AWS_SNS_TOPIC_ARM: '${AWS_SNS_TOPIC_ARN}',
|
||||
@@ -1651,7 +1653,7 @@ Resources:
|
||||
# WebServer Instance
|
||||
#
|
||||
###########################################
|
||||
WebServerEIP1:
|
||||
WebServerEIP:
|
||||
Type: AWS::EC2::EIP
|
||||
Properties:
|
||||
Domain: vpc
|
||||
@@ -1709,30 +1711,31 @@ Resources:
|
||||
Roles:
|
||||
- !Ref WebServerIamRole
|
||||
|
||||
WebServerConfig:
|
||||
Type: AWS::AutoScaling::LaunchConfiguration
|
||||
WebServerEC2:
|
||||
Type: 'AWS::EC2::Instance'
|
||||
Properties:
|
||||
SubnetId: !Ref PublicSubnet1
|
||||
IamInstanceProfile: !Ref WebServerInstanceProfile
|
||||
ImageId: !FindInMap [ "AWSRegion2AMI", !Ref AWS::Region, "WebserverAmi"]
|
||||
SecurityGroups:
|
||||
InstanceType: !Ref InstanceTypeWebserver
|
||||
SecurityGroupIds:
|
||||
- Ref: SshSecurityGroup
|
||||
- Ref: WebserverSecurityGroup
|
||||
IamInstanceProfile: !Ref WebServerInstanceProfile
|
||||
InstanceType: !Ref InstanceTypeWebserver
|
||||
KeyName: !Ref KeyName
|
||||
AssociatePublicIpAddress: true
|
||||
Monitoring: true
|
||||
UserData:
|
||||
Fn::Base64:
|
||||
Fn::Sub:
|
||||
- |
|
||||
#!/bin/bash
|
||||
PRE_PUBLIC_IP=`curl -s http://169.254.169.254/latest/meta-data/public-ipv4`
|
||||
echo "before retrieving EIP for web server, public IP is $PRE_PUBLIC_IP"
|
||||
#PRE_PUBLIC_IP=`curl -s http://169.254.169.254/latest/meta-data/public-ipv4`
|
||||
#echo "before retrieving EIP for web server, public IP is $PRE_PUBLIC_IP"
|
||||
|
||||
/usr/local/bin/auto-assign-elastic-ip.sh
|
||||
sleep 15
|
||||
#/usr/local/bin/auto-assign-elastic-ip.sh
|
||||
#sleep 15
|
||||
|
||||
PUBLIC_IP=`curl -s http://169.254.169.254/latest/meta-data/public-ipv4`
|
||||
echo "after retrieving EIP for web server, public IP is $PUBLIC_IP"
|
||||
#PUBLIC_IP=`curl -s http://169.254.169.254/latest/meta-data/public-ipv4`
|
||||
#echo "after retrieving EIP for web server, public IP is $PUBLIC_IP"
|
||||
|
||||
echo "running jambonz webserver user data script"
|
||||
|
||||
@@ -1772,7 +1775,10 @@ Resources:
|
||||
watch: false,
|
||||
max_memory_restart: '1G',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
JAMBONES_LOGLEVEL: 'info',
|
||||
JWT_SECRET: '${JWT_SECRET}',
|
||||
AWS_REGION: '${AWS_REGION}',
|
||||
AUTHENTICATION_KEY: '${JWT_SECRET}',
|
||||
JAMBONES_MYSQL_REFRESH_TTL: ${DbCachingTTS},
|
||||
JAMBONES_MYSQL_HOST: '${JAMBONES_MYSQL_HOST}',
|
||||
JAMBONES_MYSQL_USER: '${JAMBONES_MYSQL_USER}',
|
||||
@@ -1781,9 +1787,7 @@ Resources:
|
||||
JAMBONES_MYSQL_CONNECTION_LIMIT: 10,
|
||||
JAMBONES_REDIS_HOST: '${JAMBONES_REDIS_HOST}',
|
||||
JAMBONES_REDIS_PORT: 6379,
|
||||
JAMBONES_LOGLEVEL: 'info',
|
||||
JAMBONE_API_VERSION: 'v1',
|
||||
AWS_REGION: '${AWS_REGION}',
|
||||
JAMBONES_CLUSTER_ID: '${JAMBONES_CLUSTER_ID}',
|
||||
JAMBONES_TIME_SERIES_HOST: '${JAMBONES_TIME_SERIES_HOST}',
|
||||
ENABLE_METRICS: 1,
|
||||
@@ -1793,12 +1797,12 @@ Resources:
|
||||
STATS_TELEGRAF: 1,
|
||||
STATS_SAMPLE_RATE: ${JAMBONES_SAMPLE_RATE},
|
||||
HTTP_PORT: 3000,
|
||||
JAEGER_BASE_URL: 'http://${MONITORING_SERVER_IP}::16686',
|
||||
JAEGER_BASE_URL: 'http://${MONITORING_SERVER_IP}:16686',
|
||||
HOMER_BASE_URL: 'http://${MONITORING_SERVER_IP}:9080',
|
||||
HOMER_USERNAME: 'admin',
|
||||
HOMER_PASSWORD: 'sipcapture',
|
||||
AUTHENTICATION_KEY: '${JWT_SECRET}',
|
||||
JWT_SECRET: '${JWT_SECRET}'
|
||||
JAMBONZ_RECORD_WS_USERNAME: 'jambonz',
|
||||
JAMBONZ_RECORD_WS_PASSWORD: '${JWT_SECRET}'
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -1821,7 +1825,6 @@ Resources:
|
||||
watch: false,
|
||||
max_memory_restart: '1G',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
LOGLEVEL: 'info',
|
||||
NRC_TIME_SERVICE_DID: '+16137451576'
|
||||
}
|
||||
@@ -1889,20 +1892,6 @@ Resources:
|
||||
proxy_cache_bypass \$http_upgrade;
|
||||
}
|
||||
}
|
||||
server {
|
||||
listen 80;
|
||||
server_name jaeger.${URLPortal};
|
||||
location / {
|
||||
proxy_pass http://${MONITORING_SERVER_IP}:16686;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade \$http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host \$host;
|
||||
proxy_cache_bypass \$http_upgrade;
|
||||
auth_basic "Secured Endpoint";
|
||||
auth_basic_user_file /etc/nginx/.htpasswd;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
sudo systemctl restart nginx
|
||||
@@ -1917,6 +1906,10 @@ Resources:
|
||||
sudo sed -i -e "s/combine_logs: true/combine_logs: false/g" /home/admin/apps/ecosystem.config.js
|
||||
fi
|
||||
|
||||
# restart jaeger
|
||||
sudo systemctl restart jaeger-collector.service
|
||||
sudo systemctl restart jaeger-query.service
|
||||
|
||||
echo "webserver user data script completed"
|
||||
- VPC_CIDR: !Ref VpcCIDR
|
||||
JAMBONES_MYSQL_HOST: !GetAtt DatabaseCluster.Endpoint.Address
|
||||
@@ -1930,36 +1923,19 @@ Resources:
|
||||
JAMBONES_TIME_SERIES_HOST: !GetAtt MonitoringServerEC2.PrivateIp
|
||||
JWT_SECRET: !Ref EncryptionSecret
|
||||
URLPortal: !Ref URLPortal
|
||||
Cloudwatch: !Ref Cloudwatch
|
||||
CloudwatchLogRetention: !Ref CloudwatchLogRetention
|
||||
DbCachingTTS: !Ref DbCachingTTS
|
||||
|
||||
WebServerPlacementGroup:
|
||||
Type: AWS::EC2::PlacementGroup
|
||||
Properties:
|
||||
Strategy: spread
|
||||
|
||||
WebServerAutoScalingGroup:
|
||||
Type: AWS::AutoScaling::AutoScalingGroup
|
||||
Properties:
|
||||
AutoScalingGroupName: !Sub '${Prefix}-webserver-autoscaling-group'
|
||||
LaunchConfigurationName: !Ref WebServerConfig
|
||||
MinSize: 1
|
||||
MaxSize: 1
|
||||
DesiredCapacity: 1
|
||||
TerminationPolicies:
|
||||
- OldestInstance
|
||||
VPCZoneIdentifier:
|
||||
- !Ref PublicSubnet1
|
||||
- !Ref PublicSubnet2
|
||||
Tags:
|
||||
-
|
||||
Key: Name
|
||||
Value: !Sub '${Prefix}-webserver'
|
||||
PropagateAtLaunch: 'true'
|
||||
-
|
||||
Key: Environment
|
||||
Value: !Sub '${Prefix}-webserver'
|
||||
PropagateAtLaunch: 'true'
|
||||
|
||||
WebServerEIPAssociation:
|
||||
Type: AWS::EC2::EIPAssociation
|
||||
Properties:
|
||||
AllocationId: !GetAtt WebServerEIP.AllocationId
|
||||
InstanceId: !Ref WebServerEC2
|
||||
|
||||
Outputs:
|
||||
WebPortalURL:
|
||||
|
||||
BIN
Binary file not shown.
+3
@@ -31,6 +31,9 @@ module.exports = {
|
||||
DRACHTIO_PORT: 9023,
|
||||
DRACHTIO_SECRET: 'cymru',
|
||||
JAMBONES_SBCS: '172.31.32.100:5060',
|
||||
JAMBONZ_RECORD_WS_USERNAME: 'jambonz',
|
||||
JAMBONZ_RECORD_WS_PASSWORD: 'JWT-SECRET-GOES_HERE',
|
||||
JAMBONZ_RECORD_WS_BASE_URL: 'ws://PRIVATE_IP:3002/api/v1',
|
||||
JAMBONES_FEATURE_SERVERS: '127.0.0.1:9023:cymru',
|
||||
JAMBONES_FREESWITCH: '127.0.0.1:8021:JambonzR0ck$'
|
||||
}
|
||||
+6
-5
@@ -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.1
|
||||
|
||||
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.29.0.tar.gz
|
||||
cd SpeechSDK-Linux-1.29.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.29.0
|
||||
sudo rm -Rf /tmp/SpeechSDK-Linux-1.29.0.tgz /tmp/SpeechSDK-Linux-1.29.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}
|
||||
+2
-2
@@ -4,8 +4,8 @@
|
||||
"ssh_username": "admin",
|
||||
"ami_description": "jambonz feature server",
|
||||
"instance_type": "t2.xlarge",
|
||||
"drachtio_version": "v0.8.21",
|
||||
"jambonz_version": "v0.8.3-rc4",
|
||||
"drachtio_version": "v0.8.22",
|
||||
"jambonz_version": "v0.8.4-rc4",
|
||||
"ami_base_image_arch": "amd64",
|
||||
"ami_base_image_owner": "136693071363",
|
||||
"install_telegraf": "yes",
|
||||
BIN
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
@@ -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
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -47,7 +46,7 @@ module.exports = {
|
||||
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,9 @@ 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_OTEL_ENABLED: 1,
|
||||
OTEL_EXPORTER_JAEGER_ENDPOINT: 'http://localhost:14268/api/traces',
|
||||
OTEL_EXPORTER_OTLP_METRICS_INSECURE: 1,
|
||||
@@ -275,6 +273,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 +281,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 +288,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=foobar --collector.num-workers=50 --collector.queue-size=2000 --collector.http-server.host-port=127.0.0.1:14268
|
||||
User=nobody
|
||||
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=foobar
|
||||
User=nobody
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -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.1
|
||||
|
||||
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.29.0.tar.gz
|
||||
cd SpeechSDK-Linux-1.29.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.29.0
|
||||
sudo rm -Rf /tmp/SpeechSDK-Linux-1.29.0.tgz /tmp/SpeechSDK-Linux-1.29.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/
|
||||
|
||||
fi
|
||||
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
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"ami_description": "jambonz all-in-one AMI",
|
||||
"instance_type": "c6in.xlarge",
|
||||
"drachtio_version": "v0.8.22",
|
||||
"jambonz_version": "v0.8.3-3",
|
||||
"jambonz_version": "v0.8.4",
|
||||
"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.2.1.5",
|
||||
"rtp_engine_version": "mr11.3.1.8",
|
||||
"rtp_engine_min_port": "40000",
|
||||
"rtp_engine_max_port": "60000",
|
||||
"mediaserver_name" : "jambonz",
|
||||
@@ -42,7 +42,7 @@
|
||||
"launch_block_device_mappings": [
|
||||
{
|
||||
"device_name": "/dev/xvda",
|
||||
"volume_size": 60,
|
||||
"volume_size": 100,
|
||||
"volume_type": "gp2",
|
||||
"delete_on_termination": true
|
||||
}
|
||||
@@ -95,6 +95,11 @@
|
||||
"type": "shell",
|
||||
"script": "scripts/install_os_tuning.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `install_jaeger`}}",
|
||||
"script": "scripts/install_jaeger.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `install_cloudwatch`}}",
|
||||
@@ -160,11 +165,6 @@
|
||||
"type": "shell",
|
||||
"script": "scripts/install_fail2ban.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `install_jaeger`}}",
|
||||
"script": "scripts/install_jaeger.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `jambonz_user`}} {{user `jambonz_password`}}",
|
||||
|
||||
@@ -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
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Jaeger Agent
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/jaeger-agent --reporter.grpc.host-port=localhost:14250
|
||||
User=nobody
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -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=foobar --collector.num-workers=50 --collector.queue-size=2000 --collector.http-server.host-port=0.0.0.0:14268
|
||||
User=nobody
|
||||
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=foobar
|
||||
User=nobody
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$1" == "yes" ]; then
|
||||
|
||||
cd /tmp
|
||||
|
||||
echo "installing 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='foobar'
|
||||
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
-1
@@ -4,7 +4,7 @@
|
||||
"ssh_username": "admin",
|
||||
"ami_description": "jambonz monitoring server",
|
||||
"instance_type": "t2.xlarge",
|
||||
"jambonz_version": "v0.8.3-rc4",
|
||||
"jambonz_version": "v0.8.4",
|
||||
"homer_user": "homer_user",
|
||||
"homer_password": "XcapJTqy11LnsYRtxXGPTYQkAnI",
|
||||
"install_influxdb": "yes",
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
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
|
||||
|
||||
fi
|
||||
@@ -3,12 +3,12 @@
|
||||
"region": "us-east-1",
|
||||
"ssh_username": "admin",
|
||||
"ami_description": "jambonz SBC RTP server",
|
||||
"drachtio_version": "v0.8.21",
|
||||
"jambonz_version": "v0.8.3-rc4",
|
||||
"drachtio_version": "v0.8.22",
|
||||
"jambonz_version": "v0.8.4",
|
||||
"ami_base_image_arch": "amd64",
|
||||
"ami_base_image_owner": "136693071363",
|
||||
"instance_type": "t3.xlarge",
|
||||
"rtp_engine_version": "mr11.2.1.5",
|
||||
"rtp_engine_version": "mr11.3.1.8",
|
||||
"rtp_engine_min_port": "40000",
|
||||
"rtp_engine_max_port": "60000",
|
||||
"install_datadog": "no",
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user