Skip to content

Commit e516556

Browse files
committed
Add Yorc documentation about hostspool placement policies
1 parent 8ca16bc commit e516556

File tree

5 files changed

+59
-1
lines changed

5 files changed

+59
-1
lines changed

documentation/2.1.0/orchestrators/yorc/policies.html

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,21 @@
2626
<h1 class="pull-left" style="margin-top: 0px;">Applying policies</h1>
2727
<a class="btn btn-primary pull-right" href="http://prose.io/#alien4cloud/alien4cloud.github.io/edit/sources/documentation/2.1.0/orchestrators/yorc/policies.markdown"><i class="fa fa-pencil-square-o"></i> Edit (pull request)</a>
2828
</div>
29-
<p>Both monitoring policies (HTTP/TCP) and Affinity/Anti-Affinity OpenStack ServerGroup placement policies are natively available with Yorc Server.</p>
29+
<p>Yorc provides natively the following policies:</p>
30+
31+
<ul>
32+
<li>Monitoring policies (HTTP/TCP).</li>
33+
<li>Affinity/Anti-Affinity OpenStack ServerGroup placement policies.</li>
34+
<li>Round-robin and bin-packing Hosts Pool placement policies.</li>
35+
</ul>
3036

3137
<p>Let’s see how we can apply these on apps:</p>
3238

3339
<ul>
3440
<li><a href="#applying-a-server-group-anti-affinity-placement-policy-on-openstack">Server Group Anti-affinity placement policy on OpenStack</a></li>
3541
<li><a href="#applying-tcp-monitoring-policy">TCP monitoring policy</a></li>
3642
<li><a href="#applying-http-monitoring-policy-on-a-web-application">HTTP monitoring policy</a></li>
43+
<li><a href="#applying-hosts-pool-placement-policies">Round-robin and bin-packing Hosts pool placement policies</a></li>
3744
</ul>
3845

3946
<h2 id="applying-a-server-group-anti-affinity-placement-policy-on-openstack">Applying a Server Group Anti affinity placement policy on OpenStack</h2>
@@ -195,6 +202,57 @@ <h3 id="edit-application-topology-2">Edit application topology</h3>
195202

196203
<p>The next step will be to fix this by a self-healing policy !</p>
197204

205+
<h2 id="applying-hosts-pool-placement-policies">Applying Hosts Pool Placement Policies</h2>
206+
207+
<p>On a Hosts Pool location, you can provide hosts as Computes and specify if a host is shareable and so can be used by different applications or different Computes of the same application.</p>
208+
209+
<p>Now, with placement policies applied on an application, you can define how to choose the good host candidate for your Compute.</p>
210+
211+
<p>Two policies are available:</p>
212+
213+
<ul>
214+
<li><strong>yorc.policies.hostspool.BinPackingPlacement</strong></li>
215+
<li><strong>yorc.policies.hostspool.RoundRobinPlacement</strong></li>
216+
</ul>
217+
218+
<p><strong>BinPackingPlacement</strong> is the default policy if nothing is specified: It means the host with already the most related allocations will be elect preferentially.</p>
219+
220+
<p>On the contrary, the <strong>round-robin placement</strong> policy allows to choose preferentially the host with the least related allocations.</p>
221+
222+
<h3 id="configure-location-policies-3">Configure location policies</h3>
223+
224+
<p>After configuring your HostsPool location as described previously click on the <img src="../../../../images/2.1.0/yorc/policies-button.png" alt="policies button" height="26px" class="inline" /> button, select <strong>Catalog</strong> and use the search to find <strong>policies.hostspool</strong> as below.</p>
225+
226+
<p><img src="../../../../images/2.1.0/yorc/search-hostspool-policy.png" alt="Search hosts pool policies" /></p>
227+
228+
<p>Next, drag-and-drop the <strong>BinPackingPlacement</strong> and the <strong>RoundRobinPlacement</strong> policies in the <strong>Policies</strong> resources list of your HostsPool location.</p>
229+
230+
<p>You must finally have this configuration:</p>
231+
232+
<p><img src="../../../../images/2.1.0/yorc/hostspool-policy-resource.png" alt="Configure your hosts pool policies" /></p>
233+
234+
<p>Now, your hosts pool location is configured with placement policies !</p>
235+
236+
<h3 id="edit-application-topology-3">Edit application topology</h3>
237+
238+
<p>You can apply a Round-robin placement policy to your application topology by using an abstract policy: the <strong>tosca.policies.Placement</strong>.</p>
239+
240+
<p>This allows to deploy your application on Hosts pool, as well as on GCP, if another specific placement policy is implemented for GCP too.</p>
241+
242+
<p>Select your application and go to the <strong>Topology Editor</strong>. Click on the <img src="../../../../images/2.1.0/yorc/topology-policies-button.png" alt="policies button" height="52px" class="inline" /> button on the vertical blue bar on the left. Click on the <strong>+ Add policies</strong> button, search the abstract policy node <strong>Placement</strong> (tosca.policies.Placement) and drag-and-drop it on the policies list of your topology.</p>
243+
244+
<p>Then you can select the <strong>Targets</strong> of the placement policy, i.e in this case, the node name of the compute on which will be applied the placement policy.</p>
245+
246+
<p><img src="../../../../images/2.1.0/yorc/placement-abstract-topology-editor.png" alt="Add placement policy to your application topology" /></p>
247+
248+
<h3 id="manage-current-deployment">Manage current deployment</h3>
249+
250+
<p>Once you choose the <strong>hosts pool location</strong> for deploying your application, in case of multiple hostspool placement policies, you have to choose the one you want during the <strong>Policies Matching</strong> step.</p>
251+
252+
<p><img src="../../../../images/2.1.0/yorc/hostspool-policies-matching.png" alt="Select your policy during policies matching step" /></p>
253+
254+
<p>That’s it ! you can deploy your application: the Round-robin placement policy will be applied on the 2 instances of the Compute node.</p>
255+
198256
<a class="btn btn-primary pull-right" href="http://prose.io/#alien4cloud/alien4cloud.github.io/edit/sources/documentation/2.1.0/orchestrators/yorc/policies.markdown"><i class="fa fa-pencil-square-o"></i> Edit (pull request)</a>
199257
</div>
200258
</div>
34.4 KB
Loading
31.7 KB
Loading
42 KB
Loading
29.8 KB
Loading

0 commit comments

Comments
 (0)