Use variables for kafka config/log dirs as they can be different,
starting from OC 4.1
Change-Id: Ib1de79627ae889794b63d778b5cc861f43972198
Related-PROD: PROD-25533
diff --git a/opencontrail/control/analytics4_0.yml b/opencontrail/control/analytics4_0.yml
index f0cf352..ed6fb15 100644
--- a/opencontrail/control/analytics4_0.yml
+++ b/opencontrail/control/analytics4_0.yml
@@ -6,8 +6,9 @@
- system.haproxy.proxy.listen.opencontrail.analytics
parameters:
_param:
+ opencontrail_kafka_config_dir: '/usr/share/kafka/config'
opencontrail_kafka_log_cleanup_mtime: '+7'
- opencontrail_kafka_log_cleanup_dir: '/usr/share/kafka/logs/'
+ opencontrail_kafka_log_dir: '/usr/share/kafka/logs'
opencontrail_version: 4.0
linux_repo_contrail_component: oc40
opencontrail_image_tag: latest
@@ -27,7 +28,7 @@
- nf_conntrack_ipv4
job:
kafka_logs_cleanup:
- command: "find ${_param:opencontrail_kafka_log_cleanup_dir} -name '*.log.*' -type f -mtime ${_param:opencontrail_kafka_log_cleanup_mtime} -exec rm {} \\;"
+ command: "find ${_param:opencontrail_kafka_log_dir} -name '*.log.*' -type f -mtime ${_param:opencontrail_kafka_log_cleanup_mtime} -exec rm {} \\;"
identifier: kafka_logs_cleanup
hour: 0
minute: 0
@@ -101,10 +102,10 @@
- /var/lib/analyticsdb:/var/lib/cassandra
- /var/lib/analyticsdb_zookeeper_data:/var/lib/zookeeper
- /var/lib/zookeeper/myid:/var/lib/zookeeper/myid
- - /usr/share/kafka/config/server.properties:/usr/share/kafka/config/server.properties
- - /usr/share/kafka/config/consumer.properties:/usr/share/kafka/config/consumer.properties
- - /usr/share/kafka/config/zookeeper.properties:/usr/share/kafka/config/zookeeper.properties
- - /usr/share/kafka/logs:/usr/share/kafka/logs
+ - ${_param:opencontrail_kafka_config_dir}/server.properties:${_param:opencontrail_kafka_config_dir}/server.properties
+ - ${_param:opencontrail_kafka_config_dir}/consumer.properties:${_param:opencontrail_kafka_config_dir}/consumer.properties
+ - ${_param:opencontrail_kafka_config_dir}/zookeeper.properties:${_param:opencontrail_kafka_config_dir}/zookeeper.properties
+ - ${_param:opencontrail_kafka_log_dir}:${_param:opencontrail_kafka_log_dir}
- /etc/zookeeper/conf/zoo_analytics.cfg:/etc/zookeeper/conf/zoo.cfg
- /etc/zookeeper/conf/log4j.properties:/etc/zookeeper/conf/log4j.properties
- /var/log/contrail:/var/log/contrail