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