1 ================================================================================================
2 OPNFV Build instruction for the Brahmaputra release of OPNFV when using Fuel as a deployment tool
3 ================================================================================================
5 .. contents:: Table of Contents
11 This work is licensed under a Creative Commons Attribution 4.0
12 International License. .. http://creativecommons.org/licenses/by/4.0 ..
13 (c) Jonas Bjurel (Ericsson AB) and others
18 This document describes how to build the Fuel deployment tool for the
19 Brahmaputra release of OPNFV build system, dependencies and required
25 This document describes the build system used to build the Fuel
26 deployment tool for the Brahmaputra release of OPNFV, required
27 dependencies and minimum requirements on the host to be used for the
30 The Fuel build system is designed around Docker containers such that
31 dependencies outside of the build system can be kept to a minimum. It
32 also shields the host from any potential dangerous operations
33 performed by the build system.
35 The audience of this document is assumed to have good knowledge in
36 network and Unix/Linux administration.
41 Minimum Hardware Requirements
42 -----------------------------
44 - ~30 GB available disc
48 Minimum Software Requirements
49 -----------------------------
51 The build host should run Ubuntu 14.04 operating system.
53 On the host, the following packages must be installed:
55 - An x86_64 host (Bare-metal or VM) with Ubuntu 14.04 LTS installed
57 - A kernel equal- or later than 3.19 (Vivid) (simply available through sudo apt-get install linux-generic-lts-vivid)
59 - **Note:** Builds on Wily (Ubuntu 15.x) are currently not supported
61 - docker - see https://docs.docker.com/engine/installation/ubuntulinux/ for installation notes for Ubuntu 14.04. Tested against version 1.9.x and greater
63 - git (simply available through $ sudo apt-get install git)
65 - make (simply available through $ sudo apt-get install make)
67 - curl (simply available through $ sudo apt-get install curl)
72 Setting up the Docker build container
73 -------------------------------------
74 After having installed Docker, add yourself to the docker group:
76 $ sudo usermod -a -G docker [userid]
78 Also make sure to define relevant DNS servers part of the global
79 DNS chain in your </etc/default/docker> configuration file.
80 Uncomment, and modify the values appropriately.
84 <DOCKER_OPTS=" --dns=8.8.8.8 --dns=8.8.8.4">
88 .. code-block:: console
90 $ sudo service docker restart
92 Setting up OPNFV Gerrit in order to being able to clone the code
93 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94 - Start setting up OPNFV gerrit by creating a SSH key (unless you
95 don't already have one), create one with ssh-keygen
97 - Add your generated public key in OPNFV Gerrit <https://gerrit.opnfv.org/>
98 (this requires a Linux foundation account, create one if you do not
101 - Select "SSH Public Keys" to the left and then "Add Key" and paste
104 Clone the OPNFV code Git repository with your SSH key
105 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
106 Now it is time to clone the code repository:
108 $ git clone ssh://<Linux foundation user>@gerrit.opnfv.org:29418/fuel
110 Now you should have the OPNFV fuel repository with the Fuel
111 directories stored locally on your build host.
113 Check out the Brahmaputra release:
115 $ git checkout brahmaputra.1.0
117 Clone the OPNFV code Git repository without a SSH key
118 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
119 You can also opt to clone the code repository without a SSH key:
121 $ git clone https://gerrit.opnfv.org:29418/gerrit/fuel
123 Make sure to checkout the release tag as described above.
125 Support for building behind a http/https/rsync proxy
126 ----------------------------------------------------
128 The build system is able to make use of a web proxy setup if the
129 http_proxy, https_proxy, no_proxy (if needed) and RSYNC_PROXY or
130 RSYNC_CONNECT_PROG environment variables have been set before invoking make.
132 The proxy setup must permit port 80 (http), 443 (https) and 873
135 Important note about the host Docker daemon settings
136 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
138 The Docker daemon on the host must be configured to use the http proxy
139 for it to be able to pull the base Ubuntu 14.04 image from the Docker
140 registry before invoking make! In Ubuntu this is done by adding a line
143 export http_proxy="http://10.0.0.1:8888/"
145 to /etc/default/docker and restarting the Docker daemon.
147 Setting proxy environment variables prior to build
148 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
150 The build system will make use the following environment variables
151 that needs to be exported to subshells by using export (bash) or
154 | http_proxy (or HTTP_PROXY)
155 | https_proxy (or HTTP_PROXY)
156 | no_proxy (or NO_PROXY)
160 As an example, these are the settings that were put in the user's
161 .bashrc when verifying the proxy build functionality:
163 | export RSYNC_PROXY=10.0.0.1:8888
164 | export http_proxy=http://10.0.0.1:8888
165 | export https_proxy=http://10.0.0.1:8888
166 | export no_proxy=localhost,127.0.0.1,.consultron.com,.sock
168 Using a ssh proxy for the rsync connection
169 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
171 If the proxy setup is not allowing the rsync protocol, an alternative
172 solution is to use a SSH tunnel to a machine capable of accessing the
173 outbound port 873. Set the RSYNC_CONNECT_PROG according to the rsync
174 manual page (for example to "ssh <username>@<hostname> nc %H 873")
175 to enable this. Also note that netcat needs to be installed on the
178 Make sure that the ssh command also refers to the user on the remote
179 system, as the command itself will be run from the Docker build container
180 as the root user (but with the invoking user's SSH keys).
182 Disabling the Ubuntu repo cache if rsync is not allowed
183 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
185 During the build phase, a local Ubuntu package repository is fetched
186 from upstream in order to be added to the OPNFV Fuel ISO and for parts
187 of this process rsync is used.
189 If neither of the two available methods for proxying rsync are
190 available, the last resort is to turn off the caching of the Ubuntu
191 packages in the build system. This is done by removing the
192 "f_repobuild" from SUBDIRS in the beginning of
193 the fuel/build/f_isoroot/Makefile.
195 Note! Doing this will require the Fuel master node to have Internet
196 access when installing the ISO artifact built as no Ubuntu package
197 cache will be on the ISO!
199 Configure your build environment
200 --------------------------------
202 ** Configuring the build environment should not be performed if building
203 standard Brahmaputra release **
205 Select the versions of the components you want to build by editing the
206 fuel/build/config.mk file.
208 Non official build: Selecting which plugins to build
209 ----------------------------------------------------
210 In order to cut the build time for unofficial builds (made by an
211 individual developer locally), the selection if which Fuel plugins to
212 build (if any) can be done by environment variable
213 "BUILD_FUEL_PLUGINS" prior to building.
215 Only the plugin targets from fuel/build/f_isoroot/Makefile that are
216 specified in the environment variable will then be built. In order to
217 completely disable the building of plugins, the environment variable
218 is set to " ". When using this functionality, the resulting iso file
219 will be prepended with the prefix "unofficial-" to clearly indicate
220 that this is not a full build.
222 This method of plugin selection is not meant to be used from within
228 There are two methods available for building Fuel:
230 - A low level method using Make
232 - An abstracted method using build.sh
234 Low level build method using make
235 ---------------------------------
236 The low level method is based on Make:
238 From the <fuel/build> directory, invoke <make [target]>
240 Following targets exist:
242 - none/all - this will:
244 - Initialize the docker build environment
246 - Build Fuel from upstream (as defined by fuel-build/config-spec)
248 - Build the OPNFV defined plugins/features from upstream
250 - Build the defined additions to fuel (as defined by the structure
253 - Apply changes and patches to fuel (as defined by the structure of
256 - Reconstruct a fuel .iso image
258 - clean - this will remove all artifacts from earlier builds.
260 - debug - this will simply enter the build container without starting a build, from here you can start a build by enter "make iso"
262 If the build is successful, you will find the generated ISO file in
263 the <fuel/build/release> subdirectory!
265 Abstracted build method using build.sh
266 --------------------------------------
267 The abstracted build method uses the <fuel/ci/build.sh> script which
270 - Create and use a build cache - significantly speeding up the
271 build time if upstream repositories have not changed.
273 - push/pull cache and artifacts to an arbitrary URI (http(s):, file:, ftp:)
275 For more info type <fuel/ci/build.sh -h>.
280 The artifacts produced are:
282 - <OPNFV_XXXX.iso> - Which represents the bootable Fuel image, XXXX is
283 replaced with the build identity provided to the build system
285 - <OPNFV_XXXX.iso.txt> - Which holds version metadata.
290 1) OPNFV Installation instruction for the Brahmaputra release of OPNFV when using Fuel as a deployment tool
292 2) OPNFV Build instruction for the Brahmaputra release of OPNFV when using Fuel as a deployment tool
294 3) OPNFV Release Note for the Brahmaputra release of OPNFV when using Fuel as a deployment tool