1 .. This document is protected/licensed under the following conditions
2 .. (c) Jonas Bjurel (Ericsson AB)
3 .. Licensed under a Creative Commons Attribution 4.0 International License.
4 .. You should have received a copy of the license along with this work.
5 .. If not, see <http://creativecommons.org/licenses/by/4.0/>.
11 This document describes how to build the Fuel deployment tool for the
12 AArch64 Colorado release of OPNFV build system, dependencies and
13 required system resources.
19 This document describes the build system used to build the Fuel
20 deployment tool for the AArch64 Colorado release of OPNFV, required
21 dependencies and minimum requirements on the host to be used for the
24 The Fuel build system is designed around Docker containers such that
25 dependencies outside of the build system can be kept to a minimum. It
26 also shields the host from any potential dangerous operations
27 performed by the build system.
29 The audience of this document is assumed to have good knowledge in
30 network and Unix/Linux administration.
32 Due to early docker and nodejs support on AArch64, we will still use an
33 x86_64 Fuel Master to build and deploy an AArch64 target pool, as well
34 as an x86_64 build machine for building the OPNFV ISO.
40 Minimum Hardware Requirements
41 =============================
43 - ~50 GB available disc
47 Minimum Software Requirements
48 =============================
50 The build host should run Ubuntu 14.04 or 16.04 (x86_64) operating system.
52 On the host, the following packages must be installed:
54 - An x86_64 host (Bare-metal or VM) with Ubuntu 14.04 LTS installed
56 - **Note:** Builds on Wily (Ubuntu 15.x) are currently not supported
57 - A kernel equal- or later than 3.19 (Vivid), simply available through
61 $ sudo apt-get install linux-generic-lts-vivid
63 - docker - see https://docs.docker.com/installation/ubuntulinux/ for
64 installation notes for Ubuntu 14.04. Note: use the latest version from
65 Docker (docker-engine) and not the one in Ubuntu 14.04.
75 Apart from docker, all other package requirements listed above are
76 simply available through:
80 $ sudo apt-get install git make curl fuseiso
87 Setting up the Docker build container
88 =====================================
90 After having installed Docker, add yourself to the docker group:
94 $ sudo usermod -a -G docker [userid]
96 Also make sure to define relevant DNS servers part of the global
97 DNS chain in your </etc/default/docker> configuration file.
98 Uncomment, and modify the values appropriately.
104 DOCKER_OPTS=" --dns=8.8.8.8 --dns=8.8.8.4"
110 $ sudo service docker restart
112 Setting up OPNFV Gerrit in order to being able to clone the code
113 ----------------------------------------------------------------
115 - Start setting up OPNFV gerrit by creating a SSH key (unless you
116 don't already have one), create one with ssh-keygen
118 - Add your generated public key in OPNFV Gerrit (https://gerrit.opnfv.org/)
119 (this requires a Linux foundation account, create one if you do not
122 - Select "SSH Public Keys" to the left and then "Add Key" and paste
125 Clone the armband@OPNFV code Git repository with your SSH key
126 -------------------------------------------------------------
128 Now it is time to clone the code repository:
132 $ git clone ssh://<Linux foundation user>@gerrit.opnfv.org:29418/armband
134 Now you should have the OPNFV armband repository with its
135 directories stored locally on your build host.
137 Check out the Colorado release:
142 $ git checkout colorado.1.0
144 Clone the armband@OPNFV code Git repository without a SSH key
145 -------------------------------------------------------------
147 You can also opt to clone the code repository without a SSH key:
151 $ git clone https://gerrit.opnfv.org/gerrit/armband
153 Make sure to checkout the release tag as described above.
155 Support for building behind a http/https/rsync proxy
156 ====================================================
158 The build system is able to make use of a web proxy setup if the
159 http_proxy, https_proxy, no_proxy (if needed) and RSYNC_PROXY or
160 RSYNC_CONNECT_PROG environment variables have been set before invoking make.
162 The proxy setup must permit port 80 (http) and 443 (https).
163 Rsync protocol is currently not used during build process.
165 Important note about the host Docker daemon settings
166 ----------------------------------------------------
168 The Docker daemon on the host must be configured to use the http proxy
169 for it to be able to pull the base Ubuntu 14.04 image from the Docker
170 registry before invoking make! In Ubuntu this is done by adding a line
175 export http_proxy="http://10.0.0.1:8888/"
177 to </etc/default/docker> and restarting the Docker daemon.
179 Setting proxy environment variables prior to build
180 --------------------------------------------------
182 The build system will make use the following environment variables
183 that needs to be exported to subshells by using export (bash) or
188 http_proxy (or HTTP_PROXY)
189 https_proxy (or HTTP_PROXY)
190 no_proxy (or NO_PROXY)
194 As an example, these are the settings that were put in the user's
195 .bashrc when verifying the proxy build functionality:
199 export RSYNC_PROXY=10.0.0.1:8888
200 export http_proxy=http://10.0.0.1:8888
201 export https_proxy=http://10.0.0.1:8888
202 export no_proxy=localhost,127.0.0.1,.consultron.com,.sock
204 Using a ssh proxy for the rsync connection
205 ------------------------------------------
207 If the proxy setup is not allowing the rsync protocol, an alternative
208 solution is to use a SSH tunnel to a machine capable of accessing the
209 outbound port 873. Set the RSYNC_CONNECT_PROG according to the rsync
210 manual page (for example to "ssh <username>@<hostname> nc %H 873")
211 to enable this. Also note that netcat needs to be installed on the
214 Make sure that the ssh command also refers to the user on the remote
215 system, as the command itself will be run from the Docker build container
216 as the root user (but with the invoking user's SSH keys).
219 Note! Armband build system uses git submodules to track fuel and
220 other upstream repos, so in order to apply the above change, one
221 should first initialize the submodules and apply armband patches
226 $ make patches-import
229 Configure your build environment
230 ================================
232 ** Configuring the build environment should not be performed if building
233 standard Colorado release **
235 Select the versions of the components you want to build by editing the
236 <armband/upstream/fuel/build/config.mk> and
237 <armband/upstream/fuel/build/armband.mk> files.
239 Note! The same observation as above, before altering Makefile, run:
243 $ make patches-import
246 Non official build: Selecting which plugins to build
247 ====================================================
249 In order to cut the build time for unofficial builds (made by an
250 individual developer locally), the selection if which Fuel plugins to
251 build (if any) can be done by environment variable
252 "BUILD_FUEL_PLUGINS" prior to building.
254 Only the plugin targets from <armband/upstream/fuel/build/armband.mk> that
255 are specified in the environment variable will then be built. In order
256 to completely disable the building of plugins, the environment variable
257 is set to " ". When using this functionality, the resulting iso file
258 will be prepended with the prefix "unofficial-" to clearly indicate
259 that this is not a full build.
261 This method of plugin selection is not meant to be used from within
264 Note! So far, only ODL, OVS and BGPVPN plugins were ported to AArch64.
270 There are two methods available for building Fuel:
272 - A low level method using Make
274 - An abstracted method using build.sh
276 Low level build method using make
277 =================================
279 The low level method is based on Make:
281 From the <armband> directory, invoke <make [target]>
283 Following targets exist:
285 - release - this will do the same as:
287 - make submodules-clean patches-import build
289 - none/all/build - this will:
291 - Initialize the docker build environment
293 - Build Fuel from upstream (as defined by fuel-build/config-spec)
295 - Build the OPNFV defined plugins/features from upstream
297 - Build the defined additions to fuel (as defined by the structure
300 - Apply changes and patches to fuel (as defined by the structure of
303 - Reconstruct a fuel .iso image
305 - clean - this will remove all artifacts from earlier builds.
307 - debug - this will simply enter the build container without starting a build, from here you can start a build by enter "make iso"
309 If the build is successful, you will find the generated ISO file in
310 the <armband/upstream/fuel/build/release> subdirectory!
312 Abstracted build method using build.sh
313 ======================================
315 The abstracted build method uses the <armband/ci/build.sh> script which
318 - Create and use a build cache - significantly speeding up the
319 build time if upstream repositories have not changed.
321 - push/pull cache and artifacts to an arbitrary URI (http(s):, file:, ftp:)
323 For more info type <armband/ci/build.sh -h>.
329 The artifacts produced are:
331 - <OPNFV_XXXX.iso> - Which represents the bootable Fuel for AArch64 image,
332 XXXX is replaced with the build identity provided to the build system
334 - <OPNFV_XXXX.iso.txt> - Which holds version metadata.
340 1) `OPNFV Installation instruction for the AArch64 Colorado release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/armband/colorado/docs/installationprocedure/index.html>`_: http://artifacts.opnfv.org/armband/colorado/docs/installationprocedure/index.html
342 2) `OPNFV Build instruction for the AArch64 Colorado release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/armband/colorado/docs/buildprocedure/index.html>`_: http://artifacts.opnfv.org/armband/colorado/docs/buildprocedure/index.html
344 3) `OPNFV Release Note for the AArch64 Colorado release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/armband/colorado/docs/releasenotes/index.html>`_: http://artifacts.opnfv.org/armband/colorado/docs/releasenotes/index.html