I am trying to run a python script on cloudify and for that I am using the script plugin. Now I've managed to get the script running but it fails when importing the python packages it needs. Is there a way to install those packages in cloudify manager's python environment?. My blueprint looks like this:
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 }
the imports I need are at the beggining of python_script.py:
import ssh
import bottle
import paramiko
ssh is a file I wrote in the scripts folder I uploaded to cloudify as part of the blueprint package. Cloudify is not finding ssh and I don't know how to make sure that bottle and paramiko are installed on cloudify
You do not need to install anything into the worker environment manually. I assume that you are trying to execute some SSH commands on a remote machine. I would propose the following... Option 1 Use the ready terminal plugin Terminal plugin Here is an example Terminal plugin example
Option 2 Build a wagon archive with all dependencies and upload it to Cloudify Manager as a plugin.
To build a wagon you need to have docker installed: