Merge "Fix formatting to '_sha1_', '_date_' where needed"
[genesis.git] / fuel / docs / src / build-instructions.rst
1 ========================================================================
2 OPNFV Build instructions for - Fuel deployment tool - OPNFV Arno release
3 ========================================================================
4
5 .. contents:: Table of Contents
6    :backlinks: none
7
8 Abstract
9 ========
10
11 This document describes how to build the Fuel deployment tool for the Arno release of OPNFV, the build system, dependencies and required system resources.
12
13 License
14 =======
15 Arno release of OPNFV when using Fuel as a deployment tool DOCs (c) by Jonas Bjurel (Ericsson AB)
16
17 Arno release of OPNFV when using Fuel as a deployment tool DOCs (c) are licensed under a Creative Commons Attribution 4.0 International License. You should have received a copy of the license along with this. If not, see <http://creativecommons.org/licenses/by/4.0/>.
18
19
20
21 Version history
22 ===============
23
24 +--------------------+--------------------+--------------------+--------------------+
25 | **Date**           | **Ver.**           | **Author**         | **Comment**        |
26 |                    |                    |                    |                    |
27 +--------------------+--------------------+--------------------+--------------------+
28 | 2015-06-03         | 1.0.0              | Jonas Bjurel       | Instructions for   |
29 |                    |                    | (Ericsson AB)      | the Arno release   |
30 +--------------------+--------------------+--------------------+--------------------+
31
32 Introduction
33 ============
34
35 This document describes the build system used to build the Fuel deployment tool for the Arno release of OPNFV, required dependencies and minimum requirements on the host to be used for the buildsystem.
36
37 The Fuel build system is desigened around Docker containers such that dependencies outside of the build system can be kept to a minimum. It also shields the host from any potential dangerous operations performed by the build system.
38
39 The audience of this document is assumed to have good knowledge in network and Unix/Linux administration.
40
41 Requirements
42 ============
43
44 Minimum Hardware Requirements
45 -----------------------------
46
47 - An x86_64 host (Bare-metal or VM) with Ubuntu 14.04 LTS installed
48
49 - ~30 GB available disc
50
51 - 4 GB RAM
52
53 Minimum Software Requirements
54 -----------------------------
55
56 The build host should run Ubuntu 14.04 operating system.
57
58 On the host, the following packages must be installed:
59
60 - docker - see https://docs.docker.com/installation/ubuntulinux/ for installation notes for Ubuntu 14.04. Note: only use the Ubuntu stock distro of Docker (docker.io)
61
62 - git (simply available through sudo apt-get install git)
63
64 - make (simply available through sudo apt-get install make)
65
66 - curl (simply available through sudo apt-get install curl)
67
68 Preparations
69 ------------
70
71 Setting up the Docker build container
72 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73 After having installed Docker, add yourself to the docker group:
74
75 <usermod -a -G docker [userid]>
76
77 Also make sure to define relevant DNS servers part of the global dns chain in
78 in your </etc/default/docker> configuration file, eg.
79
80 <DOCKER_OPTS=" --dns=8.8.8.8 --dns=8.8.8.4">
81
82 Then restart docker:
83
84 <sudo service docker.io restart>
85
86 Setting up OPNFV Gerrit in order to being able to clone the code
87 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
88 - Start setting up OPNFV gerrit by creating a SSH key (unless you don't already have one), create one with ssh-keygen
89
90 - Add your generated public key in OPNFV Gerrit <https://gerrit.opnfv.org/>
91   (this requires a linuxfoundation account, create one if you do not already have one)
92
93 - Select "SSH Public Keys" to the left and then "Add Key" and paste your public key in.
94
95 Clone the OPNFV code git repository
96 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97 Now it is time to clone the code repository:
98
99 <git clone ssh://'Linux foundation user'@gerrit.opnfv.org:29418/genesis>
100
101 Now you should have the OPNFV genesis repository with the Fuel directories stored locally on your build host.
102
103 Check out the Arno release:
104 <cd genesis>
105 <git checkout arno.2015.1.0>
106
107 Building
108 ========
109
110 There are two methods available for building Fuel:
111
112 - A low level method using Make
113
114 - An abstracted method using build.sh
115
116 Configure your build environment
117 -------------------------------------
118
119 ** Configuring the build environment should not be performed if building standard Arno release **
120
121 Select the versions of the components you want to build by editing the fuel/build/config.mk file.
122
123 Low level build method using make
124 ---------------------------------
125 The low level method is based on Make:
126
127 From the <fuel/build> directory, invoke <make [target]>
128
129 Following targets exist:
130
131 - none/all -  this will:
132
133   - If not already existing, initialize the docker build environment
134
135   - If not already done, build OpenDaylight from upstream (as defined by fuel-build config-spec)
136
137   - If not already done, build fuel from upstream (as defined by fuel-build/config-spec)
138
139   - Build the defined additions to fuel (as defined by the structure of this framework)
140
141   - Apply changes and patches to fuel (as defined by the structure of this framework)
142
143   - Reconstruct a fuel .iso image
144
145 - clean - this will remove all artifacts from earlier builds.
146
147 If the build is successful, you will find the generated ISO file in the <fuel/build/release> subdirectory!
148
149 Abstracted build method using build.sh
150 ======================================
151 The abstracted build method uses the <fuel/ci/build.sh> script which allows you to:
152
153 - Create and use a build cache - significantly speeding up the buildtime if upstream repositories have not changed.
154
155 - push/pull cache and artifacts to an arbitrary URI (http(s):, file:, ftp:)
156
157 For more info type <fuel/ci/build.sh -h>.
158
159 Artifacts
160 =========
161
162 The artifacts produced are:
163
164 - <OPNFV_XXXX.iso> - Which represents the bootable Fuel image, XXXX is replaced with the build identity provided to the build system
165
166 - <OPNFV_XXXX.iso.txt> - Which holds version metadata.
167
168 References
169 ==========
170 -
171
172 :Authors: Jonas Bjurel (Ericsson)
173 :Version: 1.0.0
174
175 **Documentation tracking**
176
177 Revision:  _sha1_
178
179 Build date:  _date_