Adding LICENSE file
[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 - work in progress
12
13 1. Build system requirements
14 ----------------------------
15 1.1 Host HW/VM requirements
16 ---------------------------
17 - A x86_64 host (real iron or VM) with Ubuntu 12.04/14.04 LTS installed
18 - 100 GB storage
19 - 8 GB RAM
20
21 1.2 Host SW dependencies
22 ------------------------
23 On the host, the following packages must be installed:
24 - docker - see https://docs.docker.com/installation/ubuntulinux/ for installation notes for 12.04 and 14.04
25 - git (simply available through apt-get install git)
26
27 2 Setting up the Docker build container
28 ----------------------------------------
29 When having installed Docker, add yourself to the docker group:
30 usermod -a -G docker <userid>
31
32 Also make sure to define rellevant dns servers part of the global dns chain in
33 in your /etc/default/docker config file, eg.
34 DOCKER_OPTS=" --dns=8.8.8.8 --dns=8.8.8.4"
35
36 Then restart docker with "service docker restart".:
37
38 3. Setting up OPNFV Gerrit in order to being able to clone the code
39 -------------------------------------------------------------------
40 - Start by creating a SSH key, if you don't already have one, create one with ssh-keygen
41
42 - Add your generated public key in OPNFV Gerrit -https://gerrit.opnfv.org/
43   (this requires a linuxfoundation account, create one if you do not already have one)
44
45 - Select "SSH Public Keys" to the left and then "Add Key" and paste your public key in.
46
47 4. Clone the OPNFV code git repository
48 --------------------------------------
49  So now we're coming to the fun part! Let's clone the code repository:
50  git clone ssh://<Linux foundation user>@gerrit.opnfv.org:29418/genesis
51
52  Change the directory to "fuel-build"
53  cd fuel-build/
54
55 5. Set up (build) your build environment
56 ----------------------------------------
57 YOU DO NOT NEED TO SET UP YOUR BUILD ENVIRONMENT, THE TOP MAKE ALL TARGET WILL DO THAT FOR YOU IF NOT ALREADY DONE,
58 THE BELOW ACTIONS IN THIS SECTION ARE NOT NEEDED!
59
60 Note and TODO:
61 The build system will for now partly run as sudo as that is needed for the debootstrap procedure to create the root file
62 system for the Ubuntu 12.04 Docker image - BUT NOTE, NONE OF THE MAKEFILES OR SCRIPTS SHALL BE EXECUTED WITH SUDO/ROOT PRIVILEDGES!
63 (TODO: Change the scripts so that no root priviledges will be needed)
64
65 With your ordinary user-, run the following commands from your git root:
66 cd docker
67 make (and you will be prompted for your password by sudo)
68 cd ..
69
70 6. Build your fuel .iso image
71 -----------------------------
72 That's it, time to build!
73 make [all]
74
75 This will:
76 - If not allready existing, initialize the docker build environment
77 - If not already done, build fuel from upstream
78 - Build the defined derivate of fuel (as defined by the structure of this framework)
79
80 If the build is successful, you will find the generated ISO file in the release subdirectory!
81
82 7. Install your stack
83 ---------------------
84 Please see DOC/INSTALL/README