From 8f75445a37099590f36ce6044109209c67ef0deb Mon Sep 17 00:00:00 2001 From: Charalampos Kominos Date: Mon, 1 Oct 2018 13:12:46 +0200 Subject: Bring in aarch64 support in apex RDO builds packages which are aarch64 compatible but some configuration is needed to succesfully deploy. This change: - Prepares the aarch64 docker.io repo as the source for Kolla Containers - Configures VM sizing for aarch64 undercloud. - Configures VM sizing for aarch64 virtual deploy targets. Vms need to be larger on aarch64 compared to x86 to avoid starvation of resources. (MYSQL) - Configures vda2 as the location of the Linux Kernel in aarch64 in an UEFI system - Configures the vNICs to be on the pci-bus instead of the virtio-mmio bus.This will enalbe the Nics to come up in the same order as the x86 ones, so the extra configuration in ansible is not needed - Configures apex to use a stable version of the ceph:daemon container - Configure apex for containerized undercloud in Rocky - Add extra ansible.cfg file for aarch64 which increases waiting times in ansible for aarch64 - Provide helper scripts for DIB to create aarch64 UEFI images Known limitations: - Selinux is interfering with DHCP requests in ironic and ssh so it must be disabled before the deploy command is ran. - The aarch64 containers are frozen for in this commit: https://trunk.rdoproject.org/centos7-rocky/f3/18/f3180de6439333a2813119ad4b00ef897fcd596f_70883030 - The 600s timeout defined in : https://bugs.launchpad.net/tripleo/+bug/1789680 is not enough for aarch64. A value of 1200s is recommended JIRA: APEX-619 Change-Id: Ia3f067821e12bba44939bbf8c0e4676f2da70239 Signed-off-by: Charalampos Kominos Signed-off-by: ting wu --- apex/deploy.py | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'apex/deploy.py') diff --git a/apex/deploy.py b/apex/deploy.py index b74d5292..670fb6bd 100644 --- a/apex/deploy.py +++ b/apex/deploy.py @@ -293,12 +293,24 @@ def main(): 'requires at least 12GB per controller.') logging.info('Increasing RAM per controller to 12GB') elif args.virt_default_ram < 10: - control_ram = 10 - logging.warning('RAM per controller is too low. nosdn ' - 'requires at least 10GB per controller.') - logging.info('Increasing RAM per controller to 10GB') + if platform.machine() == 'aarch64': + control_ram = 16 + logging.warning('RAM per controller is too low for ' + 'aarch64 ') + logging.info('Increasing RAM per controller to 16GB') + else: + control_ram = 10 + logging.warning('RAM per controller is too low. nosdn ' + 'requires at least 10GB per controller.') + logging.info('Increasing RAM per controller to 10GB') else: control_ram = args.virt_default_ram + if platform.machine() == 'aarch64' and args.virt_cpus < 16: + vcpus = 16 + logging.warning('aarch64 requires at least 16 vCPUS per ' + 'target VM. Increasing to 16.') + else: + vcpus = args.virt_cpus if ha_enabled and args.virt_compute_nodes < 2: logging.debug( 'HA enabled, bumping number of compute nodes to 2') @@ -307,7 +319,7 @@ def main(): num_computes=args.virt_compute_nodes, controller_ram=control_ram * 1024, compute_ram=compute_ram * 1024, - vcpus=args.virt_cpus + vcpus=vcpus ) inventory = Inventory(args.inventory_file, ha_enabled, args.virtual) logging.info("Inventory is:\n {}".format(pprint.pformat( @@ -435,6 +447,12 @@ def main(): docker_env = 'containers-prepare-parameter.yaml' shutil.copyfile(os.path.join(args.deploy_dir, docker_env), os.path.join(APEX_TEMP_DIR, docker_env)) + # Upload extra ansible.cfg + if platform.machine() == 'aarch64': + ansible_env = 'ansible.cfg' + shutil.copyfile(os.path.join(args.deploy_dir, ansible_env), + os.path.join(APEX_TEMP_DIR, ansible_env)) + c_builder.prepare_container_images( os.path.join(APEX_TEMP_DIR, docker_env), branch=branch.replace('stable/', ''), -- cgit 1.2.3-korg