<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 16px; font-family: Calibri, sans-serif;">
<div>Hello Pieter,</div>
<div><br>
</div>
<div>I saw your ping in IRC and wanted to follow up with some help.</div>
<div><br>
</div>
<div>In short, the module won't support multiple clusters in the same environment.</div>
<div>The puppet master would infact group together all of those exported resources and combine them into one ring.</div>
<div><br>
</div>
<div>About the exported resources part.  I do see what you see, that what exists is a resource collector and not an exported resource realize(collector).</div>
<div>I believe this exists from early days when an open source(not enterprise) puppet user might not have had access to puppetdb or whatever was needed to use exported resources.</div>
<div>I do agree we should update the documentation around this.  I'll add that to my todo list.</div>
<div>You could change those collectors and test out this use case if you wanted to.</div>
<div><br>
</div>
<div>The way the module uses the ring builder currently suites small single node test setups and the CI jobs (only using the resource collector).</div>
<div><br>
</div>
<div>My suggestion is that you build both rings outside of puppet to start with, using swift-ring-builder.</div>
<div>It's a fairly easy tool included with swift and can be easily scripted.</div>
<div>You could then store those rings on your puppet master or some other node.</div>
<div><br>
</div>
<div>You could use the swift:ringserver and swift::ringsync classes to distribute those rings.</div>
<div>OR</div>
<div>In production I store the rings on a redundant file server and use the wget module to grab the ring:</div>
<div>I also version the path of the ring and send that data in using hiera.. helps with coordinating ring updates.</div>
<div><br>
</div>
<div>
<div>define ::swift::sync_ring(</div>
<div>  $ring_server,</div>
<div>  $path,</div>
<div>){</div>
<div>  wget::fetch { $name:</div>
<div>    source      => "http://${ring_server}/${path}/${name}",</div>
<div>    execuser    => 'swift',</div>
<div>    destination => "/etc/swift/${name}",</div>
<div>    timeout     => 30,</div>
<div>    cache_dir   => '/var/cache/swift',</div>
<div>    verbose     => false,</div>
<div>  }</div>
<div>}</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>On an object node profile:</div>
<div><br>
</div>
<div>
<div>     ::swift::sync_ring { 'account.ring.gz':</div>
<div>        ring_server => $swift_ring_server,</div>
<div>        path        => "swift/swift_rings/<clustername>/${ring_version}",</div>
<div>        require     => File['/etc/swift/'],</div>
<div>      }</div>
</div>
<div><br>
</div>
<div>With this method, you could then use hiera to key a specific ring to each 1+3 proxy/object set.</div>
<div>As long as proxy A has ring A, it won't be talking to Object node B.. for example.</div>
<div><br>
</div>
<div>Also- If you have time, read up on "storage policies" in swift.  I can think of some ways you could get</div>
<div>creative there and run both clusters off of a single proxy.</div>
<div><br>
</div>
<div>-Adam</div>
<div><br>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<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>"Wijngaarden, Pieter van" <<a href="mailto:pieter.van.wijngaarden@philips.com">pieter.van.wijngaarden@philips.com</a>><br>
<span style="font-weight:bold">Date: </span>Tuesday, December 29, 2015 at 4:50 AM<br>
<span style="font-weight:bold">To: </span>"<a href="mailto:openstack-operators@lists.openstack.org">openstack-operators@lists.openstack.org</a>" <<a href="mailto:openstack-operators@lists.openstack.org">openstack-operators@lists.openstack.org</a>><br>
<span style="font-weight:bold">Subject: </span>[Openstack-operators] [puppet] [swift] Deploying multiple Swift clusters within the same Puppet environment<br>
</div>
<div><br>
</div>
<div 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">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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]-->
<div lang="NL" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi, <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">Hopefully this is the right place to ask for guidance! I’m deploying OpenStack/Swift in a development environment and intend to create/deploy multiple Swift clusters with different hardware configurations underneath and
 then do performance benchmarking. For example, I’m now building 2 clusters with each 1+3 nodes (1 proxy + 3 storage nodes), one cluster with NL-SAS disks and another with SAS disks. I also have a single-node ‘cluster’ up & running already. I’m setting up the
 configuration of all these clusters in Puppet.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I plan to do the ring creation as follows (please correct me if I’m saying weird or dumb things, I’m fairly new to Puppet):<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">In the Puppet declaration for each storage node, I think I should create the ring_account_device resources and export them, something like this:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">hiera('swift_devices').each |String $device| {<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:35.4pt;text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">@@ring_account_device { "$backbone_ip:6002/$device":<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt;text-indent:35.4pt;text-autospace:none">
<span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">zone => hiera('swift_zone'),<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt;text-indent:35.4pt;text-autospace:none">
<span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">weight => hiera('swift_device_weight'),<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:35.4pt;text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">}<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Then on the proxy node (once for each cluster), I include the
</span><span lang="EN-US" style="font-family:"Courier New"">swift::ringbuilder</span><span lang="EN-US"> which collects these resources and creates the ring. At least for the single-node cluster this works.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">However, if I would create multiple clusters, how does Puppet know which exported resources are intended for Cluster 1 (with NL-SAS disks) and which are for Cluster 2 (with SAS disks)? Is this at all possible using Puppet?
 I fear that if I deploy this, I will have 2 proxies which build a ring, each using all servers/drives on each storage node.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Also, I don’t fully understand why (in modules/swift/ringbuilder.pp), I see the following:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">Swift::Ringbuilder::Create['account'] -> Ring_account_device <| |> ~> Swift::Ringbuilder::Rebalance['account']<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Here, it looks to me like the Ring is built with resource collector (</span><span lang="EN-US" style="font-family:"Courier New"">Ring_account_device <| |></span><span lang="EN-US">) , while the syntax to realize exported
 resources should use double angle brackets </span><span lang="EN-US" style="font-family:"Courier New"">(<<| |>>)</span><span lang="EN-US">if I understand correctly? What am I missing/overlooking here? Should I run the ring builder on the storage nodes instead,
 and are things then synced in some other way? (That makes little sense to me…). <o:p>
</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Can I make this work, and if so, how? Any help is greatly appreciated!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Happy holidays & kind regards,</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:14.4pt;background:white">
<span style="mso-fareast-language:NL">Pieter van Wijngaarden<o:p></o:p></span></p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1">The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified
 that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.<br>
</font></div>
</div>
</span><br>
<hr>
<font face="Arial" color="Gray" size="1"><br>
This E-mail and any of its attachments may contain Time Warner Cable proprietary information, which is privileged, confidential, or subject to copyright belonging to Time Warner Cable. This E-mail is intended solely for the use of the individual or entity to
 which it is addressed. If you are not the intended recipient of this E-mail, you are hereby notified that any dissemination, distribution, copying, or action taken in relation to the contents of and attachments to this E-mail is strictly prohibited and may
 be unlawful. If you have received this E-mail in error, please notify the sender immediately and permanently delete the original and any copy of this E-mail and any printout.<br>
</font>
</body>
</html>