<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} .ms-cui-menu {background-color:#ffffff;border:1px rgb(171, 171, 171) solid;font-family:'Segoe UI WPC', 'Segoe UI', Tahoma, 'Microsoft Sans Serif', Verdana, sans-serif;font-size:11pt;color:rgb(51, 51, 51);} .ms-cui-menusection-title {display:none;} .ms-cui-ctl {vertical-align:text-top;text-decoration:none;color:rgb(51, 51, 51);} .ms-cui-ctl-on {background-color:rgb(223, 237, 250);opacity: 0.8;} .ms-cui-img-cont-float {display:inline-block;margin-top:2px} .ms-cui-smenu-inner {padding-top:0px;} .ms-owa-paste-option-icon {margin: 2px 4px 0px 4px;vertical-align:sub;padding-bottom: 2px;display:inline-block;} .ms-rtePasteFlyout-option:hover {background-color:rgb(223, 237, 250) !important;opacity:1 !important;} .ms-rtePasteFlyout-option {padding:8px 4px 8px 4px;outline:none;} .ms-cui-menusection {float:left; width:85px;height:24px;overflow:hidden}.wf {speak:none; font-weight:normal; font-variant:normal; text-transform:none; -webkit-font-smoothing:antialiased; vertical-align:middle; display:inline-block;}.wf-family-owa {font-family:'o365Icons'}@font-face {  font-family:'o365IconsIE8';  src:url('prem/15.0.888.16/resources/styles/office365icons.ie8.eot?#iefix') format('embedded-opentype'),         url('prem/15.0.888.16/resources/styles/office365icons.ie8.woff') format('woff'),         url('prem/15.0.888.16/resources/styles/office365icons.ie8.ttf') format('truetype');  font-weight:normal;  font-style:normal;}@font-face {  font-family:'o365IconsMouse';  src:url('prem/15.0.888.16/resources/styles/office365icons.mouse.eot?#iefix') format('embedded-opentype'),         url('prem/15.0.888.16/resources/styles/office365icons.mouse.woff') format('woff'),         url('prem/15.0.888.16/resources/styles/office365icons.mouse.ttf') format('truetype');  font-weight:normal;  font-style:normal;}.wf-family-owa {font-family:'o365IconsMouse'}.ie8 .wf-family-owa {font-family:'o365IconsIE8'}.ie8 .wf-owa-play-large:before {content:'\e254';}.notIE8 .wf-owa-play-large:before {content:'\e054';}.ie8 .wf-owa-play-large {color:#FFFFFF/*$WFWhiteColor*/;}.notIE8 .wf-owa-play-large {border-color:#FFFFFF/*$WFWhiteColor*/; width:1.4em; height:1.4em; border-width:.1em; border-style:solid; border-radius:.8em; text-align:center; box-sizing:border-box; -moz-box-sizing:border-box; padding:0.1em; color:#FFFFFF/*$WFWhiteColor*/;}.ie8 .wf-size-play-large {width:40px; height:40px; font-size:30px}.notIE8 .wf-size-play-large {width:40px; height:40px; font-size:30px}--></style>
</head>
<body>
<div style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><span style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">Hi Adam,</span><br style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">
<span style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">Thanks for sharing the code!&nbsp;</span><br style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">
<span style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">I didn't know about node.ssh.remote_file(). That's really handy!</span><br style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">
<br style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">
<span style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">I ended up coding something myself as well, but I wanted to avoid the need
 for my workstation to have validation.pem on it.</span><br style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">
<span style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">So I found that I can ssh to a machine on our network that does have it and
 then use knife bootstrap from it.</span><br style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">
<span style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">I'm new to chef and not sure what makes for better setup. Validation.pem
 anyhow seems to end up widely shared, so it's hard to call it a &quot;private&quot; key...</span><br style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">
<br style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">
<span style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">One thing didn't find a good solution for is implementing sensible behavior
 on &quot;starcluster stop&quot; vs. &quot;starcluster terminate&quot;. It appears that a plugin can't tell the difference between the two.</span><br style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">
<span style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">If the node is terminated, I would want to remove the client and probably
 the node from the chef server. But if I do that, then on &quot;stop&quot; I end up invalidating the client and on &quot;start -x&quot; it is not recognized.</span><br style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">
<span style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">I noticed that your plugin doesn't implement any of this either, or am I
 mistaken?</span><br style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">
<br style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">
<span style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">Is the recommended practice to fully delete everything and then re-provision
 as if it's a fresh start even on &quot;start -x&quot;?</span><br style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">
<br style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">
<span style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">Thanks very much for any advice!</span><br style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">
<span style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15.454545021057129px; background-color: #ffffff;">-Dmitry</span>&#8203;<br>
</p>
<p><br>
</p>
<div style="color: #282828;">
<hr tabindex="-1" style="display: inline-block; width: 98%;">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size: 11pt;"><b>From:</b> Adam &lt;adamnkraut@gmail.com&gt;<br>
<b>Sent:</b> Tuesday, March 04, 2014 7:55 AM<br>
<b>To:</b> Dmitry Serenbrennikov<br>
<b>Cc:</b> starcluster@mit.edu; dserebren@gmail.com<br>
<b>Subject:</b> Re: [StarCluster] writing plugins</font>
<div>&nbsp;</div>
</div>
<div>
<div dir="ltr">Hi Dmitry,
<div><br>
</div>
<div>You can look at my simple chef plugin here. It might not be exactly what you're trying to do but hopefully it helps.</div>
<div><br>
</div>
<div><a href="https://github.com/bioteam/StarClusterPlugins/blob/master/starcluster_plugins/chef/chef.py">https://github.com/bioteam/StarClusterPlugins/blob/master/starcluster_plugins/chef/chef.py</a><br>
</div>
<div><br>
</div>
<div>Best Regards,</div>
<div>Adam</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Wed, Feb 26, 2014 at 7:06 PM, Dmitry Serenbrennikov <span dir="ltr">
&lt;<a href="mailto:dmitry@adchemy.com" target="_blank">dmitry@adchemy.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: #cccccc; border-left-style: solid; padding-left: 1ex;">
<div>
<div style="font-size: 12pt; font-family: calibri, arial, helvetica, sans-serif;">
<p>Hello!<br>
</p>
<p><br>
</p>
<p>I'm trying to write a simple plugin for Chef integration. But I'm having trouble finding good examples and docs out there. Can someone please point me to some good resources, besides the&nbsp;<a href="http://star.mit.edu/cluster/docs/latest/manual/plugins.html#plugin-system" target="_blank" style="font-size: 12pt;"><span>http://star.mit.edu/cluster/docs/latest/manual/plugins.html#plugin-system</span></a><span style="font-size: 12pt;">&nbsp;page?</span></p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;">DefaultClusterSetup is useful, but&nbsp;a bit tough to get through. Also, I don't know if it has example of what I am trying to do.&nbsp;For example, how does one get a cluster name and template name from inside plugin's run method?</span></p>
<p><br>
</p>
<p>Thanks!<br>
</p>
<p>Dmitry<br>
</p>
<p><a href="mailto:dserebren@gmail.com" target="_blank">dserebren@gmail.com</a><br>
</p>
</div>
</div>
<br>
_______________________________________________<br>
StarCluster mailing list<br>
<a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a><br>
<a href="http://mailman.mit.edu/mailman/listinfo/starcluster" target="_blank">http://mailman.mit.edu/mailman/listinfo/starcluster</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</body>
</html>