summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorSamuli Silvius <s.silvius@partner.samsung.com>2019-02-05 09:45:24 +0200
committerSamuli Silvius <s.silvius@partner.samsung.com>2019-02-12 09:37:14 +0200
commitfe111116be4128a9fb90d175c38e0aa955e7e33f (patch)
tree37bc4f9830c5f9c68a5386e31dbc6056e77074e5 /build
parent6e5b45ab81ee9bfba2a396b65ffdd999abffc4e4 (diff)
Helm install optional and default values
Make Helm applicaton installation optional by allowing user not to provide Helm charts. Then only empty Kubernetes cluster will be installed. Provide some reasonable default values for Helm charts configuration variables both in package script and ansible installer itself. User provided Helm charts configuration must be in sync with packaging and installer, provided some clarifying comments for that. Issue-ID: OOM-1629 Change-Id: Ica9fc76856cb50c9d636bea99a326736736c7a56 Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
Diffstat (limited to 'build')
-rw-r--r--build/package.conf17
-rwxr-xr-xbuild/package.sh15
2 files changed, 23 insertions, 9 deletions
diff --git a/build/package.conf b/build/package.conf
index c3bbeee9..7a738f31 100644
--- a/build/package.conf
+++ b/build/package.conf
@@ -1,8 +1,7 @@
-# For the packaging script it is expected that all artifacts are present on local file system
-# (e.g. they can be mounted) Downloading stuff from internet is currently not supported.
-# Furthermore we don't want to replicate content of our static data_lists for download in there
-# and those are downloaded before this packaging script is supposed to be run.
-# Therefore we can limit number of artifacts to be added into packages just to couple of items.
+# For the packaging script it is expected that all artifacts are present on local file system.
+# Artifacts include:
+# - installer source code (this git repository content)
+# - all binary artifacts pre-downloaded from internet (docker images, rpm packages, npm packages, Maven artifacts etc.)
###########################
# Project specific params #
@@ -12,10 +11,14 @@
SOFTWARE_PACKAGE_BASENAME="onap-offline"
########################
-# Helm charts handling #
+# Helm charts #
########################
-# directory with helm charts
+# Provide application installed to Kubernetes cluster. Helm chart is the supported format https://helm.sh/.
+# Directory provided here must contain all the Chart directories of the application (https://docs.helm.sh/developing_charts/#charts) and Makefile.
+# E.g. in case of ONAP oom repo it will be the content of kubernetes directory.
+# NOTE: Leaving this variable commented out will mean that no Helm application will be installed to
+# offline Kubernetes cluster. This may be sometimes wanted.
#HELM_CHARTS_DIR=~/myclones/casablanca_oom/
###################
diff --git a/build/package.sh b/build/package.sh
index fd9b9e75..89764ccf 100755
--- a/build/package.sh
+++ b/build/package.sh
@@ -109,8 +109,8 @@ function create_sw_package {
then
echo "Helm charts handling"
# Copy charts available for ansible playbook to use/move them to target server/dir
- mkdir -p "${pkg_root}"/ansible/application/helm_charts
- cp -r "${HELM_CHARTS_DIR}"/* "${pkg_root}"/ansible/application/helm_charts
+ mkdir -p ${pkg_root}/${HELM_CHARTS_DIR_IN_PACKAGE}
+ cp -r "${HELM_CHARTS_DIR}"/* ${pkg_root}/${HELM_CHARTS_DIR_IN_PACKAGE}
fi
# Add metadata to the package
@@ -192,6 +192,17 @@ TIMESTAMP=$(date -u +%Y%m%dT%H%M%S)
SCRIPT_DIR=$(dirname "${0}")
LOCAL_PATH=$(readlink -f "$SCRIPT_DIR")
+# Relative location inside the package to place Helm charts to be available for
+# Ansible process to transfer them into machine (infra node) running Helm repository.
+# NOTE: This is quite hardcoded place to put them and agreement with Ansible code
+# is done in ansible/group_vars/all.yml with variable "app_helm_charts_install_directory"
+# whihc value must match to value of this variable (with exception of slash '/'
+# prepended so that ansible docker/chroot process can see the dir).
+# This variable can be of course changed in package.conf if really needed if
+# corresponding ansible variable "app_helm_charts_install_directory" value
+# adjusted accordingly.
+HELM_CHARTS_DIR_IN_PACKAGE="ansible/application/helm_charts"
+
if [ "$#" -lt 3 ]; then
echo "Missing some mandatory parameter!"
usage