Using Oozie ssh action with private key

2019-07-11 02:47发布

I am trying to run a workflow in cloudera cluster using oozie ssh action. What I need is to run my scripts only from specific node. For this purposes I have found next solution - oozie ssh action. Configuring this workflow, I have faced with a problem that in configs, oozie takes only "user" and "host name" while I also need to use private ssh key for ssh connection.

Is it possible to perform oozie ssh action with private key? Or maybe there are some other variants, how to run oozie workflow from specific node?

标签: ssh oozie
1条回答
够拽才男人
2楼-- · 2019-07-11 03:32
  1. switch to a Shell Action
  2. create a very simple shell script invoking ssh client w/ private key, the key file being expected in the current working dir
  3. upload the shell and the key to HDFS -- using adequate permissions to make the key as "private" as you can
  4. tell Oozie to download both the script and the key at exec time, in the container CWD, with two <file> instructions
  5. ...
  6. profit :-)
查看更多
登录 后发表回答