From fb09a7ed97707b6a007721ff4b72a904c4204e93 Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Tue, 9 May 2017 11:11:53 +0800 Subject: refacort deploy.yml and add jsonschema to validate it 1. add adapter type in deploy.yml Do not rely on the pod's name to detemine whether impi or libvirt should be used. 2. increase disk size in deploy.yml The disk sizes should be bigger than 102400 mega-bytes according to the minimum of root_lv_size in upstream openstack/daisycloud-core. 3. add schemas.py Use jsonschema to validate deploy.yml Change-Id: I3f197f93403caece75460147c8df49b95e0ae9d3 Signed-off-by: Alex Yang --- deploy/environment.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'deploy/environment.py') diff --git a/deploy/environment.py b/deploy/environment.py index 088e5008..21a0970a 100644 --- a/deploy/environment.py +++ b/deploy/environment.py @@ -11,6 +11,9 @@ import os import shutil import time +from config.schemas import ( + MIN_NODE_DISK_SIZE, +) from daisy_server import ( DaisyServer ) @@ -183,8 +186,9 @@ class VirtualEnvironment(DaisyEnvironmentBase): def create_virtual_node(self, node): name = node['name'] roles = node['roles'] - controller_size = self.deploy_struct.get('disks', {'controller': 200}).get('controller') - compute_size = self.deploy_struct.get('disks', {'compute': 200}).get('compute') + disks = self.deploy_struct.get('disks', {}) + controller_size = disks.get('controller', MIN_NODE_DISK_SIZE) + compute_size = disks.get('compute', MIN_NODE_DISK_SIZE) LI('Begin to create virtual node %s, roles %s' % (name, roles)) if 'CONTROLLER_LB' in roles: @@ -201,9 +205,6 @@ class VirtualEnvironment(DaisyEnvironmentBase): if 'template' in node: template = node['template'] disk_file = path_join(self.storage_dir, name + '.qcow2') - # TODO: modify the sizes in deploy.yml to more than 100G - if size < 200: - size = 200 create_virtual_disk(disk_file, size) create_vm(template, name, disk_file) -- cgit 1.2.3-korg