Commit 22e17afe authored by Aleksey Shirokih's avatar Aleksey Shirokih

Merge branch 'microservices' into 'ansible_27'

# Conflicts:
#   .gitlab-ci.yml
parents 1fc44057 fb6ff091
Pipeline #9300 passed with stages
in 73 minutes and 57 seconds
......@@ -50,6 +50,8 @@
- role: scheduler
- role: discovery
- role: bi
- role: datastream
- role: nbi
- import_playbook: additional_roles/custom/service.yml
......
......@@ -44,6 +44,7 @@ all:
datastream_loglevel: info
datastream_power: 2
datastream_mode: wait
datastream_whitelist_access: ""
discovery_backup_power: 1
discovery_loglevel: info
discovery_max_threads: 10
......@@ -79,6 +80,7 @@ all:
has_svc_memcached: true
has_svc_mongod: true
has_svc_mrt: true
has_svc_nbi: true
has_svc_nginx: true
has_svc_noc: true
has_svc_nsqd: true
......@@ -123,6 +125,9 @@ all:
mrt_loglevel: info
mrt_max_concurrency: 50
mrt_power: 2
nbi_loglevel: info
nbi_power: 2
nbi_whitelist_access: ""
nginx_cert: |
-----BEGIN CERTIFICATE-----
MIIFAzCCAuugAwIBAgIJAKrO/EVH/HOBMA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
......@@ -570,6 +575,26 @@ all:
stopwaitsecs: 3
name: mrt
pool: null
- config:
loglevel: info
power: 2
config_order: yaml:///opt/noc/etc/tower.yml,yaml:///opt/noc/etc/settings.yml,env:///NOC
environment:
category: internal
depends:
- noc
level: global
supervisord:
command: ./services/nbi/service.py
oom_score_adj: 999
priority: 100
process_name: '%(program_name)s-%(process_num)02d'
startretries: 999
stdout_logfile_backups: 3
stdout_logfile_maxbytes: 1MB
stopwaitsecs: 3
name: nbi
pool: null
- config:
backup_power: 1
loglevel: info
......@@ -861,7 +886,7 @@ all:
noc_node_debian8: {}
svc-datastream:
children:
cfg-datastream-node_debian8:
cfg-datastream-noc_node_debian8:
hosts:
noc_node_debian8: {}
svc-datastream-read: {}
......@@ -964,6 +989,15 @@ all:
svc-mrt-exec:
hosts:
noc_node_debian8: {}
svc-nbi:
children:
cfg-nbi-noc_node_debian8:
hosts:
noc_node_debian8: {}
svc-nbi-read: {}
svc-nbi-exec:
hosts:
noc_node_debian8: {}
svc-nginx:
children:
cfg-nginx-noc_node_debian8:
......
......@@ -44,6 +44,7 @@ all:
datastream_loglevel: info
datastream_power: 2
datastream_mode: wait
datastream_whitelist_access: ""
discovery_backup_power: 1
discovery_loglevel: info
discovery_max_threads: 10
......@@ -79,6 +80,7 @@ all:
has_svc_memcached: true
has_svc_mongod: true
has_svc_mrt: true
has_svc_nbi: true
has_svc_nginx: true
has_svc_noc: true
has_svc_nsqd: true
......@@ -123,6 +125,9 @@ all:
mrt_loglevel: info
mrt_max_concurrency: 50
mrt_power: 2
nbi_loglevel: info
nbi_power: 2
nbi_whitelist_access: ""
nginx_cert: |
-----BEGIN CERTIFICATE-----
MIIFAzCCAuugAwIBAgIJAKrO/EVH/HOBMA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
......@@ -319,7 +324,6 @@ all:
- config:
loglevel: info
power: 2
mode: wait
config_order: yaml:///opt/noc/etc/tower.yml,yaml:///opt/noc/etc/settings.yml,env:///NOC
environment:
category: internal
......@@ -412,6 +416,7 @@ all:
- config:
loglevel: info
power: 2
mode: wait
config_order: yaml:///opt/noc/etc/tower.yml,yaml:///opt/noc/etc/settings.yml,env:///NOC
environment:
category: internal
......@@ -570,6 +575,26 @@ all:
stopwaitsecs: 3
name: mrt
pool: null
- config:
loglevel: info
power: 2
config_order: yaml:///opt/noc/etc/tower.yml,yaml:///opt/noc/etc/settings.yml,env:///NOC
environment:
category: internal
depends:
- noc
level: global
supervisord:
command: ./services/nbi/service.py
oom_score_adj: 999
priority: 100
process_name: '%(program_name)s-%(process_num)02d'
startretries: 999
stdout_logfile_backups: 3
stdout_logfile_maxbytes: 1MB
stopwaitsecs: 3
name: nbi
pool: null
- config:
backup_power: 1
loglevel: info
......@@ -861,7 +886,7 @@ all:
noc_node_debian9: {}
svc-datastream:
children:
cfg-datastream-node_debian8:
cfg-datastream-noc_node_debian9:
hosts:
noc_node_debian9: {}
svc-datastream-read: {}
......@@ -964,6 +989,15 @@ all:
svc-mrt-exec:
hosts:
noc_node_debian9: {}
svc-nbi:
children:
cfg-nbi-noc_node_debian9:
hosts:
noc_node_debian9: {}
svc-nbi-read: {}
svc-nbi-exec:
hosts:
noc_node_debian9: {}
svc-nginx:
children:
cfg-nginx-noc_node_debian9:
......
......@@ -44,6 +44,7 @@ all:
datastream_loglevel: info
datastream_power: 2
datastream_mode: wait
datastream_whitelist_access: ""
discovery_backup_power: 1
discovery_loglevel: info
discovery_max_threads: 10
......@@ -79,6 +80,7 @@ all:
has_svc_memcached: true
has_svc_mongod: true
has_svc_mrt: true
has_svc_nbi: true
has_svc_nginx: true
has_svc_noc: true
has_svc_nsqd: true
......@@ -123,6 +125,9 @@ all:
mrt_loglevel: info
mrt_max_concurrency: 50
mrt_power: 2
nbi_loglevel: info
nbi_power: 2
nbi_whitelist_access: ""
nginx_cert: |
-----BEGIN CERTIFICATE-----
MIIFAzCCAuugAwIBAgIJAKrO/EVH/HOBMA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
......@@ -570,6 +575,26 @@ all:
stopwaitsecs: 3
name: mrt
pool: null
- config:
loglevel: info
power: 2
config_order: yaml:///opt/noc/etc/tower.yml,yaml:///opt/noc/etc/settings.yml,env:///NOC
environment:
category: internal
depends:
- noc
level: global
supervisord:
command: ./services/nbi/service.py
oom_score_adj: 999
priority: 100
process_name: '%(program_name)s-%(process_num)02d'
startretries: 999
stdout_logfile_backups: 3
stdout_logfile_maxbytes: 1MB
stopwaitsecs: 3
name: nbi
pool: null
- config:
backup_power: 1
loglevel: info
......@@ -964,6 +989,15 @@ all:
svc-mrt-exec:
hosts:
noc_node_centos7: {}
svc-nbi:
children:
cfg-nbi-noc_node_centos7:
hosts:
noc_node_centos7: {}
svc-nbi-read: {}
svc-nbi-exec:
hosts:
noc_node_centos7: {}
svc-nginx:
children:
cfg-nginx-noc_node_centos7:
......
......@@ -45,6 +45,7 @@ all:
datastream_loglevel: info
datastream_power: 2
datastream_mode: wait
datastream_whitelist_access: ""
discovery_backup_power: 1
discovery_loglevel: info
discovery_max_threads: 10
......@@ -80,6 +81,7 @@ all:
has_svc_memcached: true
has_svc_mongod: true
has_svc_mrt: true
has_svc_nbi: true
has_svc_nginx: true
has_svc_noc: true
has_svc_nsqd: true
......@@ -124,6 +126,9 @@ all:
mrt_loglevel: info
mrt_max_concurrency: 50
mrt_power: 2
nbi_loglevel: info
nbi_power: 2
nbi_whitelist_access: ""
nginx_cert: |
-----BEGIN CERTIFICATE-----
MIIFAzCCAuugAwIBAgIJAKrO/EVH/HOBMA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
......@@ -571,6 +576,26 @@ all:
stopwaitsecs: 3
name: mrt
pool: null
- config:
loglevel: info
power: 2
config_order: yaml:///opt/noc/etc/tower.yml,yaml:///opt/noc/etc/settings.yml,env:///NOC
environment:
category: internal
depends:
- noc
level: global
supervisord:
command: ./services/nbi/service.py
oom_score_adj: 999
priority: 100
process_name: '%(program_name)s-%(process_num)02d'
startretries: 999
stdout_logfile_backups: 3
stdout_logfile_maxbytes: 1MB
stopwaitsecs: 3
name: nbi
pool: null
- config:
backup_power: 1
loglevel: info
......@@ -965,6 +990,15 @@ all:
svc-mrt-exec:
hosts:
noc_node_freebsd11: {}
svc-nbi:
children:
cfg-nbi-noc_node_freebsd11:
hosts:
noc_node_freebsd11: {}
svc-nbi-read: {}
svc-nbi-exec:
hosts:
noc_node_freebsd11: {}
svc-nginx:
children:
cfg-nginx-noc_node_freebsd11:
......
......@@ -44,6 +44,7 @@ all:
datastream_loglevel: info
datastream_power: 2
datastream_mode: wait
datastream_whitelist_access: ""
discovery_backup_power: 1
discovery_loglevel: info
discovery_max_threads: 10
......@@ -79,6 +80,7 @@ all:
has_svc_memcached: true
has_svc_mongod: true
has_svc_mrt: true
has_svc_nbi: true
has_svc_nginx: true
has_svc_noc: true
has_svc_nsqd: true
......@@ -123,6 +125,9 @@ all:
mrt_loglevel: info
mrt_max_concurrency: 50
mrt_power: 2
nbi_loglevel: info
nbi_power: 2
nbi_whitelist_access: ""
nginx_cert: |
-----BEGIN CERTIFICATE-----
MIIFAzCCAuugAwIBAgIJAKrO/EVH/HOBMA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
......@@ -219,7 +224,6 @@ all:
noc_dc: DC
noc_env: NOC
noc_env_type: eval
noc_web_host: noc_node_oel7
noc_group: noc
noc_installation_name: Unconfigured installation
noc_python_interpreter: python
......@@ -571,6 +575,26 @@ all:
stopwaitsecs: 3
name: mrt
pool: null
- config:
loglevel: info
power: 2
config_order: yaml:///opt/noc/etc/tower.yml,yaml:///opt/noc/etc/settings.yml,env:///NOC
environment:
category: internal
depends:
- noc
level: global
supervisord:
command: ./services/nbi/service.py
oom_score_adj: 999
priority: 100
process_name: '%(program_name)s-%(process_num)02d'
startretries: 999
stdout_logfile_backups: 3
stdout_logfile_maxbytes: 1MB
stopwaitsecs: 3
name: nbi
pool: null
- config:
backup_power: 1
loglevel: info
......@@ -712,6 +736,7 @@ all:
pool: null
noc_user: noc
noc_version: microservices
noc_web_host: noc_node_oel7
node_id: 1
nsqd_max_messages_in_memory: 10000
nsqd_max_msg_size: 1048576
......@@ -964,6 +989,15 @@ all:
svc-mrt-exec:
hosts:
noc_node_oel7: {}
svc-nbi:
children:
cfg-nbi-noc_node_oel7:
hosts:
noc_node_oel7: {}
svc-nbi-read: {}
svc-nbi-exec:
hosts:
noc_node_oel7: {}
svc-nginx:
children:
cfg-nginx-noc_node_oel7:
......@@ -1008,7 +1042,6 @@ all:
svc-nsqlookupd-exec:
hosts:
noc_node_oel7: {}
svc-pgbouncer:
children:
cfg-pgbouncer-noc_node_oel7:
......
......@@ -44,6 +44,7 @@ all:
datastream_loglevel: info
datastream_power: 2
datastream_mode: wait
datastream_whitelist_access: ""
discovery_backup_power: 1
discovery_loglevel: info
discovery_max_threads: 10
......@@ -79,6 +80,7 @@ all:
has_svc_memcached: true
has_svc_mongod: true
has_svc_mrt: true
has_svc_nbi: true
has_svc_nginx: true
has_svc_noc: true
has_svc_nsqd: true
......@@ -123,6 +125,9 @@ all:
mrt_loglevel: info
mrt_max_concurrency: 50
mrt_power: 2
nbi_loglevel: info
nbi_power: 2
nbi_whitelist_access: ""
nginx_cert: |
-----BEGIN CERTIFICATE-----
MIIFAzCCAuugAwIBAgIJAKrO/EVH/HOBMA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
......@@ -219,7 +224,6 @@ all:
noc_dc: DC
noc_env: NOC
noc_env_type: eval
noc_web_host: noc_node_rhel7
noc_group: noc
noc_installation_name: Unconfigured installation
noc_python_interpreter: python
......@@ -571,6 +575,26 @@ all:
stopwaitsecs: 3
name: mrt
pool: null
- config:
loglevel: info
power: 2
config_order: yaml:///opt/noc/etc/tower.yml,yaml:///opt/noc/etc/settings.yml,env:///NOC
environment:
category: internal
depends:
- noc
level: global
supervisord:
command: ./services/nbi/service.py
oom_score_adj: 999
priority: 100
process_name: '%(program_name)s-%(process_num)02d'
startretries: 999
stdout_logfile_backups: 3
stdout_logfile_maxbytes: 1MB
stopwaitsecs: 3
name: nbi
pool: null
- config:
backup_power: 1
loglevel: info
......@@ -712,6 +736,7 @@ all:
pool: null
noc_user: noc
noc_version: microservices
noc_web_host: noc_node_rhel7
node_id: 1
nsqd_max_messages_in_memory: 10000
nsqd_max_msg_size: 1048576
......@@ -964,6 +989,15 @@ all:
svc-mrt-exec:
hosts:
noc_node_rhel7: {}
svc-nbi:
children:
cfg-nbi-noc_node_rhel7:
hosts:
noc_node_rhel7: {}
svc-nbi-read: {}
svc-nbi-exec:
hosts:
noc_node_rhel7: {}
svc-nginx:
children:
cfg-nginx-noc_node_rhel7:
......
......@@ -44,6 +44,7 @@ all:
datastream_loglevel: info
datastream_power: 2
datastream_mode: wait
datastream_whitelist_access: ""
discovery_backup_power: 1
discovery_loglevel: info
discovery_max_threads: 10
......@@ -79,6 +80,7 @@ all:
has_svc_memcached: true
has_svc_mongod: true
has_svc_mrt: true
has_svc_nbi: true
has_svc_nginx: true
has_svc_noc: true
has_svc_nsqd: true
......@@ -123,6 +125,9 @@ all:
mrt_loglevel: info
mrt_max_concurrency: 50
mrt_power: 2
nbi_loglevel: info
nbi_power: 2
nbi_whitelist_access: ""
nginx_cert: |
-----BEGIN CERTIFICATE-----
MIIFAzCCAuugAwIBAgIJAKrO/EVH/HOBMA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
......@@ -570,6 +575,26 @@ all:
stopwaitsecs: 3
name: mrt
pool: null
- config:
loglevel: info
power: 2
config_order: yaml:///opt/noc/etc/tower.yml,yaml:///opt/noc/etc/settings.yml,env:///NOC
environment:
category: internal
depends:
- noc
level: global
supervisord:
command: ./services/nbi/service.py
oom_score_adj: 999
priority: 100
process_name: '%(program_name)s-%(process_num)02d'
startretries: 999
stdout_logfile_backups: 3
stdout_logfile_maxbytes: 1MB
stopwaitsecs: 3
name: nbi
pool: null
- config:
backup_power: 1
loglevel: info
......@@ -964,6 +989,15 @@ all:
svc-mrt-exec:
hosts:
noc_node_ubuntu16: {}
svc-nbi:
children:
cfg-nbi-noc_node_ubuntu16:
hosts:
noc_node_ubuntu16: {}
svc-nbi-read: {}
svc-nbi-exec:
hosts:
noc_node_ubuntu16: {}
svc-nginx:
children:
cfg-nginx-noc_node_ubuntu16:
......
......@@ -44,6 +44,7 @@ all:
datastream_loglevel: info
datastream_power: 2
datastream_mode: wait
datastream_whitelist_access: ""
discovery_backup_power: 1
discovery_loglevel: info
discovery_max_threads: 10
......@@ -79,6 +80,7 @@ all:
has_svc_memcached: true
has_svc_mongod: true
has_svc_mrt: true
has_svc_nbi: true
has_svc_nginx: true
has_svc_noc: true
has_svc_nsqd: true
......@@ -123,6 +125,9 @@ all:
mrt_loglevel: info
mrt_max_concurrency: 50
mrt_power: 2
nbi_loglevel: info
nbi_power: 2
nbi_whitelist_access: ""
nginx_cert: |
-----BEGIN CERTIFICATE-----
MIIFAzCCAuugAwIBAgIJAKrO/EVH/HOBMA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
......@@ -570,6 +575,26 @@ all:
stopwaitsecs: 3
name: mrt
pool: null
- config:
loglevel: info
power: 2
config_order: yaml:///opt/noc/etc/tower.yml,yaml:///opt/noc/etc/settings.yml,env:///NOC
environment:
category: internal
depends:
- noc
level: global
supervisord:
command: ./services/nbi/service.py
oom_score_adj: 999
priority: 100
process_name: '%(program_name)s-%(process_num)02d'
startretries: 999
stdout_logfile_backups: 3
stdout_logfile_maxbytes: 1MB
stopwaitsecs: 3
name: nbi
pool: null
- config:
backup_power: 1
loglevel: info
......@@ -964,6 +989,15 @@ all:
svc-mrt-exec:
hosts:
noc_node_ubuntu18: {}
svc-nbi:
children:
cfg-nbi-noc_node_ubuntu18:
hosts:
noc_node_ubuntu18: {}
svc-nbi-read: {}
svc-nbi-exec:
hosts:
noc_node_ubuntu18: {}
svc-nginx:
children:
cfg-nginx-noc_node_ubuntu18:
......
......@@ -16,7 +16,7 @@ forms:
min: 0
mode:
default: wait
label: Datastrem mode
label: Datastream mode
type: list
options:
- pool
......@@ -32,6 +32,13 @@ forms:
- warning
- error
- critial
whitelist_access:
type: text
default: ""
label: "Allow access to service from IPs:"
common: environment
description: "in CIDR notation, separated with comma"
services:
datastream:
level: global
......
---
forms:
nbi:
description: >
<strong>Service type</strong>: Internal <br/>
<strong>Short description</strong>: NBI service <br/>
<strong>Long description</strong>: Service for integration in external systems<br/>
<strong>Scale Recommendations</strong>: Two per HA installation <br/>
<strong>docs</strong>: <a href=http://docs.getnoc.com/en/latest/services/nbi/ target=_blank>NBI</a><br/>
<strong>Placement constraint</strong>: On nginx <br/>
power:
default: 1
label: "Instances"
type: int
max: 8
min: 0
loglevel:
default: info
label: Loglevel
type: list
options:
- disabled
- debug
- info
- warning
- error
- critial
whitelist_access:
type: text
default: ""
label: "Allow access to service from IPs:"
common: environment
description: "in CIDR notation, separated with comma"
services:
nbi:
level: global
category: internal
supervisord:
command: "./services/nbi/service.py"
process_name: "%(program_name)s-%(process_num)02d"
oom_score_adj: 100
priority: 110
startretries: 999
stopwaitsecs: 3
stdout_logfile_maxbytes: 10MB
stdout_logfile_backups: 3
depends:
- noc
---
- name: fail if noc is not selected
fail:
msg: "nbi role have to be set with noc role to get own sources."
when:
- has_svc_noc is not defined
- has_svc_nbi is defined
tags:
- checks
---
- include_tasks: "os/{{ ansible_distribution }}/main.yml"
......@@ -52,6 +52,24 @@
vars:
goss_service_name: mib
- name: Install NOC nbi
hosts: svc-nbi-exec
become: "True"
strategy: "free"
gather_facts: "True"
tags:
- noc
- nbi
vars_files:
- "../../vars/main.yml"
- "../../vars/{{ ansible_distribution }}.yml"
roles:
- role: nbi
- role: goss
tags: [goss]
vars:
goss_service_name: nbi
- name: Install NOC mrt
hosts: svc-mrt-exec
become: "True"
......
command:
{{noc_root}}/noc ctl status |grep nbi: