diff --git a/LICENSE b/LICENSE index 7e4948823..d0381d6d0 100644 --- a/LICENSE +++ b/LICENSE @@ -174,29 +174,3 @@ Apache License of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2015 Mirantis, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/README.md b/README.md index 7af22004a..ebbc86e8a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Mirantis Fuel Contrail plugin Compatible versions: - Mirantis Fuel 6.1 -- Juniper Contrail 2.01 +- Juniper Contrail 2.20 How to build plugin: @@ -17,4 +17,4 @@ How to build plugin: fpb --build . -- Check if file contrail-1.0-1.0.0-0.noarch.rpm was created. +- Check if file contrail-1.0-1.0.1-1.noarch.rpm was created. diff --git a/deployment_scripts/puppet/manifests/site-common-pre.pp b/deployment_scripts/puppet/manifests/site-common-pre.pp index 626941c53..13fe5e3b5 100644 --- a/deployment_scripts/puppet/manifests/site-common-pre.pp +++ b/deployment_scripts/puppet/manifests/site-common-pre.pp @@ -21,6 +21,11 @@ exec {'no_predefined_network_hack': } exec {'no_network_reconfigure': + command => 'echo "#NOOP here. Modified by contrail plugin" > /etc/puppet/modules/osnailyfacter/modular/netconfig/netconfig.pp', + onlyif => 'test -f /opt/contrail/provision-vrouter-DONE' +} + +exec {'no_openstack_network_reconfigure': command => 'echo "#NOOP here. Modified by contrail plugin" > /etc/puppet/modules/osnailyfacter/modular/openstack-network/openstack-network-compute.pp', onlyif => 'test -f /opt/contrail/provision-vrouter-DONE' } @@ -31,7 +36,9 @@ case $operatingsystem CentOS: { yumrepo {'mos': priority => 1, exclude => 'python-thrift,nodejs'} # Contrail requires newer python-thrift and nodejs from it's repo - yumrepo {'contrail-1.0.0': exclude => 'python-pycrypto'} # Conflicts with python-crypto@mos. Provides same files. package {'yum-plugin-priorities': ensure => present } } + Ubuntu: + { + } } diff --git a/deployment_scripts/puppet/manifests/site-compute-post.pp b/deployment_scripts/puppet/manifests/site-compute-post.pp index fd2f2d5b6..00061f977 100644 --- a/deployment_scripts/puppet/manifests/site-compute-post.pp +++ b/deployment_scripts/puppet/manifests/site-compute-post.pp @@ -25,12 +25,15 @@ class { 'contrail::network': case $operatingsystem { Ubuntu: { - + file { '/etc/apt/preferences.d/contrail-pin-100': + ensure => file, + source => 'puppet:///modules/contrail/contrail-pin-100', + before => Class['contrail::package'], + } class { 'contrail::package': install => ['contrail-openstack-vrouter','contrail-vrouter-dkms','iproute2','haproxy','libatm1'], remove => ['openvswitch-common','openvswitch-datapath-dkms','openvswitch-datapath-lts-saucy-dkms','openvswitch-switch','nova-network','nova-api'], } - } CentOS: { class { 'contrail::package': @@ -49,19 +52,13 @@ case $operatingsystem { file {'/etc/contrail/default_pmac': ensure => present, } + -> + service {'supervisor-vrouter': enable => true} } } -> class { 'contrail::config': node_role => $node_role, -} ~> - -class { 'contrail::service': - node_role => $node_role, -} -> - -service { 'supervisor-vrouter': - enable => true, } -> class { 'contrail::provision': diff --git a/deployment_scripts/puppet/manifests/site-contrail-post1.pp b/deployment_scripts/puppet/manifests/site-contrail-post1.pp index 90524726d..a3b426a74 100644 --- a/deployment_scripts/puppet/manifests/site-contrail-post1.pp +++ b/deployment_scripts/puppet/manifests/site-contrail-post1.pp @@ -20,20 +20,26 @@ if $contrail::node_name =~ /^contrail.\d+$/ { { Ubuntu: { + file { '/etc/apt/preferences.d/contrail-pin-100': + ensure => file, + source => 'puppet:///modules/contrail/contrail-pin-100', + before => Class['contrail::package'], + } $pkgs = ['python-crypto','python-netaddr','python-paramiko','ifenslave-2.6','patch', 'openjdk-7-jre-headless','contrail-fabric-utils','contrail-setup'] - $pip_pkgs = ['ecdsa-0.10','Fabric-1.7.0'] + $pip_pkgs = ['Fabric-1.7.5'] } CentOS: { $pkgs = ['python-netaddr','python-paramiko','patch', 'java-1.7.0-openjdk','contrail-fabric-utils','contrail-setup'] - $pip_pkgs = ['Fabric-1.7.0'] + $pip_pkgs = ['Fabric-1.7.5'] } } class { 'contrail::package': install => $pkgs, pip_install => $pip_pkgs, } + } diff --git a/deployment_scripts/puppet/manifests/site-controller-post1.pp b/deployment_scripts/puppet/manifests/site-controller-post1.pp index f50027514..e0d88f532 100644 --- a/deployment_scripts/puppet/manifests/site-controller-post1.pp +++ b/deployment_scripts/puppet/manifests/site-controller-post1.pp @@ -14,6 +14,9 @@ include contrail $node_role = 'controller' +class { 'contrail::package': + install => 'contrail-heat', +} -> class { 'contrail::config': node_role => $node_role, } \ No newline at end of file diff --git a/deployment_scripts/puppet/modules/contrail/files/commandline.py.patch b/deployment_scripts/puppet/modules/contrail/files/commandline.py.patch new file mode 100644 index 000000000..4ce795eff --- /dev/null +++ b/deployment_scripts/puppet/modules/contrail/files/commandline.py.patch @@ -0,0 +1,11 @@ +--- /opt/contrail/utils/fabfile/util/commandline.py.orig 2015-06-08 10:40:43.967097851 +0000 ++++ /opt/contrail/utils/fabfile/util/commandline.py 2015-06-08 10:41:27.391097689 +0000 +@@ -152,7 +152,7 @@ + cmd += ' --manage_neutron %s' % manage_neutron + else: + cmd += ' --manage_neutron no' +- internal_vip = get_contrail_internal_vip() ++ internal_vip = get_contrail_external_vip() + if internal_vip: + # Highly available setup + cmd += ' --internal_vip %s' % (internal_vip) diff --git a/deployment_scripts/puppet/modules/contrail/files/contrail-pin-100 b/deployment_scripts/puppet/modules/contrail/files/contrail-pin-100 index b9673487b..f57f5fd40 100644 --- a/deployment_scripts/puppet/modules/contrail/files/contrail-pin-100 +++ b/deployment_scripts/puppet/modules/contrail/files/contrail-pin-100 @@ -1,7 +1,3 @@ -Package: haproxy -Pin: version 1.5.4-1ppa1~precise -Pin-Priority: 1060 - -Package: nodejs -Pin: version 0.8.15-1contrail1 -Pin-Priority: 1060 +Package: * +Pin: release l=contrail +Pin-Priority: 1100 diff --git a/deployment_scripts/puppet/modules/contrail/files/install.py.patch b/deployment_scripts/puppet/modules/contrail/files/install.py.patch index cf495d79d..99c9df762 100644 --- a/deployment_scripts/puppet/modules/contrail/files/install.py.patch +++ b/deployment_scripts/puppet/modules/contrail/files/install.py.patch @@ -1,13 +1,15 @@ -+++ /opt/contrail/utils/fabfile/tasks/install.py -@@ -171,10 +171,7 @@ - run(cmd) - +--- /opt/contrail/utils/fabfile/tasks/install.py 2015-06-09 20:15:26.809587058 +0000 ++++ /opt/contrail/utils/fabfile/tasks/install.py_new 2015-06-09 20:08:40.031819798 +0000 +@@ -208,10 +208,7 @@ + sudo(cmd) + def yum_install(rpms, disablerepo = True): - if disablerepo: -- cmd = "yum -y --nogpgcheck --disablerepo=* --enablerepo=contrail_install_repo install " +- cmd = "yum -y --nogpgcheck --disablerepo=* --enablerepo=contrail* install " - else: - cmd = "yum -y --nogpgcheck install " + cmd = "yum -y --nogpgcheck install " os_type = detect_ostype() # redhat platform installs from multiple repos if os_type in ['redhat']: + diff --git a/deployment_scripts/puppet/modules/contrail/files/plugins.yaml b/deployment_scripts/puppet/modules/contrail/files/plugins.yaml deleted file mode 100644 index ded62fe84..000000000 --- a/deployment_scripts/puppet/modules/contrail/files/plugins.yaml +++ /dev/null @@ -1,21 +0,0 @@ -use_neutron: false -network_scheme: - transformations: - - action: add-br - name: br-fw-admin - - action: add-br - name: br-mgmt - - action: add-br - name: br-storage - - action: add-br - name: br-prv - roles: - neutron/private: br-prv - management: br-mgmt - storage: br-storage - fw-admin: br-fw-admin - interfaces: - eth0: - version: '1.1' - provider: lnx - diff --git a/deployment_scripts/puppet/modules/contrail/files/provision.py.patch b/deployment_scripts/puppet/modules/contrail/files/provision.py.patch deleted file mode 100644 index fff27685d..000000000 --- a/deployment_scripts/puppet/modules/contrail/files/provision.py.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- /opt/contrail/utils/fabfile/tasks/provision.py.orig -+++ /opt/contrail/utils/fabfile/tasks/provision.py -@@ -463,7 +463,7 @@ - cmd += ' --manage_neutron %s' % manage_neutron - else: - cmd += ' --manage_neutron no' -- internal_vip = get_contrail_internal_vip() -+ internal_vip = get_contrail_external_vip() - if internal_vip: - # Highly available setup - cmd += ' --internal_vip %s' % (internal_vip) diff --git a/deployment_scripts/puppet/modules/contrail/manifests/config.pp b/deployment_scripts/puppet/modules/contrail/manifests/config.pp index d16e87c30..013d4ce31 100644 --- a/deployment_scripts/puppet/modules/contrail/manifests/config.pp +++ b/deployment_scripts/puppet/modules/contrail/manifests/config.pp @@ -94,6 +94,10 @@ class contrail::config ( $node_role ) { ensure => present, content => template('contrail/contrail-vrouter-agent.conf.erb'), } + file {'/etc/contrail/contrail-vrouter-nodemgr.conf': + ensure => present, + content => template('contrail/contrail-vrouter-nodemgr.conf.erb'), + } } @@ -174,6 +178,67 @@ class contrail::config ( $node_role ) { setting => 'rabbit_password', value => $contrail::rabbit_password } + + ## Contrail SVC monitor + ini_setting { 'contrail-svc_rabbit_server': + ensure => present, + path => '/etc/contrail/contrail-svc-monitor.conf', + section => 'DEFAULTS', + setting => 'rabbit_server', + value => $contrail::mos_mgmt_vip + } + ini_setting { 'contrail-svc_rabbit_port': + ensure => present, + path => '/etc/contrail/contrail-svc-monitor.conf', + section => 'DEFAULTS', + setting => 'rabbit_port', + value => '5673' + } + ini_setting { 'contrail-svc_rabbit_password': + ensure => present, + path => '/etc/contrail/contrail-svc-monitor.conf', + section => 'DEFAULTS', + setting => 'rabbit_password', + value => $contrail::rabbit_password + } + ini_setting { 'contrail-svc_rabbit_user': + ensure => present, + path => '/etc/contrail/contrail-svc-monitor.conf', + section => 'DEFAULTS', + setting => 'rabbit_user', + value => 'nova' + } + + ## Contrail Device manager + ini_setting { 'contrail-dev_rabbit_server': + ensure => present, + path => '/etc/contrail/contrail-device-manager.conf', + section => 'DEFAULTS', + setting => 'rabbit_server', + value => $contrail::mos_mgmt_vip + } + ini_setting { 'contrail-dev_rabbit_port': + ensure => present, + path => '/etc/contrail/contrail-device-manager.conf', + section => 'DEFAULTS', + setting => 'rabbit_port', + value => '5673' + } + ini_setting { 'contrail-dev_rabbit_password': + ensure => present, + path => '/etc/contrail/contrail-device-manager.conf', + section => 'DEFAULTS', + setting => 'rabbit_password', + value => $contrail::rabbit_password + } + ini_setting { 'contrail-dev_rabbit_user': + ensure => present, + path => '/etc/contrail/contrail-device-manager.conf', + section => 'DEFAULTS', + setting => 'rabbit_user', + value => 'nova' + } + } } } diff --git a/deployment_scripts/puppet/modules/contrail/manifests/init.pp b/deployment_scripts/puppet/modules/contrail/manifests/init.pp index 8a31a4856..b51614ed7 100644 --- a/deployment_scripts/puppet/modules/contrail/manifests/init.pp +++ b/deployment_scripts/puppet/modules/contrail/manifests/init.pp @@ -30,7 +30,6 @@ $nodes= hiera('nodes') $neutron_settings=hiera('quantum_settings') $metadata_secret=$neutron_settings['metadata']['metadata_proxy_shared_secret'] -$neutron_floating=$neutron_settings['predefined_networks']['net04_ext']['L3']['floating'] $service_token = $neutron_settings['keystone']['admin_password'] $keystone=hiera('keystone') $admin_token = $keystone['admin_token'] @@ -43,8 +42,6 @@ $mos_mgmt_vip=hiera('management_vip') # Contrail settings $asnum = $settings['contrail_asnum'] -$admin_tenant_private_cidr = $settings['admin_tenant_private_cidr'] -$admin_tenant_public_cidr = $settings['admin_tenant_public_cidr'] # Network configuration prepare_network_config($network_scheme) @@ -57,15 +54,8 @@ $netmask=cidr_to_netmask($cidr) # returns i.e. "255.255.255.0" $netmask_short=netmask_to_cidr($netmask) # returns i.e. "/24" $address=get_ip_from_range($private_first,$private_last,$netmask_short,$uid,'first') -$public_network_assignment=hiera('public_network_assignment') -$public_allnodes=$public_network_assignment['assign_to_all_nodes'] - -if $public_allnodes == true { - $public_address=get_network_role_property('ex', 'ipaddr') - $public_netmask=netmask_to_cidr(get_network_role_property('ex', 'netmask')) -} - $default_gw = hiera('management_vrouter_vip') +$private_gw = $settings['contrail_private_gw'] $contrail_mgmt_vip=get_last_ip(get_network_role_property('management', 'cidr')) $contrail_node_basename='contrail' diff --git a/deployment_scripts/puppet/modules/contrail/manifests/network.pp b/deployment_scripts/puppet/modules/contrail/manifests/network.pp index 4916afc03..fbcf142ab 100644 --- a/deployment_scripts/puppet/modules/contrail/manifests/network.pp +++ b/deployment_scripts/puppet/modules/contrail/manifests/network.pp @@ -19,15 +19,20 @@ class contrail::network ( $netmask, $default_gw = undef ) { - case $operatingsystem { - 'Ubuntu': { - $br_file = ['/etc/network/interfaces.d/ifcfg-br-aux', '/etc/network/interfaces.d/ifcfg-br-mesh'] + $br_file = $operatingsystem ? { + 'Ubuntu' => ['/etc/network/interfaces.d/ifcfg-br-aux', '/etc/network/interfaces.d/ifcfg-br-mesh'], + 'CentOS' => ['/etc/sysconfig/network-scripts/ifcfg-br-aux', '/etc/sysconfig/network-scripts/ifcfg-br-mesh'], + } + + define contrail::add_route ( $destination, $gateway ) { + exec {"check_route_to_${name}": + command => "ip route del ${name}", + onlyif => "ip route | grep ${name}", + before => L23network::L3::Route[$name], } - 'CentOS': { - $br_file = ['/etc/sysconfig/network-scripts/ifcfg-br-aux', '/etc/sysconfig/network-scripts/ifcfg-br-mesh'] - exec {"remove_bridge_from_${ifname}_config": - command => "sed -i '/BRIDGE/d' /etc/sysconfig/network-scripts/ifcfg-${ifname}", - } + l23network::l3::route {$name: + destination => $name, + gateway => $gateway, } } @@ -48,6 +53,8 @@ class contrail::network ( } case $node_role { 'base-os':{ + $gateways = split($contrail::settings['contrail_gateways'], ',') + class { 'l23network': use_ovs => false } l23network::l3::ifconfig {$ifname: interface => $ifname, ipaddr => "${address}/${netmask}", @@ -59,17 +66,13 @@ class contrail::network ( } -> exec {"add-default-route-via-${default_gw}": command => "ip route add default via ${default_gw}", + } -> + contrail::add_route { $gateways: + destination => $gateways, + gateway => $contrail::private_gw, } } 'compute':{ - file {'/etc/hiera/override': - ensure => directory, - } - file {'/etc/hiera/override/plugins.yaml': - ensure => present, - content => template('contrail/plugins.yaml.erb'), - require => File['/etc/hiera/override'], - } case $operatingsystem { Ubuntu: diff --git a/deployment_scripts/puppet/modules/contrail/manifests/package.pp b/deployment_scripts/puppet/modules/contrail/manifests/package.pp index 92e93d222..45f939e12 100644 --- a/deployment_scripts/puppet/modules/contrail/manifests/package.pp +++ b/deployment_scripts/puppet/modules/contrail/manifests/package.pp @@ -20,14 +20,6 @@ class contrail::package ( if ($install) { - if $operatingsystem == 'Ubuntu' { - file { '/etc/apt/preferences.d/contrail-pin-100': - ensure => file, - source => 'puppet:///modules/contrail/contrail-pin-100', - before => Package[$install], - } - } - package { $install: ensure => present, } diff --git a/deployment_scripts/puppet/modules/contrail/manifests/service.pp b/deployment_scripts/puppet/modules/contrail/manifests/service.pp index 112db3576..ca691b6ef 100644 --- a/deployment_scripts/puppet/modules/contrail/manifests/service.pp +++ b/deployment_scripts/puppet/modules/contrail/manifests/service.pp @@ -24,21 +24,15 @@ class contrail::service ( $node_role ) { } 'controller','primary-controller': { $services = $operatingsystem ? { - 'Ubuntu' => ['nova-api','nova-scheduler','nova-conductor'], - 'CentOS' => ['openstack-nova-api','openstack-nova-scheduler','openstack-nova-conductor'], + 'Ubuntu' => ['nova-api','nova-scheduler','nova-conductor','heat-api','heat-api-cfn','heat-engine'], + 'CentOS' => ['openstack-nova-api','openstack-nova-scheduler','openstack-nova-conductor', + 'openstack-heat-api','openstack-heat-api-cfn','openstack-heat-engine'], default => undef, } notify { 'restart-services': notify => Service[$services], } } - 'compute': { - $services = $operatingsystem ? { - 'Ubuntu' => 'nova-compute', - 'CentOS' => 'openstack-nova-compute', - default => undef, - } - } } if ( $services ) { diff --git a/deployment_scripts/puppet/modules/contrail/manifests/setup.pp b/deployment_scripts/puppet/modules/contrail/manifests/setup.pp index ab66abb7d..171425c84 100644 --- a/deployment_scripts/puppet/modules/contrail/manifests/setup.pp +++ b/deployment_scripts/puppet/modules/contrail/manifests/setup.pp @@ -12,16 +12,14 @@ # License for the specific language governing permissions and limitations # under the License. -class contrail::setup ( - $node_name - ) { +class contrail::setup ($node_name) +{ if $node_name == $contrail::deployment_node { $pythonpath = $operatingsystem ? { 'Ubuntu' => '/usr/local/lib/python2.7/dist-packages', 'CentOS' => '/usr/lib/python2.6/site-packages' } - file {'/tmp/install.py.patch': ensure => file, source => 'puppet:///modules/contrail/install.py.patch' @@ -30,14 +28,13 @@ class contrail::setup ( command => 'patch /opt/contrail/utils/fabfile/tasks/install.py /tmp/install.py.patch && touch /opt/contrail/install.py.patch-DONE', creates => '/opt/contrail/install.py.patch-DONE' } -> - - file {'/tmp/provision.py.patch': + file {'/tmp/commandline.py.patch': ensure => file, - source => 'puppet:///modules/contrail/provision.py.patch' + source => 'puppet:///modules/contrail/commandline.py.patch' } -> - exec {'provision.py.patch': - command => 'patch /opt/contrail/utils/fabfile/tasks/provision.py /tmp/provision.py.patch && touch /opt/contrail/provision.py.patch-DONE', - creates => '/opt/contrail/provision.py.patch-DONE' + exec {'commandline.py.patch': + command => 'patch /opt/contrail/utils/fabfile/utils/commandline.py /tmp/commandline.py.patch && touch /opt/contrail/commandline.py.patch-DONE', + creates => '/opt/contrail/commandline.py.patch-DONE' } -> file {'/tmp/ha.py.patch': ensure => file, diff --git a/deployment_scripts/puppet/modules/contrail/templates/contrail-vrouter-agent.conf.erb b/deployment_scripts/puppet/modules/contrail/templates/contrail-vrouter-agent.conf.erb index e2626f248..bdc671fe3 100644 --- a/deployment_scripts/puppet/modules/contrail/templates/contrail-vrouter-agent.conf.erb +++ b/deployment_scripts/puppet/modules/contrail/templates/contrail-vrouter-agent.conf.erb @@ -19,7 +19,7 @@ control_network_ip=<%= scope.lookupvar('contrail::address') %> name=vhost0 ip=<%= scope.lookupvar('contrail::address') %>/<%= scope.lookupvar('contrail::netmask_short') %> physical_interface=<%= scope.function_get_private_ifname([]) %> -gateway= +gateway=<%= scope.lookupvar('contrail::private_gw') %> [GATEWAY-0] [GATEWAY-1] [SERVICE-INSTANCE] diff --git a/deployment_scripts/puppet/modules/contrail/templates/contrail-vrouter-nodemgr.conf.erb b/deployment_scripts/puppet/modules/contrail/templates/contrail-vrouter-nodemgr.conf.erb new file mode 100644 index 000000000..996edd8ed --- /dev/null +++ b/deployment_scripts/puppet/modules/contrail/templates/contrail-vrouter-nodemgr.conf.erb @@ -0,0 +1,3 @@ +[DISCOVERY] +server=<%= scope.lookupvar('contrail::private_first') %> +port=5998 \ No newline at end of file diff --git a/deployment_scripts/puppet/modules/contrail/templates/plugins.yaml.erb b/deployment_scripts/puppet/modules/contrail/templates/plugins.yaml.erb deleted file mode 100644 index 034b34dd1..000000000 --- a/deployment_scripts/puppet/modules/contrail/templates/plugins.yaml.erb +++ /dev/null @@ -1,77 +0,0 @@ -<%- -admin_address=scope.function_get_network_role_property(['fw-admin', 'ipaddr']) -admin_netmask=scope.function_netmask_to_cidr([scope.function_get_network_role_property(['fw-admin', 'netmask'])]) -admin_physdev=scope.function_get_network_role_property(['fw-admin', 'phys_dev']).join - -mgmt_address=scope.function_get_network_role_property(['management', 'ipaddr']) -mgmt_netmask=scope.function_netmask_to_cidr([scope.function_get_network_role_property(['management', 'netmask'])]) -mgmt_physdev=scope.function_get_network_role_property(['management', 'phys_dev']).join - -storage_address=scope.function_get_network_role_property(['storage', 'ipaddr']) -storage_netmask=scope.function_netmask_to_cidr([scope.function_get_network_role_property(['storage', 'netmask'])]) -storage_physdev=scope.function_get_network_role_property(['storage', 'phys_dev']).join --%> -# The following variables are required to run part of granular deployemnt in -# contrail-enabled environments and are not actually used in openstack operations -use_neutron: false -use_vcenter: undef -floating_network_range: <%= scope.lookupvar('contrail::neutron_floating') %> -fixed_network_range: 10.0.0.0/16 -public_interface: false -private_int: false -network_manager: nova.network.manager.FlatManager -novanetwork_parameters: - network_manager: FlatManager - network_size: 65536 - num_networks: 1 -network_scheme: - transformations: - - action: add-br - name: br-fw-admin - - action: add-br - name: br-mgmt - - action: add-br - name: br-storage - - action: add-br - name: br-prv -<%- if scope.lookupvar('contrail::public_allnodes') == true -%> - - action: add-br - name: br-ex -<%- end -%> - - action: add-port - bridge: br-fw-admin - name: <%= admin_physdev %> - - action: add-port - bridge: br-mgmt - name: <%= mgmt_physdev %> - - action: add-port - bridge: br-storage - name: <%= storage_physdev %> - roles: - neutron/private: br-prv - management: br-mgmt - storage: br-storage - fw-admin: br-fw-admin -<%- if scope.lookupvar('contrail::public_allnodes') == true -%> - ex: br-ex -<%- end -%> - interfaces: - eth0: - version: '1.1' - provider: lnx - endpoints: - br-fw-admin: - IP: - - <%= admin_address %>/<%= admin_netmask %> - br-mgmt: - IP: - - <%= mgmt_address %>/<%= mgmt_netmask %> - gateway: <%= scope.lookupvar('contrail::default_gw') %> - br-storage: - IP: - - <%= storage_address %>/<%= storage_netmask %> -<%- if scope.lookupvar('contrail::public_allnodes') == true -%> - br-ex: - IP: - - <%= scope.lookupvar('contrail::public_address') %>/<%= scope.lookupvar('contrail::public_netmask') %> -<%- end -%> \ No newline at end of file diff --git a/deployment_scripts/puppet/modules/contrail/templates/testbed.py.erb b/deployment_scripts/puppet/modules/contrail/templates/testbed.py.erb index 7ed80f37a..62fa2dc29 100644 --- a/deployment_scripts/puppet/modules/contrail/templates/testbed.py.erb +++ b/deployment_scripts/puppet/modules/contrail/templates/testbed.py.erb @@ -127,4 +127,3 @@ env.keystone = { } multi_tenancy = True - diff --git a/environment_config.yaml b/environment_config.yaml index c654c003c..f454a7241 100644 --- a/environment_config.yaml +++ b/environment_config.yaml @@ -40,10 +40,19 @@ attributes: regex: source: '^(?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3}$' error: "Invalid IP address" + contrail_private_gw: + value: '10.109.3.1' + label: 'Gateway for Private network' + description: 'The IP address of gateway for contrail private network to reach BGP routers' + weight: 40 + type: "text" + regex: + source: '^(?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3}$' + error: "Invalid IP address" contrail_gateways: - value: '10.109.3.1,10.109.3.2' + value: '10.109.3.2,10.110.1.1' label: 'GW IP' - description: 'Comma separated IP addresses of gateways' + description: 'Comma separated IP addresses of BGP peers' weight: 50 type: "text" regex: diff --git a/metadata.yaml b/metadata.yaml index afd471b4f..bca36bc81 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -3,7 +3,7 @@ name: contrail # Human-readable name for your plugin title: Fuel Contrail plugin # Plugin version -version: 1.0.0 +version: 1.0.1 # 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 diff --git a/tasks.yaml b/tasks.yaml index e0b3ac69d..bd4c4eb16 100644 --- a/tasks.yaml +++ b/tasks.yaml @@ -4,13 +4,6 @@ # cinder and compute nodes # ##################################### -- role: '*' - stage: pre_deployment - type: puppet - parameters: - puppet_manifest: puppet/manifests/site-common-pre.pp - puppet_modules: puppet/modules:/etc/puppet/modules - timeout: 720 # In case of base-os Hiera must be deployed manually - role: ['base-os'] stage: pre_deployment @@ -33,6 +26,13 @@ puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/globals/globals.pp puppet_modules: /etc/puppet/modules timeout: 720 +- role: '*' + stage: pre_deployment + type: puppet + parameters: + 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 @@ -98,8 +98,9 @@ timeout: 720 - role: ['compute'] stage: post_deployment - type: reboot + type: shell parameters: + cmd: if [ ! -f /opt/contrail/reboot-vrouter-DONE ]; then touch /opt/contrail/reboot-vrouter-DONE && /sbin/reboot; fi timeout: 720 - role: ['base-os'] stage: post_deployment