1 :Authors: Jonas Bjurel (Ericsson)
4 ================================================================
5 OPNFV Build instructions for - < Component denomination >
6 ================================================================
11 This document describes how to build <Component>, build system dependencies and required system resources.
15 <WORK'S NAME> (c) by <AUTHOR'S NAME>
17 <WORK'S NAME> is licensed under a Creative Commons Attribution 4.0 International License.
18 You should have received a copy of the license along with this.
19 If not, see <http://creativecommons.org/licenses/by/4.0/>.
38 +--------------------+--------------------+--------------------+--------------------+
39 | **Date** | **Ver.** | **Author** | **Comment** |
41 +--------------------+--------------------+--------------------+--------------------+
42 | 2015-04-14 | 0.1.0 | Jonas Bjurel | First draft |
44 +--------------------+--------------------+--------------------+--------------------+
47 +--------------------+--------------------+--------------------+--------------------+
51 +--------------------+--------------------+--------------------+--------------------+
55 <INTRODUCTION TO THE SCOPE AND INTENTION OF THIS DOCUMENT>
59 This document describes build system used to build Fuel@OPNFV,
60 required dependencies and minimum requirements on the host to be used for the buildsystem.
62 The Fuel build system is desigened around Docker containers such that dependencies
63 outside of the build system can be kept to a minimum.
64 It also shields the host from any potential dangerous operations performed by the build system.
66 The audience of this document is assumed to have good knowledge in network and Unix/Linux administration.
70 <PROVIDE A LIST OF MINIMUM HARDWARE AND SOFTWARE REQUIREMENTS FOR THE BUILD>
72 3.1 Minimum Hardware Requirements
73 ---------------------------------
76 - An x86_64 host (Bare-metal or VM) with Ubuntu 14.04 LTS installed
78 - ~30 GB available disc
82 3.2 Minimum Software Requirements
83 ---------------------------------
85 The build host should run Ubuntu 14.04 operating system.
87 On the host, the following packages must be installed:
89 - docker - see https://docs.docker.com/installation/ubuntulinux/ for installation notes for Ubuntu 14.04.
90 Note: only use the Ubuntu stock distro of Docker (docker.io)
92 - git (simply available through sudo apt-get install git)
94 - make (simply available through sudo apt-get install make)
96 - curl (simply available through sudo apt-get install curl)
102 3.3.1 Setting up the Docker build container
103 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104 After having installed Docker, add yourself to the docker group:
106 <usermod -a -G docker [userid]>
108 Also make sure to define relevant DNS servers part of the global dns chain in
109 in your </etc/default/docker> configuration file, eg.
111 <DOCKER_OPTS=" --dns=8.8.8.8 --dns=8.8.8.4">
115 <sudo service docker.io restart>
117 3.3.2 Setting up OPNFV Gerrit in order to being able to clone the code
118 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
120 - Start setting up OPNFV gerrit by creating a SSH key (unless you don't already have one),
121 create one with ssh-keygen
123 - Add your generated public key in OPNFV Gerrit <https://gerrit.opnfv.org/>
124 (this requires a linuxfoundation account, create one if you do not already have one)
126 - Select "SSH Public Keys" to the left and then "Add Key" and paste your public key in.
128 3.3.3 Clone the OPNFV code git repository
129 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
130 Now it is time to clone the code repository:
132 <git clone ssh://Linux foundation user@gerrit.opnfv.org:29418/genesis>
134 Now you should have the OPNFV genesis repository with Fuel@OPNFV stored locally on your build host.
138 <DESCRIBE THE FULL PROCEDURES FOR THE BUILD OF THE OPNFV COMPONENT ARTIFACTS>
142 There are two methods available for building Fuel@OPNFV:
144 - A low level method using Make
146 - An abstracted method using build.sh
148 4.1 Configure your build environment
149 -------------------------------------
151 Select the versions of the components you want to build by editing the fuel/build/config.mk file.
152 Note if you want to build with OpenDaylight SDN controller you need to uncomment the lines starting
153 with odl-main and java-main
155 4.2 Low level build method using make
156 --------------------------------------
158 The low level method is based on Make:
160 From the <fuel/build directory> invoke <make [target]>
162 Following targets exist:
164 - none/all - this will:
166 - If not allready existing, initialize the docker build environment
168 - If not already done, build OpenDaylight from upstream (as defined by fuel-build config-spec)
170 - If not already done, build fuel from upstream (as defined by fuel-build/config-spec)
172 - Build the defined additions to fuel (as defined by the structure of this framework)
174 - Apply changes and patches to fuel (as defined by the structure of this framework)
176 - Reconstruct a fuel .iso image
178 - clean - this will remove all artifacts from earlier builds.
180 If the build is successful, you will find the generated ISO file in the <fuel/build/release> subdirectory!
182 4.3 Abstracted build method using build.sh
183 ===========================================
184 The abstracted build method useses the <fuel/ci/build.sh> script which allows you to:
186 - Create and use a build cache - significantly speeding up the buildtime if upstream repositories have not changed.
188 - push/pull cache and artifacts to an arbitrary URI (http(s):, file:, ftp:)
190 For more info type <fuel/ci/build.sh -h>.
194 <DESCRIBE WHAT ARE THE PRODUCED ARTIFACTS AND WHERE THOSE CAN BE FOUND>
198 The artifacts produced are:
200 - <OPNFV_XXXX.iso> - Which represents the bootable Fuel@OPNFV image,
201 XXXX is replaced with the build identity provided to the build system
203 - <OPNFV_XXXX.iso.txt> - Which holds version metadata.
207 <PROVIDE NEEDED/USEFUL REFERENCES>