Merge "[US855179] Create /var/crashes partition" into fuel9-kilo
This commit is contained in:
commit
e256c498ee
|
@ -16,14 +16,19 @@
|
|||
# It may be used to detect a version of contrail used in the environment.
|
||||
|
||||
require 'hiera'
|
||||
require 'puppet'
|
||||
require 'puppet/util/inifile'
|
||||
|
||||
Facter.add("supervisor_params") do
|
||||
setcode do
|
||||
res = []
|
||||
vrouter_config = '/etc/contrail/supervisord_vrouter_files/contrail-vrouter-dpdk.ini'
|
||||
vrouter_config = '/etc/contrail/supervisord_vrouter_files/contrail-vrouter-dpdk.ini'
|
||||
vrouter_section = 'program:contrail-vrouter-dpdk'
|
||||
mac_from_config = nil
|
||||
if File.exist?(vrouter_config)
|
||||
config_vrouter_params = File.readlines(vrouter_config).find { |line| line.include?('command=')}.split('--no-daemon')[-1].strip
|
||||
file = Puppet::Util::IniConfig::PhysicalFile.new(vrouter_config)
|
||||
file.read
|
||||
config_vrouter_params = file.get_section(vrouter_section)['command'].split('--no-daemon')[-1].strip
|
||||
mac_from_config = config_vrouter_params.split.find { |param| param.include?('mac') }
|
||||
mac_from_config = mac_from_config.split(',').find { |param| param.include?('mac') }.split('=')
|
||||
end
|
||||
|
|
|
@ -22,13 +22,25 @@ class contrail::analytics {
|
|||
mode => '0644',
|
||||
owner => 'contrail',
|
||||
group => 'contrail',
|
||||
require => Package['contrail-openstack-analytics'],
|
||||
}
|
||||
|
||||
if !defined(File['/var/crashes']) {
|
||||
file { '/var/crashes':
|
||||
ensure => directory,
|
||||
mode => '1777',
|
||||
}
|
||||
}
|
||||
|
||||
Exec { path => '/usr/bin:/usr/sbin:/bin:/sbin' }
|
||||
|
||||
tweaks::ubuntu_service_override { 'supervisor-analytics':
|
||||
tweaks::ubuntu_service_override { 'contrail-openstack-analytics':
|
||||
package_name => 'contrail-openstack-analytics',
|
||||
service_name => 'supervisor-analytics',
|
||||
}
|
||||
|
||||
tweaks::ubuntu_service_override { 'contrail-analytics':
|
||||
package_name => 'contrail-analytics',
|
||||
service_name => 'supervisor-analytics',
|
||||
}
|
||||
|
||||
# Packages
|
||||
|
@ -58,6 +70,7 @@ class contrail::analytics {
|
|||
'DEFAULTS/analytics_config_audit_ttl': value => '-1';
|
||||
'DEFAULTS/analytics_statistics_ttl': value => '-1';
|
||||
'DEFAULTS/analytics_flow_ttl': value => '-1';
|
||||
'DEFAULTS/aaa_mode': value => 'no-auth';
|
||||
'DISCOVERY/disc_server_ip': value => $contrail::contrail_private_vip;
|
||||
'DISCOVERY/disc_server_port': value => '5998';
|
||||
'REDIS/redis_server_port': value => '6379';
|
||||
|
@ -65,10 +78,10 @@ class contrail::analytics {
|
|||
}
|
||||
|
||||
contrail_collector_config {
|
||||
'DEFAULT/analytics_data_ttl': value => '48';
|
||||
'DEFAULT/analytics_config_audit_ttl': value => '2160';
|
||||
'DEFAULT/analytics_statistics_ttl': value => '24';
|
||||
'DEFAULT/analytics_flow_ttl': value => '2';
|
||||
'DEFAULT/analytics_data_ttl': value => $contrail::analytics_data_ttl;
|
||||
'DEFAULT/analytics_config_audit_ttl': value => $contrail::analytics_config_audit_ttl;
|
||||
'DEFAULT/analytics_statistics_ttl': value => $contrail::analytics_statistics_ttl;
|
||||
'DEFAULT/analytics_flow_ttl': value => $contrail::analytics_flow_ttl;
|
||||
'DEFAULT/cassandra_server_list': value => $contrail::analytics_db_list;
|
||||
'DEFAULT/hostip': value => $contrail::address;
|
||||
'DEFAULT/log_file': value => '/var/log/contrail/contrail-collector.log';
|
||||
|
@ -136,10 +149,8 @@ class contrail::analytics {
|
|||
'KEYSTONE/auth_port': value => '35357';
|
||||
'KEYSTONE/admin_user': value => $contrail::neutron_user;
|
||||
'KEYSTONE/admin_password': value => $contrail::service_token;
|
||||
'KEYSTONE/admin_token': value => $contrail::admin_token;
|
||||
'KEYSTONE/admin_tenant_name': value => $contrail::service_tenant;
|
||||
'KEYSTONE/insecure': value => true;
|
||||
'KEYSTONE/memcache_servers': value => '127.0.0.1:11211';
|
||||
}
|
||||
|
||||
ini_setting { 'analytics-fdlimit':
|
||||
|
@ -154,6 +165,7 @@ class contrail::analytics {
|
|||
$keystone_auth_conf = '--conf_file /etc/contrail/contrail-keystone-auth.conf'
|
||||
$analytics_api_conf = '--conf_file /etc/contrail/contrail-analytics-api.conf'
|
||||
$alarm_gen_conf = '--conf_file /etc/contrail/contrail-alarm-gen.conf'
|
||||
$collector_conf = '--conf_file /etc/contrail/contrail-collector.conf'
|
||||
|
||||
ini_setting { 'supervisor-analytics-api':
|
||||
ensure => present,
|
||||
|
@ -169,7 +181,7 @@ class contrail::analytics {
|
|||
path => '/etc/contrail/supervisord_analytics_files/contrail-alarm-gen.ini',
|
||||
section => 'program:contrail-alarm-gen',
|
||||
setting => 'command',
|
||||
value => "/usr/bin/contrail-alarm-gen ${alarm_gen_conf}",
|
||||
value => "/usr/bin/contrail-alarm-gen ${alarm_gen_conf} ${keystone_auth_conf}",
|
||||
require => Package['contrail-analytics'],
|
||||
}
|
||||
|
||||
|
@ -178,7 +190,7 @@ class contrail::analytics {
|
|||
path => '/etc/contrail/supervisord_analytics_files/contrail-collector.ini',
|
||||
section => 'program:contrail-collector',
|
||||
setting => 'command',
|
||||
value => '/usr/bin/contrail-collector',
|
||||
value => "/usr/bin/contrail-collector ${collector_conf} ${keystone_auth_conf}",
|
||||
require => Package['contrail-analytics'],
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,15 @@ class contrail::common_repo {
|
|||
file { "/etc/apt/preferences.d/contrail-${plugin_version}.pref":
|
||||
ensure => absent,
|
||||
}
|
||||
# override packages pins to install tzdata, perl from ubuntu repo instead of
|
||||
# contrail repo, version of packages in ubuntu repo is higher, so we dont want
|
||||
# to downgrade.
|
||||
apt::pin { 'contrail-pin-exclude':
|
||||
explanation => 'Temporary fix to install some packages from ubuntu repos',
|
||||
priority => 1300,
|
||||
packages => ['tzdata', 'tzdata-java', 'libperl5.18', 'openjdk-7-jre-headless'],
|
||||
release => 'trusty',
|
||||
}
|
||||
}
|
||||
default: {}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ class contrail::compute::compute_override {
|
|||
|
||||
$keep_config_files = '-o Dpkg::Options::="--force-confold"'
|
||||
$force_overwrite = '-o Dpkg::Options::="--force-overwrite"'
|
||||
$allow_unsigned = '-o APT::Get::AllowUnauthenticated=1'
|
||||
$patch_path = '/usr/lib/python2.7/dist-packages'
|
||||
|
||||
Exec {
|
||||
|
@ -83,7 +84,7 @@ class contrail::compute::compute_override {
|
|||
packages => $qemu_pkg,
|
||||
} ->
|
||||
exec {'override-qemu':
|
||||
command => "apt-get install --yes ${keep_config_files} ${force_overwrite} \
|
||||
command => "apt-get install --yes ${keep_config_files} ${force_overwrite} ${allow_unsigned} \
|
||||
qemu-kvm qemu-system-x86 qemu-system-common",
|
||||
unless => 'dpkg -l | grep qemu-system-common | grep contrail',
|
||||
require => Apt::Source['dpdk-depends-repo'],
|
||||
|
@ -108,7 +109,7 @@ qemu-kvm qemu-system-x86 qemu-system-common",
|
|||
# install_options => [$keep_config_files, $force_overwrite],
|
||||
#} ->
|
||||
exec { 'override-libvirt':
|
||||
command => "apt-get install --yes ${keep_config_files} ${force_overwrite} libvirt-bin libvirt0",
|
||||
command => "apt-get install --yes ${keep_config_files} ${force_overwrite} ${allow_unsigned} libvirt-bin libvirt0",
|
||||
unless => 'dpkg -l | grep libvirt0 | grep contrail',
|
||||
require => Apt::Source['dpdk-depends-repo'],
|
||||
}
|
||||
|
|
|
@ -18,6 +18,13 @@ class contrail::compute::vrouter {
|
|||
|
||||
if $contrail::compute_dpdk_enabled {
|
||||
|
||||
if !defined(File['/var/crashes']) {
|
||||
file { '/var/crashes':
|
||||
ensure => directory,
|
||||
mode => '1777',
|
||||
}
|
||||
}
|
||||
|
||||
# in case of bonds, MAC address should be set permanently, because slave interfaces
|
||||
# may start in random order during the boot process
|
||||
if ( 'bond' in $raw_phys_dev) {
|
||||
|
@ -33,7 +40,7 @@ class contrail::compute::vrouter {
|
|||
$delete_packages = ['openvswitch-common','openvswitch-datapath-dkms','openvswitch-datapath-lts-saucy-dkms','openvswitch-switch','nova-network','nova-api']
|
||||
|
||||
contrail_vrouter_dpdk_ini_config {
|
||||
'program:contrail-vrouter-dpdk/command': value => "taskset ${contrail::vrouter_core_mask} /usr/bin/contrail-vrouter-dpdk --no-daemon ${::supervisor_params}";
|
||||
'program:contrail-vrouter-dpdk/command': value => "${contrail::taskset_command} /usr/bin/contrail-vrouter-dpdk --no-daemon ${::supervisor_params}";
|
||||
'program:contrail-vrouter-dpdk/priority': value => '410';
|
||||
'program:contrail-vrouter-dpdk/loglevel': value => 'debug';
|
||||
'program:contrail-vrouter-dpdk/autostart': value => true;
|
||||
|
|
|
@ -29,11 +29,23 @@ class contrail::config {
|
|||
mode => '0644',
|
||||
owner => 'contrail',
|
||||
group => 'contrail',
|
||||
require => Package['contrail-openstack-config'],
|
||||
}
|
||||
|
||||
tweaks::ubuntu_service_override { 'supervisor-config':
|
||||
if !defined(File['/var/crashes']) {
|
||||
file { '/var/crashes':
|
||||
ensure => directory,
|
||||
mode => '1777',
|
||||
}
|
||||
}
|
||||
|
||||
tweaks::ubuntu_service_override { 'contrail-openstack-config':
|
||||
package_name => 'contrail-openstack-config',
|
||||
service_name => 'supervisor-config',
|
||||
}
|
||||
|
||||
tweaks::ubuntu_service_override { 'contrail-config':
|
||||
package_name => 'contrail-config',
|
||||
service_name => 'supervisor-config',
|
||||
}
|
||||
|
||||
# Packages
|
||||
|
@ -89,7 +101,8 @@ class contrail::config {
|
|||
'DEFAULTS/cassandra_server_list': value => $contrail::contrail_db_list_9160;
|
||||
'DEFAULTS/listen_ip_addr': value => '0.0.0.0';
|
||||
'DEFAULTS/listen_port': value => '9100';
|
||||
'DEFAULTS/multi_tenancy': value => true;
|
||||
'DEFAULTS/aaa_mode': value => $contrail::aaa_mode;
|
||||
'DEFAULTS/cloud_admin_role': value => 'admin';
|
||||
'DEFAULTS/log_file': value => '/var/log/contrail/contrail-api.log';
|
||||
'DEFAULTS/log_local': value => '1';
|
||||
'DEFAULTS/log_level': value => 'SYS_NOTICE';
|
||||
|
@ -163,7 +176,6 @@ class contrail::config {
|
|||
'KEYSTONE/auth_port': value => '35357';
|
||||
'KEYSTONE/admin_user': value => $contrail::neutron_user;
|
||||
'KEYSTONE/admin_password': value => $contrail::service_token;
|
||||
'KEYSTONE/admin_token': value => $contrail::admin_token;
|
||||
'KEYSTONE/admin_tenant_name': value => $contrail::service_tenant;
|
||||
'KEYSTONE/insecure': value => true;
|
||||
'KEYSTONE/memcache_servers': value => '127.0.0.1:11211';
|
||||
|
|
|
@ -22,7 +22,6 @@ class contrail::control {
|
|||
mode => '0644',
|
||||
owner => 'contrail',
|
||||
group => 'contrail',
|
||||
require => Package['contrail-openstack-control'],
|
||||
}
|
||||
|
||||
Exec {
|
||||
|
@ -30,8 +29,14 @@ class contrail::control {
|
|||
path => '/usr/bin:/bin:/sbin',
|
||||
}
|
||||
|
||||
tweaks::ubuntu_service_override { 'supervisor-control':
|
||||
tweaks::ubuntu_service_override { 'contrail-openstack-control':
|
||||
package_name => 'contrail-openstack-control',
|
||||
service_name => 'supervisor-control',
|
||||
}
|
||||
|
||||
tweaks::ubuntu_service_override { 'contrail-control':
|
||||
package_name => 'contrail-control',
|
||||
service_name => 'supervisor-control',
|
||||
}
|
||||
|
||||
# Packages
|
||||
|
@ -73,40 +78,31 @@ class contrail::control {
|
|||
notify => Service['supervisor-control'],
|
||||
}
|
||||
|
||||
file { '/etc/contrail/dns/contrail-named.conf':
|
||||
content => template('contrail/contrail-named.conf.erb'),
|
||||
require => Package['contrail-dns'],
|
||||
}
|
||||
|
||||
file { '/etc/contrail/dns/contrail-rndc.conf':
|
||||
source => 'puppet:///modules/contrail/contrail-rndc.conf',
|
||||
require => Package['contrail-dns'],
|
||||
}
|
||||
|
||||
contrail_control_nodemgr_config {
|
||||
'DISCOVERY/server': value => $contrail::contrail_private_vip;
|
||||
'DISCOVERY/port': value => '5998';
|
||||
}
|
||||
|
||||
# Control service
|
||||
service { 'contrail-named':
|
||||
service { 'contrail-dns':
|
||||
ensure => running,
|
||||
require => Package['contrail-dns'],
|
||||
subscribe => [
|
||||
File['/etc/contrail/dns/contrail-named.conf'],
|
||||
File['/etc/contrail/dns/contrail-rndc.conf'],
|
||||
]
|
||||
}
|
||||
|
||||
service { 'contrail-named':
|
||||
ensure => running,
|
||||
require => Service['contrail-dns']
|
||||
}
|
||||
|
||||
service { 'supervisor-control':
|
||||
ensure => $contrail::service_ensure,
|
||||
enable => true,
|
||||
require => [
|
||||
ensure => $contrail::service_ensure,
|
||||
enable => true,
|
||||
require => [
|
||||
Package['contrail-openstack-control'],
|
||||
Package['contrail-control']
|
||||
],
|
||||
}
|
||||
|
||||
Contrail_control_config <||> ~> Service['supervisor-control']
|
||||
Contrail_dns_config <||> ~> Service['supervisor-control']
|
||||
|
||||
Contrail_control_config <||> ~> Service['supervisor-control']
|
||||
Contrail_dns_config <||> ~> Service['supervisor-control']
|
||||
Contrail_dns_config <||> ~> Service['contrail-dns']
|
||||
}
|
||||
|
|
|
@ -49,6 +49,13 @@ class contrail::controller {
|
|||
require => Package['neutron-plugin-contrail'],
|
||||
}
|
||||
|
||||
if !defined(File['/var/crashes']) {
|
||||
file { '/var/crashes':
|
||||
ensure => directory,
|
||||
mode => '1777',
|
||||
}
|
||||
}
|
||||
|
||||
# Packages
|
||||
if !defined(Package['neutron-server']) {
|
||||
package { 'neutron-server': }
|
||||
|
@ -132,13 +139,13 @@ class contrail::controller {
|
|||
}
|
||||
if !defined(Neutron_config['DEFAULT/service_plugins']) {
|
||||
neutron_config {
|
||||
'DEFAULT/service_plugins': value => 'neutron_plugin_contrail.plugins.opencontrail.loadbalancer.plugin.LoadBalancerPlugin';
|
||||
'DEFAULT/service_plugins': value => 'neutron_plugin_contrail.plugins.opencontrail.loadbalancer.v2.plugin.LoadBalancerPluginV2';
|
||||
}
|
||||
}
|
||||
else {
|
||||
Neutron_config<| title == 'DEFAULT/service_plugins' |> {
|
||||
ensure => present,
|
||||
value => 'neutron_plugin_contrail.plugins.opencontrail.loadbalancer.plugin.LoadBalancerPlugin',
|
||||
value => 'neutron_plugin_contrail.plugins.opencontrail.loadbalancer.v2.plugin.LoadBalancerPluginV2',
|
||||
}
|
||||
}
|
||||
if !defined(Neutron_config['DEFAULT/allow_overlapping_ips']) {
|
||||
|
@ -185,6 +192,16 @@ class contrail::controller {
|
|||
value => $contrail::keystone_protocol,
|
||||
}
|
||||
}
|
||||
if !defined(Neutron_config['keystone_authtoken/auth_type']) {
|
||||
neutron_config {
|
||||
'keystone_authtoken/auth_type': ensure => absent,
|
||||
}
|
||||
}
|
||||
else {
|
||||
Neutron_config<| (title == 'keystone_authtoken/auth_type') |> {
|
||||
ensure => absent,
|
||||
}
|
||||
}
|
||||
|
||||
neutron_config {
|
||||
'service_providers/service_provider': value => 'LOADBALANCER:Opencontrail:neutron_plugin_contrail.plugins.opencontrail.loadbalancer.driver.OpencontrailLoadbalancerDriver:default';
|
||||
|
@ -199,7 +216,8 @@ class contrail::controller {
|
|||
contrailplugin_ini_config {
|
||||
'APISERVER/api_server_ip': value => $contrail::contrail_mgmt_vip;
|
||||
'APISERVER/api_server_port': value => $contrail::api_server_port;
|
||||
'APISERVER/multi_tenancy': value => 'True';
|
||||
'APISERVER/aaa_mode': value => $contrail::aaa_mode;
|
||||
'APISERVER/cloud_admin_role': value => 'admin';
|
||||
'APISERVER/contrail_extensions': value => 'ipam:neutron_plugin_contrail.plugins.opencontrail.contrail_plugin_ipam.NeutronPluginContrailIpam,policy:neutron_plugin_contrail.plugins.opencontrail.contrail_plugin_policy.NeutronPluginContrailPolicy,route-table:neutron_plugin_contrail.plugins.opencontrail.contrail_plugin_vpc.NeutronPluginContrailVpc,contrail:None';
|
||||
'COLLECTOR/analytics_api_ip': value => $contrail::contrail_mgmt_vip;
|
||||
'COLLECTOR/analytics_api_port': value => '8081';
|
||||
|
@ -306,9 +324,40 @@ class contrail::controller {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if $contrail::aaa_mode == 'rbac' {
|
||||
ini_setting {'user_token':
|
||||
ensure => present,
|
||||
path => '/etc/neutron/api-paste.ini',
|
||||
section => 'composite:neutronapi_v2_0',
|
||||
setting => 'keystone',
|
||||
value => 'user_token request_id catch_errors authtoken keystonecontext extensions neutronapiapp_v2_0',
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
|
||||
ini_setting {'filter_factory':
|
||||
ensure => present,
|
||||
path => '/etc/neutron/api-paste.ini',
|
||||
section => 'filter:user_token',
|
||||
setting => 'paste.filter_factory',
|
||||
value => 'neutron_plugin_contrail.plugins.opencontrail.neutron_middleware:token_factory',
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
} else {
|
||||
ini_setting {'no_user_token':
|
||||
ensure => present,
|
||||
path => '/etc/neutron/api-paste.ini',
|
||||
section => 'composite:neutronapi_v2_0',
|
||||
setting => 'keystone',
|
||||
value => 'request_id catch_errors authtoken keystonecontext extensions neutronapiapp_v2_0',
|
||||
notify => Service['neutron-server'],
|
||||
}
|
||||
}
|
||||
|
||||
Neutron_config <||> ~> Service <|title == 'neutron-server'|>
|
||||
Ini_setting <||> ~> Service <|title == 'neutron-server'|>
|
||||
Contrailplugin_ini_config<||> ~> File['/etc/neutron/plugin.ini']
|
||||
Heat_config<||> ~> Service['heat-engine']
|
||||
Nova_config<||> ~> Service['nova-api']
|
||||
Ceilometer_pipeline_section <||> ~>
|
||||
Service <| tag == 'ceilometer' |>
|
||||
Ceilometer_pipeline_section <||> ~> Service <| tag == 'ceilometer' |>
|
||||
}
|
||||
|
|
|
@ -23,12 +23,16 @@ class contrail::database {
|
|||
owner => root,
|
||||
group => root,
|
||||
}
|
||||
|
||||
tweaks::ubuntu_service_override { 'cassandra':
|
||||
package_name => 'cassandra',
|
||||
}
|
||||
|
||||
tweaks::ubuntu_service_override { 'contrail-database':
|
||||
package_name => 'contrail-database-common',
|
||||
service_name => 'contrail-database',
|
||||
package_name => 'contrail-openstack-database',
|
||||
}
|
||||
tweaks::ubuntu_service_override { 'zookeeper':
|
||||
package_name => 'zookeeper',
|
||||
}
|
||||
|
||||
if roles_include($contrail::contrail_db_roles) {
|
||||
|
@ -58,40 +62,51 @@ class contrail::database {
|
|||
File['/etc/zookeeper/conf/myid'],
|
||||
],
|
||||
}
|
||||
|
||||
service { 'kafka':
|
||||
ensure => stopped,
|
||||
enable => false,
|
||||
}
|
||||
|
||||
} elsif roles_include($contrail::analytics_db_roles) {
|
||||
$cassandra_seeds = $contrail::primary_analytics_db_ip
|
||||
$cluster_name = 'Analytics'
|
||||
$contrail_databases = 'analytics'
|
||||
}
|
||||
# Kafka
|
||||
package { 'kafka': } ->
|
||||
file { '/tmp/kafka-logs':
|
||||
ensure => 'directory',
|
||||
mode => '0755',
|
||||
} ->
|
||||
file { '/usr/share/kafka/config/log4j.properties':
|
||||
source => 'puppet:///modules/contrail/kafka-log4j.properties',
|
||||
require => Package['kafka'],
|
||||
} ->
|
||||
file { '/usr/share/kafka/config/server.properties':
|
||||
content => template('contrail/kafka-server.properties.erb'),
|
||||
require => Package['kafka'],
|
||||
} ->
|
||||
file { '/tmp/kafka-logs/meta.properties':
|
||||
content => inline_template("version=0\nbroker.id=<%= scope.lookupvar('contrail::uid') %>\n");
|
||||
}
|
||||
|
||||
service { 'kafka':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
require => Package['kafka'],
|
||||
subscribe => [
|
||||
File['/usr/share/kafka/config/log4j.properties'],
|
||||
File['/usr/share/kafka/config/server.properties'],
|
||||
File['/tmp/kafka-logs/meta.properties'],
|
||||
],
|
||||
}
|
||||
# Kafka
|
||||
package { 'kafka': } ->
|
||||
file { '/tmp/kafka-logs':
|
||||
ensure => 'directory',
|
||||
mode => '0755',
|
||||
} ->
|
||||
file { '/usr/share/kafka/config/log4j.properties':
|
||||
source => 'puppet:///modules/contrail/kafka-log4j.properties',
|
||||
require => Package['kafka'],
|
||||
} ->
|
||||
file { '/usr/share/kafka/config/server.properties':
|
||||
content => template('contrail/kafka-server.properties.erb'),
|
||||
require => Package['kafka'],
|
||||
} ->
|
||||
file { '/tmp/kafka-logs/meta.properties':
|
||||
content => inline_template("version=0\nbroker.id=<%= scope.lookupvar('contrail::uid') %>\n");
|
||||
}
|
||||
|
||||
service { 'kafka':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
require => Package['kafka'],
|
||||
subscribe => [
|
||||
File['/usr/share/kafka/config/log4j.properties'],
|
||||
File['/usr/share/kafka/config/server.properties'],
|
||||
File['/tmp/kafka-logs/meta.properties'],
|
||||
],
|
||||
}
|
||||
|
||||
service { 'zookeeper':
|
||||
ensure => stopped,
|
||||
enable => false,
|
||||
}
|
||||
}
|
||||
# Cassandra
|
||||
package { 'cassandra': } ->
|
||||
package { 'contrail-openstack-database': }
|
||||
|
@ -109,9 +124,13 @@ class contrail::database {
|
|||
} ->
|
||||
file { '/etc/cassandra/cassandra.yaml':
|
||||
content => template('contrail/cassandra.yaml.erb'),
|
||||
owner => 'cassandra',
|
||||
group => 'cassandra',
|
||||
} ->
|
||||
file { '/etc/cassandra/cassandra-env.sh':
|
||||
source => 'puppet:///modules/contrail/cassandra-env.sh',
|
||||
owner => 'cassandra',
|
||||
group => 'cassandra',
|
||||
} ->
|
||||
file { '/etc/security/limits.d/cassandra.conf':
|
||||
content => template('contrail/cassandra_limits.conf.erb'),
|
||||
|
|
|
@ -35,7 +35,8 @@ class contrail {
|
|||
prepare_network_config($network_scheme)
|
||||
$interface = pick(get_network_role_property('neutron/mesh', 'interface'), 'br-mesh')
|
||||
|
||||
$iface = pick($network_scheme['endpoints'][$interface], {})
|
||||
#fallback to vhost0 for day2 scenario
|
||||
$iface = pick($network_scheme['endpoints'][$interface], $network_scheme['endpoints']['vhost0'], {})
|
||||
$routes = pick($iface['routes'], false)
|
||||
|
||||
if $routes {
|
||||
|
@ -54,8 +55,14 @@ class contrail {
|
|||
$raw_phys_dev = regsubst($phys_dev, '\..*' , '')
|
||||
$dev_mac = getvar("::macaddress_${raw_phys_dev}")
|
||||
$vrouter_core_mask = pick($settings['vrouter_core_mask'], '0x3')
|
||||
#if user specify particular cpu's for vrouter - taskset command should differ
|
||||
if $vrouter_core_mask =~ /^0x[0-9a-zA-Z]/ {
|
||||
$taskset_command = "taskset ${vrouter_core_mask}"
|
||||
} else {
|
||||
$taskset_command = "taskset -c ${vrouter_core_mask}"
|
||||
}
|
||||
|
||||
$headless_mode = pick($settings['headless_mode'], true)
|
||||
$multi_tenancy = pick($settings['multi_tenancy'], true)
|
||||
$vr_flow_entries = pick($settings['vr_flow_entries'], '524288')
|
||||
$vr_mpls_labels = pick($settings['vr_mpls_labels'], '5120')
|
||||
$log_flow = pick($settings['log_flow'], '0')
|
||||
|
@ -258,6 +265,12 @@ class contrail {
|
|||
$supervisor_control_minfds = pick($settings['supervisor_control_minfds'], '10240')
|
||||
$supervisor_analytics_minfds = pick($settings['supervisor_analytics_minfds'], '65535')
|
||||
|
||||
$aaa_mode = pick($settings['aaa_mode'], 'cloud-admin')
|
||||
|
||||
$analytics_config_audit_ttl = pick($settings['analytics_config_audit_ttl'], '2160')
|
||||
$analytics_statistics_ttl = pick($settings['analytics_statistics_ttl'], '24')
|
||||
$analytics_flow_ttl = pick($settings['analytics_flow_ttl'], '2')
|
||||
$analytics_data_ttl = pick($settings['analytics_data_ttl'], '48')
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,6 +20,6 @@ class contrail::provision::api_readiness {
|
|||
try_sleep => 10,
|
||||
unless => "test -e ${title}",
|
||||
}
|
||||
include ::osnailyfacter::wait_for_keystone_backends
|
||||
contain ::osnailyfacter::wait_for_keystone_backends
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ class contrail::provision::config {
|
|||
--admin_user '${contrail::neutron_user}' --admin_tenant_name '${contrail::service_tenant}' --admin_password '${contrail::service_token}' \
|
||||
&& touch /opt/contrail/prov_metadata_service-DONE",
|
||||
creates => '/opt/contrail/prov_metadata_service-DONE',
|
||||
} ->
|
||||
}
|
||||
|
||||
contrail::provision::api_readiness::check{'/opt/contrail/prov_encap_type-DONE':} ->
|
||||
exec { 'prov_encap_type':
|
||||
|
@ -51,6 +51,7 @@ class contrail::provision::config {
|
|||
--admin_user ${contrail::admin_username} --admin_password '${contrail::admin_password}' \
|
||||
&& touch /opt/contrail/prov_encap_type-DONE",
|
||||
creates => '/opt/contrail/prov_encap_type-DONE',
|
||||
require => Exec['prov_metadata_services'],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
<%- external_dns=scope.function_hiera(['external_dns']) %>
|
||||
options {
|
||||
directory "/etc/contrail/dns/";
|
||||
managed-keys-directory "/etc/contrail/dns/";
|
||||
allow-new-zones yes;
|
||||
pid-file "/etc/contrail/dns/contrail-named.pid";
|
||||
};
|
||||
|
||||
key "rndc-key" {
|
||||
algorithm hmac-md5;
|
||||
secret "xvysmOR8lnUQRBcunkC6vg==";
|
||||
};
|
||||
|
||||
controls {
|
||||
inet 127.0.0.1 port 8094
|
||||
allow { 127.0.0.1; } keys { "rndc-key"; };
|
||||
};
|
||||
|
||||
logging {
|
||||
channel debug_log {
|
||||
file "/var/log/contrail/contrail-named.log" versions 3 size 5m;
|
||||
severity debug;
|
||||
print-time yes;
|
||||
print-severity yes;
|
||||
print-category yes;
|
||||
};
|
||||
category default {
|
||||
debug_log;
|
||||
};
|
||||
category queries {
|
||||
debug_log;
|
||||
};
|
||||
};
|
||||
|
||||
view "_default_view_" {
|
||||
match-clients {any;};
|
||||
match-destinations {any;};
|
||||
match-recursive-only no;
|
||||
forwarders { <%= external_dns['dns_list'].map{ |ip| "#{ip};" }.join(' ') %> };
|
||||
};
|
|
@ -7,7 +7,7 @@
|
|||
; variables can be expanded using this syntax: "%(ENV_HOME)s".
|
||||
|
||||
[unix_http_server]
|
||||
file=/tmp/supervisord_config.sock ; (the path to the socket file)
|
||||
file=/var/run/supervisord_config.sock ; (the path to the socket file)
|
||||
chmod=0700 ; socket file mode (default 0700)
|
||||
;chown=nobody:nogroup ; socket file uid:gid owner
|
||||
;username=user ; (default is no username (open server))
|
||||
|
|
|
@ -6,7 +6,7 @@ clientPort=2181
|
|||
maxSessionTimeout=120000
|
||||
<%-
|
||||
nodes=scope.lookupvar('contrail::contrail_db_nodes_hash')
|
||||
nodes.each_pair do |node_name, node_props|
|
||||
nodes.sort_by(&:first).each do |node_name, node_props|
|
||||
-%>
|
||||
server.<%= node_props['uid'] %>=<%= node_props['network_roles']['neutron/mesh']%>:2888:3888
|
||||
<%- end -%>
|
||||
|
|
|
@ -686,6 +686,7 @@
|
|||
# Set proper apt pin for Contrail repository
|
||||
- id: contrail-compute-vmware-repo
|
||||
type: puppet
|
||||
version: 2.0.0
|
||||
groups: [compute-vmware]
|
||||
required_for: [tools]
|
||||
requires: [deploy_start, globals]
|
||||
|
@ -696,6 +697,7 @@
|
|||
|
||||
- id: contrail-compute-vmware-pkg
|
||||
type: puppet
|
||||
version: 2.0.0
|
||||
groups: [compute-vmware]
|
||||
required_for: [top-role-compute-vmware]
|
||||
requires: [deploy_start, globals, contrail-compute-vmware-repo, contrail-override-repository]
|
||||
|
@ -707,6 +709,7 @@
|
|||
# Deploy contrail vCenter plugin
|
||||
- id: contrail-compute-vmware
|
||||
type: puppet
|
||||
version: 2.0.0
|
||||
groups: [compute-vmware]
|
||||
required_for: [post_deployment_end]
|
||||
requires: [post_deployment_start]
|
||||
|
|
|
@ -144,4 +144,14 @@ attributes:
|
|||
restrictions:
|
||||
- condition: "settings:common.use_vcenter.value == false"
|
||||
action: "hide"
|
||||
|
||||
aaa_mode:
|
||||
type: "select"
|
||||
weight: 340
|
||||
value: "cloud-admin"
|
||||
label: "AAA Mode"
|
||||
description: "Authentication mode"
|
||||
values:
|
||||
- data: "rbac"
|
||||
label: "Role Based Access Control"
|
||||
- data: "cloud-admin"
|
||||
label: "Cloud Admin"
|
||||
|
|
|
@ -1,7 +1 @@
|
|||
- role: '*'
|
||||
type: puppet
|
||||
stage: pre_deployment
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/common-repo.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 720
|
||||
[]
|
||||
|
|
25
volumes.yaml
25
volumes.yaml
|
@ -13,12 +13,27 @@ volumes:
|
|||
size:
|
||||
generator: "calc_total_vg"
|
||||
generator_args: ["contrail-db"]
|
||||
- id: "crashes"
|
||||
type: "partition"
|
||||
name: "Crash dumps"
|
||||
min_size:
|
||||
generator: "calc_gb_to_mb"
|
||||
generator_args: [100]
|
||||
label: "Crash_dumps"
|
||||
mount: "/var/crashes"
|
||||
file_system: "xfs"
|
||||
volumes_roles_mapping:
|
||||
contrail-db:
|
||||
- {allocate_size: "min", id: "os"}
|
||||
- {allocate_size: "min", id: "crashes"}
|
||||
- {allocate_size: "min", id: "contrail-db"}
|
||||
contrail-analytics:
|
||||
- {allocate_size: "min", id: "os"}
|
||||
- {allocate_size: "min", id: "crashes"}
|
||||
- {allocate_size: "all", id: "logs"}
|
||||
contrail-analytics-db:
|
||||
- {allocate_size: "min", id: "os"}
|
||||
- {allocate_size: "min", id: "crashes"}
|
||||
- {allocate_size: "all", id: "contrail-db"}
|
||||
|
||||
# NOTE(gomarivera): It might be needed to specify the partitions
|
||||
|
@ -27,7 +42,17 @@ volumes_roles_mapping:
|
|||
|
||||
contrail-config:
|
||||
- {allocate_size: "min", id: "os"}
|
||||
- {allocate_size: "min", id: "crashes"}
|
||||
- {allocate_size: "all", id: "logs"}
|
||||
contrail-control:
|
||||
- {allocate_size: "min", id: "os"}
|
||||
- {allocate_size: "min", id: "crashes"}
|
||||
- {allocate_size: "all", id: "logs"}
|
||||
dpdk:
|
||||
- {allocate_size: "min", id: "os"}
|
||||
- {allocate_size: "min", id: "crashes"}
|
||||
- {allocate_size: "all", id: "logs"}
|
||||
contrail-vmware:
|
||||
- {allocate_size: "min", id: "os"}
|
||||
- {allocate_size: "min", id: "crashes"}
|
||||
- {allocate_size: "all", id: "logs"}
|
||||
|
|
Loading…
Reference in New Issue