From c5959cc14b95e9d10b78ebf3c8e2525c672fc0c7 Mon Sep 17 00:00:00 2001 From: Tim Rozet Date: Wed, 8 Aug 2018 17:43:55 -0400 Subject: 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 --- apex/inventory/inventory.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'apex/inventory') 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' -- cgit 1.2.3-korg