X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=docs%2Fbuild-instruction.rst;h=d16eb29b5d94f8c1cbf0a97e935284abcf5063d4;hb=22e1950e973d84a24e052b75544f628c25cd633d;hp=254c0d3f29cc75d5c601d6258bb4cb82e00ca02f;hpb=719cf0300eb2c63375dde152851d6ba73ca99498;p=armband.git diff --git a/docs/build-instruction.rst b/docs/build-instruction.rst index 254c0d3f..d16eb29b 100644 --- a/docs/build-instruction.rst +++ b/docs/build-instruction.rst @@ -1,5 +1,5 @@ ================================================================================================= -OPNFV Build instruction for the Brahmaputra release of OPNFV when using Fuel as a deployment tool +OPNFV Build instruction for the AArch64 Brahmaputra 3.0 release of OPNFV when using Fuel as a deployment tool ================================================================================================= License @@ -13,14 +13,14 @@ Abstract ======== This document describes how to build the Fuel deployment tool for the -Brahmaputra release of OPNFV build system, dependencies and required -system resources. +AArch64 Brahmaputra release of OPNFV build system, dependencies and +required system resources. Introduction ============ This document describes the build system used to build the Fuel -deployment tool for the Brahmaputra release of OPNFV, required +deployment tool for the AArch64 Brahmaputra release of OPNFV, required dependencies and minimum requirements on the host to be used for the build system. @@ -32,36 +32,54 @@ performed by the build system. The audience of this document is assumed to have good knowledge in network and Unix/Linux administration. +Due to early docker and nodejs support on AArch64, we will still use an +x86_64 Fuel Master to build and deploy an AArch64 target pool, as well +as an x86_64 build machine for building the OPNFV ISO. + Requirements ============ Minimum Hardware Requirements ----------------------------- -- ~30 GB available disc +- ~50 GB available disc - 4 GB RAM Minimum Software Requirements ----------------------------- -The build host should run Ubuntu 14.04 operating system. +The build host should run Ubuntu 14.04 (x86_64) operating system. On the host, the following packages must be installed: - An x86_64 host (Bare-metal or VM) with Ubuntu 14.04 LTS installed - - A kernel equal- or later than 3.19 (Vivid) (simply available through sudo apt-get install linux-generic-lts-vivid) - - **Note:** Builds on Wily (Ubuntu 15.x) are currently not supported -- docker - see https://docs.docker.com/engine/installation/ubuntulinux/ for installation notes for Ubuntu 14.04. Tested against version 1.9.x and greater + - A kernel equal- or later than 3.19 (Vivid), simply available through: + +.. code-block:: bash + + $ sudo apt-get install linux-generic-lts-vivid + +- docker - see https://docs.docker.com/engine/installation/ubuntulinux/ for + installation notes for Ubuntu 14.04. Tested against version 1.9.x and greater + +- git + +- make + +- curl -- git (simply available through $ sudo apt-get install git) +- fuseiso -- make (simply available through $ sudo apt-get install make) +Apart from docker, all other package requirements listed above are +simply available through: -- curl (simply available through $ sudo apt-get install curl) +.. code-block:: bash + + $ sudo apt-get install git make curl fuseiso Preparations ============ @@ -70,7 +88,9 @@ Setting up the Docker build container ------------------------------------- After having installed Docker, add yourself to the docker group: -$ sudo usermod -a -G docker [userid] +.. code-block:: bash + + $ sudo usermod -a -G docker [userid] Also make sure to define relevant DNS servers part of the global DNS chain in your configuration file. @@ -78,11 +98,13 @@ Uncomment, and modify the values appropriately. For example: - +.. code-block:: bash + + DOCKER_OPTS=" --dns=8.8.8.8 --dns=8.8.8.4" Then restart docker: -.. code-block:: console +.. code-block:: bash $ sudo service docker restart @@ -91,31 +113,38 @@ Setting up OPNFV Gerrit in order to being able to clone the code - Start setting up OPNFV gerrit by creating a SSH key (unless you don't already have one), create one with ssh-keygen -- Add your generated public key in OPNFV Gerrit +- Add your generated public key in OPNFV Gerrit (https://gerrit.opnfv.org/) (this requires a Linux foundation account, create one if you do not already have one) - Select "SSH Public Keys" to the left and then "Add Key" and paste your public key in. -Clone the OPNFV code Git repository with your SSH key -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Clone the armband@OPNFV code Git repository with your SSH key +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Now it is time to clone the code repository: -$ git clone ssh://@gerrit.opnfv.org:29418/fuel +.. code-block:: bash + + $ git clone ssh://@gerrit.opnfv.org:29418/armband -Now you should have the OPNFV fuel repository with the Fuel +Now you should have the OPNFV ARMBAND repository with its directories stored locally on your build host. Check out the Brahmaputra release: -$ cd fuel -$ git checkout brahmaputra.1.0 -Clone the OPNFV code Git repository without a SSH key -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. code-block:: bash + + $ cd armband + $ git checkout brahmaputra.3.0 + +Clone the armband@OPNFV code Git repository without a SSH key +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also opt to clone the code repository without a SSH key: -$ git clone https://gerrit.opnfv.org:29418/gerrit/fuel +.. code-block:: bash + + $ git clone https://gerrit.opnfv.org/gerrit/armband Make sure to checkout the release tag as described above. @@ -126,8 +155,7 @@ The build system is able to make use of a web proxy setup if the http_proxy, https_proxy, no_proxy (if needed) and RSYNC_PROXY or RSYNC_CONNECT_PROG environment variables have been set before invoking make. -The proxy setup must permit port 80 (http), 443 (https) and 873 -(rsync). +The proxy setup must permit port 80 (http), 443 (https) and 873 (rsync). Important note about the host Docker daemon settings ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -137,9 +165,11 @@ for it to be able to pull the base Ubuntu 14.04 image from the Docker registry before invoking make! In Ubuntu this is done by adding a line like: -export http_proxy="http://10.0.0.1:8888/" +.. code-block:: bash + + export http_proxy="http://10.0.0.1:8888/" -to /etc/default/docker and restarting the Docker daemon. +to and restarting the Docker daemon. Setting proxy environment variables prior to build ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -148,19 +178,23 @@ The build system will make use the following environment variables that needs to be exported to subshells by using export (bash) or setenv (csh/tcsh). -| http_proxy (or HTTP_PROXY) -| https_proxy (or HTTP_PROXY) -| no_proxy (or NO_PROXY) -| RSYNC_PROXY -| RSYNC_CONNECT_PROG +.. code-block:: bash + + http_proxy (or HTTP_PROXY) + https_proxy (or HTTP_PROXY) + no_proxy (or NO_PROXY) + RSYNC_PROXY + RSYNC_CONNECT_PROG As an example, these are the settings that were put in the user's .bashrc when verifying the proxy build functionality: -| export RSYNC_PROXY=10.0.0.1:8888 -| export http_proxy=http://10.0.0.1:8888 -| export https_proxy=http://10.0.0.1:8888 -| export no_proxy=localhost,127.0.0.1,.consultron.com,.sock +.. code-block:: bash + + export RSYNC_PROXY=10.0.0.1:8888 + export http_proxy=http://10.0.0.1:8888 + export https_proxy=http://10.0.0.1:8888 + export no_proxy=localhost,127.0.0.1,.consultron.com,.sock Using a ssh proxy for the rsync connection ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -186,13 +220,23 @@ of this process rsync is used. If neither of the two available methods for proxying rsync are available, the last resort is to turn off the caching of the Ubuntu packages in the build system. This is done by removing the -"f_repobuild" from SUBDIRS in the beginning of -the fuel/build/f_isoroot/Makefile. +"f_repobuild" from SUBDIRS in the beginning of the +. Note! Doing this will require the Fuel master node to have Internet access when installing the ISO artifact built as no Ubuntu package cache will be on the ISO! +Note! Armband build system uses git submodules to track fuel and +other upstream repos, so in order to apply the above change, one +should first initialize the submodules and apply armband patches +(only needed once): + +.. code-block:: bash + + $ make submodules-init + $ make patches-import + Configure your build environment -------------------------------- @@ -200,7 +244,13 @@ Configure your build environment standard Brahmaputra release ** Select the versions of the components you want to build by editing the -fuel/build/config.mk file. + file. + +Note! The same observation as above, before altering Makefile, run: + +.. code-block:: bash + + $ make submodules-init patches-import Non official build: Selecting which plugins to build ---------------------------------------------------- @@ -209,7 +259,8 @@ individual developer locally), the selection if which Fuel plugins to build (if any) can be done by environment variable "BUILD_FUEL_PLUGINS" prior to building. -Only the plugin targets from fuel/build/f_isoroot/Makefile that are +Only the plugin targets from + that are specified in the environment variable will then be built. In order to completely disable the building of plugins, the environment variable is set to " ". When using this functionality, the resulting iso file @@ -219,24 +270,30 @@ that this is not a full build. This method of plugin selection is not meant to be used from within Gerrit! +Note! So far, only ODL plugin was ported to AArch64. + Building ======== -There are two methods available for building Fuel: +There is only one preffered method available for building Fuel for AArch64: - A low level method using Make -- An abstracted method using build.sh - Low level build method using make --------------------------------- The low level method is based on Make: -From the directory, invoke +From the directory, invoke Following targets exist: -- none/all - this will: +- release - this will do the same as: + + - make submodules-clean clean-docker clean-build + + - make submodules-init patches-import build + +- none/all/build - this will: - Initialize the docker build environment @@ -252,40 +309,36 @@ Following targets exist: - Reconstruct a fuel .iso image -- clean - this will remove all artifacts from earlier builds. +- submodules-init - Initialize git submodules (fuel@OPNFV, fuel-library etc.) -- debug - this will simply enter the build container without starting a build, from here you can start a build by enter "make iso" +- submodules-clean - cleanup git submodules (fuel@OPNFV, fuel-library etc.) -If the build is successful, you will find the generated ISO file in -the subdirectory! +- patches-import - this will apply armband@OPNFV patches to git submodules -Abstracted build method using build.sh --------------------------------------- -The abstracted build method uses the script which -allows you to: +- patches-export - this will export git submodules changes as armband patches -- Create and use a build cache - significantly speeding up the - build time if upstream repositories have not changed. +- clean-build - this will remove all artifacts from earlier builds. -- push/pull cache and artifacts to an arbitrary URI (http(s):, file:, ftp:) +- clean-docker - this will remove all docker caches from earlier builds. -For more info type . +If the build is successful, you will find the generated ISO file in +the subdirectory! Artifacts ========= The artifacts produced are: -- - Which represents the bootable Fuel image, XXXX is - replaced with the build identity provided to the build system +- - Which represents the bootable (x86_64) Fuel for AArch64 + image, XXXX is replaced with the build identity provided to the build system - - Which holds version metadata. References ========== -1) OPNFV Installation instruction for the Brahmaputra release of OPNFV when using Fuel as a deployment tool +1) `OPNFV Installation instruction for the AArch64 Brahmaputra 3.0 release of OPNFV when using Fuel as a deployment tool `_ -2) OPNFV Build instruction for the Brahmaputra release of OPNFV when using Fuel as a deployment tool +2) `OPNFV Build instruction for the AArch64 Brahmaputra 3.0 release of OPNFV when using Fuel as a deployment tool `_ -3) OPNFV Release Note for the Brahmaputra release of OPNFV when using Fuel as a deployment tool +3) `OPNFV Release Note for the AArch64 Brahmaputra 3.0 release of OPNFV when using Fuel as a deployment tool `_