Planning for Juju 2.2 (16.10 timeframe)

Eric Snow eric.snow at canonical.com
Fri Mar 18 16:44:54 UTC 2016


On Fri, Mar 18, 2016 at 8:57 AM, Tom Barber <tom at analytical-labs.com> wrote:
> c) upload files with actions. Currently for some things I need to pass in
> some files then trigger an action on the unit upon that file. It would be
> good to say path=/tmp/myfile.xyz and have the action upload that to a place
> you define.

Have you taken a look at resources in the upcoming 2.0?  You define
resources in your charm metadata and use "juju attach" to upload them
to the controller (e.g. "juju attach my-service/0
my-resource=/tmp/myfile.xyz"). *  Then charms can use the
"resource-get" hook command to download the resource file from the
controller.  "resource-get" returns the path where the downloaded file
was saved.

-eric


* You will also upload the resources to the charm store for charm store charms.



More information about the Juju mailing list