From 3f7ffab12fdd653776bf652c78ea64a740c9613a Mon Sep 17 00:00:00 2001 From: Jean-Marie Gervais Date: Thu, 5 Sep 2024 15:26:22 +0200 Subject: [PATCH] feat: globalize root_dir variables --- tdp_vars_defaults/exporter/exporter.yml | 3 +-- tdp_vars_defaults/hadoop/hadoop.yml | 5 ++--- tdp_vars_defaults/hbase/hbase.yml | 9 ++++----- tdp_vars_defaults/hive/hive.yml | 7 +++---- tdp_vars_defaults/knox/knox.yml | 5 ++--- tdp_vars_defaults/ranger/ranger.yml | 7 +++---- tdp_vars_defaults/spark/spark.yml | 2 +- tdp_vars_defaults/spark3/spark3.yml | 2 +- tdp_vars_defaults/tdp-cluster/tdp-cluster.yml | 2 ++ tdp_vars_defaults/zookeeper/zookeeper.yml | 5 ++--- 10 files changed, 21 insertions(+), 26 deletions(-) diff --git a/tdp_vars_defaults/exporter/exporter.yml b/tdp_vars_defaults/exporter/exporter.yml index 87ffd618..9b416231 100644 --- a/tdp_vars_defaults/exporter/exporter.yml +++ b/tdp_vars_defaults/exporter/exporter.yml @@ -9,8 +9,7 @@ jmx_exporter_release: jmx_prometheus_javaagent-0.16.1 jmx_exporter_dist_file: "{{ jmx_exporter_release }}.jar" -# jmx exporter installation directory -jmx_exporter_root_dir: /opt/tdp/jmx-exporter +# jmx exporter installation file jmx_exporter_install_file: "{{ jmx_exporter_root_dir }}/jmx-exporter.jar" # jmx exporter configuration directory diff --git a/tdp_vars_defaults/hadoop/hadoop.yml b/tdp_vars_defaults/hadoop/hadoop.yml index 55b6b205..a497ef2a 100644 --- a/tdp_vars_defaults/hadoop/hadoop.yml +++ b/tdp_vars_defaults/hadoop/hadoop.yml @@ -11,7 +11,7 @@ mapred_user: mapred hadoop_group: hadoop # Hadoop installation directory -hadoop_root_dir: /opt/tdp +hadoop_root_dir: "{{ tdp_root_dir }}" hadoop_install_dir: "{{ hadoop_root_dir }}/hadoop" # Hadoop configuration directories @@ -31,8 +31,7 @@ hadoop_jhs_conf_dir: "{{ hadoop_root_conf_dir }}/conf.jhs" hadoop_pid_dir: /run/hadoop hadoop_client_pid_dir: /run/hadoop/$USER -# jmx exporter installation directory -jmx_exporter_root_dir: /opt/tdp/jmx-exporter +# jmx exporter installation file jmx_exporter_install_file: "{{ jmx_exporter_root_dir }}/jmx-exporter.jar" # jmx exporter configuration directory diff --git a/tdp_vars_defaults/hbase/hbase.yml b/tdp_vars_defaults/hbase/hbase.yml index 9ade9fec..dabf01d9 100644 --- a/tdp_vars_defaults/hbase/hbase.yml +++ b/tdp_vars_defaults/hbase/hbase.yml @@ -16,7 +16,7 @@ hbase_user: hbase hadoop_group: hadoop # HBase installation directory -hbase_root_dir: /opt/tdp +hbase_root_dir: "{{ tdp_root_dir }}" hbase_install_dir: "{{ hbase_root_dir }}/hbase" # Hadoop configuration directory @@ -30,8 +30,7 @@ hbase_rs_conf_dir: "{{ hbase_root_conf_dir }}/conf.rs" hbase_rest_conf_dir: "{{ hbase_root_conf_dir }}/conf.rest" hbase_client_conf_dir: "{{ hbase_root_conf_dir }}/conf" -# jmx exporter installation directory -jmx_exporter_root_dir: /opt/tdp/jmx-exporter +# jmx exporter installation file jmx_exporter_install_file: "{{ jmx_exporter_root_dir }}/jmx-exporter.jar" # jmx exporter configuration directory @@ -171,10 +170,10 @@ phoenix_queryserver_release: phoenix-queryserver-6.0.0-0.0 phoenix_queryserver_dist_file: "{{ phoenix_queryserver_release }}-bin.tar.gz" # Phoenix installation directory -phoenix_root_dir: /opt/tdp +phoenix_root_dir: "{{ tdp_root_dir }}" phoenix_install_dir: "{{ phoenix_root_dir }}/phoenix" -phoenix_queryserver_root_dir: /opt/tdp +phoenix_queryserver_root_dir: "{{ tdp_root_dir }}" phoenix_queryserver_install_dir: "{{ phoenix_queryserver_root_dir }}/phoenix-queryserver" # Phoenix configuration directories diff --git a/tdp_vars_defaults/hive/hive.yml b/tdp_vars_defaults/hive/hive.yml index e84f4bff..db7765ec 100644 --- a/tdp_vars_defaults/hive/hive.yml +++ b/tdp_vars_defaults/hive/hive.yml @@ -11,7 +11,7 @@ hive_user: hive hadoop_group: hadoop # Hive installation directory -hive_root_dir: /opt/tdp +hive_root_dir: "{{ tdp_root_dir }}" hive_install_dir: "{{ hive_root_dir }}/hive" # Hive configuration directories @@ -162,7 +162,7 @@ tez_release: tez-0.9.1-1.0 tez_dist_file: "{{ tez_release }}.tar.gz" # Tez installation directory -tez_root_dir: /opt/tdp +tez_root_dir: "{{ tdp_root_dir }}" tez_install_dir: "{{ tez_root_dir }}/tez" # tez_site.xml @@ -199,8 +199,7 @@ hive_default_heapsize: 256m hive_hs2_heapsize: 1024m hive_metastore_heapsize: 1024m -# jmx exporter installation directory -jmx_exporter_root_dir: /opt/tdp/jmx-exporter +# jmx exporter installation file jmx_exporter_install_file: "{{ jmx_exporter_root_dir }}/jmx-exporter.jar" # jmx exporter configuration directory diff --git a/tdp_vars_defaults/knox/knox.yml b/tdp_vars_defaults/knox/knox.yml index 71f21573..beaacacb 100644 --- a/tdp_vars_defaults/knox/knox.yml +++ b/tdp_vars_defaults/knox/knox.yml @@ -15,7 +15,7 @@ knox_user: knox knox_group: hadoop # Knox installation directory -knox_root_dir: /opt/tdp +knox_root_dir: "{{ tdp_root_dir }}" knox_install_dir: "{{ knox_root_dir }}/knox" knoxshell_install_dir: "{{ knox_root_dir }}/knoxshell" @@ -209,8 +209,7 @@ ranger_knox_service_properties: # Knox Gateway resources allocation knox_gateway_heapsize: 1024m -# jmx exporter installation directory -jmx_exporter_root_dir: /opt/tdp/jmx-exporter +# jmx exporter installation file jmx_exporter_install_file: "{{ jmx_exporter_root_dir }}/jmx-exporter.jar" # jmx exporter configuration directory diff --git a/tdp_vars_defaults/ranger/ranger.yml b/tdp_vars_defaults/ranger/ranger.yml index 0daa59cd..323e1ce0 100644 --- a/tdp_vars_defaults/ranger/ranger.yml +++ b/tdp_vars_defaults/ranger/ranger.yml @@ -16,7 +16,7 @@ ranger_kms_user: keyadmin hadoop_group: hadoop # Ranger installation directory -ranger_root_dir: /opt/tdp +ranger_root_dir: "{{ tdp_root_dir }}" ranger_install_dir: "{{ ranger_root_dir }}/ranger" ranger_usersync_install_dir: "{{ ranger_root_dir }}/ranger-usersync" ranger_kms_install_dir: "{{ ranger_root_dir }}/ranger-kms" @@ -131,7 +131,7 @@ solr_dist_file: "{{ solr_release }}.tgz" solr_user: solr # Solr installation directory -solr_root_dir: /opt/tdp +solr_root_dir: "{{ tdp_root_dir }}" solr_install_dir: "{{ solr_root_dir }}/ranger_solr" # Solr configuration directories @@ -156,8 +156,7 @@ ranger_solr_heapsize: 1024m ranger_solr_datadir: "{{ solr_root_dir }}/{{ solr_release }}/server/solr" -# jmx exporter installation directory -jmx_exporter_root_dir: /opt/tdp/jmx-exporter +# jmx exporter installation file jmx_exporter_install_file: "{{ jmx_exporter_root_dir }}/jmx-exporter.jar" # jmx exporter configuration directory diff --git a/tdp_vars_defaults/spark/spark.yml b/tdp_vars_defaults/spark/spark.yml index 84b926ac..65e27087 100644 --- a/tdp_vars_defaults/spark/spark.yml +++ b/tdp_vars_defaults/spark/spark.yml @@ -16,7 +16,7 @@ spark_user: spark hadoop_group: hadoop # Spark installation directory -spark_root_dir: /opt/tdp +spark_root_dir: "{{ tdp_root_dir }}" spark_install_dir: "{{ spark_root_dir }}/spark" # Spark configuration directories diff --git a/tdp_vars_defaults/spark3/spark3.yml b/tdp_vars_defaults/spark3/spark3.yml index 88a3b704..1a2534d6 100644 --- a/tdp_vars_defaults/spark3/spark3.yml +++ b/tdp_vars_defaults/spark3/spark3.yml @@ -16,7 +16,7 @@ spark_user: spark hadoop_group: hadoop # Spark installation directory -spark_root_dir: /opt/tdp +spark_root_dir: "{{ tdp_root_dir }}" spark_install_dir: "{{ spark_root_dir }}/spark3" # Spark configuration directories diff --git a/tdp_vars_defaults/tdp-cluster/tdp-cluster.yml b/tdp_vars_defaults/tdp-cluster/tdp-cluster.yml index 4af130ff..4d0689af 100644 --- a/tdp_vars_defaults/tdp-cluster/tdp-cluster.yml +++ b/tdp_vars_defaults/tdp-cluster/tdp-cluster.yml @@ -10,6 +10,8 @@ binaries_local_dir: "{{ lookup('env', 'PWD') }}/files" # Directory where TDP component releases are uploaded for each host binaries_upload_dir: /tmp +tdp_root_dir: /opt/tdp +jmx_exporter_root_dir: "{{ tdp_root_dir }}/jmx-exporter" # Name of the cluster. Used as HDFS nameservice and YARN cluster ID cluster_name: mycluster diff --git a/tdp_vars_defaults/zookeeper/zookeeper.yml b/tdp_vars_defaults/zookeeper/zookeeper.yml index abf46e64..2470a826 100644 --- a/tdp_vars_defaults/zookeeper/zookeeper.yml +++ b/tdp_vars_defaults/zookeeper/zookeeper.yml @@ -12,7 +12,7 @@ zookeeper_user: zookeeper hadoop_group: hadoop # ZooKeeper installation directory -hadoop_root_dir: /opt/tdp +hadoop_root_dir: "{{ tdp_root_dir }}" zookeeper_install_dir: "{{ hadoop_root_dir }}/zookeeper" # ZooKeeper configuration directories @@ -86,8 +86,7 @@ zk_start_on_boot: false # Service restart policies zk_restart: "no" -# jmx exporter installation directory -jmx_exporter_root_dir: /opt/tdp/jmx-exporter +# jmx exporter installation file jmx_exporter_install_file: "{{ jmx_exporter_root_dir }}/jmx-exporter.jar" jmx_common_opts: "-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.ssl=true" jmx_exporter_zk_file: zk.yml