Created 01-26-2017 02:58 PM
I'm implementing the Ambari service and need to have it started aotumatically after cluster was started. Is there some option in metainfo.xml to enable this?
Created 01-26-2017 03:52 PM
You may want to refer to the following article which talks about a new feature added to ambari 2.4 in order to have dynamic auto-recovery, which allows auto-start properties to be configured without needing an ambari-agent / ambari-server restart.
Example: {"recovery_enabled":"true"}
curl -u admin:<password> -H "X-Requested-By: ambari" -X PUT 'http://localhost:8080/api/v1/clusters/<cluster_name>/components?ServiceComponentInfo/component_name.in(HBASE_REGIONSERVER)' -d '{"ServiceComponentInfo" : {"recovery_enabled":"true"}}'
In the above curl call you can define your own service component. Above will help in setting auto start in case of host reboot.
Also for your custom service you may customize your scripts like "package/scripts" to have your own desired start feature.
- You can take a look at the "metainfo.xml" file of AMS something like following 'recovery_enabled':
<component> <name>METRICS_COLLECTOR</name> <displayName>Metrics Collector</displayName> <category>MASTER</category> <recovery_enabled>true</recovery_enabled>
- More info regarding this feature for ambari 2.4.x (and prior versions can be found at:
https://cwiki.apache.org/confluence/display/AMBARI/Recovery%3A+auto+start+components )
.
Created 01-26-2017 03:23 PM
After adding a service you wanted to start that service automatically? May be you can include the start script/command in the install section itself.
Created 01-26-2017 06:12 PM
Nope, it is already started. But if cluster restarts (e.g. power outage) my service is down and needs to be started manualy
Created 01-26-2017 03:52 PM
You may want to refer to the following article which talks about a new feature added to ambari 2.4 in order to have dynamic auto-recovery, which allows auto-start properties to be configured without needing an ambari-agent / ambari-server restart.
Example: {"recovery_enabled":"true"}
curl -u admin:<password> -H "X-Requested-By: ambari" -X PUT 'http://localhost:8080/api/v1/clusters/<cluster_name>/components?ServiceComponentInfo/component_name.in(HBASE_REGIONSERVER)' -d '{"ServiceComponentInfo" : {"recovery_enabled":"true"}}'
In the above curl call you can define your own service component. Above will help in setting auto start in case of host reboot.
Also for your custom service you may customize your scripts like "package/scripts" to have your own desired start feature.
- You can take a look at the "metainfo.xml" file of AMS something like following 'recovery_enabled':
<component> <name>METRICS_COLLECTOR</name> <displayName>Metrics Collector</displayName> <category>MASTER</category> <recovery_enabled>true</recovery_enabled>
- More info regarding this feature for ambari 2.4.x (and prior versions can be found at:
https://cwiki.apache.org/confluence/display/AMBARI/Recovery%3A+auto+start+components )
.