Browse Source

Add OPSVM / CloudApex support for MOS7

- a new UI input has been added to specify OPSVM IP
  before deployment
- plumgrid and sal puppet modules have been modified to
  process the provided OPSVM IP

Change-Id: I9d01b71ab7c8e7fd0c14b36a35c72b88d31d7292
Signed-off-by: Javeria Khan <javeriak@plumgrid.com>
Javeria Khan 3 years ago
parent
commit
bb5fb3c7d3

+ 2
- 0
deployment_scripts/puppet/manifests/director.pp View File

@@ -37,6 +37,7 @@ $controller_address_map = get_node_to_ipaddr_map_by_network_role($controller_nod
37 37
 $controller_ipaddresses = join(hiera_array('controller_ipaddresses', values($controller_address_map)), ',')
38 38
 $mgmt_net               = hiera('management_network_range')
39 39
 $fabric_dev             = hiera('fabric_dev')
40
+$md_ip                  = pick($plumgrid_hash['plumgrid_opsvm'])
40 41
 
41 42
 # Neutron settings
42 43
 $neutron_config         = hiera_hash('quantum_settings', {})
@@ -66,6 +67,7 @@ class { 'plumgrid':
66 67
   mgmt_dev     => 'br-mgmt',
67 68
   fabric_dev   => $fabric_dev,
68 69
   lvm_keypath   => "/var/lib/plumgrid/zones/$plumgrid_zone/id_rsa.pub",
70
+  md_ip         => $md_ip,
69 71
 }
70 72
 
71 73
 class { 'sal':

+ 4
- 2
deployment_scripts/puppet/manifests/edge.pp View File

@@ -32,12 +32,14 @@ $controller_ipaddresses = join(hiera_array('controller_ipaddresses', values($con
32 32
 $mgmt_net               = hiera('management_network_range')
33 33
 $fabric_dev             = hiera('fabric_dev')
34 34
 $plumgrid_zone          = pick($plumgrid_hash['plumgrid_zone'])
35
+$md_ip                  = pick($plumgrid_hash['plumgrid_opsvm'])
35 36
 
36 37
 class { 'plumgrid':
37 38
   plumgrid_ip => $controller_ipaddresses,
38
-  mgmt_dev => 'br-mgmt',
39
-  fabric_dev => $fabric_dev,
39
+  mgmt_dev    => 'br-mgmt',
40
+  fabric_dev  => $fabric_dev,
40 41
   lvm_keypath => "/var/lib/plumgrid/zones/$plumgrid_zone/id_rsa.pub",
42
+  md_ip       => $md_ip,
41 43
 }
42 44
 
43 45
 class { plumgrid::firewall:

+ 2
- 0
deployment_scripts/puppet/manifests/gateway.pp View File

@@ -27,6 +27,7 @@ $controller_ipaddresses = join(hiera_array('controller_ipaddresses', values($con
27 27
 $mgmt_net               = hiera('management_network_range')
28 28
 $fabric_dev             = hiera('fabric_dev')
29 29
 $plumgrid_zone          = pick($plumgrid_hash['plumgrid_zone'])
30
+$md_ip                  = pick($plumgrid_hash['plumgrid_opsvm'])
30 31
 
31 32
 class { 'plumgrid':
32 33
   plumgrid_ip  => $controller_ipaddresses,
@@ -34,6 +35,7 @@ class { 'plumgrid':
34 35
   fabric_dev   => $fabric_dev,
35 36
   gateway_devs => split($plumgrid_gw_devs, ','),
36 37
   lvm_keypath  => "/var/lib/plumgrid/zones/$plumgrid_zone/id_rsa.pub",
38
+  md_ip        => $md_ip,
37 39
 }
38 40
 
39 41
 class { plumgrid::firewall:

+ 8
- 0
deployment_scripts/puppet/modules/plumgrid/manifests/init.pp View File

@@ -27,6 +27,7 @@ class plumgrid (
27 27
   $lvm_keypath = '',
28 28
   $mcollective = false,
29 29
   $manage_repo = $plumgrid::params::manage_repo,
30
+  $md_ip = '127.0.0.1',
30 31
   $repo_baseurl = '',
31 32
   $repo_component = '',
32 33
   $physical_location = '',
@@ -57,6 +58,13 @@ class plumgrid (
57 58
       before => Service['plumgrid'],
58 59
     }
59 60
   }
61
+  if $md_ip != '127.0.0.1'  {
62
+    file { "${lxc_data_path}/conf/etc/00-pg.conf":
63
+      content => template('plumgrid/00-pg.conf.erb'),
64
+      require => Package[$pg_package],
65
+      notify => Service['plumgrid'],
66
+    }
67
+  }
60 68
   file { "${lxc_data_path}/conf/etc/hostname":
61 69
     content => $hostname,
62 70
     require => Package[$pg_package],

+ 2
- 0
deployment_scripts/puppet/modules/plumgrid/templates/00-pg.conf.erb View File

@@ -0,0 +1,2 @@
1
+$template ls_json,"{%timestamp:::date-rfc3339,jsonf:@timestamp%,%source:::jsonf:@source_host%,%msg:::json%}"
2
+:syslogtag,isequal,"pg:" @<%= @md_ip %>:6000;ls_json

+ 2
- 0
deployment_scripts/puppet/modules/sal/manifests/init.pp View File

@@ -17,6 +17,7 @@ class sal ($plumgrid_ip = '',
17 17
            $virtual_ip = '',
18 18
            $rest_port = '9180',
19 19
            $mgmt_dev = '%AUTO_DEV%',
20
+           $md_ip = '127.0.0.1',
20 21
            ) {
21 22
   $lxc_root_path = '/var/lib/libvirt/filesystems/plumgrid'
22 23
   $lxc_data_path = '/var/lib/libvirt/filesystems/plumgrid-data'
@@ -31,6 +32,7 @@ class sal ($plumgrid_ip = '',
31 32
 
32 33
   class { 'sal::nginx':
33 34
     plumgrid_ip => $plumgrid_ip,
35
+    md_ip => $md_ip,
34 36
     virtual_ip => $virtual_ip,
35 37
   }
36 38
   class { 'sal::keepalived':

+ 1
- 0
deployment_scripts/puppet/modules/sal/manifests/nginx.pp View File

@@ -14,6 +14,7 @@
14 14
 # limitations under the License.
15 15
 
16 16
 class sal::nginx ($plumgrid_ip = '',
17
+                  $md_ip = '127.0.0.1',
17 18
                   $virtual_ip = '',
18 19
                   $use_default_cert = true,
19 20
                   ) {

+ 1
- 1
deployment_scripts/puppet/modules/sal/templates/default.conf.erb View File

@@ -13,7 +13,7 @@ upstream pgCli {
13 13
 }
14 14
 
15 15
 upstream pgMW {
16
-  server 127.0.0.1:4000;
16
+  server <%= @md_ip %>:4000;
17 17
 }
18 18
 
19 19
 map $http_upgrade $connection_upgrade {

+ 10
- 1
environment_config.yaml View File

@@ -69,7 +69,16 @@ attributes:
69 69
   plumgrid_fabric_network:
70 70
     value: ''
71 71
     label: 'Enter the PLUMgrid Fabric Network'
72
-    description: 'Enter the network that will be used by PLUMgrid Fabric (no need to enter subnet)'
72
+    description: 'Enter the network that will be used by PLUMgrid Fabric (no need to enter subnet mask)'
73
+    weight: 32
74
+    type: "text"
75
+    regex:
76
+      source: '^((?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3})|(?:^)$'
77
+      error: "Invalid IP address"
78
+  plumgrid_opsvm:
79
+    value: '127.0.0.0'
80
+    label: 'Enter the OPSVM IP'
81
+    description: 'Enter the IP for the OPSVM'
73 82
     weight: 32
74 83
     type: "text"
75 84
     regex:

+ 1
- 1
metadata.yaml View File

@@ -3,7 +3,7 @@ name: plumgrid
3 3
 # Human-readable name for your plugin
4 4
 title: PLUMgrid plugin
5 5
 # Plugin version
6
-version: '1.0.1'
6
+version: '1.1.0'
7 7
 # Description
8 8
 description: This plugin enables the usage of PLUMgrid ONS as the network backend.
9 9
 # Required fuel version

Loading…
Cancel
Save