1

In a Cloudify service recipe, is there a built-in way to upload static files to the instances? I see examples in recipes of using template files through a Groovy parser like:

def yaml = new File('templates/storm.yaml')
engine = new SimpleTemplateEngine()
template = engine.createTemplate(yaml).make(binding)

And I could do something like this in one of the lifecycle event's Groovy script for static files except not pass them through the template engine, but what I'm interested in is a common pattern used in Cloudify recipes for uploading static files, ideally one where everything in a directory gets uploaded to the instances.

I can't seem to find anything in the documentation or forums showing a way to do this. Does such a nice method of uploading files to the instances as part of a service recipe exist?

Gordon Seidoh Worley
  • 7,839
  • 6
  • 45
  • 82

1 Answers1

2

You can upload files to an instance in one of the following ways:

You can implement a custom command that can be invoked during the installation or even during runtime (i.e.: after the deployment is over).

In any life cycle event handler and in any custom command , you can use wget or Ant's get task to download any file that you need to any instance that you want.

I hope this answers your question. If not, please elaborate.

Tamir,

Cloudify Community Manager.

tamirko
  • 499
  • 5
  • 12
  • The example of a custom command for uploading a .war file seems useful, so I'll take a look at it. Otherwise, though, I'm only concerned in this question about uploading files from my local machine to the instances during an install-service command. – Gordon Seidoh Worley Jun 24 '13 at 14:13