diff options
-rw-r--r-- | apex/deploy.py | 3 | ||||
-rw-r--r-- | apex/undercloud/undercloud.py | 5 | ||||
-rw-r--r-- | apex/virtual/virtual_utils.py | 3 | ||||
-rw-r--r-- | lib/ansible/playbooks/configure_undercloud.yml | 2 |
4 files changed, 8 insertions, 5 deletions
diff --git a/apex/deploy.py b/apex/deploy.py index 6866945b..1cab0d6c 100644 --- a/apex/deploy.py +++ b/apex/deploy.py @@ -13,6 +13,7 @@ import argparse import json import logging import os +import platform import pprint import shutil import sys @@ -77,7 +78,6 @@ def build_vms(inventory, network_settings, name = 'baremetal{}'.format(idx) volume = name + ".qcow2" volume_path = os.path.join(constants.LIBVIRT_VOLUME_PATH, volume) - # TODO(trozet): add back aarch64 # TODO(trozet): add error checking vm_lib.create_vm( name, volume_path, @@ -357,6 +357,7 @@ def main(): deploy_vars = dict() deploy_vars['virtual'] = args.virtual deploy_vars['debug'] = args.debug + deploy_vars['aarch64'] = platform.machine() == 'aarch64' deploy_vars['dns_server_args'] = '' deploy_vars['apex_temp_dir'] = APEX_TEMP_DIR deploy_vars['stackrc'] = 'source /home/stack/stackrc' diff --git a/apex/undercloud/undercloud.py b/apex/undercloud/undercloud.py index da695f5b..513c4191 100644 --- a/apex/undercloud/undercloud.py +++ b/apex/undercloud/undercloud.py @@ -10,6 +10,7 @@ import libvirt import logging import os +import platform import shutil import subprocess import time @@ -215,7 +216,7 @@ class Undercloud: "enabled": ns_external['enabled'] } - # FIXME (trozet): for now hardcoding aarch64 to false - config['aarch64'] = False + # Check if this is an ARM deployment + config['aarch64'] = platform.machine() == 'aarch64' return config diff --git a/apex/virtual/virtual_utils.py b/apex/virtual/virtual_utils.py index 5ebb0582..4582dbc7 100644 --- a/apex/virtual/virtual_utils.py +++ b/apex/virtual/virtual_utils.py @@ -11,6 +11,7 @@ import copy import iptc import logging import os +import platform import pprint import subprocess @@ -26,7 +27,7 @@ DEFAULT_VIRT_IP = '192.168.122.1' def generate_inventory(target_file, ha_enabled=False, num_computes=1, - controller_ram=DEFAULT_RAM, arch='x86_64', + controller_ram=DEFAULT_RAM, arch=platform.machine(), compute_ram=DEFAULT_RAM, vcpus=4): """ Generates inventory file for virtual deployments diff --git a/lib/ansible/playbooks/configure_undercloud.yml b/lib/ansible/playbooks/configure_undercloud.yml index f19218c3..91a8f9a4 100644 --- a/lib/ansible/playbooks/configure_undercloud.yml +++ b/lib/ansible/playbooks/configure_undercloud.yml @@ -45,7 +45,7 @@ - lineinfile: path: /usr/lib/python2.7/site-packages/ironic/common/pxe_utils.py regexp: '_link_ip_address_pxe_configs' - line: '_link_mac_pxe_configs(task)' + line: ' _link_mac_pxe_configs(task)' when: aarch64 - block: - name: undercloud install |