Hello,
This is Mahesh from Pivotal. We are working on cross-stack definition
inheritance story which require design inputs from Ambari team, as it needs
some changes in HDP stack definitions.
Here is the case that we are trying to solve:
Currently, Ambari supports inheriting stack definitions within a particular
stack, for example, HDP-2.2 stack definition inherits HDP-2.1. But
inheritance between stacks is not yet supported, like PHD inheriting HDP
stack definition. We are working on adding this support.
Design problem that we are facing:
Supporting cross-stack definition inheritance means both HDP and PHD
definitions should be deployed while deploying PHD cluster. As both
definitions are deployed, we need to make HDP definitions as in-active,
otherwise, HDP option will show up for PHD based deployment. In order to do
so, we need to change some logic in HDP definitions as well and that's
where we need input.
Below are the options that we are proposing, please feel free to give
comments,
Option-1:
Introducing two properties, hdp.active & hdp.inactive, in main pom.xml and
all HDP stack definitions will be updated to use these properties to
enable/disable stacks. While building for PHD, both will be set to false.
./pom.xml:
<stack.distribution>HDP</stack.distribution>
+ <hdp.active>true</hdp.active>
+ <hdp.inactive>false</hdp.inactive>
</properties>
./ambari-server/src/main/resources/stacks/HDP/2.2/metainfo.xml
<versions>
- <active>true</active>
+ <active>${hdp.active}</active>
</versions>
./ambari-server/src/main/resources/stacks/HDP/2.0.6/metainfo.xml
<versions>
- <active>false</active>
+ <active>${hdp.inactive}</active>
</versions>
Option-2:
Adding property per stack definition to enable/disable stacks. While
building for PHD, all those properties will be set to false.
./pom.xml:
<stack.distribution>HDP</stack.distribution>
+ <hdp.22.active>true</hdp.22.active>
+ <hdp.21.active>true</hdp.21.active>
+ <hdp.206.active>false</hdp.206.active>
</properties>
./ambari-server/src/main/resources/stacks/HDP/2.2/metainfo.xml
<versions>
- <active>true</active>
+ <active>${hdp.22.active}</active>
</versions>
./ambari-server/src/main/resources/stacks/HDP/2.1/metainfo.xml
<versions>
- <active>true</active>
+ <active>${hdp.21.active}</active>
</versions>
./ambari-server/src/main/resources/stacks/HDP/2.0.6/metainfo.xml
<versions>
- <active>false</active>
+ <active>${hdp.206.active}</active>
</versions>
Thanks in advance for the inputs.
Thanks,
Mahesh