<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
color:black;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Texte de bulles Car";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
color:black;
mso-fareast-language:EN-US;}
span.TextedebullesCar
{mso-style-name:"Texte de bulles Car";
mso-style-priority:99;
mso-style-link:"Texte de bulles";
font-family:"Tahoma","sans-serif";}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=FR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Hi Mark,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Thanks for the reply, really nice to see top management involved in Juju </span><span style='font-family:Wingdings;color:#1F497D'>J</span><span lang=EN-US style='color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>We tried some basic charm writing and followed your advice to use ruby but ruby is not in the precise distribution! <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>So, am supposed to write the following install hook? :<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Install <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>sudo apt-get update && sudo apt-get install ruby-1.9.1-full<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>ruby install.rb<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>install.rb<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'># whatever ruby code<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>….<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>This does not look very nice. Install here is installing the required tool for the installation.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Couldn’t we get a “pre-install” hook somewhere? <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>People writing python charms use jinja2 normally as well and imagine all kinds of pre-hook mechanisms that are rather ugly…<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>It should be possible to execute the pre-install hook if it is there thus not breaking existing charms.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Just my 2 cents<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Best Regards<o:p></o:p></span></p><div><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:FR'>Franck Dehay</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:FR'><br><br><o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal style='margin-left:35.4pt'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:FR'>De :</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:FR'> Mark Shuttleworth [mailto:mark@ubuntu.com] <br><b>Envoyé :</b> mercredi 22 mai 2013 16:28<br><b>À :</b> DEHAY Franck DMGP/PORTAIL<br><b>Cc :</b> juju@lists.ubuntu.com<br><b>Objet :</b> Re: What would you like to see in the virtual Charm School hangouts?<o:p></o:p></span></p></div></div><p class=MsoNormal style='margin-left:35.4pt'><o:p> </o:p></p><div><p class=MsoNormal style='margin-left:35.4pt'>On 05/22/2013 02:49 PM, <a href="mailto:franck.dehay@orange.com">franck.dehay@orange.com</a> wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:FR'>Browsing through the charm store, I see lots of diversity, which is normal as juju requires only executable files as hooks.</span><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:FR'> </span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:FR'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US>Some implement all in one python program with symlinks (quite cute I would say), most do the install with bash…</span><o:p></o:p></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US>If you guys had some proposal for best suited method it would be nice.</span><o:p></o:p></p></blockquote><p class=MsoNormal style='margin-left:35.4pt'><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:FR'><br>General guidance is that if you are serious about the charm, treat it like code, use version control and if possible test suites, and pick a high-level language you are comfortable in.<br><br>Most charms start out as a quick-and-dirty proof of concept in Bash, then the serious ones switch to something more suited to flow control, architecture and testing.<br><br><br><o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US> I remember having read in the archives that python would be the recommended language.</span><o:p></o:p></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US>Is it still the vision?</span><o:p></o:p></p><p class=MsoNormal style='margin-left:35.4pt'><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:FR'><br>I would expect to see the Rails charm in Ruby, and the Node charm in Node.js :) We'll generally try to implement utilities as things which can be used from any language, but yes, many / most of the industrial-grade charms will use Python, given its status as a popular glue language.<br><br>Mark<o:p></o:p></span></p></div><PRE>_________________________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
France Telecom - Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, France Telecom - Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
</PRE></body></html>