Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The idea is to allow extending a stack definition and overriding some of its values.
Current stack definition structure of files and directories:
|_ stacks |_ <dist_name> |_ <version_number> metainfo.xml |_ repos repoinfo.xml |_ services |_ <service_name> metainfo.xml |_ configuration configuration files
We introduce extends element at the top level (stack version level) that links to the parent stack definition for this stack version.
Rules of extension:
1. All of the parent stack services are automatically a part of the child stack unless explicitly excluded.
2. Only one parent stack can be extended by the child stack.
3. <stacks>.<dist_name>.<repos>.repoinfo.xml, will not be overridden
4. All service configurations unless explicitly excluded are a part of the child service definition.
1. Extending stack definition
File: <stacks>.<dist_name>.<version_number>.metainfo.xml
E.g.: /stacks/HDP/1.3.1/metainfo.xml
<metainfo> <versions> <upgrade>1.2.0</upgrade> </versions> <active>true</active> <extends>1.3.0</extends> </metainfo>
2. Extending service definition
<stacks>.<dist_name>.<version_number>.<service_name>.metainfo.xml
E.g.: /stacks/HDP/1.2.1/services/HDFS/metainfo.xml
<metainfo> <user>root</user> <comment>Apache Hadoop Distributed File System</comment> <version>1.1.2</version> <deleted>false<deleted> </metainfo>
2.1 Extending component definition
Components can be added or deleted from the stack.
<component> <name>YARN_CLIENT</name> <category>CLIENT</category> <deleted>true</deleted> </component>
3. Extending service configurations
File: <stacks>.<dist_name>.<version_number>.<service_name>.<configuration>.configuration_file
E.g.: /stacks/HDP/1.3.1/services/HDFS/configuration/hdfs-site.xml
<configuration> <property> <name>dfs.name.dir</name> <deleted>true</deleted> </property> </configuration>
Notes:
The same property can disappear and reappear in an extension graph.
1.3.0 ----------------> 1.3.1 ----------------> 1.3.2 ----------------> 1.3.5 a = b a = c a = c
Attachments
Attachments
Issue Links
- is related to
-
AMBARI-2714 Ability to dynamically add services to a stack.
- Resolved
-
AMBARI-4358 Add stack extension support for pluggable services
- Resolved