Hi Kapil,
I agree that not having juju-deployer handle the Git side of things, and just
working locally from a Git checkout, would be simpler – but I don’t think that
sort of bundle would work in the Juju GUI, because the extra steps needed mean
that you can’t drag-and-drop it. Have I understood correctly?
On the syntax for bundle files, one thing I might want to do is take my five
charms (all hosted in one Git repository) and bundle them together with several
charms from someone else (which might all be hosted in the same repository). I
can’t quite see how the syntax you suggest (one Git repository per bundle)
would allow that. Something like:
clearwater:
services:
clearwater-bono:
charm: clearwater-bono
branch:
https://github.com/Metaswitch/clearwater-juju@46785ea8368a47c4351a516bb9a76763f6d4a952;
charms_subdirectory: charms/precise/clearwater-bono
clearwater-sprout:
charm: clearwater-sprout
branch:
https://github.com/Metaswitch/clearwater-juju@46785ea8368a47c4351a516bb9a76763f6d4a952;
charms_subdirectory: charms/precise/clearwater-sprout
somethingElse:
charm: somethingElse
branch: https://github.com/someoneElse/somethingElse@abcde;
charms_subdirectory: contrib/juju-charms
Does that seem OK to you, or do you still prefer the single charm_repository
option?
Thanks,
Rob
From: Kapil Thangavelu [mailto:kap...@gmail.com]
Sent: 14 April 2015 13:26
To: Robert Day
Cc: juju@lists.ubuntu.com
Subject: Re: Deploying Juju charms from Github
On Tue, Apr 14, 2015 at 6:09 AM, Robert Day
robert@metaswitch.commailto:robert@metaswitch.com wrote:
Thanks for the response! I’ve:
* found https://code.launchpad.net/~whitmo/juju-deployer/git-clone-fix and
applied those changes to my local copy of juju-deployer
* removed the “--depth 1” from vcs.py
* corrected my bundle to the below
services:
clearwater-bono:
charm: clearwater-bono
branch:
https://github.com/Metaswitch/clearwater-juju@46785ea8368a47c4351a516bb9a76763f6d4a952;
I then get this error:
2015-04-14 09:33:21 Using deployment clearwater
2015-04-14 09:33:21 Starting deployment of clearwater
2015-04-14 09:33:21 Invalid config charm clearwater-bono zone=clearwater.local
2015-04-14 09:33:21 Deployment stopped. run time: 0.52
I’m pretty sure that this is because juju-deployer expects the charm’s
metadata.yaml file (or config.yaml, etc.) to be in
precise/clearwater-bono/metadata.yaml, whereas due to the way my Git repository
is laid out, it’s actually in
precise/clearwater-bono/charms/precise/clearwater-bono/metadata.yaml (the Git
repository is checked out correctly to precise/clearwater-bono, but my charms
are all in the charms/precise subdirectory of that repository – it’s at
https://github.com/Metaswitch/clearwater-juju if you want to see what I mean).
specifically the error is referencing the key 'zone' is not found in the
charms's config.yaml. if you have a single directory of charms in vcs, its a
bit easier to not have deployer do vcs, ie. checkout, set JUJU_REPOSITORY env
var to root of checkout dir, omit vcs info from the bundle config, and then
just juju-deployer. Granted that has the downside of requiring additional
instructions when sharing.
I think I could correct this by having one repository per charm, but I’d like
to keep all my charms in the same repository if possible – there are six or
seven of them and they’re quite closely related. It feels like having an option
in the bundle to say “the charm files are in this subdirectory of the Git
repository” would be useful – I might try and put that patch together, unless
there are reasons why that wouldn’t be a good idea (or unless something similar
already exists). Something like:
clearwater:
services:
clearwater-bono:
charm: clearwater-bono
branch:
https://github.com/Metaswitch/clearwater-juju@46785ea8368a47c4351a516bb9a76763f6d4a952;
charms_subdirectory: charms/precise/clearwater-bono
clearwater-sprout:
charm: clearwater-sprout
branch:
https://github.com/Metaswitch/clearwater-juju@46785ea8368a47c4351a516bb9a76763f6d4a952;
charms_subdirectory: charms/precise/clearwater-sprout
actually i think a different syntax would be nice.
clearwater:
charm_repository: https://github.com/Metaswitch/clearwater@987132asdf
services:
charm: clearwater-bono
that repo directory would get checked out, and set as the JUJU_REPOSITORY for
the rest of the services, ie. propagate for all local charms automatically, but
they could override as needed. patches welcome.
cheers,
Kapil
Thanks,
Rob
From: Kapil Thangavelu [mailto:kap...@gmail.commailto:kap...@gmail.com]
Sent: 14 April 2015 05:57
To: Robert Day
Cc: juju@lists.ubuntu.commailto:juju@lists.ubuntu.com
Subject: Re: Deploying Juju charms from Github
There's a few things going on. The charm key in the bundle should just be the
charm name. The git support has a bug