ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Sen <>
Subject Re: Ambari commandScript running on ambari server itself
Date Thu, 12 Nov 2015 08:30:33 GMT
5. Check YOUR_MASTER_COMPONENT? for deployment and ambari server node

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


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




3. Implement certificates generation logic at YOUR_SERVICE/1.0/scripts/
. 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


Dmytro Sen

From: Henning Kropp <>
Sent: Wednesday, November 11, 2015 11:21 PM
Subject: Re: Ambari commandScript running on ambari server itself


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?


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


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.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 ?

View raw message