fuel-library/deployment/puppet/osnailyfacter/modular/netconfig/tasks.yaml

127 lines
4.4 KiB
YAML

- id: hiera_default_route
type: puppet
version: 2.2.0
tags: [primary-controller, controller, cinder, cinder-block-device, compute, ceph-osd,
primary-mongo, mongo, virt, ironic, primary-rabbitmq, rabbitmq, primary-database, database,
primary-keystone, keystone, primary-neutron, neutron]
# We need to execute this task before netconfig on all nodes except mongo.
# Mongo nodes will configure routing via admin network and update it later
# with configure_default_route task
cross-depended-by:
yaql_exp: >
switch(
(
('mongo' in $.roles) or ('primary-mongo' in $.roles)
) => [
{name=>'configure_default_route',role=>'self'}
],
true => [
{name=>'netconfig',role=>'self'}
]
)
# On mongo nodes this task should be executed after netconfig in order
# to not break default route by setting it to not yet existent mgmt VIP
cross-depends:
yaql_exp: >
switch(
(
('mongo' in $.roles) or ('primary-mongo' in $.roles)
) => [
{name=>'netconfig',role=>'self'},
{name=>'post_deployment_start',role=>'self'}
],
true => [
{name=>'tools',role=>'self'}
]
)
condition:
yaql_exp: &network >
changedAny($.network_scheme, $.get('dpdk'), $.get('use_ovs'),
$.get('set_rps'), $.get('run_ping_checker'),
$.network_scheme.endpoints.values().where(
$.get('gateway') != null).gateway,
$.network_metadata.vips)
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/netconfig/hiera_default_route.pp
puppet_modules: /etc/puppet/modules
timeout: 120
- id: netconfig
type: puppet
version: 2.2.0
tags: [primary-controller, controller, cinder, cinder-block-device, compute, ceph-osd,
primary-mongo, mongo, virt, ironic, primary-rabbitmq, rabbitmq, primary-database, database,
primary-keystone, keystone, primary-neutron, neutron]
required_for: [deploy_end]
requires: [tools]
condition:
yaql_exp: *network
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/netconfig/netconfig.pp
puppet_modules: /etc/puppet/modules
timeout: 300
test_pre:
cmd: ruby /etc/puppet/modules/osnailyfacter/modular/netconfig/netconfig_pre.rb
test_post:
cmd: ruby /etc/puppet/modules/osnailyfacter/modular/netconfig/netconfig_post.rb
# Run netconfig task on all nodes (except mongo and vrouter VIP roles) after virtual_ips.
# Thus we make sure that our default gateway (vrouter VIP) is up before configuring
# routing on nodes.
cross-depends:
yaql_exp: >
switch(
(
$.roles.any($.matches('^(primary-)?(mongo)$'))
or ($.network_metadata.get('vips',{}).get('vrouter',{}).get('ipaddr') = null)
or (
len($.roles.toSet().intersect($.network_metadata.get('vips',{}).get('vrouter',{}).get('node_roles').toSet())) > 0
)
) => [],
true => [{
name => 'virtual_ips',
role => $.network_metadata.get('vips',{}).get('vrouter',{}).get('node_roles')
}]
)
- id: connectivity_tests
type: puppet
version: 2.1.0
groups: [primary-controller, controller, cinder, cinder-block-device, compute, ceph-osd, primary-mongo, mongo, virt, ironic]
required_for: [firewall, hosts]
requires: [netconfig]
condition:
yaql_exp: 'changedAny($.repo_setup, $.network_scheme)'
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/netconfig/connectivity_tests.pp
puppet_modules: /etc/puppet/modules
timeout: 120
cwd: /
- id: sriov_iommu_check
type: puppet
version: 2.1.0
groups: [compute]
requires: [netconfig]
required_for: [firewall, hosts]
condition:
yaql_exp: 'changed($.network_scheme.transformations)'
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/netconfig/sriov_iommu_check.pp
puppet_modules: /etc/puppet/modules
timeout: 120
cwd: /
- id: reserved_ports
type: puppet
version: 2.1.0
groups: [primary-controller, controller, cinder, cinder-block-device, compute, ceph-osd, primary-mongo, mongo, virt, ironic]
required_for: [globals]
requires: [rsync_core_puppet]
condition:
yaql_exp: '$.uid in added($.network_metadata.nodes.values()).uid'
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/netconfig/reserved_ports.pp
puppet_modules: /etc/puppet/modules
timeout: 180
cwd: /