将Oozie ssh操作与私钥一起使用 [英] Using Oozie ssh action with private key

查看:270
本文介绍了将Oozie ssh操作与私钥一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用oozie ssh action cloudera 集群中运行工作流程.我需要的是仅从特定节点运行脚本.为此,我找到了下一个解决方案-oozie ssh action.配置此工作流程时,我遇到一个问题,在配置中,oozie仅采用用户"和主机名",而我还需要使用ssh私钥进行ssh连接.

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.

是否可以用私钥执行oozie ssh action?也许还有其他变体,如何从特定节点运行oozie工作流程?

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?

推荐答案

  1. 切换到Shell操作
  2. 创建一个非常简单的shell脚本,调用带有私钥的ssh客户端,该密钥文件应在当前工作目录中
  3. 将外壳和密钥上载到HDFS-使用足够的权限将密钥尽可能地设置为私有"
  4. 告诉Oozie在执行时将脚本和密钥下载到CWD容器中,其中包含两个<file>指令
  5. ...
  6. 利润:-)
  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 :-)

这篇关于将Oozie ssh操作与私钥一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