<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jul 2, 2014 at 10:47 AM, Denis Weerasiri <span dir="ltr"><<a href="mailto:ddweerasiri@gmail.com" target="_blank">ddweerasiri@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, <div>I mentioned the command as "charm-update". But it should have been "upgrade-charm"</div>
<div><a href="https://juju.ubuntu.com/docs/authors-charm-upgrades.html" target="_blank">https://juju.ubuntu.com/docs/authors-charm-upgrades.html</a><br>

</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 2, 2014 at 12:44 PM, Denis Weerasiri <span dir="ltr"><<a href="mailto:ddweerasiri@gmail.com" target="_blank">ddweerasiri@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div>Support I have written a charm to deploy a web application on top of tomcat. And now I need to redeploy the web application when I update the source repository of the web application. What is the best practice to do this?</div>



<div>What I have in mind is to write a new version of charm and use charm-update command. So juju will re-deploy the web application.</div></div></blockquote></div></div></div></div></blockquote><div><br></div><div>A charmer will be able to give you better directions, but what existing charms do is have a source revision (and maybe repository) charm config setting.</div>
<div>You would then do "juju set myapp revision=<rev>", which would trigger a config-changed hook call in your charm. The charm is then responsible for pulling down the new revision and restarting the application.</div>
<div><br></div><div>HTH,<br></div><div>Andrew</div></div></div></div>