5. Check YOUR_MASTER_COMPONENT? for deployment and ambari server node

________________________________
From: Dmitry Sen <[email protected]>
Sent: Thursday, November 12, 2015 9:54 AM
To: [email protected]
Subject: Re: Ambari commandScript running on ambari server itself


Hi,


You can

1. Define a new master component for your service in metainfo.xml

2. Create for your stack role_command_order.json like 
stacks/HDP/2.3/role_command_order.json? , add here dependency

"YOUR_OTHER_COMPONENTS-START" : ["YOUR_MASTER_COMPONENT-START"],

or

"YOUR_OTHER_COMPONENTS-INSTALL" : ["YOUR_MASTER_COMPONENT-START"],?

3. Implement certificates generation logic at 
YOUR_SERVICE/1.0/scripts/master_component.py . The certificates should be 
located under /var/lib/ambari-server/resources/ , it's a shared directory by 
ambari server:8080

4. Install ambari agent on the Ambari Server node


BR,

Dmytro Sen

________________________________
From: Henning Kropp <[email protected]>
Sent: Wednesday, November 11, 2015 11:21 PM
To: [email protected]
Subject: Re: Ambari commandScript running on ambari server itself

Hi,

maybe 
/var/lib/ambari-server/resources/custom_action_definitions/system_action_definitions.xml
 and /var/lib/ambari-server/resources/custom_actions/scripts could work for 
your purposes?

Regards


---- On Mi, 11 Nov 2015 19:27:04 +0100 Constantine Yarovoy <[email protected]> 
wrote ----

Hi!

I am developing my own custom app stack and bunch of services for Ambari (not 
related to HDP).
And I have a specific requirement - run some code locally on Ambari server 
right after deployment process starts but before any service components are 
installed on chosen hosts.
This "local" code is supposed to do 2 operations:
1) generate some files (e.g. certificates/tokens)
2) that are to be copied/distributed to all master hosts.

Something similar can be found in Ansible and it's named "local-action".

Is there any recommended way to declare such local command script that runs on 
Ambari Server itself ? I mean, of course, I have 2 options for desired 
automation, but they all "suck", I think:

- I can code it in Ansible or bash and run prior to cluster deployment
- I can code it in inside master commandScript's install function with 
Execute("generate.sh > generate.out && scp generate.out 
user@master-host-1:/home/user/").

But it'd be much better if Ambari had such functionality and I could have done 
all operations from just a single Ambari Web Ui.

Any suggestions ?

Reply via email to