我试图在cloudify上运行python脚本,为此我使用了脚本插件。 现在我已经成功地运行了脚本,但是在导入它需要的python包时失败了。 有没有办法在cloudify manager的python环境中安装这些软件包?。我的蓝图是这样的:
tosca_definitions_version: cloudify_dsl_1_3
imports:
- http://www.getcloudify.org/spec/cloudify/5.0.0/types.yaml
inputs:
input1:
description: description1
input2:
description: description2
type: string
node_templates:
node_name:
type: cloudify.nodes.SoftwareComponent
interfaces:
cloudify.interfaces.lifecycle:
start:
implementation: scripts/python_script.py
executor: central_deployment_agent
inputs:
input1: { get_input: input1 }
input2: { get_input: input2 }
我需要的导入在python_script.py的begining中:
import ssh
import bottle
import paramiko
ssh是我在脚本文件夹中编写的一个文件,作为blueprint包的一部分上传到cloudify。 Cloudify找不到ssh,我不知道如何确保瓶子和paramiko安装在Cloudify上
您不需要手动将任何内容安装到辅助环境中。 我假设您正试图在远程机器上执行一些SSH命令。 我提议如下。。。 选项1 使用ready终端插件Terminal plugin 下面是一个例子Terminal plugin example
选项2 构建一个包含所有依赖项的旅行车存档,并将其作为插件上载到Cloudify Manager
要建造货车,您需要安装docker:
相关问题 更多 >
编程相关推荐