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 - A kernel equal- or later than 3.19 (Vivid) (simply available through sudo apt-get install linux-generic-lts-vivid)
60 - **Note:** Builds on Wily (Ubuntu 15.x) are currently not supported
62 - docker - see https://docs.docker.com/engine/installation/ubuntulinux/ for installation notes for Ubuntu 14.04. Tested against version 1.9.x and greater
64 - git (simply available through $ sudo apt-get install git)
66 - make (simply available through $ sudo apt-get install make)
68 - curl (simply available through $ sudo apt-get install curl)
70 - fuseiso (simply available through $ sudo apt-get install fuseiso)
75 Setting up the Docker build container
76 -------------------------------------
77 After having installed Docker, add yourself to the docker group:
79 $ sudo usermod -a -G docker [userid]
81 Also make sure to define relevant DNS servers part of the global
82 DNS chain in your </etc/default/docker> configuration file.
83 Uncomment, and modify the values appropriately.
87 <DOCKER_OPTS=" --dns=8.8.8.8 --dns=8.8.8.4">
91 .. code-block:: console
93 $ sudo service docker restart
95 Setting up OPNFV Gerrit in order to being able to clone the code
96 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97 - Start setting up OPNFV gerrit by creating a SSH key (unless you
98 don't already have one), create one with ssh-keygen
100 - Add your generated public key in OPNFV Gerrit <https://gerrit.opnfv.org/>
101 (this requires a Linux foundation account, create one if you do not
104 - Select "SSH Public Keys" to the left and then "Add Key" and paste
107 Clone the armband@OPNFV code Git repository with your SSH key
108 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
109 Now it is time to clone the code repository:
111 $ git clone ssh://<Linux foundation user>@gerrit.opnfv.org:29418/armband
113 Now you should have the OPNFV ARMBAND repository with its
114 directories stored locally on your build host.
116 Check out the Brahmaputra release:
118 $ git checkout brahmaputra.3.0
120 Clone the armband@OPNFV code Git repository without a SSH key
121 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
122 You can also opt to clone the code repository without a SSH key:
124 $ git clone https://gerrit.opnfv.org:29418/gerrit/armband
126 Make sure to checkout the release tag as described above.
128 Support for building behind a http/https/rsync proxy
129 ----------------------------------------------------
131 The build system is able to make use of a web proxy setup if the
132 http_proxy, https_proxy, no_proxy (if needed) and RSYNC_PROXY or
133 RSYNC_CONNECT_PROG environment variables have been set before invoking make.
135 The proxy setup must permit port 80 (http), 443 (https) and 873
138 Important note about the host Docker daemon settings
139 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
141 The Docker daemon on the host must be configured to use the http proxy
142 for it to be able to pull the base Ubuntu 14.04 image from the Docker
143 registry before invoking make! In Ubuntu this is done by adding a line
146 export http_proxy="http://10.0.0.1:8888/"
148 to /etc/default/docker and restarting the Docker daemon.
150 Setting proxy environment variables prior to build
151 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
153 The build system will make use the following environment variables
154 that needs to be exported to subshells by using export (bash) or
157 | http_proxy (or HTTP_PROXY)
158 | https_proxy (or HTTP_PROXY)
159 | no_proxy (or NO_PROXY)
163 As an example, these are the settings that were put in the user's
164 .bashrc when verifying the proxy build functionality:
166 | export RSYNC_PROXY=10.0.0.1:8888
167 | export http_proxy=http://10.0.0.1:8888
168 | export https_proxy=http://10.0.0.1:8888
169 | export no_proxy=localhost,127.0.0.1,.consultron.com,.sock
171 Using a ssh proxy for the rsync connection
172 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
174 If the proxy setup is not allowing the rsync protocol, an alternative
175 solution is to use a SSH tunnel to a machine capable of accessing the
176 outbound port 873. Set the RSYNC_CONNECT_PROG according to the rsync
177 manual page (for example to "ssh <username>@<hostname> nc %H 873")
178 to enable this. Also note that netcat needs to be installed on the
181 Make sure that the ssh command also refers to the user on the remote
182 system, as the command itself will be run from the Docker build container
183 as the root user (but with the invoking user's SSH keys).
185 Disabling the Ubuntu repo cache if rsync is not allowed
186 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
188 During the build phase, a local Ubuntu package repository is fetched
189 from upstream in order to be added to the OPNFV Fuel ISO and for parts
190 of this process rsync is used.
192 If neither of the two available methods for proxying rsync are
193 available, the last resort is to turn off the caching of the Ubuntu
194 packages in the build system. This is done by removing the
195 "f_repobuild" from SUBDIRS in the beginning of
196 the armband/upstream/fuel/build/f_isoroot/Makefile.
198 Note! Doing this will require the Fuel master node to have Internet
199 access when installing the ISO artifact built as no Ubuntu package
200 cache will be on the ISO!
202 Note! Armband build system uses git submodules to track fuel and
203 other upstream repos, so in order to apply the above change, one
204 should first initialize the submodules and apply armband patches
206 $ make submodules-init
207 $ make patches-import
209 Configure your build environment
210 --------------------------------
212 ** Configuring the build environment should not be performed if building
213 standard Brahmaputra release **
215 Select the versions of the components you want to build by editing the
216 armband/upstream/fuel/build/config.mk file.
218 Note! The same observation as above, before altering Makefile, run:
219 $ make submodules-init patches-import
221 Non official build: Selecting which plugins to build
222 ----------------------------------------------------
223 In order to cut the build time for unofficial builds (made by an
224 individual developer locally), the selection if which Fuel plugins to
225 build (if any) can be done by environment variable
226 "BUILD_FUEL_PLUGINS" prior to building.
228 Only the plugin targets from
229 armband/upstream/fuel/build/f_isoroot/Makefile that are
230 specified in the environment variable will then be built. In order to
231 completely disable the building of plugins, the environment variable
232 is set to " ". When using this functionality, the resulting iso file
233 will be prepended with the prefix "unofficial-" to clearly indicate
234 that this is not a full build.
236 This method of plugin selection is not meant to be used from within
239 Note! So far, only ODL plugin was ported to AArch64.
244 There is only one preffered method available for building Fuel for AArch64:
246 - A low level method using Make
248 Low level build method using make
249 ---------------------------------
250 The low level method is based on Make:
252 From the <armband> directory, invoke <make [target]>
254 Following targets exist:
256 - release - this will do the same as:
258 - make submodules-clean clean-docker clean-build
260 - make submodules-init patches-import build
262 - none/all/build - this will:
264 - Initialize the docker build environment
266 - Build Fuel from upstream (as defined by fuel-build/config-spec)
268 - Build the OPNFV defined plugins/features from upstream
270 - Build the defined additions to fuel (as defined by the structure
273 - Apply changes and patches to fuel (as defined by the structure of
276 - Reconstruct a fuel .iso image
278 - submodules-init - Initialize git submodules (fuel@OPNFV, fuel-library etc.)
280 - submodules-clean - cleanup git submodules (fuel@OPNFV, fuel-library etc.)
282 - patches-import - this will apply armband@OPNFV patches to git submodules
284 - patches-export - this will export git submodules changes as armband patches
286 - clean-build - this will remove all artifacts from earlier builds.
288 - clean-docker - this will remove all docker caches from earlier builds.
290 If the build is successful, you will find the generated ISO file in
291 the <armband/upstream/fuel/build/release> subdirectory!
296 The artifacts produced are:
298 - <OPNFV_XXXX.iso> - Which represents the bootable Fuel for AArch64 image,
299 XXXX is replaced with the build identity provided to the build system
301 - <OPNFV_XXXX.iso.txt> - Which holds version metadata.
306 1) `OPNFV Installation instruction for the Brahmaputra 3.0 release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/fuel/brahmaputra/docs/installation-instruction.html>`_
308 2) `OPNFV Build instruction for the Brahmaputra 3.0 release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/fuel/brahmaputra/docs/build-instruction.html>`_
310 3) `OPNFV Release Note for the Brahmaputra 3.0 release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/fuel/brahmaputra/docs/release-notes.html>`_
312 4) `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>`_
314 5) `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>`_
316 6) `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>`_