juju / juju-bundlelib

A Python library for working with Juju bundles.
GNU Lesser General Public License v3.0
1 stars 14 forks source link

feature: charm specification in bundle.yaml should fall back to cs:<series>/charm #36

Open kwmonroe opened 9 years ago

kwmonroe commented 9 years ago

I'd like to specify my charms like this in a bundle.yaml:

$ cat bundle.yaml 
services:
  ubuntu:
    charm: ubuntu
    num_units: 1

I want that to first look in $JUJU_REPOSITORY/<series>, and if ubuntu isn't present, fall over to cs:<series>/ubuntu. This would let my locally modified charms take precedent over store charms without me having to remember which charms in my bundle.yaml should come from the store vs those that I want to deploy from my local system.

If I try to deploy the bundle.yaml as written above, I get this:

$ juju-deployer -v -c bundle.yaml 
2015-10-06 21:38:50 Using runtime GoEnvironment on amazon
2015-10-06 21:38:50 Using deployment bundle.yaml
2015-10-06 21:38:50 Starting deployment of bundle.yaml
2015-10-06 21:38:50 Getting charms...
2015-10-06 21:38:50 Service: ubuntu has neither charm url or branch specified
2015-10-06 21:38:50 Invalid charm specification ubuntu

That's because I don't have a copy of the ubuntu charm locally. I'd like deployer to catch this failure and try to deploy from the store.

mitechie commented 9 years ago

@frankban can you speak to if this works in the current juju deploy $bundle work please? Do we support this charm url structure?