Bump the nfs-utils package version
[oom/offline-installer.git] / docs / BuildGuide.rst
index 27c0835..e2215c1 100644 (file)
@@ -10,6 +10,7 @@ This document is describing procedure for building offline installer packages. I
 Procedure was completely tested on RHEL 7.6 as it’s tested target platform, however with small adaptations it should be applicable also for other platforms.
 Some discrepancies when Centos 7.6 is used are described below as well.
 
+
 Part 1. Preparations
 --------------------
 
@@ -60,9 +61,9 @@ Subsequent steps are the same on both platforms:
 ::
 
     # install following packages
-    yum install -y docker-ce-18.09.5 python-pip git createrepo expect nodejs npm jq
+    yum install -y docker-ce-18.09.5 git createrepo expect nodejs npm jq
 
-    # install Python 3 (download scripts don't support Python 2 anymore)
+    # install Python 3
     yum install -y python36 python36-pip
 
     # docker daemon must be running on host
@@ -95,28 +96,29 @@ Part 2. Download artifacts for offline installer
    ::
 
     # clone the OOM repository
-    git clone https://gerrit.onap.org/r/oom -b master --recurse-submodules /tmp/oom
+    git clone https://gerrit.onap.org/r/oom -b <branch> --recurse-submodules /tmp/oom
+
+.. note::  replace <branch> by branch you want to build
 
-    # enable subsystems in oom/kubernetes/onap/values.yaml as required
+    # docker-images-collector.sh script uses oom/kubernetes/onap/resources/overrides/onap-all.yaml file to find what subsystems
+    are enabled. By default all subsystems are enabled there. Modify the file if want to drop some subsystems.
 
     #run the collector providing path the the project
     ./build/creating_data/docker-images-collector.sh /tmp/oom/kubernetes/onap
 
-   If the list does not contain any image, no subsystem is enabled in the oom/kubernetes/onap/values.yaml
-
    For the other options check the usage of the script.
 
 .. note:: Skip this step if you have already all necessary resources and continue with Part 3. Populate local nexus
 
 
-There need to be created RPM repository containing packages which need to be installed on all nodes.
+Repository containing packages to be installed on all nodes needs to be created:
 
 ::
 
-    # run the docker container with -d parameter for destination directory with RPM packages
-    ./offline-installer/build/create_repo.sh -d $(pwd)
+    # run the docker container with -d parameter for destination directory with RPM packages and optionally use -t parameter for target platform. Supported target platforms are centos|rhel|ubuntu. If -t parameter is not given, default platform is based on host platform where script is running.
+    ./offline-installer/build/create_repo.sh -d $(pwd) -t centos|rhel|ubuntu
 
-.. note:: If script fails with permissions, problem could be with SeLinux. Issue is possible to solve by:
+.. note:: If script fails due to permissions issue, it could be a problem with SeLinux. It can be fixed by running:
     ::
 
       # Change security context of directory
@@ -128,17 +130,19 @@ so one might try following command to download most of the required artifacts in
 ::
 
         # following arguments are provided
-        # all data lists are taken in ./build/data_lists/ folder
+        # all data lists are taken from ./build/data_lists/ folder
         # all resources will be stored in expected folder structure within ../resources folder
 
         ./build/download/download.py --docker ./build/data_lists/infra_docker_images.list ../resources/offline_data/docker_images_infra \
-        --docker ./build/data_lists/rke_docker_images.list \
-        --docker ./build/data_lists/k8s_docker_images.list \
-        --docker ./build/data_lists/onap_docker_images.list \
         --http ./build/data_lists/infra_bin_utils.list ../resources/downloads
 
+        # following docker images do not necessarily need to be stored under resources as they load into repository in next part
+        # if second argument for --docker is not present, images are just pulled and cached.
+        # Warning: script must be run twice separately, for more details run download.py --help
+        ./build/download/download.py --docker ./build/data_lists/rke_docker_images.list \
+        --docker ./build/data_lists/k8s_docker_images.list \
+        --docker ./build/data_lists/onap_docker_images.list \
 
-Alternatively, step-by-step procedure is described in Appendix 1.
 
 This concludes SW download part required for ONAP offline platform creating.
 
@@ -148,7 +152,7 @@ Part 3. Populate local nexus
 Prerequisites:
 
 - All data lists and resources which are pushed to local nexus repository are available
-- Following ports are not occupied buy another service: 80, 8081, 8082, 10001
+- Following ports are not occupied by another service: 80, 8081, 8082, 10001
 - There's no docker container called "nexus"
 
 .. note:: In case you skipped the Part 2 for the artifacts download, please ensure that the onap docker images are cached and copy of resources data are untarred in *./onap-offline/../resources/*
@@ -185,14 +189,15 @@ From onap-offline directory run:
 
 ::
 
-  ./build/package.py <helm charts repo> --build_version "" --application-repository_reference <commit/tag/branch> --output-dir <target\_dir> --resources-directory <target\_dir>
+  ./build/package.py <helm charts repo> --build-version <version> --application-repository_reference <commit/tag/branch> --output-dir <target\_dir> --resources-directory <target\_dir>
 
 For example:
 
 ::
 
-  ./build/package.py https://gerrit.onap.org/r/oom --build_version "" --application-repository_reference master --output-dir /tmp/packages --resources-directory /tmp/resources
+  ./build/package.py https://gerrit.onap.org/r/oom --application-repository_reference <branch> --output-dir /tmp/packages --resources-directory /tmp/resources
 
+.. note::  replace <branch> by branch you want to build
 
 In the target directory you should find tar files: