Giuseppe Lavagetto has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/185153

Change subject: virt: use role, hiera
......................................................................

virt: use role, hiera

See T86774

Change-Id: I5c3fd4f87183a417cc5d87d4e703302a4fe154dd
Signed-off-by: Giuseppe Lavagetto <[email protected]>
---
A hieradata/hosts/virt1010.yaml
A hieradata/hosts/virt1011.yaml
A hieradata/hosts/virt1012.yaml
A hieradata/role/common/nova/compute.yaml
M manifests/site.pp
5 files changed, 10 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/53/185153/1

diff --git a/hieradata/hosts/virt1010.yaml b/hieradata/hosts/virt1010.yaml
new file mode 100644
index 0000000..0f97ce9
--- /dev/null
+++ b/hieradata/hosts/virt1010.yaml
@@ -0,0 +1 @@
+role::nova::compute::instance_dev: "/dev/sdb1"
diff --git a/hieradata/hosts/virt1011.yaml b/hieradata/hosts/virt1011.yaml
new file mode 100644
index 0000000..0f97ce9
--- /dev/null
+++ b/hieradata/hosts/virt1011.yaml
@@ -0,0 +1 @@
+role::nova::compute::instance_dev: "/dev/sdb1"
diff --git a/hieradata/hosts/virt1012.yaml b/hieradata/hosts/virt1012.yaml
new file mode 100644
index 0000000..d7cadae
--- /dev/null
+++ b/hieradata/hosts/virt1012.yaml
@@ -0,0 +1,2 @@
+role::nova::compute::instance_dev: "/dev/sdb1"
+cluster: virt
diff --git a/hieradata/role/common/nova/compute.yaml 
b/hieradata/role/common/nova/compute.yaml
new file mode 100644
index 0000000..4559a8a
--- /dev/null
+++ b/hieradata/role/common/nova/compute.yaml
@@ -0,0 +1 @@
+cluster: virt
diff --git a/manifests/site.pp b/manifests/site.pp
index a70c2a7..994814b 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2597,26 +2597,22 @@
 }
 
 node /virt100[1-9].eqiad.wmnet/ {
-    $cluster = 'virt'
     $use_neutron = false
-
+    role nova::compute
     include admin
     include standard
-    include role::nova::compute
     if $use_neutron == true {
         include role::neutron::computenode
     }
 }
 
 node /virt101[0-1].eqiad.wmnet/ {
-    $cluster = 'virt'
-    openstack::nova::partition{ '/dev/sdb': }
-
     $use_neutron = false
-
+    openstack::nova::partition{ '/dev/sdb': }
+    role nova::compute
     include admin
     include standard
-    class { 'role::nova::compute': instance_dev => '/dev/sdb1' }
+
     if $use_neutron == true {
         include role::neutron::computenode
     }
@@ -2626,21 +2622,10 @@
     # virt1012 is a nova node, similar to virt1010-1011.
     # Its nova-compute service is currently OFF to keep it in reserve
     # as a lifeboat should we need to evacuate a different virt host.
-    #
-    # To move this into active service, just remove the \# from
-    # the role::nova::compute line below, or consolidate in the
-    # /virt101[0-1].eqiad.wmnet/ section above.
-    $cluster = 'virt'
+
     openstack::nova::partition{ '/dev/sdb': }
-
-    $use_neutron = false
-
     include admin
     include standard
-    #class { 'role::nova::compute': instance_dev => '/dev/sdb1' }
-    if $use_neutron == true {
-        include role::neutron::computenode
-    }
 }
 
 node 'iodine.wikimedia.org' {

-- 
To view, visit https://gerrit.wikimedia.org/r/185153
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c3fd4f87183a417cc5d87d4e703302a4fe154dd
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to