<p dir="ltr">Bah maybe you're right. I want to sleep on it. It's kind of ugh either way.</p>
<br><div class="gmail_quote"><div dir="ltr">On Wed, Mar 9, 2016, 9:50 PM Rick Harding <<a href="mailto:rick.harding@canonical.com">rick.harding@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">I think there's already rules for charmstore charms. it uses the default if not specified. I totally agree that for local charms we have to have this. For remote charms though this is providing the user two ways to do the same thing</p>
<br><div class="gmail_quote"><div dir="ltr">On Wed, Mar 9, 2016, 9:46 PM Ian Booth <<a href="mailto:ian.booth@canonical.com" target="_blank">ian.booth@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If the charm store charm defines a series in the URL, then we will consider it<br>
an error to specify a different series using the attribute. But charm store URLs<br>
are not required to have a series, so we can use the attribute in that case. It<br>
also allows users to easily switch between store and local charms during<br>
development just by replacing "./" with "cs:"<br>
<br>
     nova-compute:<br>
       series: xenial<br>
       charm: ./nova-compute<br>
<br>
     nova-compute:<br>
       series: xenial<br>
       charm: cs:nova-compute<br>
<br>
<br>
On 10/03/16 12:21, Rick Harding wrote:<br>
> I'm not sure we want to make this attribute apply to charmstore charms.<br>
> We've an established practice of the charmstore url being the series<br>
> information. It gives the user a chance to have conflicting information if<br>
> the charmstore url is cs:trusty/nova-compute and the series attribute is<br>
> set to xenial. I think we should toss an error to a bundle that has series:<br>
> specified for a charmstore based charm value (or non-local value whichever<br>
> way you want to think about it)<br>
><br>
> On Wed, Mar 9, 2016 at 6:29 PM Ian Booth <<a href="mailto:ian.booth@canonical.com" target="_blank">ian.booth@canonical.com</a>> wrote:<br>
><br>
>> One additional enhancement we need for bundles concerns specifying series<br>
>> for<br>
>> multi-series charms, in particular local charms now that the local repo<br>
>> will be<br>
>> going away.<br>
>><br>
>> Consider:<br>
>><br>
>> A new multi-series charm may have a URL which does not specify the series.<br>
>> In<br>
>> that case, the series used will be the default specified in the charm<br>
>> metadata<br>
>> or the latest LTS. But we want to allow people to choose their own series<br>
>> also.<br>
>><br>
>> So we need a new (optional) Series attribute in the bundle metadata.<br>
>><br>
>> bundle.yaml<br>
>>   series: trusty<br>
>>   services:<br>
>>     nova-compute:<br>
>>       series: xenial <------ new<br>
>>       charm: ./nova-compute<br>
>>       num_units: 2<br>
>><br>
>> or with a charm store charm<br>
>><br>
>> bundle.yaml<br>
>>   series: trusty<br>
>>   services:<br>
>>     nova-compute:<br>
>>       series: xenial    <------ new<br>
>>       charm: cs:nova-compute<br>
>>       num_units: 2<br>
>><br>
>><br>
>> Note: the global series in the bundle still applies if series is not<br>
>> otherwise<br>
>> known.<br>
>> The new series attribute is per charm.<br>
>><br>
>> So in the case above, cs:nova-compute may ordinarily be deployed on trusty<br>
>> (the<br>
>> default series in that charm's metadata). But the bundle requires the<br>
>> xenial<br>
>> version. With the charm store URL, we can currently use<br>
>> cs:xenial/nova-compute<br>
>> but that's not the case for local charms deployed out of a directory. We<br>
>> need a<br>
>> way to allow the series to be specified in that latter case.<br>
>><br>
>> We'll look to make the changes in core initially and can followup later<br>
>> with the<br>
>> GUI etc. The attribute is optional and only really affects bundles with<br>
>> local<br>
>> charms.<br>
>><br>
>><br>
>><br>
>> On 09/03/16 09:53, Ian Booth wrote:<br>
>>> So to clarify what we'll do. We'll support the same syntax in bundle<br>
>> files as we<br>
>>> do for deploy.<br>
>>><br>
>>> Deploys charm store charms:<br>
>>><br>
>>> $ juju deploy cs:wordpress<br>
>>> $ juju deploy wordpress<br>
>>><br>
>>> Deploys a local charm from a directory:<br>
>>><br>
>>> $ juju deploy ./charms/wordpress<br>
>>> $ juju deploy ./wordpress<br>
>>><br>
>>> So below deploys a local nova-compute charm in a directory co-located<br>
>> with the<br>
>>> bundle.yaml file.<br>
>>><br>
>>>  series: trusty<br>
>>>  services:<br>
>>>    nova-compute:<br>
>>>      charm: ./nova-compute<br>
>>>      num_units: 2<br>
>>><br>
>>> This one deploys a charm store charm:<br>
>>><br>
>>>  series: trusty<br>
>>>  services:<br>
>>>    nova-compute:<br>
>>>    charm: nova-compute<br>
>>>    num_units: 2<br>
>>><br>
>>><br>
>>><br>
>>> On 09/03/16 03:59, Rick Harding wrote:<br>
>>>> Long term we want to have a pattern when the bundle is a directory with<br>
>>>> local charms in a directory next to the bundles.yaml file. We could not<br>
>> do<br>
>>>> this cleanly before the multi-series charms that are just getting out<br>
>> the<br>
>>>> door. I think that bundles with local charms will be suboptimal until we<br>
>>>> can get those bits to line up.<br>
>>>><br>
>>>> I don't think we want to be doing the file based urls, but to build a<br>
>>>> pattern that's reusable and makes sense across systems. Creating a<br>
>> standard<br>
>>>> pattern I think is the best path forward.<br>
>>>><br>
>>>> On Tue, Mar 8, 2016 at 12:26 PM Martin Packman <<br>
>> <a href="mailto:martin.packman@canonical.com" target="_blank">martin.packman@canonical.com</a>><br>
>>>> wrote:<br>
>>>><br>
>>>>> On 05/03/2016, Ian Booth <<a href="mailto:ian.booth@canonical.com" target="_blank">ian.booth@canonical.com</a>> wrote:<br>
>>>>>>><br>
>>>>>>> How will bundles work which reference local charms? Will this work as<br>
>>>>>>> expected where nova-compute is a directory at the same level as a<br>
>> bundle<br>
>>>>>>> file?<br>
>>>>>>><br>
>>>>>>> ```<br>
>>>>>>> series: trusty<br>
>>>>>>> services:<br>
>>>>>>>   nova-compute:<br>
>>>>>>>     charm: ./nova-compute<br>
>>>>>>>     num_units: 2<br>
>>>>>>> ```<br>
>>>>>>><br>
>>>>>><br>
>>>>>> The above will work but not until a tweak is made to bundle<br>
>> deployment to<br>
>>>>>> interpret a path on disk rather than a url. It's a small change. This<br>
>>>>> would<br>
>>>>>> be done as part of the work to remove the local repo support.<br>
>>>>><br>
>>>>> Can we keep interpreting the the reference in the bundle as a url, but<br>
>>>>> start supporting file urls? That seems neater than treating the cs:<br>
>>>>> prefix as magic not-a-filename.<br>
>>>>><br>
>>>>> The catch is that there's no sane way of referencing locations outside<br>
>>>>> a base url.<br>
>>>>><br>
>>>>>     charm: file:nova-compute<br>
>>>>><br>
>>>>> Works as a reference to a dir inside the base location, but:<br>
>>>>><br>
>>>>>     charm: file:../nova-compute<br>
>>>>><br>
>>>>> Will not work as a reference to a sibling directory. And absolute file<br>
>>>>> paths are pretty useless across machines.<br>
>>>>><br>
>>>>> Martin<br>
>>>>><br>
>>>>> --<br>
>>>>> Juju-dev mailing list<br>
>>>>> <a href="mailto:Juju-dev@lists.ubuntu.com" target="_blank">Juju-dev@lists.ubuntu.com</a><br>
>>>>> Modify settings or unsubscribe at:<br>
>>>>> <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
>>>>><br>
>>>><br>
>>>><br>
>>>><br>
>><br>
><br>
</blockquote></div></blockquote></div>