Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include inventory_to_use vars to add cluster's hosts in ambari_groups #155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ldebs
Copy link

@ldebs ldebs commented Jul 1, 2019

This change permit to create a file in vars that define the cluster by overriding some of the properties defined in 'all' file without modifying it.

For example, I create playbooks/group_vars/poc_cluster:
`---
cluster_name: 'poc_cluster'

ambari_admin_password: '123abc;'
default_password: '123abc'

blueprint_dynamic:

  • host_group: "hdp-master"
    clients: ['ZOOKEEPER_CLIENT', 'HDFS_CLIENT', 'YARN_CLIENT', 'MAPREDUCE2_CLIENT', 'TEZ_CLIENT', 'PIG', 'SQOOP', 'HIVE_CLIENT', 'OOZIE_CLIENT', 'INFRA_SOLR_CLIENT', 'SPARK2_CLIENT', 'HBASE_CLIENT']
    services: ['NAMENODE', 'SECONDARY_NAMENODE', 'ZOOKEEPER_SERVER', 'KAFKA_BROKER', 'RESOURCEMANAGER', 'APP_TIMELINE_SERVER', 'YARN_REGISTRY_DNS', 'TIMELINE_READER', 'HISTORYSERVER', 'HIVE_SERVER', 'HIVE_METASTORE', 'OOZIE_SERVER', 'HBASE_MASTER', 'SPARK2_JOBHISTORYSERVER', 'ZEPPELIN_MASTER', 'AMBARI_SERVER', 'INFRA_SOLR', 'NIFI_REGISTRY_MASTER']

  • host_group: "hdp-slave"
    clients: ['ZOOKEEPER_CLIENT', 'HDFS_CLIENT', 'YARN_CLIENT', 'MAPREDUCE2_CLIENT', 'TEZ_CLIENT', 'PIG', 'SQOOP', 'HIVE_CLIENT', 'OOZIE_CLIENT', 'INFRA_SOLR_CLIENT', 'SPARK2_CLIENT', 'HBASE_CLIENT']
    services: ['DATANODE', 'NODEMANAGER', 'HBASE_REGIONSERVER', 'NIFI_MASTER']
    `

@seanorama
Copy link
Collaborator

Is the goal to have a single copy of ansible-hortonworks which you can then point to different inventories and group_vars/_ files at each run?

If so, that is a good feature, however it will need a bit more work:

  1. Name 'inventory_to_use' isn't appropriate as it sounds like we are selecting the inventory.
  2. Would need to update all the scripts to use it.
  3. Would need a way to indicate you want to use it instead of 'all'.
    • Possibly defaulting to using the inventory name (i.e. group_vars/${inventory_to_use} and falling back to 'all' if it's not there).
    • Or adding a switch or variable to make it use the named vars file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants