<div dir="ltr"><br><div class="gmail_extra">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 (there's a pending merge proposal for this) re parent dir/checkout dir which is the cause of those tracebacks. The @ syntax works for revision and tags but not branches. Given its common for branch co-location with git unlike bzr that seems reasonable, the @rev specification will likely need some additional syntax to support branches. Another issue is deployer is optimizing for the deployment case so its taking shallow copies of repos (--depth 1 on git clone). With git that seems to preclude fetching remote branch info. The shallow clone is probably of marginal utility given git's speed, with bzr its a significant speed up. Its going to take a few days to sort out changes to support this.</div><div class="gmail_extra"><br></div><div class="gmail_extra">-kapil</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 13, 2015 at 11:11 AM, Robert Day <span dir="ltr"><<a href="mailto:Robert.Day@metaswitch.com" target="_blank">Robert.Day@metaswitch.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi all,<br>
<br>
I'm trying to deploy a Juju bundle and set of charms hosted on Github rather than Launchpad, but I'm running into some problems. Although juju-deployer does appear to support this, I haven't found many examples, so I'm not certain I'm doing the right thing - if anyone has this working, and could point me at their Github repository, that'd be great.<br></blockquote><div>.  <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
I'm using juju-deployer version 0.4.3-0ubuntu1~ubuntu12.04.1~ppa1, juju-core version 1.22.0-0ubuntu1~12.04.2~juju1 and Git version 2.3.3. The bundle I'm using is at <a href="https://raw.githubusercontent.com/Metaswitch/clearwater-juju/github_everywhere/charms/bundles/clearwater/bundle/bundles.yaml" target="_blank">https://raw.githubusercontent.com/Metaswitch/clearwater-juju/github_everywhere/charms/bundles/clearwater/bundle/bundles.yaml</a>. The Github repository/branch is <a href="https://github.com/Metaswitch/clearwater-juju/" target="_blank">https://github.com/Metaswitch/clearwater-juju/</a>, which contains several charms and the bundle.<br>
<br>
What I want is:<br>
- to check out the dnsaas branch of <a href="https://github.com/Metaswitch/clearwater-juju.git" target="_blank">https://github.com/Metaswitch/clearwater-juju.git</a><br>
- to deploy the charm in the subdirectory 'charms/precise/clearwater-bono'<br>
<br>
so I have the following in my bundle:<br>
<br>
>   services:<br>
>     "clearwater-bono":<br>
>       charm: "charms/precise/clearwater-bono"<br>
>       branch: "<a href="https://github.com/Metaswitch/clearwater-juju@dnsaas" target="_blank">https://github.com/Metaswitch/clearwater-juju@dnsaas</a>"<br>
<br>
When I run juju-deployer, it fails with "No such file or directory" when trying to deploy the charm at <a href="https://github.com/Metaswitch/clearwater-juju/tree/dnsaas/charms/precise/clearwater-bono" target="_blank">https://github.com/Metaswitch/clearwater-juju/tree/dnsaas/charms/precise/clearwater-bono</a> (though there's nothing special about this charm, it's just the first one in the bundle):<br>
<br>
> $ juju-deployer -c <a href="https://raw.githubusercontent.com/Metaswitch/clearwater-juju/github_everywhere/charms/bundles/clearwater/bundle/bundles.yaml" target="_blank">https://raw.githubusercontent.com/Metaswitch/clearwater-juju/github_everywhere/charms/bundles/clearwater/bundle/bundles.yaml</a><br>
> 2015-04-13 13:50:20 Using deployment clearwater<br>
> 2015-04-13 13:50:20 Starting deployment of clearwater<br>
> Traceback (most recent call last):<br>
>   File "/usr/bin/juju-deployer", line 9, in <module><br>
>     load_entry_point('juju-deployer==0.4.3', 'console_scripts', 'juju-deployer')()<br>
>   File "/usr/local/lib/python2.7/dist-packages/deployer/cli.py", line 130, in main<br>
>     run()<br>
>   File "/usr/local/lib/python2.7/dist-packages/deployer/cli.py", line 228, in run<br>
>     importer.Importer(env, deployment, options).run()<br>
>   File "/usr/local/lib/python2.7/dist-packages/deployer/action/importer.py", line 188, in run<br>
>     self.get_charms()<br>
>   File "/usr/local/lib/python2.7/dist-packages/deployer/action/importer.py", line 63, in get_charms<br>
>     no_local_mods=self.options.no_local_mods)<br>
>   File "/usr/local/lib/python2.7/dist-packages/deployer/deployment.py", line 139, in fetch_charms<br>
>     os.mkdir(charm.series_path)<br>
> OSError: [Errno 2] No such file or directory: 'precise/charms/precise'<br>
<br>
If I create that directory (with mkdir -p precise/charms/precise) I get a different error:<br>
<br>
> $ juju-deployer -c <a href="https://raw.githubusercontent.com/Metaswitch/clearwater-juju/github_everywhere/charms/bundles/clearwater/bundle/bundles.yaml" target="_blank">https://raw.githubusercontent.com/Metaswitch/clearwater-juju/github_everywhere/charms/bundles/clearwater/bundle/bundles.yaml</a><br>
> 2015-04-13 13:50:58 Using deployment clearwater<br>
> 2015-04-13 13:50:58 Starting deployment of clearwater<br>
> Traceback (most recent call last):<br>
>   File "/usr/bin/juju-deployer", line 9, in <module><br>
>     load_entry_point('juju-deployer==0.4.3', 'console_scripts', 'juju-deployer')()<br>
>   File "/usr/local/lib/python2.7/dist-packages/deployer/cli.py", line 130, in main<br>
>     run()<br>
>   File "/usr/local/lib/python2.7/dist-packages/deployer/cli.py", line 228, in run<br>
>     importer.Importer(env, deployment, options).run()<br>
>   File "/usr/local/lib/python2.7/dist-packages/deployer/action/importer.py", line 188, in run<br>
>     self.get_charms()<br>
>   File "/usr/local/lib/python2.7/dist-packages/deployer/action/importer.py", line 63, in get_charms<br>
>     no_local_mods=self.options.no_local_mods)<br>
>   File "/usr/local/lib/python2.7/dist-packages/deployer/deployment.py", line 140, in fetch_charms<br>
>     charm.fetch()<br>
>   File "/usr/local/lib/python2.7/dist-packages/deployer/charm.py", line 132, in fetch<br>
>     self.vcs.update(self.rev)<br>
>   File "/usr/local/lib/python2.7/dist-packages/deployer/vcs.py", line 99, in update<br>
>     self._call(params, self.err_update)<br>
>   File "/usr/local/lib/python2.7/dist-packages/deployer/vcs.py", line 30, in _call<br>
>     args, cwd=cwd or self.path, stderr=stderr)<br>
>   File "/usr/lib/python2.7/subprocess.py", line 537, in check_output<br>
>     process = Popen(stdout=PIPE, *popenargs, **kwargs)<br>
>   File "/usr/lib/python2.7/subprocess.py", line 679, in __init__<br>
>     errread, errwrite)<br>
>   File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child<br>
>     raise child_exception<br>
> OSError: [Errno 2] No such file or directory: 'precise/charms/precise/clearwater-bono'<br>
<br>
It looks like something odd has happened with the paths - juju-deployer is looking in 'precise/charms/precise/clearwater-bono' but my charm actually seems to have been checked out to 'precise/charms/precise/precise/charms/precise/clearwater-bono/charms/precise/clearwater-bono/'.<br>
<br>
> $ ls precise/charms/precise/precise/charms/precise/clearwater-bono/charms/precise/clearwater-bono/<br>
> config.yaml  copyright  hooks  icon.svg  lib  metadata.yaml  README.md  revision<br>
<br>
I get the same error with juju-quickstart - a notification in the juju-gui tells me:<br>
<br>
> Updated status for deployment id: 0<br>
><br>
> An error occurred while deploying the bundle: [Errno 2] No such file or directory: 'precise/charms/precise'<br>
> less than a minute ago<br>
<br>
I tried creating a new charm repository holding only a single charm (as opposed to my current model, where six or seven closely related charms are all in the same repository), but hit similar errors - I didn't pursue this any further, because it's much easier for me to keep all these charms in the same repository.<br>
<br>
Thanks,<br>
Rob<br>
<span class=""><font color="#888888"><br>
--<br>
Juju mailing list<br>
<a href="mailto:Juju@lists.ubuntu.com">Juju@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju</a><br>
</font></span></blockquote></div><br></div></div>