Created 02-20-2017 10:46 PM
I have a VM with docker containers running HDP. If I shutdown the VM and restart - the containers come up along with ambar-server and agent, but I have to manally start each component. Is there an easy way to make all components start up in order?
Created 02-20-2017 10:47 PM
I recommend doing this via ambari rest api and start each service in the order you wish
API docs
Start/Stop all host components
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=41812517
Created 02-20-2017 10:47 PM
I recommend doing this via ambari rest api and start each service in the order you wish
API docs
Start/Stop all host components
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=41812517
Created 02-20-2017 10:57 PM
Thanks for the quick response. How does the sandbox actually start all the services? Is there an easier way vs having to keep track of all the services added/removed etc. ? I read somewhere there is some option in ambari.properties (but i can't seem to find anything) ?
Created 02-20-2017 11:46 PM
yes you can do it very ambari.properties. for full info go here:
IE
When an ambari agent starts, it bootstraps with the ambari server via registration. The server sends information to the agent about the components that have been enabled for auto start along with the other auto start properties in ambari.properties. The agent compares the current state of these components against the desired state, to determine if these components are to be installed, started, restarted or stopped.
Ambari.propertiesTo enable components for auto start, specify them using recover.enabled_components=A,B,C
# Enable Metrics Collector auto-restart
recovery.type=AUTO_START
recovery.enabled_components=METRICS_COLLECTOR
recovery.lifetime_max_count=1024
Here’s a sample snippet of the auto start configuration that is sent to the agent by the server during agent registration:
"recoveryConfig": {
"type" : "AUTO_START",
"maxCount" : 10,
"windowInMinutes" : 60,
"retryGap" : 0,
"enabledComponents" : "a,b",
“disabledComponents”: “c,d”
}
For example, if the current state of METRICS_COLLECTOR component on a host is INSTALLED but it is enabled for auto start, the desired state is STARTED. The recovery manager generates a start command for METRICS_COLLECTOR which is executed by the controller.
More on link provided
Created 02-21-2017 01:07 AM
Great. I'll try that out here shortly and report back.
Created 02-21-2017 04:13 AM
Is that on all the agents or on ambari server machine? I'm assuming _CLIENT components aren't needed. Thanks.
Created 02-21-2017 04:48 AM
Nevermind...its only on server 🙂 it does seem to work, but doesn't show it in "op"