[
https://issues.apache.org/jira/browse/NIFI-7848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ram Viswanadha updated NIFI-7848:
---------------------------------
Description:
To make the docker image run on K8S and make the information stored resilient
to restarts and redeploy, some the configurations are needed. Here is a patch
file for the start.sh
{code:java}
diff --git a/nifi-docker/dockerhub/sh/start.sh
b/nifi-docker/dockerhub/sh/start.sh
index e4bc79a1d..e0d9524b9 100755
--- a/nifi-docker/dockerhub/sh/start.sh
+++ b/nifi-docker/dockerhub/sh/start.sh
@@ -63,6 +63,10 @@ prop_replace
'nifi.analytics.connection.model.implementation' "${NIFI_ANALYTIC
prop_replace 'nifi.analytics.connection.model.score.name'
"${NIFI_ANALYTICS_MODEL_SCORE_NAME:-rSquared}"
prop_replace 'nifi.analytics.connection.model.score.threshold'
"${NIFI_ANALYTICS_MODEL_SCORE_THRESHOLD:-.90}"
+prop_replace 'nifi.database.directory' "${NIFI_DATABASE_DIRECTORY}"
+prop_replace 'nifi.flow.configuration.archive.dir'
"${NIFI_FLOW_CONFIGURATION_ARCHIVE_DIR}"
+prop_replace 'nifi.flow.configuration.file'
"${NIFI_FLOW_CONFIGURATION_FILE}"
+
. "${scripts_dir}/update_cluster_state_management.sh"
# Check if we are secured or unsecured {code}
{code:java}
diff --git a/nifi-docker/dockerhub/sh/common.sh
b/nifi-docker/dockerhub/sh/common.sh
index f3ea43580..90b69b190 100755
--- a/nifi-docker/dockerhub/sh/common.sh
+++ b/nifi-docker/dockerhub/sh/common.sh
@@ -19,8 +19,10 @@
# 3 - file to perform replacement inline
prop_replace () {
target_file=${3:-${nifi_props_file}}
- echo 'replacing target file ' ${target_file}
- sed -i -e "s|^$1=.*$|$1=$2|" ${target_file}
+ key=$1
+ val=$2
+ echo 'replacing the value of ${key} with ${val} in target file '
${target_file}
+ sed -i -e "s|^${key}=.*$|${key}=${val}|" ${target_file}
}
uncomment() { {code}
was:
To make the docker image run on K8S and make the information stored resilient
to restarts and redeploy, some the configurations are needed. Here is a patch
file for the start.sh
{code:java}
diff --git a/nifi-docker/dockerhub/sh/start.sh
b/nifi-docker/dockerhub/sh/start.sh
index e4bc79a1d..e0d9524b9 100755
--- a/nifi-docker/dockerhub/sh/start.sh
+++ b/nifi-docker/dockerhub/sh/start.sh
@@ -63,6 +63,10 @@ prop_replace
'nifi.analytics.connection.model.implementation' "${NIFI_ANALYTIC
prop_replace 'nifi.analytics.connection.model.score.name'
"${NIFI_ANALYTICS_MODEL_SCORE_NAME:-rSquared}"
prop_replace 'nifi.analytics.connection.model.score.threshold'
"${NIFI_ANALYTICS_MODEL_SCORE_THRESHOLD:-.90}"
+prop_replace 'nifi.database.directory' "${NIFI_DATABASE_DIRECTORY}"
+prop_replace 'nifi.flow.configuration.archive.dir'
"${NIFI_FLOW_CONFIGURATION_ARCHIVE_DIR}"
+prop_replace 'nifi.flow.configuration.file'
"${NIFI_FLOW_CONFIGURATION_FILE}"
+
. "${scripts_dir}/update_cluster_state_management.sh"
# Check if we are secured or unsecured {code}
> missing configurations in start.sh
> -----------------------------------
>
> Key: NIFI-7848
> URL: https://issues.apache.org/jira/browse/NIFI-7848
> Project: Apache NiFi
> Issue Type: Bug
> Components: Docker
> Affects Versions: 1.12.1
> Reporter: Ram Viswanadha
> Priority: Major
>
> To make the docker image run on K8S and make the information stored resilient
> to restarts and redeploy, some the configurations are needed. Here is a patch
> file for the start.sh
> {code:java}
> diff --git a/nifi-docker/dockerhub/sh/start.sh
> b/nifi-docker/dockerhub/sh/start.sh
> index e4bc79a1d..e0d9524b9 100755
> --- a/nifi-docker/dockerhub/sh/start.sh
> +++ b/nifi-docker/dockerhub/sh/start.sh
> @@ -63,6 +63,10 @@ prop_replace
> 'nifi.analytics.connection.model.implementation' "${NIFI_ANALYTIC
> prop_replace 'nifi.analytics.connection.model.score.name'
> "${NIFI_ANALYTICS_MODEL_SCORE_NAME:-rSquared}"
> prop_replace 'nifi.analytics.connection.model.score.threshold'
> "${NIFI_ANALYTICS_MODEL_SCORE_THRESHOLD:-.90}"
>
> +prop_replace 'nifi.database.directory'
> "${NIFI_DATABASE_DIRECTORY}"
> +prop_replace 'nifi.flow.configuration.archive.dir'
> "${NIFI_FLOW_CONFIGURATION_ARCHIVE_DIR}"
> +prop_replace 'nifi.flow.configuration.file'
> "${NIFI_FLOW_CONFIGURATION_FILE}"
> +
> . "${scripts_dir}/update_cluster_state_management.sh"
>
> # Check if we are secured or unsecured {code}
>
>
> {code:java}
> diff --git a/nifi-docker/dockerhub/sh/common.sh
> b/nifi-docker/dockerhub/sh/common.sh
> index f3ea43580..90b69b190 100755
> --- a/nifi-docker/dockerhub/sh/common.sh
> +++ b/nifi-docker/dockerhub/sh/common.sh
> @@ -19,8 +19,10 @@
> # 3 - file to perform replacement inline
> prop_replace () {
> target_file=${3:-${nifi_props_file}}
> - echo 'replacing target file ' ${target_file}
> - sed -i -e "s|^$1=.*$|$1=$2|" ${target_file}
> + key=$1
> + val=$2
> + echo 'replacing the value of ${key} with ${val} in target file '
> ${target_file}
> + sed -i -e "s|^${key}=.*$|${key}=${val}|" ${target_file}
> }
>
> uncomment() { {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)