summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Pilat <m.pilat@partner.samsung.com>2019-07-08 12:08:01 +0200
committerMateusz Pilat <m.pilat@partner.samsung.com>2019-07-08 15:20:18 +0200
commit8fb56a9a924ad5d2d4f00a38c68334cbb7f1c4e1 (patch)
tree7e919e4905857bfe384e3c87aeb483781eac0866
parentb00fda87df7db69d1cb74948e385694a51a6e016 (diff)
Changing doc section related to packaging
Updating build documentation with description how to use new packaging script, removing obsolete steps Signed-off-by: Mateusz Pilat <m.pilat@partner.samsung.com> Issue-ID: OOM-1932 Change-Id: I2a51c1f836dec5942229b88379b46151f041b560
-rwxr-xr-x[-rw-r--r--]build/package.py0
-rw-r--r--docs/BuildGuide.rst106
2 files changed, 23 insertions, 83 deletions
diff --git a/build/package.py b/build/package.py
index 8a1808b3..8a1808b3 100644..100755
--- a/build/package.py
+++ b/build/package.py
diff --git a/docs/BuildGuide.rst b/docs/BuildGuide.rst
index 798da9f9..464422ac 100644
--- a/docs/BuildGuide.rst
+++ b/docs/BuildGuide.rst
@@ -79,7 +79,8 @@ Then it is necessary to clone all installer and build related repositories and p
git clone https://gerrit.onap.org/r/oom/offline-installer onap-offline
cd onap-offline
- # install required pip packages for download scripts
+ # install required pip packages for build and download scripts
+ pip3 install -r ./build/requirements.txt
pip3 install -r ./build/download/requirements.txt
Part 2. Download artifacts for offline installer
@@ -90,8 +91,6 @@ Part 2. Download artifacts for offline installer
It's possible to download all artifacts in single ./download.py execution. Recently we improved reliability of download scripts
so one might try following command to download most of the required artifacts in single shot.
-**Step1 - download wrapper script execution**
-
::
# following arguments are provided
@@ -111,23 +110,6 @@ so one might try following command to download most of the required artifacts in
Alternatively, step-by-step procedure is described in Appendix 1.
-Following steps are still required and are not supported by current version of download.py script.
-
-**Step 2 - Building own dns image**
-
-::
-
- # We are building our own dns image within our offline infrastructure
- ./build/creating_data/create_nginx_image/01create-image.sh /tmp/resources/offline_data/docker_images_infra
-
-
-**Step 3 - Create repo**
-
-::
-
- createrepo ../resources/pkg/rhel
-
-
This concludes SW download part required for ONAP offline platform creating.
Part 3. Populate local nexus
@@ -172,78 +154,43 @@ E.g.
rm -rf /tmp/resources/offline_data/npm_tar
rm -rf /tmp/resources/offline_data/pypi
-Part 4. Application helm charts preparation and patching
+Part 4. Packages preparation
--------------------------------------------------------
-This is about to clone oom repository and patch it to be able to use it
-offline. Use the following command:
-
-::
-
- ./build/fetch_and_patch_charts.sh <helm charts repo> <commit/tag/branch> <patchfile> <target\_dir>
-
-For example:
-
-::
-
- ./build/fetch_and_patch_charts.sh https://gerrit.onap.org/r/oom 0b904977dde761d189874d6dc6c527cd45928 /tmp/onap-offline/patches/onap.patch /tmp/oom-clone
-
-Part 5. Creating offline installation package
----------------------------------------------
-
-For the packagin itself it's necessary to prepare configuration. You can
-use ./build/package.conf as template or
-directly modify it.
-
-There are some parameters needs to be set in configuration file.
-Example values below are setup according to steps done in this guide to package ONAP.
+ONAP offline deliverable consist of 3 packages:
+---------------------------------------+------------------------------------------------------------------------------+
-| Parameter | Description |
+| Package | Description |
+=======================================+==============================================================================+
-| HELM_CHARTS_DIR | directory with Helm charts for the application |
-| | |
-| | Example: /tmp/oom-clone/kubernetes |
+| sw_package.tar | Contains installation software and configuration for infrastructure and ONAP |
+---------------------------------------+------------------------------------------------------------------------------+
-| APP_CONFIGURATION | application install configuration (application_configuration.yml) for |
-| | ansible installer and custom ansible role code directories if any. |
-| | |
-| | Example:: |
-| | |
-| | APP_CONFIGURATION=( |
-| | /tmp/onap-offline/config/application_configuration.yml |
-| | /tmp/onap-offline/patches/onap-patch-role |
-| | ) |
-| | |
+| resources_package.tar | Contains all input files needed to deploy infrastructure and ONAP |
+---------------------------------------+------------------------------------------------------------------------------+
-| APP_BINARY_RESOURCES_DIR | directory with all (binary) resources for offline infra and application |
-| | |
-| | Example: /tmp/resources |
-+---------------------------------------+------------------------------------------------------------------------------+
-| APP_AUX_BINARIES | additional binaries such as docker images loaded during runtime [optional] |
+| aux_package.tar | Contains auxiliary input files that can be added to ONAP |
+---------------------------------------+------------------------------------------------------------------------------+
-Offline installer packages are created with prepopulated data via
-following command run from onap-offline directory
+All packages can be created using script build/package.py. Beside of archiving files gathered in the previous steps, script also builds installer software and apply patch over application repository to make it usable without internet access.
+
+From onap-offline directory run:
::
- ./build/package.sh <project> <version> <packaging target directory>
+ ./build/package.py <helm charts repo> --application-repository_reference <commit/tag/branch> --application-patch_file <patchfile> --output-dir <target\_dir> --resources-directory <target\_dir>
-E.g.
+For example:
::
- ./build/package.sh onap 4.0.0 /tmp/package
+ ./build/package.py https://gerrit.onap.org/r/oom --application-repository_reference master --application-patch_file ./patches/onap.patch --output-dir ../packages --resources-directory ../resources
-So in the target directory you should find tar files with
+In the target directory you should find tar files:
::
- offline-<PROJECT_NAME>-<PROJECT_VERSION>-sw.tar
- offline-<PROJECT_NAME>-<PROJECT_VERSION>-resources.tar
- offline-<PROJECT_NAME>-<PROJECT_VERSION>-aux-resources.tar
+ sw_package.tar
+ resources_package.tar
+ aux_package.tar
Appendix 1. Step-by-step download procedure
@@ -261,14 +208,7 @@ Appendix 1. Step-by-step download procedure
--docker ./build/data_lists/onap_docker_images.list ../resources/offline_data/docker_images_for_nexus
-**Step 2 - building own dns image**
-
-::
-
- # We are building our own dns image within our offline infrastructure
- ./build/creating_data/create_nginx_image/01create-image.sh /tmp/resources/offline_data/docker_images_infra
-
-**Step 3 - git repos**
+**Step 2 - git repos**
::
@@ -276,21 +216,21 @@ Appendix 1. Step-by-step download procedure
./build/download/download.py --git ./build/data_lists/onap_git_repos.list ../resources/git-repo
-**Step 4 - npm packages**
+**Step 3 - npm packages**
::
# Following step will download all npm packages
./build/download/download.py --npm ./build/data_lists/onap_npm.list ../resources/offline_data/npm_tar
-**Step 5 - binaries**
+**Step 4 - binaries**
::
# Following step will download rke, kubectl and helm binaries
./build/download/download.py --http ./build/data_lists/infra_bin_utils.sh ../resources/downloads
-**Step 6 - rpms**
+**Step 5 - rpms**
::
@@ -299,7 +239,7 @@ Appendix 1. Step-by-step download procedure
createrepo ../resources/pkg/rhel
-**Step 7 - pip packages**
+**Step 6 - pip packages**
::