summaryrefslogtreecommitdiffstats
path: root/apex/inventory
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2018-08-08 17:43:55 -0400
committerTim Rozet <trozet@redhat.com>2018-08-10 20:40:16 -0400
commitc5959cc14b95e9d10b78ebf3c8e2525c672fc0c7 (patch)
tree1ab5b0be3e893ac3f77f951abe0c8d7bdf07e6d6 /apex/inventory
parent7bbbc905908be356fd1cf2f869b43d7e4d87c12b (diff)
Allow all in one deployments
This patch adds the ability to deploy all in one single nodes (Control + Compute). To enable this functionality do the following for each deployment type: - Baremetal: do not tag any nodes as compute in the inventory file - Virtual: use argument '--virtual-computes 0' JIRA: APEX-548 Change-Id: I22525c9eb21d331129c819449316c26a6fcf522d Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'apex/inventory')
-rw-r--r--apex/inventory/inventory.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/apex/inventory/inventory.py b/apex/inventory/inventory.py
index b5ffd2f8..0546fe9f 100644
--- a/apex/inventory/inventory.py
+++ b/apex/inventory/inventory.py
@@ -67,9 +67,12 @@ class Inventory(dict):
if ha and len(self['nodes']) < 5:
raise ApexInventoryException('You must provide at least 5 '
'nodes for HA deployment')
- elif len(self['nodes']) < 2:
- raise ApexInventoryException('You must provide at least 2 nodes '
+ elif len(self['nodes']) < 1:
+ raise ApexInventoryException('You must provide at least 1 node '
'for non-HA deployment')
+ elif list(self.get_node_counts())[0] < 1:
+ raise ApexInventoryException('You must provide at least 1 '
+ 'control node for deployment')
if virtual:
self['host-ip'] = '192.168.122.1'