Hi Sid,
                Below are the steps I followed to keep the service installation 
in an order.

1.       I have modified the below file and restarted ambari-server:
                                vi 
/var/lib/ambari-server/resources/stacks/HDP/2.0.6/role_command_order.json
                                #added below lines
                                "A_HANDLER-INSTALL" : ["B_HANDLER-INSTALL", 
"C_HANDLER-INSTALL"],
                                "A_HANDLER-START": ["B_HANDLER-START", 
"C_HANDLER-START"],


2.       But, while installing the services the installation order was 
happening in Alphabetical order.

3.       I want the order to be C, B and A.

Am I missing something here.


Thanks,
Satya.
From: Siddharth Wagle [mailto:[email protected]]
Sent: 05 March 2015 01:58
To: [email protected]
Subject: Re: Adding install priority to custom services


Hi Satya,



Take a look at the

ambari-server/src/main/resources/role_command_order.json



This json structure is used to build the dependency graph between components.

Every stack overrides this file to add order between new components that the 
stack introduces, so that the base copy of this file remains unchanged.



In your case, if you add INSTALL time or START time dependencies between 
service2 to service1 components, Ambari will re-order the commands 
automatically.

Note: Format of the keys in the json is "ComponentName"-"Command" (Commands: 
START, INSTALL, UPGRADE, SERVICE_CHECK).



BR,

Sid



________________________________
From: Satyanarayana Jampa <[email protected]<mailto:[email protected]>>
Sent: Wednesday, March 04, 2015 3:08 AM
To: [email protected]<mailto:[email protected]>
Subject: Adding install priority to custom services

I have created some custom services, and in my case the "service2" needs 
"service1" to be installed first as it is needed for service2 to function 
properly.
How can I specify the dependency or order in which the services should be 
installed.

Thanks,
Satya.


Reply via email to