1 =================================================================================================
2 OPNFV Build instruction for the AArch64 Brahmaputra 3.0 release of OPNFV when using Fuel as a deployment tool
3 =================================================================================================
8 This work is licensed under a Creative Commons Attribution 4.0
9 International License. .. http://creativecommons.org/licenses/by/4.0 ..
10 (c) Jonas Bjurel (Ericsson AB) and others
15 This document describes how to build the Fuel deployment tool for the
16 AArch64 Brahmaputra release of OPNFV build system, dependencies and
17 required system resources.
22 This document describes the build system used to build the Fuel
23 deployment tool for the AArch64 Brahmaputra release of OPNFV, required
24 dependencies and minimum requirements on the host to be used for the
27 The Fuel build system is designed around Docker containers such that
28 dependencies outside of the build system can be kept to a minimum. It
29 also shields the host from any potential dangerous operations
30 performed by the build system.
32 The audience of this document is assumed to have good knowledge in
33 network and Unix/Linux administration.
35 Due to early docker and nodejs support on AArch64, we will still use an
36 x86_64 Fuel Master to build and deploy an AArch64 target pool, as well
37 as an x86_64 build machine for building the OPNFV ISO.
42 Minimum Hardware Requirements
43 -----------------------------
45 - ~50 GB available disc
49 Minimum Software Requirements
50 -----------------------------
52 The build host should run Ubuntu 14.04 (x86_64) operating system.
54 On the host, the following packages must be installed:
56 - An x86_64 host (Bare-metal or VM) with Ubuntu 14.04 LTS installed
58 - **Note:** Builds on Wily (Ubuntu 15.x) are currently not supported
60 - A kernel equal- or later than 3.19 (Vivid), simply available through:
64 $ sudo apt-get install linux-generic-lts-vivid
66 - docker - see https://docs.docker.com/engine/installation/ubuntulinux/ for
67 installation notes for Ubuntu 14.04. Tested against version 1.9.x and greater
77 Apart from docker, all other package requirements listed above are
78 simply available through:
82 $ sudo apt-get install git make curl fuseiso
87 Setting up the Docker build container
88 -------------------------------------
89 After having installed Docker, add yourself to the docker group:
93 $ sudo usermod -a -G docker [userid]
95 Also make sure to define relevant DNS servers part of the global
96 DNS chain in your </etc/default/docker> configuration file.
97 Uncomment, and modify the values appropriately.
103 DOCKER_OPTS=" --dns=8.8.8.8 --dns=8.8.8.4"
109 $ sudo service docker restart
111 Setting up OPNFV Gerrit in order to being able to clone the code
112 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
113 - Start setting up OPNFV gerrit by creating a SSH key (unless you
114 don't already have one), create one with ssh-keygen
116 - Add your generated public key in OPNFV Gerrit (https://gerrit.opnfv.org/)
117 (this requires a Linux foundation account, create one if you do not
120 - Select "SSH Public Keys" to the left and then "Add Key" and paste
123 Clone the armband@OPNFV code Git repository with your SSH key
124 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
125 Now it is time to clone the code repository:
129 $ git clone ssh://<Linux foundation user>@gerrit.opnfv.org:29418/armband
131 Now you should have the OPNFV ARMBAND repository with its
132 directories stored locally on your build host.
134 Check out the Brahmaputra release:
139 $ git checkout brahmaputra.3.0
141 Clone the armband@OPNFV code Git repository without a SSH key
142 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
143 You can also opt to clone the code repository without a SSH key:
147 $ git clone https://gerrit.opnfv.org/gerrit/armband
149 Make sure to checkout the release tag as described above.
151 Support for building behind a http/https/rsync proxy
152 ----------------------------------------------------
154 The build system is able to make use of a web proxy setup if the
155 http_proxy, https_proxy, no_proxy (if needed) and RSYNC_PROXY or
156 RSYNC_CONNECT_PROG environment variables have been set before invoking make.
158 The proxy setup must permit port 80 (http), 443 (https) and 873 (rsync).
160 Important note about the host Docker daemon settings
161 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
163 The Docker daemon on the host must be configured to use the http proxy
164 for it to be able to pull the base Ubuntu 14.04 image from the Docker
165 registry before invoking make! In Ubuntu this is done by adding a line
170 export http_proxy="http://10.0.0.1:8888/"
172 to </etc/default/docker> and restarting the Docker daemon.
174 Setting proxy environment variables prior to build
175 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
177 The build system will make use the following environment variables
178 that needs to be exported to subshells by using export (bash) or
183 http_proxy (or HTTP_PROXY)
184 https_proxy (or HTTP_PROXY)
185 no_proxy (or NO_PROXY)
189 As an example, these are the settings that were put in the user's
190 .bashrc when verifying the proxy build functionality:
194 export RSYNC_PROXY=10.0.0.1:8888
195 export http_proxy=http://10.0.0.1:8888
196 export https_proxy=http://10.0.0.1:8888
197 export no_proxy=localhost,127.0.0.1,.consultron.com,.sock
199 Using a ssh proxy for the rsync connection
200 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
202 If the proxy setup is not allowing the rsync protocol, an alternative
203 solution is to use a SSH tunnel to a machine capable of accessing the
204 outbound port 873. Set the RSYNC_CONNECT_PROG according to the rsync
205 manual page (for example to "ssh <username>@<hostname> nc %H 873")
206 to enable this. Also note that netcat needs to be installed on the
209 Make sure that the ssh command also refers to the user on the remote
210 system, as the command itself will be run from the Docker build container
211 as the root user (but with the invoking user's SSH keys).
213 Disabling the Ubuntu repo cache if rsync is not allowed
214 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
216 During the build phase, a local Ubuntu package repository is fetched
217 from upstream in order to be added to the OPNFV Fuel ISO and for parts
218 of this process rsync is used.
220 If neither of the two available methods for proxying rsync are
221 available, the last resort is to turn off the caching of the Ubuntu
222 packages in the build system. This is done by removing the
223 "f_repobuild" from SUBDIRS in the beginning of the
224 <armband/upstream/fuel/build/f_isoroot/Makefile>.
226 Note! Doing this will require the Fuel master node to have Internet
227 access when installing the ISO artifact built as no Ubuntu package
228 cache will be on the ISO!
230 Note! Armband build system uses git submodules to track fuel and
231 other upstream repos, so in order to apply the above change, one
232 should first initialize the submodules and apply armband patches
237 $ make submodules-init
238 $ make patches-import
240 Configure your build environment
241 --------------------------------
243 ** Configuring the build environment should not be performed if building
244 standard Brahmaputra release **
246 Select the versions of the components you want to build by editing the
247 <armband/upstream/fuel/build/config.mk> file.
249 Note! The same observation as above, before altering Makefile, run:
253 $ make submodules-init patches-import
255 Non official build: Selecting which plugins to build
256 ----------------------------------------------------
257 In order to cut the build time for unofficial builds (made by an
258 individual developer locally), the selection if which Fuel plugins to
259 build (if any) can be done by environment variable
260 "BUILD_FUEL_PLUGINS" prior to building.
262 Only the plugin targets from
263 <armband/upstream/fuel/build/f_isoroot/Makefile> that are
264 specified in the environment variable will then be built. In order to
265 completely disable the building of plugins, the environment variable
266 is set to " ". When using this functionality, the resulting iso file
267 will be prepended with the prefix "unofficial-" to clearly indicate
268 that this is not a full build.
270 This method of plugin selection is not meant to be used from within
273 Note! So far, only ODL plugin was ported to AArch64.
278 There is only one preffered method available for building Fuel for AArch64:
280 - A low level method using Make
282 Low level build method using make
283 ---------------------------------
284 The low level method is based on Make:
286 From the <armband> directory, invoke <make [target]>
288 Following targets exist:
290 - release - this will do the same as:
292 - make submodules-clean clean-docker clean-build
294 - make submodules-init patches-import build
296 - none/all/build - this will:
298 - Initialize the docker build environment
300 - Build Fuel from upstream (as defined by fuel-build/config-spec)
302 - Build the OPNFV defined plugins/features from upstream
304 - Build the defined additions to fuel (as defined by the structure
307 - Apply changes and patches to fuel (as defined by the structure of
310 - Reconstruct a fuel .iso image
312 - submodules-init - Initialize git submodules (fuel@OPNFV, fuel-library etc.)
314 - submodules-clean - cleanup git submodules (fuel@OPNFV, fuel-library etc.)
316 - patches-import - this will apply armband@OPNFV patches to git submodules
318 - patches-export - this will export git submodules changes as armband patches
320 - clean-build - this will remove all artifacts from earlier builds.
322 - clean-docker - this will remove all docker caches from earlier builds.
324 If the build is successful, you will find the generated ISO file in
325 the <armband/upstream/fuel/build/release> subdirectory!
330 The artifacts produced are:
332 - <OPNFV_XXXX.iso> - Which represents the bootable (x86_64) Fuel for AArch64
333 image, XXXX is replaced with the build identity provided to the build system
335 - <OPNFV_XXXX.iso.txt> - Which holds version metadata.
340 1) `OPNFV Installation instruction for the AArch64 Brahmaputra 3.0 release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/armband/brahmaputra/docs/installation-instruction.html>`_
342 2) `OPNFV Build instruction for the AArch64 Brahmaputra 3.0 release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/armband/brahmaputra/docs/build-instruction.html>`_
344 3) `OPNFV Release Note for the AArch64 Brahmaputra 3.0 release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/armband/brahmaputra/docs/release-notes.html>`_