Unify all templates into a single tree, no more CE vs PRO distinction. Handle inactive nodes, and CARRIER systems. Change-Id: Id2800e0cc746233cb69a1b9a09769f26aa9c2a5dchanges/94/13394/18
parent
d693ef759a
commit
993198705f
@ -1,35 +0,0 @@
|
||||
command:
|
||||
hostname:
|
||||
exit-status: 0
|
||||
|
||||
[% IF sipwise.system_tester.skip_strict_hostname_test != "true" %]
|
||||
hostname:
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "spce"
|
||||
stderr: []
|
||||
|
||||
hostname --fqdn:
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "spce."
|
||||
stderr: []
|
||||
|
||||
hostname --short:
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "spce"
|
||||
stderr: []
|
||||
|
||||
[% END -%]
|
||||
"[ $(hostname --short). = $(hostname --fqdn) ]":
|
||||
title: "short hostname should be the same as fqdn (ignoring trailing dot)"
|
||||
exit-status: 0
|
||||
stdout: []
|
||||
stderr: []
|
||||
|
||||
"[ $(resolveip -s $(hostname --fqdn)) = $(resolveip -s $(hostname --short)) ]":
|
||||
title: "ip-s of short hostname and fqdn should be the same"
|
||||
exit-status: 0
|
||||
stdout: []
|
||||
stderr: []
|
||||
@ -1,75 +0,0 @@
|
||||
command:
|
||||
"pgrep -c -f '[l]ua5.1 /usr/bin/prosody'":
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "1"
|
||||
stderr: []
|
||||
|
||||
"pgrep -c -f '[p]erl-fcgi-pm \\[NGCP::Panel\\]'":
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "1"
|
||||
stderr: []
|
||||
|
||||
"pgrep -n -f '[k]amailio.*kamailio.proxy.pid'":
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "/[0-9]+/"
|
||||
stderr: []
|
||||
|
||||
"pgrep -n -f '[k]amailio.*kamailio.lb.pid'":
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "/[0-9]+/"
|
||||
stderr: []
|
||||
|
||||
process:
|
||||
acpid:
|
||||
running: true
|
||||
asterisk:
|
||||
running: true
|
||||
cron:
|
||||
running: true
|
||||
exim4:
|
||||
running: true
|
||||
getty:
|
||||
running: true
|
||||
influxd:
|
||||
running: true
|
||||
kamailio:
|
||||
running: true
|
||||
mediator:
|
||||
running: true
|
||||
mysqld:
|
||||
running: true
|
||||
mysqld_safe:
|
||||
running: true
|
||||
ngcp-sems:
|
||||
running: true
|
||||
ngcp-witnessd:
|
||||
running: true
|
||||
nginx:
|
||||
running: true
|
||||
ntpd:
|
||||
running: true
|
||||
perl-fcgi:
|
||||
running: true
|
||||
rate-o-mat:
|
||||
running: true
|
||||
redis-server:
|
||||
running: true
|
||||
rsyslogd:
|
||||
running: true
|
||||
rtpengine:
|
||||
running: true
|
||||
sshd:
|
||||
running: true
|
||||
telegraf:
|
||||
running: true
|
||||
{{if eq .Env.DEBIAN_RELEASE "8"}}
|
||||
udevd:
|
||||
running: true
|
||||
{{else}}
|
||||
systemd-udevd:
|
||||
running: true
|
||||
{{end}}
|
||||
@ -1,137 +0,0 @@
|
||||
file:
|
||||
|
||||
/etc/apt/sources.list.d/sipwise.list:
|
||||
exists: true
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: root
|
||||
filetype: file
|
||||
contains: []
|
||||
|
||||
/etc/ngcp-config/config.yml:
|
||||
exists: true
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: root
|
||||
filetype: file
|
||||
contains: []
|
||||
|
||||
/etc/ngcp-config/constants.yml:
|
||||
exists: true
|
||||
mode: "0600"
|
||||
owner: root
|
||||
group: root
|
||||
filetype: file
|
||||
contains: []
|
||||
|
||||
/etc/ngcp-config/network.yml:
|
||||
exists: true
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: root
|
||||
filetype: file
|
||||
contains: []
|
||||
|
||||
/etc/ngcp-config/.git:
|
||||
exists: true
|
||||
mode: "0700"
|
||||
owner: root
|
||||
group: root
|
||||
filetype: directory
|
||||
contains: []
|
||||
|
||||
/etc/ngcp-config/cfg_schema.db:
|
||||
exists: true
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: root
|
||||
filetype: file
|
||||
contains: []
|
||||
|
||||
/etc/ngcp-config/.ngcpcfg_perms:
|
||||
exists: true
|
||||
mode: "0700"
|
||||
owner: root
|
||||
group: root
|
||||
filetype: file
|
||||
contains: []
|
||||
|
||||
/etc/ngcp-config/ngcpcfg.cfg:
|
||||
exists: true
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: root
|
||||
filetype: file
|
||||
contains: []
|
||||
|
||||
# /etc/ngcp-config/systems.cfg:
|
||||
# exists: true
|
||||
# mode: "0644"
|
||||
# owner: root
|
||||
# group: root
|
||||
# filetype: file
|
||||
# contains: []
|
||||
|
||||
/etc/ngcp-config/ssl:
|
||||
exists: true
|
||||
mode: "0750"
|
||||
owner: root
|
||||
group: ssl-cert
|
||||
filetype: directory
|
||||
contains: []
|
||||
|
||||
/etc/ngcp-config/shared-files:
|
||||
exists: true
|
||||
mode: "0755"
|
||||
owner: root
|
||||
group: root
|
||||
filetype: directory
|
||||
contains: []
|
||||
|
||||
/etc/ngcp-config/shared-files/mysql:
|
||||
exists: true
|
||||
mode: "0755"
|
||||
owner: root
|
||||
group: root
|
||||
filetype: directory
|
||||
contains: []
|
||||
|
||||
/etc/ngcp-config/shared-files/mysql/sipwise.cnf:
|
||||
exists: true
|
||||
mode: "0600"
|
||||
owner: root
|
||||
group: root
|
||||
filetype: file
|
||||
contains: []
|
||||
|
||||
# /etc/ngcp-config/shared-files/ssh:
|
||||
# exists: true
|
||||
# mode: "0755"
|
||||
# owner: root
|
||||
# group: root
|
||||
# filetype: directory
|
||||
# contains: []
|
||||
|
||||
# /etc/ngcp-config/shared-files/sshd:
|
||||
# exists: true
|
||||
# mode: "0755"
|
||||
# owner: root
|
||||
# group: root
|
||||
# filetype: directory
|
||||
# contains: []
|
||||
|
||||
/etc/ngcp_version:
|
||||
exists: true
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: root
|
||||
filetype: file
|
||||
contains: []
|
||||
|
||||
/etc/sipwise_ngcp_version:
|
||||
exists: true
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: root
|
||||
filetype: file
|
||||
contains: []
|
||||
@ -1,27 +0,0 @@
|
||||
[% PROCESS '/usr/lib/ngcp-ngcpcfg/get_hostname';
|
||||
hostname = out
|
||||
-%]
|
||||
[% argv.host=hostname; argv.type='web_ext';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host';
|
||||
web_ext_ips = out;
|
||||
-%]
|
||||
[% argv.host=hostname; argv.type='web_int';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host';
|
||||
web_int_ips = out;
|
||||
-%]
|
||||
port:
|
||||
tcp:443:
|
||||
listening: true
|
||||
ip: ["[% web_ext_ips.0 -%]"]
|
||||
|
||||
tcp:1443:
|
||||
listening: true
|
||||
ip: ["[% web_int_ips.0 -%]"]
|
||||
|
||||
tcp6:8083:
|
||||
listening: true
|
||||
ip: ["::"]
|
||||
|
||||
tcp6:8086:
|
||||
listening: true
|
||||
ip: ["::"]
|
||||
@ -1,9 +0,0 @@
|
||||
package:
|
||||
ngcp-ngcp-ce:
|
||||
installed: true
|
||||
|
||||
ngcp-ngcp-pro:
|
||||
installed: false
|
||||
|
||||
ngcp-ngcp-carrier:
|
||||
installed: false
|
||||
@ -1,88 +0,0 @@
|
||||
service:
|
||||
acpid:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
asterisk:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
cron:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
exim4:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
influxdb:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
io-scheduler:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
kamailio-lb:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
kamailio-proxy:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
mediator:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
motd:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
mysql:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
ngcp-rate-o-mat:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
ngcp-rtpengine-daemon:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
ngcp-sems:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
ngcp-witnessd:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
nginx:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
ntp:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
prosody:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
redis-server:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
rsyslog:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
ssh:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
telegraf:
|
||||
enabled: true
|
||||
running: true
|
||||
@ -1,13 +0,0 @@
|
||||
port:
|
||||
tcp:1443:
|
||||
listening: true
|
||||
|
||||
tcp:22:
|
||||
listening: true
|
||||
|
||||
tcp:443:
|
||||
listening: true
|
||||
|
||||
tcp6:80:
|
||||
# why Ipv4 is not here?
|
||||
listening: true
|
||||
@ -1,14 +0,0 @@
|
||||
dns:
|
||||
[% IF sipwise.system_tester.skip_dns_check_test != "true" -%]
|
||||
spce:
|
||||
resolveable: true
|
||||
addrs:
|
||||
- 127.0.0.2
|
||||
timeout: 500
|
||||
|
||||
[% END -%]
|
||||
localhost:
|
||||
resolveable: true
|
||||
addrs:
|
||||
- 127.0.0.1
|
||||
timeout: 500
|
||||
@ -1,16 +0,0 @@
|
||||
gossfile:
|
||||
01_running-processes.yaml: {}
|
||||
01_hostname-and-interfaces.yaml: {}
|
||||
02_disk-free.yaml: {}
|
||||
03_files_availability.yaml: {}
|
||||
03_no-cores.yaml: {}
|
||||
03_open_ports.yaml: {}
|
||||
04_template_files.yaml: {}
|
||||
05_system_users.yaml: {}
|
||||
06_system_packages.yaml: {}
|
||||
07_system_service.yaml: {}
|
||||
08_system_ports.yaml: {}
|
||||
09_system_dns.yaml: {}
|
||||
10_sites_ok.yaml: {}
|
||||
11_influxdb_content.yaml: {}
|
||||
99_dummy.yaml: {}
|
||||
@ -1,3 +1,2 @@
|
||||
ce/* /etc/ngcp-config/templates/etc/ngcp-tests/ce/
|
||||
pro/* /etc/ngcp-config/templates/etc/ngcp-tests/pro/
|
||||
testrunner /usr/share/ngcp-tests/
|
||||
templates/* /etc/ngcp-config/templates/etc/ngcp-tests/
|
||||
testrunner /usr/share/ngcp-tests/
|
||||
|
||||
@ -0,0 +1,32 @@
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/ce/01_hostname-and-interfaces.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/ce/01_running-processes.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/ce/02_disk-free.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/ce/03_files_availability.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/ce/03_no-cores.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/ce/03_open_ports.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/ce/04_template_files.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/ce/05_system_users.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/ce/06_system_packages.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/ce/07_system_service.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/ce/08_system_ports.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/ce/09_system_dns.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/ce/10_sites_ok.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/ce/11_influxdb_content.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/ce/99_dummy.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/ce/goss.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/pro/01_hostname-and-interfaces.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/pro/01_running-processes.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/pro/02_disk-free.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/pro/03_files_availability.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/pro/03_no-cores.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/pro/03_open_ports.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/pro/04_template_files.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/pro/05_system_users.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/pro/06_system_packages.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/pro/07_system_service.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/pro/08_system_ports.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/pro/09_system_dns.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/pro/10_sites_ok.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/pro/11_influxdb_content.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/pro/99_dummy.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
rm_conffile /etc/ngcp-config/templates/etc/ngcp-tests/pro/goss.yaml.tt2 5.4.0.0+0~mr5.4.0.0~ ngcp-system-tests
|
||||
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Remove obsolete files generated from templates.
|
||||
rm -rf /etc/ngcp-tests/ce
|
||||
rm -rf /etc/ngcp-tests/pro
|
||||
|
||||
#DEBHELPER#
|
||||
@ -1,121 +0,0 @@
|
||||
command:
|
||||
|
||||
"pgrep -c -f '[l]ua5.1 /usr/bin/prosody'":
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "1"
|
||||
stderr: []
|
||||
|
||||
"pgrep -c -f '[p]erl-fcgi-pm \\[NGCP::Panel\\]'":
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "1"
|
||||
stderr: []
|
||||
|
||||
"pgrep -n -f '[k]amailio.*kamailio.proxy.pid'":
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "/[0-9]+/"
|
||||
stderr: []
|
||||
|
||||
"pgrep -n -f '[k]amailio.*kamailio.lb.pid'":
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "/[0-9]+/"
|
||||
stderr: []
|
||||
|
||||
process:
|
||||
acpid:
|
||||
running: true
|
||||
|
||||
asterisk:
|
||||
running: true
|
||||
|
||||
cron:
|
||||
running: true
|
||||
|
||||
exim4:
|
||||
running: true
|
||||
|
||||
glusterfs:
|
||||
running: true
|
||||
|
||||
hb_watchdog:
|
||||
running: true
|
||||
|
||||
heartbeat:
|
||||
running: true
|
||||
|
||||
influxd:
|
||||
running: true
|
||||
|
||||
influxdb-relay:
|
||||
running: true
|
||||
|
||||
kamailio:
|
||||
running: true
|
||||
|
||||
mediator:
|
||||
running: true
|
||||
|
||||
mysqld:
|
||||
running: true
|
||||
|
||||
mysqld_safe:
|
||||
running: true
|
||||
|
||||
monit:
|
||||
running: true
|
||||
|
||||
ngcp-faxserver:
|
||||
running: true
|
||||
|
||||
ngcp-sems:
|
||||
running: true
|
||||
|
||||
ngcp-snmp-agent:
|
||||
running: true
|
||||
|
||||
ngcp-witnessd:
|
||||
running: true
|
||||
|
||||
nginx:
|
||||
running: true
|
||||
|
||||
ntpd:
|
||||
running: true
|
||||
|
||||
perl-fcgi:
|
||||
running: true
|
||||
|
||||
rate-o-mat:
|
||||
running: true
|
||||
|
||||
redis-server:
|
||||
running: true
|
||||
|
||||
rsyslogd:
|
||||
running: true
|
||||
|
||||
rtpengine:
|
||||
running: true
|
||||
|
||||
sshd:
|
||||
running: true
|
||||
|
||||
snmpd:
|
||||
running: true
|
||||
|
||||
telegraf:
|
||||
running: true
|
||||
|
||||
{{if eq .Env.DEBIAN_RELEASE "8"}}
|
||||
udevd:
|
||||
running: true
|
||||
{{else}}
|
||||
systemd-udevd:
|
||||
running: true
|
||||
{{end}}
|
||||
|
||||
voisniff-ng:
|
||||
running: true
|
||||
@ -1 +0,0 @@
|
||||
../ce/02_disk-free.yaml.tt2
|
||||
@ -1 +0,0 @@
|
||||
../ce/03_no-cores.yaml.tt2
|
||||
@ -1,203 +0,0 @@
|
||||
[% PROCESS '/usr/lib/ngcp-ngcpcfg/get_hostname'; hostname = out -%]
|
||||
[% argv.host=hostname; argv.role='proxy';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_proxy = out
|
||||
-%]
|
||||
[% argv.host=hostname; argv.role='lb';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_lb = out
|
||||
-%]
|
||||
[% argv.host=hostname; argv.role='mgmt';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_mgmt = out
|
||||
-%]
|
||||
[% argv.host=hostname; argv.role='db';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_db = out
|
||||
-%]
|
||||
[% argv.host=hostname; argv.role='rtp';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_rtp = out
|
||||
-%]
|
||||
[% argv.host=hostname; argv.type='ha_int';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_iface';
|
||||
host_ha_iface = out
|
||||
-%]
|
||||
[% argv.host=hostname; argv.type='sip_ext';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_shared_ips_for_host';
|
||||
sip_ext_ips = out
|
||||
-%]
|
||||
[% IF !sip_ext_ips.size -%]
|
||||
[% argv.host=hostname; argv.type='sip_ext';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host';
|
||||
sip_ext_ips = out;
|
||||
-%]
|
||||
[% END -%]
|
||||
[% argv.host=hostname; argv.type='web_ext';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_shared_ips_for_host';
|
||||
web_ext_ips = out
|
||||
-%]
|
||||
[% IF !web_ext_ips.size -%]
|
||||
[% argv.host=hostname; argv.type='web_ext';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host';
|
||||
web_ext_ips = out;
|
||||
-%]
|
||||
[% END -%]
|
||||
[% argv.host=hostname; argv.type='web_int';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_shared_ips_for_host';
|
||||
web_int_ips = out
|
||||
-%]
|
||||
[% IF !web_int_ips.size -%]
|
||||
[% argv.host=hostname; argv.type='web_int';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host';
|
||||
web_int_ips = out;
|
||||
-%]
|
||||
[% END -%]
|
||||
[% argv.host=hostname; argv.type='ha_int';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host';
|
||||
ha_int_ips = out;
|
||||
-%]
|
||||
|
||||
port:
|
||||
|
||||
[% IF is_mgmt -%]
|
||||
tcp:443:
|
||||
listening: true
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
tcp:1443:
|
||||
listening: true
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
[% END -%]
|
||||
[% IF is_mgmt && pbx.enable == 'yes' -%]
|
||||
tcp:1444:
|
||||
listening: true
|
||||
ip: ["[% web_ext_ips.0 -%]"]
|
||||
|
||||
tcp:1445:
|
||||
listening: true
|
||||
ip: ["[% web_ext_ips.0 -%]"]
|
||||
|
||||
[% END -%]
|
||||
tcp:22:
|
||||
listening: true
|
||||
ip: ["0.0.0.0"]
|
||||
|
||||
tcp:22:
|
||||
listening: true
|
||||
ip: ["[% hosts.$hostname.$host_ha_iface.ip %]"]
|
||||
|
||||
tcp:24009:
|
||||
listening: true
|
||||
ip: ["0.0.0.0"]
|
||||
|
||||
tcp:25:
|
||||
listening: true
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
tcp:2812:
|
||||
listening: true
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
tcp:3306:
|
||||
listening: true
|
||||
ip: ["0.0.0.0"]
|
||||
|
||||
[% IF is_lb -%]
|
||||
tcp:5060:
|
||||
listening: true
|
||||
ip: ["[% sip_ext_ips.0 -%]"]
|
||||
|
||||
[% END -%]
|
||||
[% IF is_proxy -%]
|
||||
tcp:5062:
|
||||
listening: true
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
tcp:5222:
|
||||
listening: true
|
||||
ip: ["[% sip_ext_ips.0 -%]"]
|
||||
|
||||
tcp:5269:
|
||||
listening: true
|
||||
ip: ["[% sip_ext_ips.0 -%]"]
|
||||
|
||||
tcp:5280:
|
||||
listening: true
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
tcp:5281:
|
||||
listening: true
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
tcp:5582:
|
||||
listening: true
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
tcp:8090:
|
||||
listening: true
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
tcp:5038:
|
||||
listening: true
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
udp:5040:
|
||||
listening: true
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
udp:5070:
|
||||
listening: true
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
udp:5080:
|
||||
listening: true
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
[% END -%]
|
||||
[% IF is_rtp || is_proxy || is_db -%]
|
||||
tcp:6379:
|
||||
listening: true
|
||||
ip: ["[% ha_int_ips.0 %]"]
|
||||
|
||||
[% END -%]
|
||||
tcp:7777:
|
||||
listening: false
|
||||
|
||||
udp:7777:
|
||||
listening: false
|
||||
|
||||
udp:123:
|
||||
listening: true
|
||||
ip: ["0.0.0.0"]
|
||||
|
||||
udp:161:
|
||||
listening: true
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
[% IF is_rtp -%]
|
||||
udp:2223:
|
||||
listening: true
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
[% END -%]
|
||||
tcp6:8083:
|
||||
listening: true
|
||||
ip: ["::"]
|
||||
|
||||
tcp6:8086:
|
||||
listening: true
|
||||
ip: ["::"]
|
||||
|
||||
tcp:9096:
|
||||
listening: true
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
udp:[% heartbeat.port ? heartbeat.port : '694' %]:
|
||||
listening: true
|
||||
ip: ["0.0.0.0"]
|
||||
|
||||
tcp:22:
|
||||
# last record to keep JSON valid
|
||||
listening: true
|
||||
@ -1 +0,0 @@
|
||||
../ce/04_template_files.yaml.tt2
|
||||
@ -1 +0,0 @@
|
||||
../ce/05_system_users.yaml.tt2
|
||||
@ -1,9 +0,0 @@
|
||||
package:
|
||||
ngcp-ngcp-ce:
|
||||
installed: false
|
||||
|
||||
ngcp-ngcp-pro:
|
||||
installed: true
|
||||
|
||||
ngcp-ngcp-carrier:
|
||||
installed: false
|
||||
@ -1,239 +0,0 @@
|
||||
[% PROCESS '/usr/lib/ngcp-ngcpcfg/get_hostname'; hostname = out -%]
|
||||
[% argv.host=hostname; argv.role='proxy';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_proxy = out
|
||||
-%]
|
||||
[% argv.host=hostname; argv.role='lb';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_lb = out
|
||||
-%]
|
||||
[% argv.host=hostname; argv.role='mgmt';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_mgmt = out
|
||||
-%]
|
||||
[% argv.host=hostname; argv.role='db';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_db = out
|
||||
-%]
|
||||
[% argv.host=hostname; argv.role='rtp';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_rtp = out
|
||||
-%]
|
||||
[% PROCESS '/usr/lib/ngcp-ngcpcfg/get_ngcp_type'; ngcp_type = out -%]
|
||||
|
||||
service:
|
||||
|
||||
acpid:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
[% IF is_proxy && asterisk.enabled == "yes" -%]
|
||||
asterisk:
|
||||
enabled: false
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
[% IF (is_proxy || is_rtp) && intercept.enabled == "yes" -%]
|
||||
captagent:
|
||||
enabled: false
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
[% IF turnserver.enabled == 'yes' -%]
|
||||
coturn:
|
||||
enabled: false
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
cron:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
[% IF bootenv.dhcp.enable == 'yes' -%]
|
||||
dnsmasq:
|
||||
enabled: false
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
exim4:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
[% IF haproxy.enable == "yes" -%]
|
||||
haproxy:
|
||||
enabled: false
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
[% IF heartbeat.hb_watchdog.enable == 'yes' -%]
|
||||
hb_watchdog:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
io-scheduler:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
influxdb:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
influxdb-relay:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
[% IF is_lb && kamailio.lb.start == "yes" -%]
|
||||
kamailio-lb:
|
||||
enabled: false
|
||||
running: true
|
||||
|
||||
[% ELSE -%]
|
||||
kamailio-lb:
|
||||
enabled: false
|
||||
running: false
|
||||
|
||||
[% END -%]
|
||||
[% IF is_proxy && kamailio.proxy.start == "yes" -%]
|
||||
kamailio-proxy:
|
||||
enabled: false
|
||||
running: true
|
||||
|
||||
[% ELSE -%]
|
||||
kamailio-proxy:
|
||||
enabled: false
|
||||
running: false
|
||||
|
||||
[% END -%]
|
||||
[% IF mediator.enabled == 'yes' -%]
|
||||
mediator:
|
||||
enabled: false
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
motd:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
mysql:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
[% IF www_admin.enabled == 'yes' -%]
|
||||
ngcp-panel:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
[% IF rateomat.enable == "yes" -%]
|
||||
ngcp-rate-o-mat:
|
||||
enabled: false
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
[% IF rtpproxy.enabled == "yes" -%]
|
||||
ngcp-rtpengine-daemon:
|
||||
enabled: false
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
[% IF sems.enabled == "yes" -%]
|
||||
ngcp-sems:
|
||||
enabled: false
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
[% IF is_mgmt -%]
|
||||
ngcp-snmp-agent:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
[% ELSE -%]
|
||||
ngcp-snmp-agent:
|
||||
enabled: false
|
||||
running: false
|
||||
|
||||
[% END -%]
|
||||
ngcp-witnessd:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
[% IF nginx.enabled == 'yes' -%]
|
||||
nginx:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
ntp:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
[% IF prosody.enabled == 'yes' -%]
|
||||
prosody:
|
||||
enabled: false
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
[% IF pushd.enable == "yes" -%]
|
||||
ngcp-pushd:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
[% IF faxserver.enable == "yes" -%]
|
||||
ngcp-faxserver:
|
||||
enabled: false
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
[% IF redis.enabled == "yes" -%]
|
||||
redis-server:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
rsyslog:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
[% IF ldap.enabled == "yes" -%]
|
||||
slapd:
|
||||
enabled: false
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
[% IF pbx.enable == "yes" -%]
|
||||
sems-pbx:
|
||||
enabled: false
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
snmpd:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
[% IF (is_proxy || is_lb || is_rtp) && voisniff.daemon.start == 'yes' -%]
|
||||
voisniff-ng:
|
||||
enabled: false
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
[% IF ngcp_type == 'carrier' -%]
|
||||
ngcpcfg-api:
|
||||
enabled: false
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
[% IF (is_db || is_mgmt) && ngcp_type == 'carrier' -%]
|
||||
elasticsearch:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
[% END -%]
|
||||
ssh:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
telegraf:
|
||||
enabled: true
|
||||
running: true
|
||||
@ -1 +0,0 @@
|
||||
../ce/08_system_ports.yaml.tt2
|
||||
@ -1 +0,0 @@
|
||||
../ce/10_sites_ok.yaml.tt2
|
||||
@ -1 +0,0 @@
|
||||
../ce/11_influxdb_content.yaml.tt2
|
||||
@ -1 +0,0 @@
|
||||
../ce/99_dummy.yaml.tt2
|
||||
@ -1 +0,0 @@
|
||||
../ce/goss.yaml.tt2
|
||||
@ -0,0 +1,25 @@
|
||||
file:
|
||||
|
||||
/etc/ngcp-config/shared-files/ssh:
|
||||
exists: true
|
||||
mode: "0755"
|
||||
owner: root
|
||||
group: root
|
||||
filetype: directory
|
||||
contains: []
|
||||
|
||||
/etc/ngcp-config/shared-files/sshd:
|
||||
exists: true
|
||||
mode: "0755"
|
||||
owner: root
|
||||
group: root
|
||||
filetype: directory
|
||||
contains: []
|
||||
|
||||
/etc/ngcp-config/systems.cfg:
|
||||
exists: true
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: root
|
||||
filetype: file
|
||||
contains: []
|
||||
@ -0,0 +1,54 @@
|
||||
group:
|
||||
cdrexport:
|
||||
exists: true
|
||||
gid:
|
||||
or:
|
||||
- 1001
|
||||
- 10001
|
||||
sems:
|
||||
exists: true
|
||||
|
||||
sipwise:
|
||||
exists: true
|
||||
gid:
|
||||
or:
|
||||
- 1000
|
||||
- 10000
|
||||
|
||||
user:
|
||||
cdrexport:
|
||||
exists: true
|
||||
uid:
|
||||
or:
|
||||
- 1001
|
||||
- 10001
|
||||
gid:
|
||||
or:
|
||||
- 1001
|
||||
- 10001
|
||||
groups:
|
||||
- cdrexport
|
||||
home: "/home/jail/home/cdrexport"
|
||||
|
||||
sems:
|
||||
exists: true
|
||||
groups:
|
||||
- sems
|
||||
home:
|
||||
or:
|
||||
- "/var/run/ngcp-sems"
|
||||
- "/var/run/sems"
|
||||
|
||||
sipwise:
|
||||
exists: true
|
||||
uid:
|
||||
or:
|
||||
- 1000
|
||||
- 10000
|
||||
gid:
|
||||
or:
|
||||
- 1000
|
||||
- 10000
|
||||
groups:
|
||||
- sipwise
|
||||
home: "/var/sipwise"
|
||||
@ -0,0 +1,9 @@
|
||||
package:
|
||||
ngcp-ngcp-ce:
|
||||
installed: [% general.ngcp_type == 'spce' ? 'true' : 'false' %]
|
||||
|
||||
ngcp-ngcp-pro:
|
||||
installed: [% general.ngcp_type == 'sppro' ? 'true' : 'false' %]
|
||||
|
||||
ngcp-ngcp-carrier:
|
||||
installed: [% general.ngcp_type == 'carrier' ? 'true' : 'false' %]
|
||||
@ -0,0 +1,44 @@
|
||||
process:
|
||||
acpid:
|
||||
running: true
|
||||
|
||||
cron:
|
||||
running: true
|
||||
|
||||
exim4:
|
||||
running: true
|
||||
|
||||
getty:
|
||||
running: true
|
||||
|
||||
mysqld:
|
||||
running: true
|
||||
|
||||
mysqld_safe:
|
||||
running: true
|
||||
|
||||
nginx:
|
||||
running: true
|
||||
|
||||
ntpd:
|
||||
running: true
|
||||
|
||||
perl-fcgi:
|
||||
running: true
|
||||
|
||||
redis-server:
|
||||
running: true
|
||||
|
||||
rsyslogd:
|
||||
running: true
|
||||
|
||||
sshd:
|
||||
running: true
|
||||
|
||||
{{if eq .Env.DEBIAN_RELEASE "8"}}
|
||||
udevd:
|
||||
running: true
|
||||
{{else}}
|
||||
systemd-udevd:
|
||||
running: true
|
||||
{{end}}
|
||||
@ -0,0 +1,109 @@
|
||||
[%
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_hostname';
|
||||
hostname = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.role = 'proxy';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_proxy = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.role = 'lb';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_lb = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.role = 'mgmt';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_mgmt = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.role = 'db';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_db = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.role = 'rtp';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_rtp = out;
|
||||
-%]
|
||||
[% PERL -%]
|
||||
my $node_state = qx(ngcp-check_active -v);
|
||||
chomp $node_state;
|
||||
|
||||
$stash->set(node_state => $node_state);
|
||||
[% END -%]
|
||||
|
||||
command:
|
||||
|
||||
"pgrep -c -f '[l]ua5.1 /usr/bin/prosody'":
|
||||
[% IF is_proxy && prosody.enabled == 'yes' && node_state == 'active' -%]
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "1"
|
||||
[% ELSE -%]
|
||||
exit-status: 1
|
||||
stdout: []
|
||||
[% END -%]
|
||||
stderr: []
|
||||
|
||||
"pgrep -c -f '[p]erl-fcgi-pm \\[NGCP::Panel\\]'":
|
||||
[% IF is_mgmt && www_admin.enabled == 'yes' -%]
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "1"
|
||||
[% ELSE -%]
|
||||
exit-status: 1
|
||||
stdout: []
|
||||
[% END -%]
|
||||
stderr: []
|
||||
|
||||
"pgrep -n -f '[k]amailio.*kamailio.proxy.pid'":
|
||||
[% IF is_proxy && kamailio.proxy.start == "yes" && node_state == 'active' -%]
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "/[0-9]+/"
|
||||
[% ELSE -%]
|
||||
exit-status: 1
|
||||
stdout: []
|
||||
[% END -%]
|
||||
stderr: []
|
||||
|
||||
"pgrep -n -f '[k]amailio.*kamailio.lb.pid'":
|
||||
[% IF is_lb && kamailio.lb.start == "yes" && node_state == 'active' -%]
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "/[0-9]+/"
|
||||
[% ELSE -%]
|
||||
exit-status: 1
|
||||
stdout: []
|
||||
[% END -%]
|
||||
stderr: []
|
||||
|
||||
process:
|
||||
asterisk:
|
||||
running: [% is_proxy && node_state == 'active' ? 'true' : 'false' %]
|
||||
|
||||
influxd:
|
||||
running: true
|
||||
|
||||
kamailio:
|
||||
running: [% (is_lb || is_proxy) && node_state == 'active' ? 'true' : 'false' %]
|
||||
|
||||
mediator:
|
||||
running: [% is_proxy && node_state == 'active' ? 'true' : 'false' %]
|
||||
|
||||
ngcp-sems:
|
||||
running: [% is_proxy && node_state == 'active' ? 'true' : 'false' %]
|
||||
|
||||
ngcp-witnessd:
|
||||
running: true
|
||||
|
||||
rate-o-mat:
|
||||
running: [% is_proxy && node_state == 'active' ? 'true' : 'false' %]
|
||||
|
||||
rtpengine:
|
||||
running: [% is_rtp && node_state == 'active' ? 'true' : 'false' %]
|
||||
|
||||
telegraf:
|
||||
running: true
|
||||
@ -0,0 +1,53 @@
|
||||
[%
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_hostname';
|
||||
hostname = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.role = 'proxy';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_proxy = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.role = 'lb';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_lb = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.role = 'rtp';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_rtp = out;
|
||||
-%]
|
||||
[% PERL -%]
|
||||
my $node_state = qx(ngcp-check_active -v);
|
||||
chomp $node_state;
|
||||
|
||||
$stash->set(node_state => $node_state);
|
||||
[% END -%]
|
||||
|
||||
process:
|
||||
glusterfs:
|
||||
running: true
|
||||
|
||||
hb_watchdog:
|
||||
running: true
|
||||
|
||||
heartbeat:
|
||||
running: true
|
||||
|
||||
influxdb-relay:
|
||||
running: true
|
||||
|
||||
monit:
|
||||
running: true
|
||||
|
||||
ngcp-faxserver:
|
||||
running: [% is_proxy && node_state == 'active' ? 'true' : 'false' %]
|
||||
|
||||
ngcp-snmp-agent:
|
||||
running: true
|
||||
|
||||
snmpd:
|
||||
running: true
|
||||
|
||||
voisniff-ng:
|
||||
running: [% (is_proxy || is_lb || is_rtp) && node_state == 'active' ? 'true' : 'false' %]
|
||||
@ -0,0 +1,45 @@
|
||||
service:
|
||||
|
||||
acpid:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
cron:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
exim4:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
io-scheduler:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
influxdb:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
motd:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
mysql:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
ntp:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
rsyslog:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
ssh:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
telegraf:
|
||||
enabled: true
|
||||
running: true
|
||||
@ -0,0 +1,178 @@
|
||||
[%
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_hostname';
|
||||
hostname = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.role = 'proxy';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_proxy = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.role = 'lb';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_lb = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.role = 'mgmt';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_mgmt = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.role = 'db';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_db = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.role = 'rtp';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_rtp = out;
|
||||
|
||||
argv.role = 'li';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_li = out;
|
||||
is_li_enabled = is_li && cluster_sets.type == 'distributed' && intercept.enabled == 'yes';
|
||||
-%]
|
||||
[% PERL -%]
|
||||
my $node_state = qx(ngcp-check_active -v);
|
||||
chomp $node_state;
|
||||
|
||||
$stash->set(node_state => $node_state);
|
||||
[% END -%]
|
||||
|
||||
service:
|
||||
[% IF asterisk.enabled == "yes" -%]
|
||||
|
||||
asterisk:
|
||||
enabled: [% general.process_handler == 'none' ? 'true' : 'false' %]
|
||||
running: [% is_proxy && node_state == 'active' ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
[% IF intercept.enabled == "yes" -%]
|
||||
|
||||
captagent:
|
||||
enabled: false
|
||||
running: [% is_proxy || is_rtp ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
[% IF turnserver.enabled == 'yes' -%]
|
||||
|
||||
coturn:
|
||||
enabled: false
|
||||
running: [% is_rtp ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
[% IF bootenv.dhcp.enable == 'yes' -%]
|
||||
|
||||
dnsmasq:
|
||||
enabled: false
|
||||
running: [% is_mgmt ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
[% IF haproxy.enable == "yes" -%]
|
||||
|
||||
haproxy:
|
||||
enabled: false
|
||||
running: [% is_lb ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
[% IF heartbeat.hb_watchdog.enable == 'yes' -%]
|
||||
|
||||
hb_watchdog:
|
||||
enabled: true
|
||||
running: true
|
||||
[% END -%]
|
||||
[% IF kamailio.lb.start == "yes" -%]
|
||||
|
||||
kamailio-lb:
|
||||
enabled: [% general.process_handler == 'none' ? 'true' : 'false' %]
|
||||
running: [% is_lb && node_state == 'active' ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
[% IF kamailio.proxy.start == "yes" -%]
|
||||
|
||||
kamailio-proxy:
|
||||
enabled: [% general.process_handler == 'none' ? 'true' : 'false' %]
|
||||
running: [% is_proxy && node_state == 'active' ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
[% IF mediator.enabled == 'yes' -%]
|
||||
|
||||
mediator:
|
||||
enabled: [% general.process_handler == 'none' ? 'true' : 'false' %]
|
||||
running: [% is_proxy && node_state == 'active' ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
[% IF www_admin.enabled == 'yes' -%]
|
||||
|
||||
ngcp-panel:
|
||||
enabled: [% is_mgmt ? 'true' : 'false' %]
|
||||
running: [% is_mgmt ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
[% IF rateomat.enable == "yes" -%]
|
||||
|
||||
ngcp-rate-o-mat:
|
||||
enabled: [% general.process_handler == 'none' ? 'true' : 'false' %]
|
||||
running: [% is_proxy && node_state == 'active' ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
[% IF rtpproxy.enabled == "yes" -%]
|
||||
|
||||
ngcp-rtpengine-daemon:
|
||||
enabled: [% general.process_handler == 'none' ? 'true' : 'false' %]
|
||||
running: [% is_rtp && node_state == 'active' ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
[% IF sems.enabled == "yes" -%]
|
||||
|
||||
ngcp-sems:
|
||||
enabled: [% general.process_handler == 'none' ? 'true' : 'false' %]
|
||||
running: [% is_proxy && node_state == 'active' ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
|
||||
ngcp-witnessd:
|
||||
enabled: true
|
||||
running: true
|
||||
[% IF nginx.enabled == 'yes' -%]
|
||||
|
||||
nginx:
|
||||
enabled: true
|
||||
running: [% (is_mgmt || is_li_enabled) ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
[% IF prosody.enabled == 'yes' -%]
|
||||
|
||||
prosody:
|
||||
enabled: [% general.process_handler == 'none' ? 'true' : 'false' %]
|
||||
running: [% is_proxy && node_state == 'active' ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
[% IF pushd.enable == "yes" -%]
|
||||
|
||||
ngcp-pushd:
|
||||
enabled: true
|
||||
running: [% is_lb ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
[% IF redis.enabled == "yes" -%]
|
||||
|
||||
redis-server:
|
||||
enabled: true
|
||||
running: [% (is_rtp || is_proxy || is_db) ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
[% IF ldap.enabled == "yes" -%]
|
||||
|
||||
slapd:
|
||||
enabled: false
|
||||
running: [% is_mgmt ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
[% IF pbx.enable == "yes" -%]
|
||||
|
||||
sems-pbx:
|
||||
enabled: false
|
||||
running: [% is_proxy && node_state == 'active' ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
[% IF voisniff.daemon.start == 'yes' -%]
|
||||
|
||||
voisniff-ng:
|
||||
enabled: false
|
||||
running: [% (is_proxy || is_lb || is_rtp) && node_state == 'active' ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
[% IF is_mgmt && general.ngcp_type == 'carrier' -%]
|
||||
|
||||
ngcpcfg-api:
|
||||
enabled: false
|
||||
running: true
|
||||
[% END -%]
|
||||
[% IF elasticsearch.enable == 'yes' -%]
|
||||
|
||||
elasticsearch:
|
||||
enabled: true
|
||||
running: [% (is_db || is_mgmt) ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
@ -0,0 +1,41 @@
|
||||
[%
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_hostname';
|
||||
hostname = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.role = 'mgmt';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_mgmt = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.role = 'proxy';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_proxy = out;
|
||||
-%]
|
||||
[% PERL -%]
|
||||
my $node_state = qx(ngcp-check_active -v);
|
||||
chomp $node_state;
|
||||
|
||||
$stash->set(node_state => $node_state);
|
||||
[% END -%]
|
||||
|
||||
service:
|
||||
influxdb-relay:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
snmpd:
|
||||
enabled: true
|
||||
running: true
|
||||
|
||||
ngcp-snmp-agent:
|
||||
enabled: true
|
||||
running: true
|
||||
[% IF faxserver.enable == "yes" -%]
|
||||
|
||||
# XXX: This should be moved to the non-pro file, but the faxserver.enable
|
||||
# is incorrectly enabled on spce.
|
||||
ngcp-faxserver:
|
||||
enabled: false
|
||||
running: [% is_proxy && node_state == 'active' ? 'true' : 'false' %]
|
||||
[% END -%]
|
||||
@ -0,0 +1,6 @@
|
||||
dns:
|
||||
localhost:
|
||||
resolveable: true
|
||||
addrs:
|
||||
- 127.0.0.1
|
||||
timeout: 500
|
||||
@ -0,0 +1,6 @@
|
||||
dns:
|
||||
spce:
|
||||
resolveable: true
|
||||
addrs:
|
||||
- 127.0.0.2
|
||||
timeout: 500
|
||||
@ -0,0 +1,23 @@
|
||||
port:
|
||||
# OpenSSH
|
||||
tcp:22:
|
||||
listening: true
|
||||
ip: ["0.0.0.0"]
|
||||
|
||||
# Exim MTA
|
||||
tcp:25:
|
||||
listening: true
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
# ntpd
|
||||
udp:123:
|
||||
listening: true
|
||||
ip: ["0.0.0.0"]
|
||||
|
||||
# Check for a closed port, nothing there.
|
||||
tcp:7777:
|
||||
listening: false
|
||||
|
||||
# Check for a closed port, nothing there.
|
||||
udp:7777:
|
||||
listening: false
|
||||
@ -0,0 +1,199 @@
|
||||
[%
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_hostname';
|
||||
hostname = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.role = 'proxy';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_proxy = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.role = 'lb';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_lb = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.role = 'mgmt';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_mgmt = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.role = 'db';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_db = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.role = 'rtp';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
||||
is_rtp = out;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.type = 'sip_ext';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_shared_ips_for_host';
|
||||
sip_ext_ips = out;
|
||||
|
||||
IF !sip_ext_ips.size;
|
||||
argv.host = hostname;
|
||||
argv.type = 'sip_ext';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host';
|
||||
sip_ext_ips = out;
|
||||
END;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.type = 'web_ext';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_shared_ips_for_host';
|
||||
web_ext_ips = out;
|
||||
|
||||
IF !web_ext_ips.size;
|
||||
argv.host = hostname;
|
||||
argv.type = 'web_ext';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host';
|
||||
web_ext_ips = out;
|
||||
END;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.type = 'web_int';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_shared_ips_for_host';
|
||||
web_int_ips = out;
|
||||
|
||||
IF !web_int_ips.size;
|
||||
argv.host = hostname;
|
||||
argv.type = 'web_int';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host';
|
||||
web_int_ips = out;
|
||||
END;
|
||||
|
||||
argv.host = hostname;
|
||||
argv.type = 'ha_int';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host';
|
||||
ha_int_ips = out;
|
||||
-%]
|
||||
[% PERL -%]
|
||||
my $node_state = qx(ngcp-check_active -v);
|
||||
chomp $node_state;
|
||||
|
||||
$stash->set(node_state => $node_state);
|
||||
[% END -%]
|
||||
|
||||
port:
|
||||
|
||||
[% IF is_mgmt -%]
|
||||
# Nginx (IPv6 due to listening on all address families)
|
||||
tcp6:80:
|
||||
listening: true
|
||||
|
||||
# Nginx HTTPS (NGCP Panel)
|
||||
tcp:443:
|
||||
listening: true
|
||||
ip: ["[% web_ext_ips.0 -%]"]
|
||||
|
||||
# Nginx HTTPS (NGCP Panel Admin)
|
||||
tcp:1443:
|
||||
listening: true
|
||||
ip: ["[% web_int_ips.0 -%]"]
|
||||
|
||||
[% END -%]
|
||||
[% IF is_mgmt && pbx.enable == 'yes' -%]
|
||||
# HTTPS PBX autoprovisioning
|
||||
tcp:1444:
|
||||
listening: true
|
||||
ip: ["[% web_ext_ips.0 -%]"]
|
||||
|
||||
# HTTP PBX autoprovisioning
|
||||
tcp:1445:
|
||||
listening: true
|
||||
ip: ["[% web_ext_ips.0 -%]"]
|
||||
|
||||
[% END -%]
|
||||
# MySQL
|
||||
tcp:3306:
|
||||
listening: true
|
||||
ip: ["[% general.ngcp_type == 'spce' ? '127.0.0.1' : '0.0.0.0' %]"]
|
||||
|
||||
[% IF is_lb -%]
|
||||
# Kamailio load-balancer
|
||||
tcp:5060:
|
||||
listening: [% node_state == 'active' ? 'true' : 'false' %]
|
||||
ip: ["[% sip_ext_ips.0 -%]"]
|
||||
|
||||
[% END -%]
|
||||
[% IF is_proxy -%]
|
||||
# Kamailio proxy
|
||||
tcp:5062:
|
||||
listening: [% node_state == 'active' ? 'true' : 'false' %]
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
# Prosody
|
||||
tcp:5222:
|
||||
listening: [% node_state == 'active' ? 'true' : 'false' %]
|
||||
ip: ["[% sip_ext_ips.0 -%]"]
|
||||
|
||||
# Prosody
|
||||
tcp:5269:
|
||||
listening: [% node_state == 'active' ? 'true' : 'false' %]
|
||||
ip: ["[% sip_ext_ips.0 -%]"]
|
||||
|
||||
# Prosody
|
||||
tcp:5280:
|
||||
listening: [% node_state == 'active' ? 'true' : 'false' %]
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
# Prosody
|
||||
tcp:5281:
|
||||
listening: [% node_state == 'active' ? 'true' : 'false' %]
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
# Prosody
|
||||
tcp:5582:
|
||||
listening: [% node_state == 'active' ? 'true' : 'false' %]
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
# SEMS
|
||||
tcp:8090:
|
||||
listening: [% node_state == 'active' ? 'true' : 'false' %]
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
# Asterisk
|
||||
tcp:5038:
|
||||
listening: [% node_state == 'active' ? 'true' : 'false' %]
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
# SEMS
|
||||
udp:5040:
|
||||
listening: [% node_state == 'active' ? 'true' : 'false' %]
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
# Asterisk
|
||||
udp:5070:
|
||||
listening: [% node_state == 'active' ? 'true' : 'false' %]
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
# SEMS
|
||||
udp:5080:
|
||||
listening: [% node_state == 'active' ? 'true' : 'false' %]
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
[% END -%]
|
||||
[% IF is_rtp || is_proxy || is_db -%]
|
||||
# Redis
|
||||
tcp:6379:
|
||||
listening: true
|
||||
ip: ["[% ha_int_ips.0 %]"]
|
||||
|
||||
[% END -%]
|
||||
[% IF is_rtp -%]
|
||||
# rtpengine
|
||||
udp:2223:
|
||||
listening: [% node_state == 'active' ? 'true' : 'false' %]
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
[% END -%]
|
||||
# InfluxDB Admin
|
||||
tcp6:8083:
|
||||
listening: true
|
||||
ip: ["::"]
|
||||
|
||||
# InfluxDb Query
|
||||
tcp6:8086:
|
||||
listening: true
|
||||
ip: ["::"]
|
||||
@ -0,0 +1,25 @@
|
||||
port:
|
||||
# glusterfs
|
||||
tcp:24009:
|
||||
listening: true
|
||||
ip: ["0.0.0.0"]
|
||||
|
||||
# Monit
|
||||
tcp:2812:
|
||||
listening: true
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
# snmpd
|
||||
udp:161:
|
||||
listening: true
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
# InfluxDB Relay
|
||||
tcp:9096:
|
||||
listening: true
|
||||
ip: ["127.0.0.1"]
|
||||
|
||||
# Heartbeat
|
||||
udp:[% heartbeat.port ? heartbeat.port : '694' %]:
|
||||
listening: true
|
||||
ip: ["0.0.0.0"]
|
||||
@ -0,0 +1,38 @@
|
||||
gossfile:
|
||||
000_self-test-command.yaml: {}
|
||||
110_filesys-no-cores.yaml: {}
|
||||
120_filesys-free-space.yaml: {}
|
||||
130_filesys-ngcp.yaml: {}
|
||||
[% IF general.ngcp_type != 'spce' -%]
|
||||
131_filesys-ngcp-pro.yaml: {}
|
||||
[% END -%]
|
||||
132_filesys-ngcp-templates.yaml: {}
|
||||
200_user-debian.yaml: {}
|
||||
210_user-ngcp.yaml: {}
|
||||
310_package-ngcp.yaml: {}
|
||||
400_process-debian.yaml: {}
|
||||
410_process-ngcp.yaml: {}
|
||||
[% IF general.ngcp_type != 'spce' -%]
|
||||
411_process-ngcp-pro.yaml: {}
|
||||
[% END -%]
|
||||
500_init-daemons-dabian.yaml: {}
|
||||
510_init-daemons-ngcp.yaml: {}
|
||||
[% IF general.ngcp_type != 'spce' -%]
|
||||
511_init-daemons-ngcp-pro.yaml: {}
|
||||
[% END -%]
|
||||
800_network-hostname.yaml: {}
|
||||
[% IF sipwise.system_tester.skip_dns_check_test != "true" -%]
|
||||
810_network-dns-debian.yaml: {}
|
||||
[% IF general.ngcp_type == 'spce' -%]
|
||||
811_network-dns-ngcp-ce.yaml: {}
|
||||
[% ELSE -%]
|
||||
812_network-dns-ngcp-pro.yaml: {}
|
||||
[% END -%]
|
||||
[% END -%]
|
||||
820_network-ports-debian.yaml: {}
|
||||
821_network-ports-ngcp.yaml: {}
|
||||
[% IF general.ngcp_type != 'spce' -%]
|
||||
822_network-ports-ngcp-pro.yaml: {}
|
||||
[% END -%]
|
||||
900_service-ngcp-api.yaml: {}
|
||||
910_service-influxdb.yaml: {}
|
||||
Loading…
Reference in new issue