summaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
Diffstat (limited to 'deploy')
-rw-r--r--deploy/config/schemas.py36
-rw-r--r--deploy/daisy.conf4
-rw-r--r--deploy/tempest.py10
3 files changed, 36 insertions, 14 deletions
diff --git a/deploy/config/schemas.py b/deploy/config/schemas.py
index d2fd7ef6..3096d017 100644
--- a/deploy/config/schemas.py
+++ b/deploy/config/schemas.py
@@ -8,6 +8,8 @@
##############################################################################
from jsonschema import Draft4Validator, FormatChecker
+import sys
+import yaml
MIN_DAISY_DISK_SIZE = 50
@@ -28,8 +30,19 @@ hosts_schema = {
'enum': ['COMPUTER', 'CONTROLLER_LB', 'CONTROLLER_HA']
}
},
- 'template': {'type': 'string', 'minLength': 1}
- }
+ 'template': {'type': 'string', 'minLength': 1},
+ 'ipmi_ip': {'type': 'string', 'format': 'ip-address'},
+ 'ipmi_user': {'type': 'string'},
+ 'ipmi_pass': {'type': 'string'},
+ 'mac_addresses': {
+ 'type': 'array',
+ 'items': {
+ 'type': 'string',
+ 'pattern': '^([0-9a-fA-F]{2})((:[0-9a-fA-F]{2}){5})$'
+ }
+ }
+ },
+ 'required': ['roles']
}
}
@@ -51,12 +64,13 @@ schema_mapping = {
'daisy_ip': {'type': 'string', 'format': 'ip-address'},
'daisy_gateway': {'type': 'string', 'format': 'ip-address'},
'ceph_disk_name': {'type': 'string'},
+ 'modules': {'type': ['array', 'null']}
}
deploy_schema = {
'type': 'object',
'properties': schema_mapping,
- 'required': ['hosts', 'daisy_passwd', 'daisy_ip', 'daisy_gateway']
+ 'required': ['hosts', 'daisy_passwd', 'daisy_gateway']
}
@@ -75,3 +89,19 @@ def item_validate(data, schema_type):
def deploy_schema_validate(data):
return _validate(data, deploy_schema)
+
+
+def _main():
+ if 2 != len(sys.argv):
+ sys.exit(1)
+ try:
+ data = yaml.safe_load(open(sys.argv[1], 'r'))
+ errors = deploy_schema_validate(data)
+ except Exception as e:
+ errors = 'Exception occured: ' + str(e)
+ if errors:
+ sys.exit(errors)
+
+
+if __name__ == '__main__':
+ _main()
diff --git a/deploy/daisy.conf b/deploy/daisy.conf
index d9659dbb..fe48925f 100644
--- a/deploy/daisy.conf
+++ b/deploy/daisy.conf
@@ -16,10 +16,10 @@ os_install_type=pxe
[PXE]
#Set to 'yes' if you want to build a PXE server, otherwise to 'no'.
-build_pxe=no
+build_pxe=yes
#the nic name, to build a PXE server on this nic.
-eth_name=
+eth_name=ens3
#The ip value of PXE server
ip_address=99.99.1.5
diff --git a/deploy/tempest.py b/deploy/tempest.py
index b154e72d..9117a187 100644
--- a/deploy/tempest.py
+++ b/deploy/tempest.py
@@ -19,7 +19,6 @@ import os
daisy_version = 1.0
daisyrc_path = "/root/daisyrc_admin"
iso_path = "/var/lib/daisy/kolla/"
-deployment_interface = "ens3"
cluster_name = "clustertest"
_CLI_OPTS = [
@@ -59,6 +58,7 @@ def get_endpoint(file_path):
daisy_endpoint = daisyrc_admin_line.split("=")[1]
return daisy_endpoint
+
daisy_endpoint = get_endpoint(daisyrc_path)
client = daisy_client.Client(version=daisy_version, endpoint=daisy_endpoint)
@@ -79,8 +79,6 @@ def prepare_install():
print("cluster_id=%s." % cluster_id)
print("update network...")
update_network(cluster_id, network_map)
- print("build pxe...")
- build_pxe_for_discover(cluster_id)
elif conf['host'] and conf['host'] == 'yes':
isbare = False if 'isbare' in conf and conf['isbare'] == 0 else True
print("discover host...")
@@ -127,12 +125,6 @@ def prepare_install():
print_bar("Everything is done!")
-def build_pxe_for_discover(cluster_id):
- cluster_meta = {'cluster_id': cluster_id,
- 'deployment_interface': deployment_interface}
- client.install.install(**cluster_meta)
-
-
def install_os_for_vm_step1(cluster_id):
cluster_meta = {'cluster_id': cluster_id,
'pxe_only': "true"}