Add aarch64 documentation
[apex.git] / docs / contributor / APEX-on-aarch64.rst
1 ==================================================================================
2 APEX on AARCH64
3 ==================================================================================
4
5 This document describes the changes needed to deploy OPNFV-APEX on aarch64
6  * General considerations
7  * Creating undercloud and overcloud images using DIB
8  * Creating Kolla containers
9
10 General considerations
11 --------------------------
12
13 OPNFV - APEX relies on artifacts created by the OOO project.
14
15 Those artifacts are:
16
17 1. Openstack packages, found in delorean_.
18
19    .. _delorean: http://www.python.org/
20
21 2. UC and OC images created by RDO and found in images_.
22
23   .. _images: https://images.rdoproject.org/master/rdo_trunk/current-tripleo-rdo-internal/
24
25 3. The containerized version of the openstack services found in docker.io_.
26
27    .. _docker.io: https://hub.docker.com/r/tripleomaster/
28
29 All the above artifacts are x86_64 only and as a result cannot be used by APEX on aarch64
30 As a result the user needs to create the Images locally before attempting to deploy.
31 The only supported scenario is 'os-nosdn-rocky-ha'.
32
33 Other than the aarch64 disk images and containers, there is no other special configuration
34 required for aarch64. The only requirement is for the nodes to be identified as aarch64 nodes
35 in the inventory files.
36
37 For example :
38
39 .. code-block:: yaml
40
41      node1:
42        mac_address: "68:05:CA:68:08:CA"
43        ipmi_ip: 10.10.10.10
44        ipmi_user: user
45        ipmi_pass: pass
46        pm_type: "pxe_ipmitool"
47        cpus: 1
48        memory: 128000
49        disk: 480
50        disk_device: sda
51        arch: "aarch64"
52        capabilities: "profile:control"
53
54
55 Creating undercloud and overcloud images using DIB
56 --------------------------------------------------
57 In order to create that image DIB_ must be used. DIB can either be built from source or use yum to be installed.
58
59 .. _DIB: https://github.com/openstack/diskimage-builder
60
61 It is important to use a fairly late version of DIB to support UEFI systems. The version currently on epel does NOT have support for UEFI. The version on delorean (15.01) works just fine. DIB uses a YAML file from the user which describes how the
62 image should look like. The original yaml from RDO is here_:
63
64
65 .. _here: https://github.com/openstack/tripleo-common/blob/master/image-yaml/overcloud-images.yaml
66
67 The equivelant yaml files for aarch64  are included in the apex repo in the "apex/contrib/aarch64" folder.
68 The UC and OC images are very similar in terms of packages. The major difference is the partition table in EFI so for the undercloud, that has to provided as an environmental variable.
69
70 .. code-block:: python
71
72     export DIB_BLOCK_DEVICE_CONFIG="
73
74     - local_loop:
75       name: image0
76
77     - partitioning:
78       base: image0
79       label: gpt
80       partitions:
81       - name: ESP
82         type: 'EF00'
83         size: 64MiB
84         mkfs:
85           type: vfat
86           mount:
87             mount_point: /boot/efi
88             fstab:
89               options: "defaults"
90               fsck-passno: 1
91     - name: root
92       type: '8300'
93       size: 50GiB
94       mkfs:
95         type: ext4
96         mount:
97           mount_point: /
98           fstab:
99             options: "defaults"
100             fsck-passno: 1
101     "
102
103     export DIB_YUM_REPO_CONF+="/etc/yum.repos.d/delorean-deps-rocky.repo /etc/yum.repos.d/delorean-rocky.repo /etc/yum.repos.d
104                                /epel.repo "
105     openstack --debug overcloud image build --config-file undercloud_full.yaml --output-directory ./
106
107
108 The overcloud is built in a similar way.
109
110 .. code-block:: python
111
112     export DIB_YUM_REPO_CONF+="/etc/yum.repos.d/delorean-deps-rocky.repo /etc/yum.repos.d/delorean-rocky.repo /etc/yum.repos.d
113                                /epel.repo "
114     openstack --debug overcloud image build --config-file overcloud_full_rootfs.yaml --output-directory ./
115
116
117
118 Apex container deployment
119 -------------------------
120 Similarly the containers provided by OOO are for x86 only. Containers for apex on aarch64 for the Rocky release can
121 be found in armbandapex_.
122
123 .. _armbandapex: https://registry.hub.docker.com/v2/repositories/armbandapex/
124
125 A user who wishes to rebuild the containers can easily do so by sing Kolla. An example kolla.conf and the command to build the containers is given bellow.
126
127
128 .. code-block:: python
129
130     [DEFAULT]
131
132     base=centos
133     type=binary
134     namespace="private docker.io repository"
135     tag=current-tripleo-rdo
136     rpm_setup_config=ceph.repo,epel.repo,delorean-deps.repo,delorean.repo
137     push=True
138
139
140
141 .. code-block:: python
142
143     openstack overcloud container image build --config-file /usr/share/tripleo-common/container-images/overcloud_containers.yaml
144     --kolla-config-file /etc/kolla/kolla-build.conf
145
146