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