Plugin updated to support Fuel 7.0

- metadata updated with SDK version and supported releases
- plugin version bump
- pre_build hook updated
- plugin manifests updated to support latest contrail builds

Change-Id: Ibfa5e980c63588671446fba910f340cd40786ab4
This commit is contained in:
Oleksandr Martsyniuk 2015-10-19 19:11:10 +03:00
parent 0391ea19ac
commit 8cc7593452
30 changed files with 123 additions and 381 deletions

View File

@ -39,9 +39,13 @@ case $operatingsystem
package {'yum-plugin-priorities': ensure => present }
}
Ubuntu: {
file { '/etc/apt/preferences.d/contrail-2.1.0.pref':
file { '/etc/apt/preferences.d/contrail-3.0.0.pref':
ensure => absent,
}
file { '/etc/apt/preferences.d/contrail-pin-110':
ensure => file,
source => 'puppet:///modules/contrail/contrail-pin-110',
}
}
default: {}
}

View File

@ -13,9 +13,19 @@
# under the License.
include contrail
$node_role = 'base-os'
Exec { path => '/bin:/sbin:/usr/bin:/usr/sbin'}
if $contrail::node_name =~ /^contrail.\d+$/ {
class { 'contrail::network':
node_role => $node_role,
address => $contrail::address,
ifname => $contrail::ifname,
netmask => $contrail::netmask_short,
default_gw => $contrail::default_gw,
}
case $operatingsystem
{
Ubuntu:
@ -23,6 +33,9 @@ if $contrail::node_name =~ /^contrail.\d+$/ {
file { '/etc/apt/preferences.d/contrail-pin-100':
ensure => file,
source => 'puppet:///modules/contrail/contrail-pin-100',
} ->
package { 'tzdata':
ensure => '2015d-0ubuntu0.14.04',
before => Class['contrail::package'],
}
$pkgs = ['python-crypto','python-netaddr','python-paramiko',

View File

@ -12,18 +12,3 @@
# License for the specific language governing permissions and limitations
# under the License.
include contrail
$node_role = 'base-os'
Exec { path => '/bin:/sbin:/usr/bin:/usr/sbin'}
if $contrail::node_name =~ /^contrail.\d+$/ {
class { 'contrail::network':
node_role => $node_role,
address => $contrail::address,
ifname => $contrail::ifname,
netmask => $contrail::netmask_short,
default_gw => $contrail::default_gw,
}
}

View File

@ -0,0 +1,3 @@
Package: *
Pin: release l=contrail
Pin-Priority: 200

View File

@ -1,101 +0,0 @@
; contrail database (cassandra) supervisor config file.
;
; For more example, check supervisord_analytics.conf
[unix_http_server]
file=/tmp/supervisord_database.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))
;password=123 ; (default is no password (open server))
;[inet_http_server] ; inet (TCP) server disabled by default
;port=localhost:9007 ; (ip_address:port specifier, *:port for all i/f)
;username=user ; (default is no username (open server))
;password=123 ; (default is no password (open server))
[supervisord]
logfile=/var/log/contrail/supervisord_contrail_database.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=10MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=5 ; (num of main logfile rotation backups;default 10)
loglevel=info ; (log level;default info; others: debug,warn,trace)
pidfile=/var/run/supervisord_contrail_database.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=false ; (start in foreground if true;default false)
minfds=65535 ; (min. avail startup file descriptors;default 1024)
minprocs=200 ; (min. avail process descriptors;default 200)
;umask=022 ; (process file creation umask;default 022)
;user=chrism ; (default is current user, required if root)
;identifier=supervisor ; (supervisord identifier, default is 'supervisor')
;directory=/tmp ; (default is not to cd during start)
nocleanup=true ; (don't clean up tempfiles at start;default false)
;childlogdir=/tmp ; ('AUTO' child log dir, default $TEMP)
;environment=KEY=value ; (key value pairs to add to environment)
;strip_ansi=false ; (strip ansi escape codes in logs; def. false)
; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///tmp/supervisord_database.sock ; use a unix:// URL for a unix socket
;serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket
;username=chris ; should be same as http_username if set
;password=123 ; should be same as http_password if set
;prompt=mysupervisor ; cmd line prompt (default "supervisor")
;history_file=~/.sc_history ; use readline history if available
; The below sample program section shows all possible program subsection values,
; create one or more 'real' program: sections to be able to control them under
; supervisor.
[program:contrail-database]
command=cassandra -f
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
;numprocs=1 ; number of processes copies to start (def 1)
;directory=/tmp ; directory to cwd to before exec (def no cwd)
;umask=022 ; umask for process (default None)
;priority=300 ; the relative start priority (default 999)
autostart=true ; start at supervisord start (default: true)
;autorestart=unexpected ; whether/when to restart (default: unexpected)
;startsecs=1 ; number of secs prog must stay running (def. 1)
;startretries=3 ; max # of serial start failures (default 3)
;exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
stopsignal=KILL ; signal used to kill process (default TERM)
;stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10)
;stopasgroup=false ; send stop signal to the UNIX process group (default false)
killasgroup=false ; SIGKILL the UNIX process group (def false)
;user=chrism ; setuid to this UNIX account to run the program
;redirect_stderr=true ; redirect proc stderr to stdout (default false)
;stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO
;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
;stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
;stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
;stdout_events_enabled=false ; emit events on stdout writes (default false)
;stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO
;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
;stderr_logfile_backups=10 ; # of stderr logfile backups (default 10)
;stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
;stderr_events_enabled=false ; emit events on stderr writes (default false)
;environment=A=1,B=2 ; process environment additions (def no adds)
;serverurl=AUTO ; override serverurl computation (childutils)
; The below sample group section shows all possible group values,
; create one or more 'real' group: sections to create "heterogeneous"
; process groups.
;[group:thegroupname]
;programs=progname1,progname2 ; each refers to 'x' in [program:x] definitions
;priority=999 ; the relative start priority (default 999)
; The [include] section can just contain the "files" setting. This
; setting can list multiple files (separated by whitespace or
; newlines). It can also contain wildcards. The filenames are
; interpreted as relative to this file. Included files *cannot*
; include files themselves.
[include]
files = /etc/contrail/supervisord_database_files/*.ini

View File

@ -58,12 +58,12 @@ class contrail::analytics {
content => template('contrail/contrail-snmp-collector.conf.erb'),
}
file { '/etc/contrail/contrail-topology.conf':
content => template('contrail/contrail-topology.conf.erb'),
file { '/etc/contrail/contrail-alarm-gen.conf':
content => template('contrail/contrail-alarm-gen.conf.erb'),
}
file { '/etc/contrail/supervisord_analytics_files/contrail-alarm-gen.ini':
ensure => absent,
file { '/etc/contrail/contrail-topology.conf':
content => template('contrail/contrail-topology.conf.erb'),
}
# Services
@ -77,7 +77,7 @@ class contrail::analytics {
service { 'contrail-alarm-gen':
ensure => stopped,
enable => false,
require => [Package['contrail-openstack-analytics'],File['/etc/contrail/supervisord_analytics_files/contrail-alarm-gen.ini']],
require => Package['contrail-openstack-analytics'],
}
service { 'supervisor-analytics':
@ -91,6 +91,7 @@ class contrail::analytics {
File['/etc/contrail/contrail-query-engine.conf'],
File['/etc/contrail/contrail-analytics-nodemgr.conf'],
File['/etc/contrail/contrail-snmp-collector.conf'],
File['/etc/contrail/contrail-alarm-gen.conf'],
File['/etc/contrail/contrail-topology.conf'],
],
}

View File

@ -19,7 +19,7 @@ class contrail::config ( $node_role ) {
nova_config {
'DEFAULT/neutron_url': value => "http://${contrail::mos_mgmt_vip}:9696";
'DEFAULT/neutron_admin_auth_url': value=> "http://${contrail::mos_mgmt_vip}:35357/v2.0/";
'DEFAULT/network_api_class': value=> 'nova_contrail_vif.contrailvif.ContrailNetworkAPI';
'DEFAULT/network_api_class': value=> 'nova.network.neutronv2.api.API';
'DEFAULT/neutron_admin_tenant_name': value=> 'services';
'DEFAULT/neutron_admin_username': value=> 'neutron';
'DEFAULT/neutron_admin_password': value=> $contrail::service_token;

View File

@ -29,6 +29,7 @@ class contrail::controller {
# Packages
package { 'neutron-server': } ->
package { 'python-neutron-lbaas': } ->
package { 'python-contrail': } ->
package { 'neutron-plugin-contrail': } ->
package { 'contrail-heat': }
@ -64,6 +65,9 @@ class contrail::controller {
'DEFAULT/service_plugins': value => 'neutron_plugin_contrail.plugins.opencontrail.loadbalancer.plugin.LoadBalancerPlugin';
'DEFAULT/allow_overlapping_ips': value => 'True';
'service_providers/service_provider': value => 'LOADBALANCER:Opencontrail:neutron_plugin_contrail.plugins.opencontrail.loadbalancer.driver.OpencontrailLoadbalancerDriver:default';
'keystone_authtoken/auth_host': value => $contrail::mos_mgmt_vip;
'keystone_authtoken/auth_port': value => '35357';
'keystone_authtoken/auth_protocol': value => 'http';
'QUOTAS/quota_network': value => '-1';
'QUOTAS/quota_subnet': value => '-1';
'QUOTAS/quota_port': value => '-1';
@ -78,11 +82,11 @@ class contrail::controller {
# Contrail-specific heat templates settings
ini_setting { 'contrail-user':
ensure => present,
path => '/etc/heat/heat.conf',
section => 'clients_contrail',
setting => 'user',
value => 'neutron',
ensure => present,
path => '/etc/heat/heat.conf',
section => 'clients_contrail',
setting => 'user',
value => 'neutron',
} ->
ini_setting { 'contrail-password':
ensure => present,

View File

@ -50,6 +50,8 @@ class contrail::database {
file { '/var/lib/cassandra':
ensure => directory,
mode => '0755',
owner => 'cassandra',
group => 'cassandra',
require => Package['cassandra'],
} ->
file { '/var/crashes':
@ -67,18 +69,24 @@ class contrail::database {
file { '/etc/contrail/contrail-database-nodemgr.conf':
content => template('contrail/contrail-database-nodemgr.conf.erb'),
}
file { '/etc/contrail/supervisord_database.conf':
source => 'puppet:///modules/contrail/supervisord_database.conf',
}
service { 'supervisor-database':
ensure => running,
enable => true,
require => [File['/var/lib/cassandra'],Package['contrail-openstack-database']],
service { 'contrail-database':
ensure => running,
enable => true,
require => [File['/var/lib/cassandra'],Package['contrail-openstack-database']],
subscribe => [
File['/etc/cassandra/cassandra.yaml'],
File['/etc/cassandra/cassandra-env.sh'],
],
}
service { 'supervisor-database':
ensure => running,
enable => true,
require => [Service['contrail-database'],Package['contrail-openstack-database']],
subscribe => [
File['/etc/cassandra/cassandra.yaml'],
File['/etc/contrail/contrail-database-nodemgr.conf'],
File['/etc/contrail/supervisord_database.conf'],
],
}

View File

@ -19,10 +19,11 @@ $settings = hiera('contrail')
# TODO
#$plugin_version = $settings['metadata']['plugin_version']
$plugin_version = '2.0'
$plugin_version = '3.0'
$distribution=$settings['contrail_distribution']
$network_scheme = hiera('network_scheme')
$network_metadata = hiera_hash('network_metadata', {})
$uid = hiera('uid')
$master_ip = hiera('master_ip')
$node_role = hiera('role')
@ -80,21 +81,11 @@ end
# Settings for RabbitMQ on contrail controllers
$rabbit=hiera('rabbit')
$rabbit_password=$rabbit['password']
$rabbit_hosts_ports = hiera('amqp_hosts')
# Returns array of ip addresses
$rabbit_hosts =
split(
inline_template("<%-
rv=Array.new
@nodes.each do |node|
if node['role'] =~ /^(primary-)?controller$/
rv << node['internal_address']
end
end
-%>
<%= rv.join(',') %>")
, ',')
$tmp_rabbit = join($rabbit_hosts,':5673,')
$rabbit_hosts_ports = "${tmp_rabbit}:5673"
# Base-os nodes Private IP list
$baseos_nodes_hash = get_nodes_hash_by_roles($network_metadata, ['base-os'])
$baseos_ips_hash = get_node_to_ipaddr_map_by_network_role($baseos_nodes_hash, 'neutron/mesh')
$baseos_ips = values($baseos_ips_hash)
}

View File

@ -1,16 +1,3 @@
<%-
nodes=scope.function_hiera(['nodes'])
contrail_node_basename=scope.lookupvar('contrail::contrail_node_basename')
priv_ip=Array.new
nodes.each do |node|
case node['role']
when 'base-os'
if node['user_node_name'] =~ /^#{contrail_node_basename}-.*/
priv_ip << node['private_address']
end
end
end
-%>
test:test
test2:test2
test3:test3
@ -38,7 +25,7 @@ helper:mapclient
# This is a read-only MAPC
reader:reader
<%- priv_ip.each do |ip| -%>
<%- scope.lookupvar('contrail::baseos_ips').each do |ip| -%>
<%= ip %>:<%= ip %>
<%= ip %>.dns:<%= ip %>.dns
<%- end -%>

View File

@ -1,18 +1,3 @@
<%-
nodes=scope.function_hiera(['nodes'])
contrail_deployment_node=scope.lookupvar('contrail::deployment_node')
uid=scope.lookupvar('contrail::uid')
priv_ip=Array.new
nodes.each do |node|
case node['role']
when 'base-os'
if node['user_node_name'] == contrail_deployment_node
priv_ip << node['private_address']
end
end
end
-%>
cluster_name: 'Contrail'
num_tokens: 256
hinted_handoff_enabled: true
@ -45,7 +30,7 @@ seed_provider:
parameters:
# seeds is actually a comma-delimited list of addresses.
# Ex: "<ip1>,<ip2>,<ip3>"
- seeds: "<%= priv_ip.join(',') %>"
- seeds: "<%= scope.lookupvar('contrail::baseos_ips').join(',') %>"
flush_largest_memtables_at: 0.75
reduce_cache_sizes_at: 0.85
reduce_cache_capacity_to: 0.6

View File

@ -1,16 +1,3 @@
<%-
nodes=scope.function_hiera(['nodes'])
contrail_node_basename=scope.lookupvar('contrail::contrail_node_basename')
priv_ip=Array.new
nodes.each do |node|
case node['role']
when 'base-os'
if node['user_node_name'] =~ /^#{contrail_node_basename}-.*/
priv_ip << node['private_address']
end
end
end
-%>
/*
* Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
*/
@ -186,7 +173,7 @@ config.files.download_path = '/tmp';
/* Cassandra Server */
config.cassandra = {};
config.cassandra.server_ips = [<%= priv_ip.map{ |ip| "'#{ip}'" }.join(',') %>];
config.cassandra.server_ips = [<%= scope.lookupvar('contrail::baseos_ips').map{ |ip| "'#{ip}'" }.join(',') %>];
config.cassandra.server_port = '9160';
config.cassandra.enable_edit = false;

View File

@ -0,0 +1,17 @@
[DEFAULTS]
#host_ip = 127.0.0.1
#collectors = 127.0.0.1:8086
#http_server_port = 5995
log_local = 1
log_level = SYS_NOTICE
#log_category =
log_file = /var/log/contrail/contrail-alarm-gen.log
kafka_broker_list = <%= scope.lookupvar('contrail::baseos_ips').map{ |ip| "#{ip}:9092" }.join(' ') %>
zk_list = <%= scope.lookupvar('contrail::baseos_ips').map{ |ip| "#{ip}:2181" }.join(',') %>
[DISCOVERY]
disc_server_ip = <%= scope.lookupvar('contrail::contrail_private_vip') %>
disc_server_port = 5998
[REDIS]
redis_server_port = 6379

View File

@ -1,19 +1,6 @@
<%-
nodes=scope.function_hiera(['nodes'])
contrail_node_basename=scope.lookupvar('contrail::contrail_node_basename')
priv_ip=Array.new
nodes.each do |node|
case node['role']
when 'base-os'
if node['user_node_name'] =~ /^#{contrail_node_basename}-.*/
priv_ip << node['private_address']
end
end
end
-%>
[DEFAULTS]
host_ip = <%= scope.lookupvar('contrail::address') %>
cassandra_server_list=<%= priv_ip.map{ |ip| "#{ip}:9160" }.join(' ') %>
cassandra_server_list=<%= scope.lookupvar('contrail::baseos_ips').map{ |ip| "#{ip}:9160" }.join(' ') %>
collectors = <%= scope.lookupvar('contrail::address') %>:8086
http_server_port = 8090
rest_api_port = 9081

View File

@ -1,22 +1,9 @@
<%-
nodes=scope.function_hiera(['nodes'])
contrail_node_basename=scope.lookupvar('contrail::contrail_node_basename')
priv_ip=Array.new
nodes.each do |node|
case node['role']
when 'base-os'
if node['user_node_name'] =~ /^#{contrail_node_basename}-.*/
priv_ip << node['private_address']
end
end
end
-%>
[DEFAULTS]
ifmap_server_ip=<%= scope.lookupvar('contrail::address') %>
ifmap_server_port=8443
ifmap_username=api-server
ifmap_password=api-server
cassandra_server_list=<%= priv_ip.map{ |ip| "#{ip}:9160" }.join(' ') %>
cassandra_server_list=<%= scope.lookupvar('contrail::baseos_ips').map{ |ip| "#{ip}:9160" }.join(' ') %>
listen_ip_addr=0.0.0.0
listen_port=9100
multi_tenancy=True
@ -25,7 +12,7 @@ log_local=1
log_level=SYS_NOTICE
disc_server_ip=<%= scope.lookupvar('contrail::contrail_private_vip') %>
disc_server_port=5998
zk_server_ip=<%= priv_ip.map{ |ip| "#{ip}:2181" }.join(',') %>
zk_server_ip=<%= scope.lookupvar('contrail::baseos_ips').map{ |ip| "#{ip}:2181" }.join(',') %>
redis_server_ip=$__contrail_redis_ip__
rabbit_server=<%= scope.lookupvar('contrail::mos_mgmt_vip') %>
rabbit_port=5673

View File

@ -1,16 +1,3 @@
<%-
nodes=scope.function_hiera(['nodes'])
contrail_node_basename=scope.lookupvar('contrail::contrail_node_basename')
priv_ip=Array.new
nodes.each do |node|
case node['role']
when 'base-os'
if node['user_node_name'] =~ /^#{contrail_node_basename}-.*/
priv_ip << node['private_address']
end
end
end
-%>
[DEFAULT]
# Everything in this section is optional
@ -26,11 +13,11 @@ analytics_flow_ttl=-1
# IP address and port to be used to connect to cassandra.
# Multiple IP:port strings separated by space can be provided
cassandra_server_list=<%= priv_ip.map{ |ip| "#{ip}:9160" }.join(' ') %>
cassandra_server_list=<%= scope.lookupvar('contrail::baseos_ips').map{ |ip| "#{ip}:9160" }.join(' ') %>
# IP address and port to be used to connect to kafka.
# Multiple IP:port strings separated by space can be provided
kafka_broker_list=
kafka_broker_list=<%= scope.lookupvar('contrail::baseos_ips').map{ |ip| "#{ip}:9092" }.join(' ') %>
# IP address of analytics node. Resolved IP of 'hostname'
hostip=<%= scope.lookupvar('contrail::address') %>

View File

@ -1,22 +1,9 @@
<%-
nodes=scope.function_hiera(['nodes'])
contrail_node_basename=scope.lookupvar('contrail::contrail_node_basename')
priv_ip=Array.new
nodes.each do |node|
case node['role']
when 'base-os'
if node['user_node_name'] =~ /^#{contrail_node_basename}-.*/
priv_ip << node['private_address']
end
end
end
-%>
[DEFAULTS]
api_server_ip=<%= scope.lookupvar('contrail::contrail_mgmt_vip') %>
api_server_port=8082
zk_server_ip=<%= priv_ip.map{ |ip| "#{ip}:2181" }.join(',') %>
zk_server_ip=<%= scope.lookupvar('contrail::baseos_ips').map{ |ip| "#{ip}:2181" }.join(',') %>
log_file=/var/log/contrail/contrail-device-manager.log
cassandra_server_list=<%= priv_ip.map{ |ip| "#{ip}:9160" }.join(' ') %>
cassandra_server_list=<%= scope.lookupvar('contrail::baseos_ips').map{ |ip| "#{ip}:9160" }.join(' ') %>
disc_server_ip=<%= scope.lookupvar('contrail::contrail_private_vip') %>
disc_server_port=5998
log_local=1

View File

@ -1,24 +1,11 @@
<%-
nodes=scope.function_hiera(['nodes'])
contrail_node_basename=scope.lookupvar('contrail::contrail_node_basename')
priv_ip=Array.new
nodes.each do |node|
case node['role']
when 'base-os'
if node['user_node_name'] =~ /^#{contrail_node_basename}-.*/
priv_ip << node['private_address']
end
end
end
-%>
[DEFAULTS]
zk_server_ip=<%= priv_ip.join(',') %>
zk_server_ip=<%= scope.lookupvar('contrail::baseos_ips').join(',') %>
zk_server_port=2181
listen_ip_addr=0.0.0.0
listen_port=9110
log_local=True
log_file=/var/log/contrail/discovery.log
cassandra_server_list=<%= priv_ip.map{ |ip| "#{ip}:9160" }.join(' ') %>
cassandra_server_list=<%= scope.lookupvar('contrail::baseos_ips').map{ |ip| "#{ip}:9160" }.join(' ') %>
log_level=SYS_NOTICE
# minimim time to allow client to cache service information (seconds)

View File

@ -1,19 +1,6 @@
<%-
nodes=scope.function_hiera(['nodes'])
contrail_node_basename=scope.lookupvar('contrail::contrail_node_basename')
priv_ip=Array.new
nodes.each do |node|
case node['role']
when 'base-os'
if node['user_node_name'] =~ /^#{contrail_node_basename}-.*/
priv_ip << node['private_address']
end
end
end
-%>
[DEFAULT]
# analytics_data_ttl=48
cassandra_server_list=<%= priv_ip.map{ |ip| "#{ip}:9160" }.join(' ') %>
cassandra_server_list=<%= scope.lookupvar('contrail::baseos_ips').map{ |ip| "#{ip}:9160" }.join(' ') %>
collectors=127.0.0.1:8086
hostip=$__contrail_host_ip__ # Resolved IP of `hostname`
# hostname= # Retrieved as `hostname`

View File

@ -1,16 +1,3 @@
<%-
nodes=scope.function_hiera(['nodes'])
contrail_node_basename=scope.lookupvar('contrail::contrail_node_basename')
priv_ip=Array.new
nodes.each do |node|
case node['role']
when 'base-os'
if node['user_node_name'] =~ /^#{contrail_node_basename}-.*/
priv_ip << node['private_address']
end
end
end
-%>
[DEFAULTS]
ifmap_server_ip=<%= scope.lookupvar('contrail::address') %>
ifmap_server_port=8443
@ -18,13 +5,17 @@ ifmap_username=schema-transformer
ifmap_password=schema-transformer
api_server_ip=<%= scope.lookupvar('contrail::contrail_mgmt_vip') %>
api_server_port=8082
zk_server_ip=<%= priv_ip.map{ |ip| "#{ip}:2181" }.join(',') %>
zk_server_ip=<%= scope.lookupvar('contrail::baseos_ips').map{ |ip| "#{ip}:2181" }.join(',') %>
log_file=/var/log/contrail/contrail-schema.log
cassandra_server_list=<%= priv_ip.map{ |ip| "#{ip}:9160" }.join(' ') %>
cassandra_server_list=<%= scope.lookupvar('contrail::baseos_ips').map{ |ip| "#{ip}:9160" }.join(' ') %>
disc_server_ip=<%= scope.lookupvar('contrail::contrail_private_vip') %>
disc_server_port=5998
log_local=1
log_level=SYS_NOTICE
rabbit_server=<%= scope.lookupvar('contrail::mos_mgmt_vip') %>
rabbit_port=5673
rabbit_user = nova
rabbit_password = <%= scope.lookupvar('contrail::rabbit_password') %>
[SECURITY]
use_certs=False

View File

@ -1,16 +1,3 @@
<%-
nodes=scope.function_hiera(['nodes'])
contrail_node_basename=scope.lookupvar('contrail::contrail_node_basename')
priv_ip=Array.new
nodes.each do |node|
case node['role']
when 'base-os'
if node['user_node_name'] =~ /^#{contrail_node_basename}-.*/
priv_ip << node['private_address']
end
end
end
-%>
[DEFAULTS]
ifmap_server_ip=<%= scope.lookupvar('contrail::address') %>
ifmap_server_port=8443
@ -18,9 +5,9 @@ ifmap_username=svc-monitor
ifmap_password=svc-monitor
api_server_ip=<%= scope.lookupvar('contrail::contrail_mgmt_vip') %>
api_server_port=8082
zk_server_ip=<%= priv_ip.map{ |ip| "#{ip}:2181" }.join(',') %>
zk_server_ip=<%= scope.lookupvar('contrail::baseos_ips').map{ |ip| "#{ip}:2181" }.join(',') %>
log_file=/var/log/contrail/contrail-svc-monitor.log
cassandra_server_list=<%= priv_ip.map{ |ip| "#{ip}:9160" }.join(' ') %>
cassandra_server_list=<%= scope.lookupvar('contrail::baseos_ips').map{ |ip| "#{ip}:9160" }.join(' ') %>
disc_server_ip=<%= scope.lookupvar('contrail::contrail_private_vip') %>
disc_server_port=5998
region_name=RegionOne

View File

@ -1,16 +1,3 @@
<%-
nodes=scope.function_hiera(['nodes'])
contrail_node_basename=scope.lookupvar('contrail::contrail_node_basename')
priv_ip=Array.new
nodes.each do |node|
case node['role']
when 'base-os'
if node['user_node_name'] =~ /^#{contrail_node_basename}-.*/
priv_ip << node['private_address']
end
end
end
-%>
global
tune.maxrewrite 1024
tune.bufsize 16384
@ -67,7 +54,7 @@ backend contrail-analytics-api
option tcp-check
tcp-check connect port 6379
default-server error-limit 1 on-error mark-down
<%- priv_ip.each_with_index do |ip, i| -%>
<%- scope.lookupvar('contrail::baseos_ips').each_with_index do |ip, i| -%>
server <%= ip %> <%= ip %>:9081 check inter 2000 rise 2 fall 3
<%- end -%>
@ -95,14 +82,14 @@ backend contrail-api-backend
option nolinger
timeout server 3m
balance roundrobin
<%- priv_ip.each_with_index do |ip, i| -%>
<%- scope.lookupvar('contrail::baseos_ips').each_with_index do |ip, i| -%>
server <%= ip %> <%= ip %>:9100 check inter 2000 rise 2 fall 3
<%- end -%>
backend contrail-discovery-backend
option nolinger
balance roundrobin
<%- priv_ip.each_with_index do |ip, i| -%>
<%- scope.lookupvar('contrail::baseos_ips').each_with_index do |ip, i| -%>
server <%= ip %> <%= ip %>:9110 check inter 2000 rise 2 fall 3
<%- end -%>

View File

@ -12,7 +12,7 @@ nodes.each do |node|
when 'base-os'
if node['user_node_name'] =~ /^#{contrail_node_basename}-.*/
-%>
server.<%= node['uid'] %>=<%= node['private_address']%>:2888:3888
server.<%= node['uid'] %>=<%= node['internal_address']%>:2888:3888
<%- end
end
end

7
deployment_tasks.yaml Normal file
View File

@ -0,0 +1,7 @@
- id: contail-baseos-symlink
role: [base-os]
required_for: [post_deployment_start]
type: shell
parameters:
cmd: ln -sf /etc/base-os.yaml /etc/astute.yaml
timeout: 30

View File

@ -2,7 +2,7 @@ attributes:
# Show contrail only in supported network config
metadata:
restrictions:
- condition: "not (cluster:net_provider == 'neutron' and networking_parameters:segmentation_type == 'gre')"
- condition: "not (cluster:net_provider == 'neutron' and networking_parameters:segmentation_type != 'vlan')"
message: "Please use Neutron with GRE segmentation, the only network type supported with Contrail plugin."
contrail_distribution:
type: "radio"

View File

@ -27,7 +27,7 @@
set -ex
PLUGIN_PATH="/var/www/nailgun/plugins/contrail-2.1"
PLUGIN_PATH="/var/www/nailgun/plugins/contrail-3.0"
#Now uses the latest package file
UBUNTU_PKG=`find $PLUGIN_PATH -maxdepth 1 -name 'contrail-install-packages*.deb' -exec stat -c "%y %n" {} + | sort -r | head -n 1 | cut -d' ' -f 4`
CENTOS_PKG=`find $PLUGIN_PATH -maxdepth 1 -name 'contrail-install-packages*.rpm' -exec stat -c "%y %n" {} + | sort -r | head -n 1 | cut -d' ' -f 4`

View File

@ -3,27 +3,22 @@ name: contrail
# Human-readable name for your plugin
title: Fuel Contrail plugin
# Plugin version
version: 2.1.0
version: 3.0.0
# Description
description: Contrail plugin for Fuel provides the functionality to add Juniper Contrail SDN for Mirantis OpenStack as network backend using Fuel Web UI in a user-friendly manner
# Required fuel version
fuel_version: ['6.1']
fuel_version: ['7.0']
# The plugin is compatible with releases in the list
releases:
- os: ubuntu
version: 2014.2.2-6.1
version: 2015.1.0-7.0
mode: ['ha', 'multinode']
deployment_scripts_path: deployment_scripts/
repository_path: repositories/ubuntu
- os: centos
version: 2014.2.2-6.1
mode: ['ha', 'multinode']
deployment_scripts_path: deployment_scripts/
repository_path: repositories/centos
# Version of plugin package
package_version: '2.0.0'
package_version: '3.0.0'
licenses: ['Apache 2.0']
authors: ['Mirantis Inc.']
homepage: https://github.com/stackforge/fuel-plugin-contrail

View File

@ -4,12 +4,3 @@
# The script should return 0 if there were no errors.
set -eux
ROOT="$(dirname `readlink -f $0`)"
MODULES="${ROOT}"/deployment_scripts/puppet/modules
mkdir -p "${MODULES}"
FUEL_REPO_PATH='https://github.com/stackforge/fuel-library/tarball/f43d885914d74fbd062096763222f350f47480e1'
wget -qO- "${FUEL_REPO_PATH}" | \
tar -C "${MODULES}" --strip-components=3 -zxvf - \
stackforge-fuel-library-f43d885/deployment/puppet/{inifile,stdlib}

View File

@ -4,28 +4,6 @@
# cinder and compute nodes
#
#####################################
# In case of base-os Hiera must be deployed manually
- role: ['base-os']
stage: pre_deployment
type: puppet
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/hiera/hiera.pp
puppet_modules: /etc/puppet/modules
timeout: 720
- role: ['base-os']
stage: pre_deployment
type: shell
parameters:
cmd: ln -sf /etc/base-os.yaml /etc/astute.yaml
timeout: 30
# In case of base-os globals.yaml must be created
- role: ['base-os']
stage: pre_deployment
type: puppet
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/globals/globals.pp
puppet_modules: /etc/puppet/modules
timeout: 720
- role: '*'
stage: pre_deployment
type: puppet
@ -33,14 +11,6 @@
puppet_manifest: puppet/manifests/site-common-pre.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 720
# Config default network, first of all
- role: ['base-os']
stage: pre_deployment
type: puppet
parameters:
puppet_modules: /etc/puppet/modules
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/netconfig/netconfig.pp
timeout: 3600
- role: ['base-os']
stage: pre_deployment
type: puppet
@ -48,6 +18,14 @@
puppet_manifest: puppet/manifests/site-contrail-pre.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 720
# Config default network, first of all
- role: ['base-os']
stage: post_deployment
type: puppet
parameters:
puppet_modules: /etc/puppet/modules
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/netconfig/netconfig.pp
timeout: 3600
- role: ['primary-controller','controller']
stage: post_deployment
type: puppet