blob: def00f4d35d621f7d77c80aa42f9ab2a83c4e54e [file] [log] [blame]
{%- set vendor = salt['pillar.get']('opencontrail:common:vendor', 'opencontrail') %}
{%- set version = salt['pillar.get']('opencontrail:common:version') %}
{%- set ifmap = salt['pillar.get']('opencontrail:config:ifmap:engine', 'irond') %}
{%- load_yaml as base_defaults %}
{%- if vendor in ['opencontrail'] %}
common:
Debian:
vendor: opencontrail
source: {'engine': 'pkg', 'address': 'http://'}
pkgs:
['dpkg-dev', 'contrail-utils', 'contrail-nodemgr', 'gettext-base']
RedHat:
vendor: opencontrail
source: {'engine': 'pkg', 'address': 'http://'}
pkgs:
['contrail-utils', 'contrail-nodemgr']
collector:
Debian:
pkgs:
['contrail-analytics', 'python-cassandra']
redis_config: '/etc/redis/redis.conf'
services:
{%- if version < 4.0 %}
['supervisor-analytics', 'redis-server']
{%- else %}
['contrail-collector', 'contrail-analytics-api', 'contrail-query-engine', 'contrail-alarm-gen', 'contrail-snmp-collector', 'contrail-topology', 'contrail-analytics-nodemgr', 'redis-server']
{%- endif %}
{%- if pillar.get('docker', {}).get('client', {}).get('compose', {}).get('opencontrail', {}).get('service', {}).get('analytics', {}).container_name is defined %}
container_name:
{{ pillar.docker.client.compose.opencontrail.service.analytics.container_name }}
{%- endif%}
RedHat:
pkgs:
['contrail-analytics']
redis_config: '/etc/redis.conf'
services:
{%- if version < 4.0 %}
['supervisor-analytics', 'redis']
{%- else %}
['contrail-collector', 'contrail-analytics-api', 'contrail-query-engine', 'contrail-alarm-gen', 'contrail-snmp-collector', 'contrail-topology', 'contrail-analytics-nodemgr', 'redis']
{%- endif %}
{%- if pillar.get('docker', {}).get('client', {}).get('compose', {}).get('opencontrail', {}).get('service', {}).get('analytics', {}).container_name is defined %}
container_name:
{{ pillar.docker.client.compose.opencontrail.service.analytics.container_name }}
{%- endif%}
compute:
Debian:
pkgs:
- contrail-utils
- iproute2
- haproxy
- {{ ['linux-headers-', grains.get('kernelrelease')]|join('') }}
{%- if pillar.nova is defined and pillar.nova.compute is defined and pillar.nova.compute.get('networking', 'default') == "contrail" and pillar.nova.compute.get('version', 'ocata') not in ["juno", "kilo", "liberty", "mitaka", "newton"] %}
- contrail-nova-driver
{%- endif %}
services:
{%- if version < 4.0 %}
['supervisor-vrouter']
{%- else %}
['contrail-vrouter-agent', 'contrail-vrouter-nodemgr']
{%- endif %}
xmpp:
tls:
enabled: False
auth:
enabled: False
cert_file: /etc/contrail/ssl/certs/server.pem
key_file: /etc/contrail/ssl/private/server-privkey.pem
ca_cert_file: /etc/contrail/ssl/certs/ca-cert.pem
dpdk:
enabled: False
RedHat:
pkgs:
['contrail-openstack-vrouter', 'contrail-utils', 'haproxy', 'contrail-vrouter-source']
services:
{%- if version < 4.0 %}
['supervisor-vrouter']
{%- else %}
['contrail-vrouter-agent', 'contrail-vrouter-nodemgr']
{%- endif %}
xmpp:
tls:
enabled: False
auth:
enabled: False
cert_file: /etc/contrail/ssl/certs/server.pem
key_file: /etc/contrail/ssl/private/server-privkey.pem
ca_cert_file: /etc/contrail/ssl/certs/ca-cert.pem
dpdk:
enabled: False
config:
Debian:
pkgs:
- 'contrail-config-openstack'
{%- if version < 4.0 %}
{%- if ifmap == 'irond' %}
- 'ifmap-server'
{%- endif %}
{%- endif %}
services:
{%- if version < 4.0 %}
{%- if ifmap == 'irond' %}
- 'ifmap-server'
{%- endif %}
- 'supervisor-config'
{%- else %}
['contrail-api', 'contrail-schema', 'contrail-svc-monitor', 'contrail-device-manager', 'contrail-config-nodemgr']
{%- endif %}
{%- if pillar.get('docker', {}).get('client', {}).get('compose', {}).get('opencontrail', {}).get('service', {}).get('controller', {}).container_name is defined %}
container_name:
{{ pillar.docker.client.compose.opencontrail.service.controller.container_name }}
{%- endif%}
RedHat:
pkgs:
['contrail-openstack-config']
services:
{%- if version < 4.0 %}
['supervisor-config']
{%- else %}
['contrail-api', 'contrail-schema', 'contrail-svc-monitor', 'contrail-device-manager', 'contrail-config-nodemgr']
{%- endif %}
{%- if pillar.get('docker', {}).get('client', {}).get('compose', {}).get('opencontrail', {}).get('service', {}).get('controller', {}).container_name is defined %}
container_name:
{{ pillar.docker.client.compose.opencontrail.service.controller.container_name }}
{%- endif%}
control:
Debian:
pkgs:
['contrail-control', 'contrail-dns']
services:
{%- if version < 4.0 %}
['contrail-control', 'supervisor-control']
{%- else %}
['contrail-control', 'contrail-named', 'contrail-dns', 'contrail-control-nodemgr']
{%- endif %}
{%- if pillar.get('docker', {}).get('client', {}).get('compose', {}).get('opencontrail', {}).get('service', {}).get('controller', {}).container_name is defined %}
container_name:
{{ pillar.docker.client.compose.opencontrail.service.controller.container_name }}
{%- endif%}
xmpp:
tls:
enabled: False
auth:
enabled: False
cert_file: /etc/contrail/ssl/certs/server.pem
key_file: /etc/contrail/ssl/private/server-privkey.pem
ca_cert_file: /etc/contrail/ssl/certs/ca-cert.pem
RedHat:
pkgs:
['contrail-openstack-control']
services:
{%- if version < 4.0 %}
['contrail-control', 'supervisor-control']
{%- else %}
['contrail-control', 'contrail-named', 'contrail-dns', 'contrail-control-nodemgr']
{%- endif %}
{%- if pillar.get('docker', {}).get('client', {}).get('compose', {}).get('opencontrail', {}).get('service', {}).get('controller', {}).container_name is defined %}
container_name:
{{ pillar.docker.client.compose.opencontrail.service.controller.container_name }}
{%- endif%}
xmpp:
tls:
enabled: False
auth:
enabled: False
cert_file: /etc/contrail/ssl/certs/server.pem
key_file: /etc/contrail/ssl/private/server-privkey.pem
ca_cert_file: /etc/contrail/ssl/certs/ca-cert.pem
database:
Debian:
pkgs:
{%- set openjdkPackage = 'openjdk-8-jre-headless' if grains.get('oscodename') == 'xenial' else 'openjdk-7-jre-headless' %}
{%- set databasePackage = 'contrail-openstack-database' if version >= 4.0 else 'contrail-database' %}
['cassandra', 'zookeeper', '{{ openjdkPackage }}' , '{{ databasePackage }}']
{%- if version >= 4.1 %}
cassandra_version: '3.10'
kafka_version: '1.1.1'
{%- elif version == 4.0 %}
cassandra_version: '2.2'
kafka_version: '0.9.0.1'
{%- else %}
cassandra_version: '2.1'
kafka_version: '0.8.2.0'
{%- endif%}
cassandra_config: '/etc/cassandra/'
compaction_throughput_mb_per_sec: 16
services:
{%- if version < 4.0 %}
['supervisord-contrail-database', 'zookeeper']
{%- else %}
['contrail-database', 'contrail-database-nodemgr', 'zookeeper']
{%- endif %}
{%- if pillar.get('docker', {}).get('client', {}).get('compose', {}).get('opencontrail', {}).get('service', {}).get('analyticsdb', {}).container_name is defined %}
container_name:
{{ pillar.docker.client.compose.opencontrail.service.analyticsdb.container_name }}
{%- endif%}
RedHat:
pkgs:
['contrail-openstack-database', 'zookeeper', 'supervisor', 'java-1.7.0-openjdk-headless']
{%- if version >= 4.1 %}
cassandra_version: '3.10'
kafka_version: '1.1.1'
{%- elif version == 4.0 %}
cassandra_version: '2.2'
kafka_version: '0.9.0.1'
{%- else %}
cassandra_version: '2.1'
kafka_version: '0.8.2.0'
{%- endif%}
cassandra_config: '/etc/cassandra/conf/'
compaction_throughput_mb_per_sec: 16
services:
{%- if version < 4.0 %}
['supervisord-contrail-database', 'zookeeper']
{%- else %}
['contrail-database', 'contrail-database-nodemgr', 'zookeeper']
{%- endif %}
{%- if pillar.get('docker', {}).get('client', {}).get('compose', {}).get('opencontrail', {}).get('service', {}).get('analyticsdb', {}).container_name is defined %}
container_name:
{{ pillar.docker.client.compose.opencontrail.service.analyticsdb.container_name }}
{%- endif%}
web:
Debian:
pkgs:
['contrail-web-controller', 'gettext-base', 'nodejs-legacy']
redis_config_dir: '/etc/redis/'
services:
{%- if version < 4.0 %}
['contrail-webui-webserver', 'contrail-webui-jobserver']
{%- else %}
['contrail-webui', 'contrail-webui-middleware']
{%- endif %}
database:
engine: cassandra
port: 9160
{%- if pillar.get('docker', {}).get('client', {}).get('compose', {}).get('opencontrail', {}).get('service', {}).get('controller', {}).container_name is defined %}
container_name:
{{ pillar.docker.client.compose.opencontrail.service.controller.container_name }}
{%- endif%}
RedHat:
pkgs:
['contrail-web-controller']
redis_config_dir: '/etc/'
services:
['supervisor-webui']
database:
engine: cassandra
port: 9160
{%- if pillar.get('docker', {}).get('client', {}).get('compose', {}).get('opencontrail', {}).get('service', {}).get('controller', {}).container_name is defined %}
container_name:
{{ pillar.docker.client.compose.opencontrail.service.controller.container_name }}
{%- endif%}
client:
Debian:
pkgs:
['python-contrail']
RedHat:
pkgs:
[]
test:
Debian:
pkgs: ['libssl-dev', 'python-dev', 'libvirt-dev', 'python-pip']
{%- elif vendor == 'juniper' -%}
common:
Debian:
vendor: juniper
source: {'engine': 'pkg', 'address': 'http://'}
pkgs:
['dpkg-dev', 'contrail-utils', 'contrail-nodemgr', 'gettext-base']
RedHat:
vendor: juniper
source: {'engine': 'pkg', 'address': 'http://'}
pkgs:
['contrail-utils', 'contrail-nodemgr']
collector:
Debian:
pkgs:
['contrail-analytics', 'python-cassandra-driver']
redis_config: '/etc/redis/redis.conf'
services:
{%- if version < 4.0 %}
['supervisor-analytics', 'redis-server']
{%- else %}
['contrail-collector', 'contrail-analytics-api', 'contrail-query-engine', 'contrail-alarm-gen', 'contrail-snmp-collector', 'contrail-topology', 'contrail-analytics-nodemgr', 'redis-server']
{%- endif %}
RedHat:
pkgs:
['contrail-analytics', 'python-cassandra-driver']
redis_config: '/etc/redis.conf'
services:
{%- if version < 4.0 %}
['supervisor-analytics', 'redis']
{%- else %}
['contrail-collector', 'contrail-analytics-api', 'contrail-query-engine', 'contrail-alarm-gen', 'contrail-snmp-collector', 'contrail-topology', 'contrail-analytics-nodemgr', 'redis']
{%- endif %}
compute:
Debian:
pkgs:
['contrail-utils', 'iproute2', 'haproxy', '{{ ['linux-headers-', grains.get('kernelrelease')]|join('') }}', 'contrail-openstack-vrouter']
services:
{%- if version < 4.0 %}
['supervisor-vrouter']
{%- else %}
['contrail-vrouter-agent', 'contrail-vrouter-nodemgr']
{%- endif %}
dpdk:
enabled: False
RedHat:
pkgs:
['contrail-openstack-vrouter', 'contrail-utils', 'haproxy', 'contrail-vrouter-source']
services:
{%- if version < 4.0 %}
['supervisor-vrouter']
{%- else %}
['contrail-vrouter-agent', 'contrail-vrouter-nodemgr']
{%- endif %}
dpdk:
enabled: False
config:
Debian:
pkgs:
['contrail-config-openstack', 'ifmap-server']
services:
{%- if version < 4.0 %}
['supervisor-config']
{%- else %}
['contrail-api', 'contrail-schema', 'contrail-svc-monitor', 'contrail-device-manager', 'contrail-config-nodemgr']
{%- endif %}
RedHat:
pkgs:
['contrail-openstack-config']
services:
{%- if version < 4.0 %}
['supervisor-config']
{%- else %}
['contrail-api', 'contrail-schema', 'contrail-svc-monitor', 'contrail-device-manager', 'contrail-config-nodemgr']
{%- endif %}
control:
Debian:
pkgs:
['contrail-control', 'contrail-dns']
services:
{%- if version < 4.0 %}
['contrail-control', 'supervisor-control']
{%- else %}
['contrail-control', 'contrail-named', 'contrail-dns', 'contrail-control-nodemgr']
{%- endif %}
RedHat:
pkgs:
['contrail-openstack-control']
services:
{%- if version < 4.0 %}
['contrail-control', 'supervisor-control']
{%- else %}
['contrail-control', 'contrail-named', 'contrail-dns', 'contrail-control-nodemgr']
{%- endif %}
database:
Debian:
pkgs:
{%- set openjdkPackage = 'openjdk-8-jre-headless' if grains.get('oscodename') == 'xenial' else 'openjdk-7-jre-headless' %}
['cassandra', 'zookeeper', '{{ openjdkPackage }}', 'contrail-openstack-database']
{%- if version >= 4.1 %}
cassandra_version: '3.10'
kafka_version: '1.1.1'
{%- elif version == 4.0 %}
cassandra_version: '2.2'
kafka_version: '0.9.0.1'
{%- else %}
cassandra_version: '2.1'
kafka_version: '0.8.2.0'
{%- endif%}
cassandra_config: '/etc/cassandra/'
compaction_throughput_mb_per_sec: 16
services:
{%- if version < 4.0 %}
['supervisord-contrail-database', 'zookeeper']
{%- else %}
['contrail-database', 'contrail-database-nodemgr', 'zookeeper']
{%- endif %}
RedHat:
pkgs:
['contrail-openstack-database', 'zookeeper', 'supervisor', 'java-1.7.0-openjdk-headless']
{%- if version >= 4.1 %}
cassandra_version: '3.10'
kafka_version: '1.1.1'
{%- elif version == 4.0 %}
cassandra_version: '2.2'
kafka_version: '0.9.0.1'
{%- else %}
cassandra_version: '2.1'
kafka_version: '0.8.2.0'
{%- endif%}
cassandra_config: '/etc/cassandra/conf/'
compaction_throughput_mb_per_sec: 16
services:
{%- if version < 4.0 %}
['supervisord-contrail-database', 'zookeeper']
{%- else %}
['contrail-database', 'contrail-database-nodemgr', 'zookeeper']
{%- endif %}
web:
Debian:
pkgs:
['contrail-web-controller', 'contrail-openstack-webui', 'nodejs', 'gettext-base']
redis_config_dir: '/etc/redis/'
services:
{%- if version < 4.0 %}
['supervisor-webui']
{%- else %}
['contrail-webui', 'contrail-webui-middleware']
{%- endif %}
database:
engine: cassandra
port: 9160
{%- if pillar.get('docker',{}).get('client',{}).get('compose',{}).get('opencontrail_api',{}).get('service',{}).get('controller',{}).name is defined %}
container_name:
{{ pillar.docker.client.compose.opencontrail_api.service.controller.name }}
{%- endif%}
RedHat:
pkgs:
['contrail-web-controller']
redis_config_dir: '/etc/'
services:
['supervisor-webui']
database:
engine: cassandra
port: 9160
{%- if pillar.get('docker',{}).get('client',{}).get('compose',{}).get('opencontrail_api',{}).get('service',{}).get('controller',{}).name is defined %}
container_name:
{{ pillar.docker.client.compose.opencontrail_api.service.controller.name }}
{%- endif%}
client:
Debian:
pkgs:
['python-contrail']
RedHat:
pkgs:
[]
test:
Debian:
pkgs: ['libssl-dev', 'python-dev', 'libvirt-dev', 'python-pip']
{%- endif %}
{%- endload %}
{% set common = salt['grains.filter_by'](base_defaults['common'], merge=salt['pillar.get']('opencontrail:common', {}), base='common') %}
{% set collector = salt['grains.filter_by'](base_defaults['collector'], merge=salt['pillar.get']('opencontrail:collector', {}), base='collector') %}
{% set compute = salt['grains.filter_by'](base_defaults['compute'], merge=salt['pillar.get']('opencontrail:compute', {}), base='compute') %}
{% set config = salt['grains.filter_by'](base_defaults['config'], merge=salt['pillar.get']('opencontrail:config', {}), base='config') %}
{% set control = salt['grains.filter_by'](base_defaults['control'], merge=salt['pillar.get']('opencontrail:control', {}), base='control') %}
{% set database = salt['grains.filter_by'](base_defaults['database'], merge=salt['pillar.get']('opencontrail:database', {}), base='database') %}
{% set web = salt['grains.filter_by'](base_defaults['web'], merge=salt['pillar.get']('opencontrail:web', {}), base='web') %}
{% set client = salt['grains.filter_by'](base_defaults['client'], merge=salt['pillar.get']('opencontrail:client', {}), base='client') %}
{% set test = salt['grains.filter_by'](base_defaults['test'], merge=salt['pillar.get']('opencontrail:test', {}), base='test') %}
{% set monitoring = salt['grains.filter_by']({
'default': {
'xmpp_sessions_too_high_threshold': 500,
'xmpp_sessions_variation_threshold': 100,
'vrouter_xmpp_sessions_too_high_threshold': 10,
'vrouter_xmpp_sessions_variation_threshold': 5,
'vrouter_dns_xmpp_sessions_too_high_threshold': 10,
'vrouter_dns_xmpp_sessions_variation_threshold': 5,
'vrouter_lls_too_high_threshold': 10,
'vrouter_lls_variation_threshold': 5,
'services_failed_warning_threshold_percent': 0.3,
'services_failed_critical_threshold_percent': 0.6,
},
}, grain='os_family', merge=salt['pillar.get']('opencontrail:monitoring')) %}