...
Question: How do I provide my own label and icon for the custom action in UI?
In Ambari UI, add your component action to the App.HostComponentActionMap object with custom icon and name. Ex: REBALANCEHDFS.
Question: How do I provide custom UI side logic for the action, to show or enable the action?
Configuration
Configuration files for a service should be placed by default in the configuration folder.
If a different named folder has to be used, the <configuration-dir> element can be used in metainfo.xml to point to that folder.
...
You can read more about the widgets descriptor in the Enhanced Service Dashboard page.
Define Stack
A stack is a versioned collection of services. Each stack is a folder is defined in ambari-server/src/main/resources/stacks source. Once installed, these stack definitions are available on the ambari-server machine at /var/lib/ambari-server/resources/stacks.
Each stack folder contains one sub-folder per version of the stack. Some of these stack-versions are active while some are not. Each stack-version includes services which are either referenced from common-services, or defined inside the stack-version's services folder.
Example: HDP stack. HDP-2.4 stack version.
Stack-Version Descriptor
Each stack-version should provide a metainfo.xml (Example: HDP-2.3, HDP-2.4) descriptor file which describes the following about this stack-version:
Code Block |
---|
<metainfo>
<versions>
<active>true</active>
</versions>
<extends>2.3</extends>
<minJdk>1.7</minJdk>
<maxJdk>1.8</maxJdk>
</metainfo> |
- versions/active - Whether this stack-version is still available for install. If not available, this version will not show up in UI during install.
- extends - The stack-version in this stack that is being extended. Extended stack-versions inherit services along with almost all aspects of the parent stack-version.
- minJdk - Minimum JDK with which this stack-version is supported. Users are warned during installer wizard if the JDK used by Ambari is lower than this version.
- maxJdk - Maximum JDK with which this stack-version is supported. Users are warned during installer wizard if the JDK used by Ambari is greater than this version.
Services
Each stack-version includes services which are either referenced from common-services, or defined inside the stack-version's services folder.
Command Order
Repositories
...