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