> For the complete documentation index, see [llms.txt](https://chameleoncloud.gitbook.io/chi-in-a-box/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chameleoncloud.gitbook.io/chi-in-a-box/example-deployments/arm-and-x86-mixed-architecture.md).

# ARM/x86 mixed architecture

It is possible to configure CHI-in-a-Box to support bare metal provisioning on both x86- and ARM-based bare metal hardware. There are a few steps, namely configuring support for iPXE, which when combined with UEFI boot can provide different EFI images to the pre-boot environment depending on the target host architecture.

The following assumes your Site Configuration is stored at `$site_config`.

### Configuration changes

**`$site_config/defaults.yml`**:

```yaml
# When set to 'yes', a new ipxe server container is deployed on the 
# Ironic conductor node(s).
enable_ironic_ipxe: yes
```

You must additionally provide a custom ironic.conf file that enables the iPXE plugin:

```
# Copy ironic config to avoid overwriting
cp path/to/chi-in-a-box/kolla/node_custom_config/ironic.conf \
    $CC_ANSIBLE_SITE/node_custom_config/ironic.conf
```

Then, make sure the file contains the following lines

```ini
[DEFAULT]
enabled_boot_interfaces = ipxe,pxe

[pxe]
ipxe_bootfile_name_by_arch = aarch64:aarch64/snponly.efi
```

### Apply changes

```shell
./cc-ansible --site $CC_ANSIBLE_SITE upgrade --tags ironic
```

### Post-config

1. Copy the iPXE binary from the [v2021-11.01 CHI-in-a-Box release](https://github.com/ChameleonCloud/chi-in-a-box/releases/tag/v2021-11.01). You must deploy the EFI images to **all** Ironic conductor nodes (usually there is only one.) The Ironic conductor must already be running for this to succeed because it uses a `docker cp`.

```shell
tar xf $ipxe_tarball aarch64/snponly.efi
docker exec -it ironic_conductor mkdir -p /tftpboot/aarch64/
docker cp aarch64/snponly.efi ironic_conductor:/tftpboot/aarch64/
```

1. Upload the IPA kernel and ramdisk images from the [v2021-11.01 CHI-in-a-Box release](https://github.com/ChameleonCloud/chi-in-a-box/releases/tag/v2021-11.01) to your site:

```shell
openstack image create --file ironic-python-agent-aarch64.initramfs ironic-python-agent-aarch64.initramfs
# Note the UUID of the image, it is used as $ramdisk_uuid later

openstack image create --file ironic-python-agent-aarch64.kernel ironic-python-agent-aarch64.kernel
# Note the UUID of the image, it is used as $kernel_uuid later
```

1. Configure your ARM nodes to deploy with the ARM64-compiled IPA image, and also set the architecture on the node, which will help iPXE understand it is an ARM node at boot time.

> ⚠️ Requires `python-doniclient>=0.4.0`

```shell
openstack hardware set --architecture aarch64 --deploy_kernel $kernel_uuid --deploy_ramdisk $ramdisk_uuid $node
```

### Verification

You should now be able to reserve and provision an ARM node in your environment in addition to any existing x86 nodes, which should remain operational.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://chameleoncloud.gitbook.io/chi-in-a-box/example-deployments/arm-and-x86-mixed-architecture.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
