<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px;">
<div style="font-family: Calibri, sans-serif;">Here’s one way: </div>
<div style="font-family: Calibri, sans-serif;"><br>
</div>
<div>
<div><font face="Consolas">heat_template_version: 2013-05-23</font></div>
<div><font face="Consolas">parameters:</font></div>
<div><font face="Consolas"> image:</font></div>
<div><font face="Consolas"> type: string</font></div>
<div><font face="Consolas"> default: TestVM</font></div>
<div><font face="Consolas"> flavor:</font></div>
<div><font face="Consolas"> type: string</font></div>
<div><font face="Consolas"> default: m1.micro</font></div>
<div><font face="Consolas"> network:</font></div>
<div><font face="Consolas"> type: string</font></div>
<div><font face="Consolas"> default: cirros_net2</font></div>
<div><font face="Consolas"> </font></div>
<div><font face="Consolas">resources:</font></div>
<div><font face="Consolas"> serv_1:</font></div>
<div><font face="Consolas"> type: OS::Nova::Server</font></div>
<div><font face="Consolas"> properties:</font></div>
<div><font face="Consolas"> image: { get_param: image }</font></div>
<div><font face="Consolas"> flavor: { get_param: flavor }</font></div>
<div><font face="Consolas"> networks:</font></div>
<div><font face="Consolas"> - network: {get_param: network}</font></div>
<div><font face="Consolas"> scheduler_hints: {different_host: {get_resource: serv_2}}</font></div>
<div><font face="Consolas"> serv_2:</font></div>
<div><font face="Consolas"> type: OS::Nova::Server</font></div>
<div><font face="Consolas"> properties:</font></div>
<div><font face="Consolas"> image: { get_param: image }</font></div>
<div><font face="Consolas"> flavor: { get_param: flavor }</font></div>
<div><font face="Consolas"> networks:</font></div>
<div><font face="Consolas"> - network: {get_param: network}</font></div>
<div><font face="Consolas"> scheduler_hints: {different_host: {get_resource: serv_1}}</font></div>
<div style="font-family: Calibri, sans-serif;"> </div>
<div style="font-family: Calibri, sans-serif;">Note: In order to the above mentioned scheduler hints to work, the following scheduler filter should be enabled for nova scheduler</div>
<div style="font-family: Calibri, sans-serif;"> SameHostFilter and</div>
<div style="font-family: Calibri, sans-serif;"> DifferentHostFilter</div>
</div>
<div style="font-family: Calibri, sans-serif;"><br>
</div>
<div style="font-family: Calibri, sans-serif;">There’s another way of doing it using OS::Nova::ServerGroup, but it’s available only since Juno.</div>
<div style="font-family: Calibri, sans-serif;"><br>
</div>
<div style="font-family: Calibri, sans-serif;">-</div>
<div style="font-family: Calibri, sans-serif;">Dimitri</div>
<div style="font-family: Calibri, sans-serif;"><br>
</div>
<span id="OLK_SRC_BODY_SECTION" style="font-family: Calibri, sans-serif;">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Daniel Comnea <<a href="mailto:comnea.dani@gmail.com">comnea.dani@gmail.com</a>><br>
<span style="font-weight:bold">Reply-To: </span>"OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Date: </span>Sunday 24 May 2015 12:24<br>
<span style="font-weight:bold">To: </span>"OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [openstack-dev] [heat][nova]: anti-affinity policy via heat in IceHouse?<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<div>
<div>
<div>Thanks Kevin !<br>
<br>
</div>
Would you have an example?<br>
<br>
</div>
Much appreciated,<br>
</div>
Dani<br>
<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, May 24, 2015 at 12:28 AM, Fox, Kevin M <span dir="ltr">
<<a href="mailto:Kevin.Fox@pnnl.gov" target="_blank">Kevin.Fox@pnnl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>It works with heat. You can use a scheduler hint on the instance and the server group resource to make a new one.<br>
<br>
Thanks,<br>
Kevin <strong>
<div><font face="Tahoma" color="#000000" size="2"> </font></div>
</strong>
<hr>
<font face="Tahoma" size="2"><b>From:</b> Daniel Comnea<br>
<b>Sent:</b> Saturday, May 23, 2015 3:17:11 PM<br>
<b>To:</b> OpenStack Development Mailing List (not for usage questions)<br>
<b>Subject:</b> [openstack-dev] [heat][nova]: anti-affinity policy via heat in IceHouse?<br>
</font>
<div>
<div class="h5"><br>
<div></div>
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>Hi,<br>
<br>
</div>
I'm aware of the anti-affinity policy which you can create via nova cli and associated instances with it.<br>
</div>
I'm also aware of the default policies in nova.conf<br>
<br>
</div>
by creating instances via HEAT is any alternatives to create instances part of anti-affinity group?<br>
<br>
</div>
Thx,<br>
</div>
Dani <br>
</div>
</div>
</div>
</div>
</div>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</span>
</body>
</html>