Created 06-07-2016 06:07 PM
Hi,
I need to execute a shell script in a remote server from hadoop server. So I am planning to use oozie SSH action for this. I have 2 basic questions regarding oozie actions.
1. for passwordless SSH, I need to share the public keys between 2 servers. In case of oozie SSH action, where does the oozie workflow initiate the SSH action from? Does it execute from any of the data nodes? If so, how to setup the SSH or get the public keys.
2. Does the oozie Shell action execute from any of the available data nodes or is there any specific way this execution server is identified?
Thanks!
Created 06-07-2016 06:30 PM
When you create the SSH action, you can give Oozie the username and hostname to execute the command:
<workflow-app name="[WF-DEF-NAME]" xmlns="uri:oozie:workflow:0.1"> ... <action name="[NODE-NAME]"> <ssh xmlns="uri:oozie:ssh-action:0.1"> <host>[USER]@[HOST]</host> <command>[SHELL]</command> <args>[ARGUMENTS]</args> ... <capture-output/> </ssh> <ok to="[NODE-NAME]"/> <error to="[NODE-NAME]"/> </action> ... </workflow-app>
The command needs to exist on the node you specify, and the command will be run as the user specified in the action definition from that user's home directory. This page of the oozie docs has some additional information as well.
Created 06-07-2016 06:30 PM
When you create the SSH action, you can give Oozie the username and hostname to execute the command:
<workflow-app name="[WF-DEF-NAME]" xmlns="uri:oozie:workflow:0.1"> ... <action name="[NODE-NAME]"> <ssh xmlns="uri:oozie:ssh-action:0.1"> <host>[USER]@[HOST]</host> <command>[SHELL]</command> <args>[ARGUMENTS]</args> ... <capture-output/> </ssh> <ok to="[NODE-NAME]"/> <error to="[NODE-NAME]"/> </action> ... </workflow-app>
The command needs to exist on the node you specify, and the command will be run as the user specified in the action definition from that user's home directory. This page of the oozie docs has some additional information as well.
Created 06-09-2016 02:45 AM
In case of oozie SSH action, where does the oozie workflow initiate the SSH action from? Does it execute from any of the data nodes?
It executes from the current Oozie server, which usually runs on a master node. Deploy your SSH private keys there. See this article on how to go from start to finish.
Created 06-10-2016 07:53 AM
Thanks, I was able to set up the SSH and it is working. But I have a question.
What is this oozie ID? I am logging in to Linux using my ID. I submit the workflow either using my ID or I do a kinit to other ID and submit the workflow using that ID.
When I see in the UI logs, oozie workflow is shown to be submitted using either my ID or other ID for which ticket was obtained using Kinit.
What I dont understand is where does this "oozie" user id fit in. Even I had to go to the home directory of this user "oozie" and get its keys and added it to my destination server authprized_keys file. Can you please explain the purpose of this id? And also how to find this "oozie user id" Is this user id available in oozie-site.xml? Based on this article I also searched for oozie id, but what if it were different? how to find this oozie id?
Thanks!