Browse Source

Add neutron-ovs to ironic role

Change-Id: Ifd4c791e7801ae732ba493b71fcd434032fc7611
Andrey Shestakov 3 years ago
parent
commit
8976aa29d2

+ 11
- 1
deployment_scripts/puppet/manifests/ironic.pp View File

@@ -5,6 +5,7 @@ $nova_hash                  = hiera_hash('nova_hash', {})
5 5
 $access_hash                = hiera_hash('access',{})
6 6
 $public_vip                 = hiera('public_vip')
7 7
 $management_vip             = hiera('management_vip')
8
+$public_ssl_hash            = hiera('public_ssl')
8 9
 
9 10
 $network_metadata           = hiera_hash('network_metadata', {})
10 11
 $baremetal_vip              = $network_metadata['vips']['baremetal']['ipaddr']
@@ -29,8 +30,17 @@ $db_name                    = pick($ironic_hash['db_name'], 'ironic')
29 30
 $db_password                = pick($ironic_hash['password'], 'ironic')
30 31
 $database_connection        = "mysql://${db_name}:${db_password}@${db_host}/${db_name}?charset=utf8&read_timeout=60"
31 32
 
33
+$public_address = $public_ssl_hash['services'] ? {
34
+  true    => $public_ssl_hash['hostname'],
35
+  default => $public_vip,
36
+}
37
+$public_protocol = $public_ssl_hash['services'] ? {
38
+  true    => 'https',
39
+  default => 'http',
40
+}
41
+
32 42
 $region                     = hiera('region', 'RegionOne')
33
-$public_url                 = "http://${public_vip}:6385"
43
+$public_url                 = "${public_protocol}://${public_address}:6385"
34 44
 $admin_url                  = "http://${management_vip}:6385"
35 45
 $internal_url               = "http://${management_vip}:6385"
36 46
 

+ 1
- 42
deployment_scripts/puppet/manifests/network-openstack.pp View File

@@ -1,4 +1,4 @@
1
-notice('MODULAR: ironic/network.pp')
1
+notice('MODULAR: ironic/network-openstack.pp')
2 2
 
3 3
 $network_scheme    = hiera('network_scheme', {})
4 4
 prepare_network_config($network_scheme)
@@ -12,43 +12,6 @@ $baremetal_L3_allocation_pool = $ironic_hash['l3_allocation_pool']
12 12
 $baremetal_L3_gateway = $ironic_hash['l3_gateway']
13 13
 
14 14
 
15
-# Physnets
16
-###############################
17
-if $pnets['physnet1'] {
18
-  $physnet1 = "physnet1:${pnets['physnet1']['bridge']}"
19
-}
20
-if $pnets['physnet2'] {
21
-  $physnet2 = "physnet2:${pnets['physnet2']['bridge']}"
22
-}
23
-$physnet_ironic = "physnet-ironic:br-ironic"
24
-$physnets_array = [$physnet1, $physnet2, $physnet_ironic]
25
-$bridge_mappings = delete_undef_values($physnets_array)
26
-
27
-$br_map_str = join($bridge_mappings, ',')
28
-neutron_agent_ovs {
29
-  'ovs/bridge_mappings': value => $br_map_str;
30
-}
31
-
32
-$flat_networks  = ['physnet-ironic']
33
-neutron_plugin_ml2 {
34
-  'ml2_type_flat/flat_networks': value => join($flat_networks, ',');
35
-}
36
-
37
-service { 'p_neutron-plugin-openvswitch-agent':
38
-  ensure => 'running',
39
-  enable => true,
40
-  provider => 'pacemaker',
41
-}
42
-service { 'p_neutron-dhcp-agent':
43
-  ensure => 'running',
44
-  enable => true,
45
-  provider => 'pacemaker',
46
-}
47
-
48
-Neutron_plugin_ml2<||> ~> Service['p_neutron-plugin-openvswitch-agent'] ~> Service['p_neutron-dhcp-agent']
49
-Neutron_agent_ovs<||> ~> Service['p_neutron-plugin-openvswitch-agent'] ~> Service['p_neutron-dhcp-agent']
50
-
51
-
52 15
 # Predefined network
