519ee6a3a8964336b6ec44c1417c1010d9c7107e
[genesis.git] / fuel / build / DOC / BUILD / README.build
1 ##############################################################################
2 # Copyright (c) 2015 Ericsson AB and others.
3 # stefan.k.berg@ericsson.com
4 # jonas.bjurel@ericsson.com
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10
11 How to setup and use the OPNFV/BGS/FUEL build system
12 ====================================================
13
14 1. Build system requirements
15 ----------------------------
16 1.1 Host HW/VM requirements
17 ---------------------------
18 - An x86_64 host (real iron or VM) with Ubuntu 14.04 LTS installed
19 - ~30 GB available disc
20 - 4 GB RAM
21
22 1.2 Host SW dependencies
23 ------------------------
24 The host should run Ubuntu 14.04
25 On the host, the following packages must be installed:
26 - docker - see https://docs.docker.com/installation/ubuntulinux/ for installation notes
27 for Ubuntu 14.04. Note: only use the Ubuntu stock distro of Docker (docker.io)
28 - git (simply available through apt-get install git)
29 - make (simply available through apt-get install make)
30
31 2 Setting up the Docker build container
32 ----------------------------------------
33 When having installed Docker, add yourself to the docker group:
34 usermod -a -G docker <userid>
35
36 Also make sure to define rellevant dns servers part of the global dns chain in
37 in your /etc/default/docker config file, eg.
38 DOCKER_OPTS=" --dns=8.8.8.8 --dns=8.8.8.4"
39
40 Then restart docker with "service docker.io restart".:
41
42 3. Setting up OPNFV Gerrit in order to being able to clone the code
43 -------------------------------------------------------------------
44 - Start by creating a SSH key, if you don't already have one, create one with ssh-keygen
45
46 - Add your generated public key in OPNFV Gerrit -https://gerrit.opnfv.org/
47   (this requires a linuxfoundation account, create one if you do not already have one)
48
49 - Select "SSH Public Keys" to the left and then "Add Key" and paste your public key in.
50
51 4. Clone the OPNFV code git repository
52 --------------------------------------
53  So now we're coming to the fun part! Let's clone the code repository:
54  git clone ssh://<Linux foundation user>@gerrit.opnfv.org:29418/genesis
55
56  Change the directory to "fuel-build"
57  cd fuel-build/
58
59 5. Set up (build) your build environment
60 ----------------------------------------
61 Select the versions of the components you want to build by editing the
62 fuel-build/config-spec file. Note if you want to build with OpenDaylight
63 SDN controller you need to uncomment the lines starting with odl-main and
64 java-main
65
66 6. Build your fuel .iso image
67 -----------------------------
68 That's it, time to build!
69 make [all]
70
71 This will:
72 - If not allready existing, initialize the docker build environment
73 - If not already done, build OpenDaylight from upstream (as defined by fuel-build/
74   config-spec)
75 - If not already done, build fuel from upstream (as defined by fuel-build/config-spec)
76 - Build the defined additions to fuel (as defined by the structure of this framework)
77 - Apply changes and patches to fuel (as defined by the structure of this framework)
78 - Reconstruct a fuel .iso image
79
80 If the build is successful, you will find the generated ISO file in the release
81 subdirectory!
82
83 NOTE: the build of the baseline for Fuel and odl are cached, if build results reffering
84 to the same versions as specified in fuel-build/config spec has been built before, these
85 packages will not be rebuilt. The cache is cleared by "make clean"
86
87 7. Install your stack
88 ---------------------
89 Please see DOC/INSTALL/README
90
91 NOTES and TODO:
92 ---------------
93 The build system will for now partly run as sudo
94 BUT NOTE, NONE OF THE MAKEFILES OR SCRIPTS SHALL BE EXECUTED WITH
95 SUDO/ROOT PRIVILEDGES!
96 TODO: Change the scripts so that no root priviledges will be needed
97