summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Ptacek <m.ptacek@partner.samsung.com>2019-03-08 08:34:07 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-08 08:34:07 +0000
commitbdababf6496d20be5723740041b63a1855535c32 (patch)
treea2f8f6f929183b1fcf39e87e876da3e8398f109b
parent0fa3cf91c1d9609c4d9323dc611be354d72ba8d5 (diff)
parent652e41d93456b52bff533ef2602cbe87faad9a50 (diff)
Merge "Refine application_pre_install_role variable usage"
-rw-r--r--ansible/.gitignore1
-rw-r--r--ansible/application/README.md15
-rwxr-xr-xansible/group_vars/all.yml4
-rw-r--r--build/package.conf10
-rwxr-xr-xconfig/application_configuration.yml6
5 files changed, 20 insertions, 16 deletions
diff --git a/ansible/.gitignore b/ansible/.gitignore
index 521beaa8..e5505c9e 100644
--- a/ansible/.gitignore
+++ b/ansible/.gitignore
@@ -1,2 +1,3 @@
ansible_chroot
application/*
+certs/
diff --git a/ansible/application/README.md b/ansible/application/README.md
index d260b3cb..36f69bd5 100644
--- a/ansible/application/README.md
+++ b/ansible/application/README.md
@@ -6,9 +6,10 @@ also on target server where package is installed.
## Application configuration
-All application related configuration variables are defined in file
-`application_configuration.yml` in this folder. The name of configuration file
-does not matter but it must be given to ansible run as command line variable file.
+All application related configuration variables are defined in the
+`application_configuration.yml` file in this folder. The name of the configuration
+file can be altered but it must be passed to ansible run as command line
+variable file nevertheless.
Example:
```
@@ -26,12 +27,14 @@ Helm charts transfer from packaging up to the target infra server.
## Application specific roles
Installer supports optional custom pre and post install roles. Custom roles' code folders
-are placed to this directory at packaging time and name of those folders are configured in
-application.yml with variable `application_pre_install_role` and `application_post_install_role`.
+are placed into this directory at packaging time and names of those folders shall be configured in
+application_configuration.yml with variable `application_pre_install_role` and `application_post_install_role`.
+Note that these directory names must correspond to those configured in APP_CONFIGURATION inside package.conf
+during package build time.
Example:
```
-application_pre_install_role: "{{ app_name }}-patch-role"
+application_pre_install_role: "my-pre-install-role"
```
## Inventory hosts
diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml
index 2171562c..0d22ac5d 100755
--- a/ansible/group_vars/all.yml
+++ b/ansible/group_vars/all.yml
@@ -110,7 +110,7 @@ app_helm_charts_infra_directory: "{{ app_data_path }}/helm_charts"
# Main Helm chart to install
# e.g. app_helm_chart_name: onap
-app_helm_chart_name: "{{ app_name }}"
+app_helm_chart_name:
# Targets for helm charts repository build
# e.g. for ONAP Casablanca
@@ -134,7 +134,7 @@ app_kubernetes_namespace: "{{ app_name }}"
# Optional application custom Ansible roles name for pre and post install logic.
# Location of additional custom roles is defined in ansible.cfg with roles_path.
-# e.g. application_pre_install_role: "{{ app_name }}-patch-role"
+# e.g. application_pre_install_role: "my-pre-install-role"
application_pre_install_role:
application_post_install_role:
diff --git a/build/package.conf b/build/package.conf
index 29ca3cb1..7d6a1b8f 100644
--- a/build/package.conf
+++ b/build/package.conf
@@ -30,12 +30,12 @@ HELM_CHARTS_DIR=/tmp/oom-clone/kubernetes
# APP_CONFIGURATION array variable can be used to provide files/directories
# into sw package available for the Ansible process to consume.
-# The main configuration for you application is a yml file
+# The main configuration file for your application is
# "application_configuration.yml" (name of file can be anything) where user
-# need to provide values to control ansible installer process. Yml file is given
+# shall provide values to control ansible installer process. Yml file is given
# as command line parameter to ansible run.
# See more from UserGuide documentation (LINK HERE) how to use installer.
-# Available configuration parameters user can configure is seen from group_vars files:
+# Available configuration parameters user can configure are seen from group_vars files:
# ansible/group_vars/all.yml
# ansible/group_vars/infrastucture.yml
# ansible/group_vars/kubernetes.yml
@@ -46,10 +46,10 @@ HELM_CHARTS_DIR=/tmp/oom-clone/kubernetes
# application_pre_install_role: my-pre-install-role
# application_post_install_role: my-post-install-role
# And according to Ansible functionality, roles' code must be placed to directories
-# with the same name.
+# with the same name:
#APP_CONFIGURATION=(
# <offline-installer-clone>/config/application_configuration.yml
-# <offline-installer-clone>/patches/onap-casablanca-patch-role
+# <offline-installer-clone>/patches/my-pre-install-role
# ~/myappfiles/my-post-install-role
#)
APP_CONFIGURATION=(
diff --git a/config/application_configuration.yml b/config/application_configuration.yml
index 25737edb..12dc13ab 100755
--- a/config/application_configuration.yml
+++ b/config/application_configuration.yml
@@ -16,6 +16,6 @@ certificates:
locality_name: Krakow
app_helm_build_targets:
- all
- - "{{ app_name }}"
-application_pre_install_role: "{{ app_name }}-casablanca-patch-role"
-
+ - onap
+app_helm_chart_name: onap
+application_pre_install_role: "onap-casablanca-patch-role"