summaryrefslogtreecommitdiffstats
path: root/apex/undercloud
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2017-10-20 15:30:20 -0400
committerTim Rozet <trozet@redhat.com>2018-02-07 21:56:16 +0000
commit63000d6dba8990bd01683a6e210cf7e57f3664f7 (patch)
treef0145a867f2b6cf7b09bc0521a4279a4e6c221f6 /apex/undercloud
parent50f1d92e0aa0e5720adc44f23ed59a4cfc1c4b58 (diff)
Allow disabling ipxe for provisioning
JIRA: APEX-535 Change-Id: I52d17e962fc4a504db1ddbc20df0ac56a208f34b Signed-off-by: Dan Radez <dradez@redhat.com>
Diffstat (limited to 'apex/undercloud')
-rw-r--r--apex/undercloud/undercloud.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/apex/undercloud/undercloud.py b/apex/undercloud/undercloud.py
index 452e4971..d28ed981 100644
--- a/apex/undercloud/undercloud.py
+++ b/apex/undercloud/undercloud.py
@@ -111,10 +111,12 @@ class Undercloud:
"Unable to find IP for undercloud. Check if VM booted "
"correctly")
- def configure(self, net_settings, playbook, apex_temp_dir):
+ def configure(self, net_settings, deploy_settings,
+ playbook, apex_temp_dir):
"""
Configures undercloud VM
- :param net_setings: Network settings for deployment
+ :param net_settings: Network settings for deployment
+ :param deploy_settings: Deployment settings for deployment
:param playbook: playbook to use to configure undercloud
:param apex_temp_dir: temporary apex directory to hold configs/logs
:return: None
@@ -122,7 +124,8 @@ class Undercloud:
logging.info("Configuring Undercloud...")
# run ansible
- ansible_vars = Undercloud.generate_config(net_settings)
+ ansible_vars = Undercloud.generate_config(net_settings,
+ deploy_settings)
ansible_vars['apex_temp_dir'] = apex_temp_dir
try:
utils.run_ansible(ansible_vars, playbook, host=self.ip,
@@ -180,21 +183,27 @@ class Undercloud:
virt_utils.virt_customize(virt_ops, self.volume)
@staticmethod
- def generate_config(ns):
+ def generate_config(ns, ds):
"""
Generates a dictionary of settings for configuring undercloud
:param ns: network settings to derive undercloud settings
+ :param ds: deploy settings to derive undercloud settings
:return: dictionary of settings
"""
ns_admin = ns['networks']['admin']
intro_range = ns['apex']['networks']['admin']['introspection_range']
config = dict()
+ # Check if this is an ARM deployment
+ config['aarch64'] = platform.machine() == 'aarch64'
+ # Configuration for undercloud.conf
config['undercloud_config'] = [
"enable_ui false",
"undercloud_update_packages false",
"undercloud_debug false",
"inspection_extras false",
+ "ipxe {}".format(str(ds['global_params'].get('ipxe', True) and
+ not config['aarch64'])),
"undercloud_hostname undercloud.{}".format(ns['dns-domain']),
"local_ip {}/{}".format(str(ns_admin['installer_vm']['ip']),
str(ns_admin['cidr']).split('/')[1]),
@@ -227,7 +236,4 @@ class Undercloud:
"enabled": ns_external['enabled']
}
- # Check if this is an ARM deployment
- config['aarch64'] = platform.machine() == 'aarch64'
-
return config