53 16
 ###############################
54 17
 $netdata = {
@@ -77,7 +40,3 @@ neutron_router_interface { "router04:baremetal__subnet":
77 40
   ensure => present,
78 41
 }
79 42
 
80
-
81
-# Order
82
-###############################
83
-Neutron_plugin_ml2<||> -> Neutron_agent_ovs<||> -> Openstack::Network::Create_network<||>

+ 43
- 0
deployment_scripts/puppet/manifests/network-physnets-conductor.pp View File

@@ -0,0 +1,43 @@
1
+notice('MODULAR: ironic/network-physnets-conductor.pp')
2
+
3
+$network_scheme    = hiera('network_scheme', {})
4
+prepare_network_config($network_scheme)
5
+$neutron_config    = hiera_hash('quantum_settings')
6
+$pnets             = $neutron_config['L2']['phys_nets']
7
+$baremetal_network = get_network_role_property('ironic/baremetal', 'network')
8
+$nameservers       = $neutron_config['predefined_networks']['net04']['L3']['nameservers']
9
+
10
+$ironic_hash       = hiera_hash('fuel-plugin-ironic', {})
11
+$baremetal_L3_allocation_pool = $ironic_hash['l3_allocation_pool']
12
+$baremetal_L3_gateway = $ironic_hash['l3_gateway']
13
+
14
+# Physnets
15
+###############################
16
+if $pnets['physnet1'] {
17
+  $physnet1 = "physnet1:${pnets['physnet1']['bridge']}"
18
+}
19
+if $pnets['physnet2'] {
20
+  $physnet2 = "physnet2:${pnets['physnet2']['bridge']}"
21
+}
22
+$physnet_ironic = "physnet-ironic:br-ironic"
23
+$physnets_array = [$physnet1, $physnet2, $physnet_ironic]
24
+$bridge_mappings = delete_undef_values($physnets_array)
25
+
26
+$br_map_str = join($bridge_mappings, ',')
27
+neutron_agent_ovs {
28
+  'ovs/bridge_mappings': value => $br_map_str;
29
+}
30
+
31
+$flat_networks  = ['physnet-ironic']
32
+neutron_plugin_ml2 {
33
+  'ml2_type_flat/flat_networks': value => join($flat_networks, ',');
34
+}
35
+
36
+service { 'neutron-plugin-openvswitch-agent':
37
+  ensure => 'running',
38
+  enable => true,
39
+}
40
+
41
+Neutron_plugin_ml2<||> ~> Service['neutron-plugin-openvswitch-agent']
42
+Neutron_agent_ovs<||> ~> Service['neutron-plugin-openvswitch-agent']
43
+

+ 49
- 0
deployment_scripts/puppet/manifests/network-physnets.pp View File

@@ -0,0 +1,49 @@
1
+notice('MODULAR: ironic/network-physnets.pp')
2
+
3
+$network_scheme    = hiera('network_scheme', {})
4
+prepare_network_config($network_scheme)
5
+$neutron_config    = hiera_hash('quantum_settings')
6
+$pnets             = $neutron_config['L2']['phys_nets']
7
+$baremetal_network = get_network_role_property('ironic/baremetal', 'network')
8
+$nameservers       = $neutron_config['predefined_networks']['net04']['L3']['nameservers']
9
+
10
+$ironic_hash       = hiera_hash('fuel-plugin-ironic', {})
11
+$baremetal_L3_allocation_pool = $ironic_hash['l3_allocation_pool']
12
+$baremetal_L3_gateway = $ironic_hash['l3_gateway']
13
+
14
+# Physnets
15
+###############################
16
+if $pnets['physnet1'] {
17
+  $physnet1 = "physnet1:${pnets['physnet1']['bridge']}"
18
+}
19
+if $pnets['physnet2'] {
20
+  $physnet2 = "physnet2:${pnets['physnet2']['bridge']}"
21
+}
22
+$physnet_ironic = "physnet-ironic:br-ironic"
23
+$physnets_array = [$physnet1, $physnet2, $physnet_ironic]
24
+$bridge_mappings = delete_undef_values($physnets_array)
25
+
26
+$br_map_str = join($bridge_mappings, ',')
27
+neutron_agent_ovs {
28
+  'ovs/bridge_mappings': value => $br_map_str;
29
+}
30
+
31
+$flat_networks  = ['physnet-ironic']
32
+neutron_plugin_ml2 {
33
+  'ml2_type_flat/flat_networks': value => join($flat_networks, ',');
34
+}
35
+
36
+service { 'p_neutron-plugin-openvswitch-agent':
37
+  ensure => 'running',
38
+  enable => true,
39
+  provider => 'pacemaker',
40
+}
41
+service { 'p_neutron-dhcp-agent':
42
+  ensure => 'running',
43
+  enable => true,
44
+  provider => 'pacemaker',
45
+}
46
+
47
+Neutron_plugin_ml2<||> ~> Service['p_neutron-plugin-openvswitch-agent'] ~> Service['p_neutron-dhcp-agent']
48
+Neutron_agent_ovs<||> ~> Service['p_neutron-plugin-openvswitch-agent'] ~> Service['p_neutron-dhcp-agent']
49
+

deployment_scripts/puppet/manifests/network.pp → deployment_scripts/puppet/manifests/vips.pp View File

@@ -1,4 +1,4 @@
1
-notice('MODULAR: ironic/network.pp')
1
+notice('MODULAR: ironic/vips.pp')
2 2
 
3 3
 $network_scheme    = hiera('network_scheme', {})
4 4
 prepare_network_config($network_scheme)

+ 51
- 11
deployment_tasks.yaml View File

@@ -14,29 +14,69 @@
14 14
   groups: ['primary-controller', 'controller']
15 15
   type: puppet
16 16
   required_for: [ironic-api]
17
-  requires: [openstack-haproxy, ironic-network]
17
+  requires: [openstack-haproxy, ironic-vips]
18 18
   parameters:
19 19
     puppet_manifest: puppet/manifests/haproxy.pp
20 20
     puppet_modules: puppet/modules:/etc/puppet/modules
21 21
     timeout: 3600
22 22
 
23
+- id: ironicopenstack-network-compute
24
+  type: puppet
25
+  groups: ['ironic']
26
+  required_for: [ironic-physnets-conductor]
27
+  requires: [ironic-compute]
28
+  parameters:
29
+    puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/openstack-network/openstack-network-compute.pp
30
+    puppet_modules: /etc/puppet/modules
31
+    timeout: 3600
32
+
23 33
 - id: ironic-network-ovs
24
-  groups: ['primary-controller', 'controller']
34
+  groups: ['primary-controller', 'controller', 'ironic']
25 35
   type: puppet
26
-  required_for: [virtual_ips]
36
+  required_for: [virtual_ips, ironic-vips, ironic-openstack-network-compute]
27 37
   requires: [netconfig]
28 38
   parameters:
29 39
     puppet_manifest: puppet/manifests/network-ovs.pp
30 40
     puppet_modules: puppet/modules:/etc/puppet/modules
31 41
     timeout: 3600
32 42
 
33
-- id: ironic-network
43
+- id: ironic-physnets
44
+  groups: ['primary-controller', 'controller']
45
+  type: puppet
46
+  required_for: [ironic-network-openstack]
47
+  requires: [ironic-network-ovs, openstack-network]
48
+  parameters:
49
+    puppet_manifest: puppet/manifests/network-physnets.pp
50
+    puppet_modules: puppet/modules:/etc/puppet/modules
51
+    timeout: 3600
52
+
53
+- id: ironic-openstack-network-compute
54
+  groups: ['ironic']
55
+  type: puppet
56
+  required_for: [ironic-physnets-conductor]
57
+  requires: [ironic-compute]
58
+  parameters:
59
+    puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/openstack-network/openstack-network-compute.pp
60
+    puppet_modules: /etc/puppet/modules
61
+    timeout: 3600
62
+
63
+- id: ironic-physnets-conductor
64
+  groups: ['ironic']
65
+  type: puppet
66
+  required_for: [deploy_end]
67
+  requires: [ironic-openstack-network-compute]
68
+  parameters:
69
+    puppet_manifest: puppet/manifests/network-physnets-conductor.pp
70
+    puppet_modules: puppet/modules:/etc/puppet/modules
71
+    timeout: 3600
72
+
73
+- id: ironic-vips
34 74
   groups: ['primary-controller', 'controller']
35 75
   type: puppet
36 76
   required_for: [ironic-haproxy]
37 77
   requires: [openstack-controller, ironic-network-ovs]
38 78
   parameters:
39
-    puppet_manifest: puppet/manifests/network.pp
79
+    puppet_manifest: puppet/manifests/vips.pp
40 80
     puppet_modules: puppet/modules:/etc/puppet/modules
41 81
     timeout: 3600
42 82
 
@@ -96,13 +136,13 @@
96 136
   groups: ['primary-controller', 'controller']
97 137
   type: puppet
98 138
   required_for: [deploy_end, controller_remaining_tasks]
99
-  requires: [openstack-controller, ironic-db, ironic-network, ironic-haproxy]
139
+  requires: [openstack-controller, ironic-db, ironic-vips, ironic-haproxy]
100 140
   parameters:
101 141
     puppet_manifest: puppet/manifests/ironic.pp
102 142
     puppet_modules: puppet/modules:/etc/puppet/modules
103 143
     timeout: 3600
104 144
 
105
-- id: ironic-network-conductor
145
+- id: ironic-conductor-network
106 146
   groups: ['ironic']
107 147
   type: puppet
108 148
   required_for: [ironic-conductor]
@@ -115,8 +155,8 @@
115 155
 - id: ironic-conductor
116 156
   groups: ['ironic']
117 157
   type: puppet
118
-  required_for: [deploy_end, ironic-compute]
119
-  requires: [hosts, firewall, ironic-network-conductor]
158
+  required_for: [ironic-compute]
159
+  requires: [ironic-conductor-network]
120 160
   parameters:
121 161
     puppet_manifest: puppet/manifests/ironic-conductor.pp
122 162
     puppet_modules: puppet/modules:/etc/puppet/modules
@@ -125,8 +165,8 @@
125 165
 - id: ironic-compute
126 166
   groups: ['ironic']
127 167
   type: puppet
128
-  required_for: [deploy_end]
129
-  requires: [hosts, firewall, ironic-conductor]
168
+  required_for: [ironic-openstack-network-compute]
169
+  requires: [ironic-conductor]
130 170
   parameters:
131 171
     puppet_manifest: puppet/manifests/ironic-compute.pp
132 172
     puppet_modules: puppet/modules:/etc/puppet/modules

+ 1
- 1
post_install.sh View File

@@ -21,5 +21,5 @@ export BOOTSTRAP_SSH_KEYS="${key_file}.pub"
21 21
 export AGENT_PACKAGE_PATH="${package_path}/repositories/ubuntu"
22 22
 
23 23
 mkdir -p "${DESTDIR}"
24
-#${deployment_scripts_path}/fuel-bootstrap-image-builder/bin/fuel-bootstrap-image
24
+${deployment_scripts_path}/fuel-bootstrap-image-builder/bin/fuel-bootstrap-image
25 25
 chmod 755 -R "${DESTDIR}"

Loading…
Cancel
Save