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 Colorado release of OPNFV build system, dependencies and required
19 This document describes the build system used to build the Fuel
20 deployment tool for the 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.
36 Minimum Hardware Requirements
37 =============================
39 - ~30 GB available disc
43 Minimum Software Requirements
44 =============================
46 The build host should run Ubuntu 14.04 or 16.04 operating system.
48 On the host, the following packages must be installed:
50 - An x86_64 host (Bare-metal or VM) with Ubuntu 14.04 LTS installed
52 - **Note:** Builds on Wily (Ubuntu 15.x) are currently not supported
53 - A kernel equal- or later than 3.19 (Vivid), simply available through
57 $ sudo apt-get install linux-generic-lts-vivid
59 - docker - see https://docs.docker.com/installation/ubuntulinux/ for
60 installation notes for Ubuntu 14.04. Note: use the latest version from
61 Docker (docker-engine) and not the one in Ubuntu 14.04.
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)
73 Setting up the Docker build container
74 =====================================
76 After having installed Docker, add yourself to the docker group:
80 $ sudo usermod -a -G docker [userid]
82 Also make sure to define relevant DNS servers part of the global
83 DNS chain in your </etc/default/docker> configuration file.
84 Uncomment, and modify the values appropriately.
90 DOCKER_OPTS=" --dns=8.8.8.8 --dns=8.8.8.4"
96 $ sudo service docker restart
98 Setting up OPNFV Gerrit in order to being able to clone the code
99 ----------------------------------------------------------------
101 - Start setting up OPNFV gerrit by creating a SSH key (unless you
102 don't already have one), create one with ssh-keygen
104 - Add your generated public key in OPNFV Gerrit <https://gerrit.opnfv.org/>
105 (this requires a Linux foundation account, create one if you do not
108 - Select "SSH Public Keys" to the left and then "Add Key" and paste
111 Clone the OPNFV code Git repository with your SSH key
112 -----------------------------------------------------
114 Now it is time to clone the code repository:
118 $ git clone ssh://<Linux foundation user>@gerrit.opnfv.org:29418/fuel
120 Now you should have the OPNFV fuel repository with the Fuel
121 directories stored locally on your build host.
123 Check out the Colorado release:
128 $ git checkout colorado.2.0
130 Clone the OPNFV code Git repository without a SSH key
131 -----------------------------------------------------
133 You can also opt to clone the code repository without a SSH key:
137 $ git clone https://gerrit.opnfv.org/gerrit/fuel
139 Make sure to checkout the release tag as described above.
141 Support for building behind a http/https/rsync proxy
142 ====================================================
144 The build system is able to make use of a web proxy setup if the
145 http_proxy, https_proxy, no_proxy (if needed) and RSYNC_PROXY or
146 RSYNC_CONNECT_PROG environment variables have been set before invoking make.
148 The proxy setup must permit port 80 (http) and 443 (https).
149 Rsync protocol is currently not used during build process.
151 Important note about the host Docker daemon settings
152 ----------------------------------------------------
154 The Docker daemon on the host must be configured to use the http proxy
155 for it to be able to pull the base Ubuntu 14.04 image from the Docker
156 registry before invoking make! In Ubuntu this is done by adding a line
161 export http_proxy="http://10.0.0.1:8888/"
163 to /etc/default/docker and restarting the Docker daemon.
165 Setting proxy environment variables prior to build
166 --------------------------------------------------
168 The build system will make use the following environment variables
169 that needs to be exported to subshells by using export (bash) or
174 http_proxy (or HTTP_PROXY)
175 https_proxy (or HTTP_PROXY)
176 no_proxy (or NO_PROXY)
180 As an example, these are the settings that were put in the user's
181 .bashrc when verifying the proxy build functionality:
185 export RSYNC_PROXY=10.0.0.1:8888
186 export http_proxy=http://10.0.0.1:8888
187 export https_proxy=http://10.0.0.1:8888
188 export no_proxy=localhost,127.0.0.1,.consultron.com,.sock
190 Using a ssh proxy for the rsync connection
191 ------------------------------------------
193 If the proxy setup is not allowing the rsync protocol, an alternative
194 solution is to use a SSH tunnel to a machine capable of accessing the
195 outbound port 873. Set the RSYNC_CONNECT_PROG according to the rsync
196 manual page (for example to "ssh <username>@<hostname> nc %H 873")
197 to enable this. Also note that netcat needs to be installed on the
200 Make sure that the ssh command also refers to the user on the remote
201 system, as the command itself will be run from the Docker build container
202 as the root user (but with the invoking user's SSH keys).
204 Configure your build environment
205 ================================
207 ** Configuring the build environment should not be performed if building
208 standard Colorado release **
210 Select the versions of the components you want to build by editing the
211 fuel/build/config.mk file.
213 Non official build: Selecting which plugins to build
214 ====================================================
216 In order to cut the build time for unofficial builds (made by an
217 individual developer locally), the selection if which Fuel plugins to
218 build (if any) can be done by environment variable
219 "BUILD_FUEL_PLUGINS" prior to building.
221 Only the plugin targets from fuel/build/f_isoroot/Makefile that are
222 specified in the environment variable will then be built. In order to
223 completely disable the building of plugins, the environment variable
224 is set to " ". When using this functionality, the resulting iso file
225 will be prepended with the prefix "unofficial-" to clearly indicate
226 that this is not a full build.
228 This method of plugin selection is not meant to be used from within
235 There are two methods available for building Fuel:
237 - A low level method using Make
239 - An abstracted method using build.sh
241 Low level build method using make
242 =================================
244 The low level method is based on Make:
246 From the <fuel/build> directory, invoke <make [target]>
248 Following targets exist:
250 - none/all - this will:
252 - Initialize the docker build environment
254 - Build Fuel from upstream (as defined by fuel-build/config-spec)
256 - Build the OPNFV defined plugins/features from upstream
258 - Build the defined additions to fuel (as defined by the structure
261 - Apply changes and patches to fuel (as defined by the structure of
264 - Reconstruct a fuel .iso image
266 - clean - this will remove all artifacts from earlier builds.
268 - debug - this will simply enter the build container without starting a build, from here you can start a build by enter "make iso"
270 If the build is successful, you will find the generated ISO file in
271 the <fuel/build/release> subdirectory!
273 Abstracted build method using build.sh
274 ======================================
276 The abstracted build method uses the <fuel/ci/build.sh> script which
279 - Create and use a build cache - significantly speeding up the
280 build time if upstream repositories have not changed.
282 - push/pull cache and artifacts to an arbitrary URI (http(s):, file:, ftp:)
284 For more info type <fuel/ci/build.sh -h>.
290 The artifacts produced are:
292 - <OPNFV_XXXX.iso> - Which represents the bootable Fuel image, XXXX is
293 replaced with the build identity provided to the build system
295 - <OPNFV_XXXX.iso.txt> - Which holds version metadata.
301 1) `OPNFV Installation instruction for the Colorado release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/fuel/colorado/2.0/docs/installationprocedure/index.html>`_: http://artifacts.opnfv.org/fuel/colorado/2.0/docs/installationprocedure/index.html
303 2) `OPNFV Build instruction for the Colorado release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/fuel/colorado/2.0/docs/buildprocedure/index.html>`_: http://artifacts.opnfv.org/fuel/colorado/2.0/docs/buildprocedure/index.html
305 3) `OPNFV Release Note for the Colorado release of OPNFV when using Fuel as a deployment tool <http://artifacts.opnfv.org/fuel/colorado/2.0/docs/releasenotes/index.html>`_: http://artifacts.opnfv.org/fuel/colorado/2.0/docs/releasenotes/index.html