API change: new juju scp subcommand
jim.baker at canonical.com
Wed Nov 30 22:13:50 UTC 2011
A proposed API change is to implement a new subcommand, juju scp. This
feature is requested by this bug:
Users need a simple way to transfer files back and forth from
Juju-managed machines. Like juju ssh, machines can be identified by
their machine ID or by their service unit name. This enables command
usage like so:
Grab the wordpress configuration file in order to debug it:
$ juju scp wordpress/0:/etc/wordpress/config-* .
Upload to machine 2 in /home/ubuntu the file some-file:
$ juju scp some-file 2:.
The juju scp subcommand works by identifying paths that specify a
remote host; if the remote host has the format of a service unit name
(<service name>/<unit number>) or is a potential machine ID, this then
is expanded to the public DNS name for the corresponding machine.
Any options used, such as -r, are passed through to the underlying scp
command being used to do the actual copy.
Unlike the existing juju ssh, juju scp does not depend on agent
liveness. It should however depend on the ssh host keys being
registered, as part of work on managing ssh keys.
Please note, this is not intended to be a general purpose tool for
uploading files to be used by Juju. That's really the purpose of a
related feature request, https://bugs.launchpad.net/juju/+bug/814974,
to add a file type for config settings.
Merge proposal implementing this work:
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 554 bytes
Desc: OpenPGP digital signature
More information about the Juju