在Google Cloud Composer中配置气流SSH连接
我正在尝试配置从Google Cloud Composer环境上的气流UI到前提Posgresql Server的SSH连接 我应该在哪里存储我的私钥? 如何传递到SSH连接配置专用密钥位置?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我正在尝试配置从Google Cloud Composer环境上的气流UI到前提Posgresql Server的SSH连接 我应该在哪里存储我的私钥? 如何传递到SSH连接配置专用密钥位置?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
首先,您需要在以下方面添加一个SSH连接:
这将使您可以在操作员中使用此连接来访问远程实例。将您的键添加到额外的字段中(检查key_file& host_key)。
文档此处:
在具有DAG的同一GCS桶下添加文件将使气流工作人员可以将其触及。您可以在GADS下使用一个新目录,并在需要的情况下命名键。
然后,您将需要设计管道(DAG),以便能够从远程实例中获取私钥。
您可以根据设计使用SSHExecuteOperator或任何其他操作员。
检查此问题以获取更多有用的详细信息:
airflow> airflow'> airflow'不同的服务器
First, you will need to add an SSH connection under:
That will allow you to use this connection in an operator to access the remote instance. Add your key to the Extra field (check key_file & host_key).
Documentation here: https://airflow.apache.org/docs/apache-airflow-providers-ssh/stable/connections/ssh.html
Adding the file under the same GCS bucket having the dags will make it reachable by the Airflow workers. You can have a new directory under gads and name it keys if you want.
Then you will need to design your pipeline (dag) to be able to get your private key from the remote instance.
You can use the SSHExecuteOperator or any other operator based on your design.
Check this question for more helpful details:
Airflow: How to SSH and run BashOperator from a different server