<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>front page Archives &#8211; Structured Procrastination</title>
	<atom:link href="https://blog.adamspiers.org/category/front-page/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.adamspiers.org/category/front-page/</link>
	<description>because there&#039;s always something more interesting than what you should be doing</description>
	<lastBuildDate>Wed, 01 Jun 2022 14:31:53 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.2</generator>

<image>
	<url>https://blog.adamspiers.org/wp-content/uploads/2018/12/cropped-IMG_20160907_193859-PANO-c-7-32x32.jpg</url>
	<title>front page Archives &#8211; Structured Procrastination</title>
	<link>https://blog.adamspiers.org/category/front-page/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Improving trust in the cloud with OpenStack and AMD SEV</title>
		<link>https://blog.adamspiers.org/2019/09/13/improving-trust-in-the-cloud-with-openstack-and-amd-sev/</link>
					<comments>https://blog.adamspiers.org/2019/09/13/improving-trust-in-the-cloud-with-openstack-and-amd-sev/#respond</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Fri, 13 Sep 2019 12:00:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[AMD]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[coopetition]]></category>
		<category><![CDATA[OpenStack]]></category>
		<category><![CDATA[SEV]]></category>
		<guid isPermaLink="false">https://blog.adamspiers.org/?p=1871</guid>

					<description><![CDATA[<p>This post contains an exciting announcement, but first I need to provide some context! Ever heard that joke &#8220;the cloud is just someone else&#8217;s computer&#8221;? Of course it&#8217;s a gross over-simplification, but there&#8217;s more than a grain of truth in it. And that raises the question: if your applications are running in someone else&#8217;s data-centre, [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2019/09/13/improving-trust-in-the-cloud-with-openstack-and-amd-sev/">Improving trust in the cloud with OpenStack and AMD SEV</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> This post contains an exciting announcement, but first I need to provide some context! </p>
<p> Ever heard that joke &#8220;the cloud is just someone else&#8217;s computer&#8221;? </p>
<div class="figure">
<p><img decoding="async" src="https://blog.adamspiers.org/wp-content/uploads/2019/09/no-cloud-coffee-mug.jpg" alt="Coffee mug saying &quot;There is no cloud. It's just someone else's computer&quot;" title="There are T-shirts too ..." style="width: 50%; margin: 0 auto; display: block;" /> </p>
</p></div>
<p> Of course it&#8217;s a gross over-simplification, but there&#8217;s more than a grain of truth in it.  And that raises the question: <b>if your applications are running in someone else&#8217;s data-centre, how can you trust that they&#8217;re not being snooped upon, or worse, invasively tampered with?</b> </p>
<p> Until recently, the answer was &#8220;you can&#8217;t&#8221;.  Well, that&#8217;s another over-simplification.  You could design your workload to be tamperproof; for example even if individual mining nodes in Bitcoin or Ethereum are compromised, the blockchain as a whole will resist the attack just fine.  But there&#8217;s still the snooping problem. </p>
<div id="outline-container-org4c32b9b" class="outline-2">
<h2 id="org4c32b9b">Hardware to the rescue?</h2>
<div class="outline-text-2" id="text-org4c32b9b">
<p> However, there&#8217;s some good news on this front.  Intel and AMD realised this was a problem, and have both introduced new hardware capabilities to help improve the level to which cloud users can trust the environment in which their workloads are executed, e.g.: </p>
<ul class="org-ul">
<li>
<p> <a href="https://en.wikipedia.org/wiki/Zen_(microarchitecture)#Enhanced_security_and_virtualization_support">AMD SEV (Secure Encrypted Virtualization)</a> which can encrypt the memory of a running VM with a key which is only accessible to the owner of that VM.  This is done on-chip so that even if you have physical access to the machine, it makes it a lot harder to snoop in on the running VM<sup><a id="fnr.1" name="fnr.1" class="footref" href="#fn.1">1</a></sup>. </p>
<p> It can also provide the guest owner with an attestation which cryptographically proves that the memory was encrypted correctly and can only be decrypted by the owner. </p>
</li>
<li><a href="https://www.tomshardware.co.uk/intel-mktme-amd-memory-encryption,news-60766.html">Intel MKTME (Multi-Key Total Memory Encryption)</a> which is a similar approach.</li>
</ul>
<p> But even with that hardware support, there is the question to what degree anyone can trust public clouds run on proprietary technology. There is a growing awareness that Free (Libre) / Open Source Software tends to be inherently more secure and trustworthy, since its transparency enables unlimited peer review, and its openness allows anyone to contribute improvements. </p>
<p> And these days, <a href="https://www.openstack.org">OpenStack</a> is pretty much the undisputed king of the Open Source cloud infrastructure world. </p>
</div>
</div>
<div id="outline-container-org85d715d" class="outline-2">
<h2 id="org85d715d">An exciting announcement</h2>
<div class="outline-text-2" id="text-org85d715d">
<p> So I&#8217;m delighted to be able to announce a significant step forward in trustworthy cloud computing: as of this week, <b>OpenStack is now able to launch VMs with SEV enabled!</b> (Given the appropriate AMD hardware, of course.) </p>
<div class="figure">
<p><a href="https://blog.adamspiers.org/wp-content/uploads/2019/09/SEV-Horizon-flavor-metadata-2.png" title="The new hw:mem_encryption flavor extra spec. Click for full size." alt="The new hw:mem_encryption flavor extra spec" style="width: 98%; margin: 0 auto; display: block;"><img decoding="async" src="https://blog.adamspiers.org/wp-content/uploads/2019/09/SEV-Horizon-flavor-metadata-2-1.png" alt="The new hw:mem_encryption flavor extra spec" title="The new hw:mem_encryption flavor extra spec. Click for full size." style="width: 98%; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> The core functionality is all merged and will be in the imminent Train release.  You can read <a href="https://docs.openstack.org/nova/latest/admin/configuration/hypervisor-kvm.html#amd-sev-secure-encrypted-virtualization">the documentation</a>, and you will also find it mentioned in <a href="https://docs.openstack.org/releasenotes/nova/">the Nova Release Notes</a>. </p>
<p> While this is &#8220;only&#8221; an <a href="https://en.wikipedia.org/wiki/Minimum_viable_product">MVP</a> and far from the end of the journey (see below), it&#8217;s an important milestone in a strong partnership between my employer <a href="http://suse.com/">SUSE</a> and <a href="https://www.amd.com/">AMD</a>.  We started work on adding SEV support into OpenStack around a year ago: </p>
<div class="figure">
<p><a href="https://blueprints.launchpad.net/nova/+spec/amd-sev-libvirt-support" title="The original blueprint for integrating AMD SEV into nova. Click for full size." alt="The original blueprint for integrating AMD SEV into nova" style="width: 98%; margin: 0 auto; display: block;"><img decoding="async" src="https://blog.adamspiers.org/wp-content/uploads/2019/09/SEV-launchpad-blueprint-implemented.png" alt="The original blueprint for integrating AMD SEV into nova" title="The original blueprint for integrating AMD SEV into nova. Click for full size." style="width: 98%; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> This resulted in <a href="http://specs.openstack.org/openstack/nova-specs/specs/train/approved/amd-sev-libvirt-support.html">one of the most in-depth technical specification documentations I&#8217;ve ever had to write</a>, plus many months of intense collaboration on the code and several changes in design along the way. </p>
<div class="figure">
<p><a href="https://review.opendev.org/#/q/topic:bp/amd-sev-libvirt-support+status:merged" title="SEV code reviews. Click to view in Gerrit!" alt="SEV code reviews. Click to view in Gerrit!" style="width: 98%; margin: 0 auto; display: block;"><img decoding="async" src="https://blog.adamspiers.org/wp-content/uploads/2019/09/SEV-Gerrit-merged-patches.png" alt="SEV code reviews. Click to view in Gerrit!" title="SEV code reviews. Click to view in Gerrit!" style="width: 98%; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> I&#8217;d like to thank not only my colleagues at SUSE and AMD for all their work so far, but also many members of the upstream OpenStack community, especially the <a href="https://wiki.openstack.org/wiki/Nova">Nova</a> team.  In particular I enjoyed fantastic support from the PTL (Project Technical Lead) Eric Fried, and several developers at Red Hat, which I think speaks volumes to how well <a href="https://en.wikipedia.org/wiki/Coopetition">the &#8220;coopetition&#8221; model</a> works in the Open Source world. </p>
<p> The rest of this post gives a quick tour of the implementation via screenshots and brief explanations, and then concludes with what&#8217;s planned next. </p>
<p><span id="more-1871"></span></p>
<p> OpenStack&#8217;s Compute service (nova) will automatically detect the presence of the SEV feature on any compute node which is configured to support it.  You can optionally configure how many slots are available on the memory controller for encryption keys.  One is used for each guest, so this effectively acts as the maximum number of guest VMs which can concurrently use SEV.  Here you can see the configuration of <a href="https://docs.openstack.org/nova/latest/configuration/config.html#libvirt.num_memory_encrypted_guests">this option</a>, and how nova handles the inventory.  Note that it also registers an SEV trait on the compute host, so that in the future if the cloud has a mix of hardware offering different guest memory encryption technologies, you&#8217;ll be able to choose which one you want for any given guest, if you need to. </p>
<div class="figure">
<p><a href="https://blog.adamspiers.org/wp-content/uploads/2019/09/SEV-CLI-compute-inventory-trait.png" title="Inventorying the SEV feature. Click for full size." alt="Inventorying the SEV feature." style="width: 98%; margin: 0 auto; display: block;"><img decoding="async" src="https://blog.adamspiers.org/wp-content/uploads/2019/09/SEV-CLI-compute-inventory-trait.png" alt="Inventorying the SEV feature." title="Inventorying the SEV feature. Click for full size." style="width: 98%; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> SEV can be enabled by the operator by adding a new <code>hw:mem_encryption</code> &#8220;extra spec&#8221; which is a property on nova&#8217;s <a href="https://docs.openstack.org/nova/latest/user/flavors.html">flavors</a>.  As already shown in the screenshot above, this can be done through Horizon, OpenStack&#8217;s web dashboard.  However it can also be set per-image via a similarly-named property <code>hw_mem_encryption</code>: </p>
<div class="figure">
<p><a href="https://blog.adamspiers.org/wp-content/uploads/2019/09/SEV-Horizon-image-metadata-4.png" title="Enabling SEV via image property in Horizon. Click for full size." alt="Enabling SEV via image property in Horizon." style="width: 98%; margin: 0 auto; display: block;"><img decoding="async" src="https://blog.adamspiers.org/wp-content/uploads/2019/09/SEV-Horizon-image-metadata-4.png" alt="Enabling SEV via image property in Horizon." title="Enabling SEV via image property in Horizon. Click for full size." style="width: 98%; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> and of course this can all be done via the command-line too: </p>
<div class="figure">
<p><a href="https://blog.adamspiers.org/wp-content/uploads/2019/09/SEV-CLI-flavor-image.png" title="Enabling SEV via CLI. Click for full size." alt="Enabling SEV via CLI. Click for full size." style="width: 98%; margin: 0 auto; display: block;"><img decoding="async" src="https://blog.adamspiers.org/wp-content/uploads/2019/09/SEV-CLI-flavor-image.png" alt="Enabling SEV via CLI. Click for full size." title="Enabling SEV via CLI. Click for full size." style="width: 98%; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> Notice the presence of a few other image properties which are crucial for SEV to function correctly.  (These are explained fully in the documentation.) </p>
<p> Once booted, an SEV VM instance looks and behaves pretty much like any other OpenStack VM: </p>
<div class="figure">
<p><a href="https://blog.adamspiers.org/wp-content/uploads/2019/09/SEV-Horizon-instances.png" title="SEV instances listed in Horizon. Click for full size." alt="SEV instances listed in Horizon" style="width: 98%; margin: 0 auto; display: block;"><img decoding="async" src="https://blog.adamspiers.org/wp-content/uploads/2019/09/SEV-Horizon-instances.png" alt="SEV instances listed in Horizon" title="SEV instances listed in Horizon. Click for full size." style="width: 98%; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> However there are <a href="https://docs.openstack.org/nova/latest/admin/configuration/hypervisor-kvm.html#impermanent-limitations">some limitations</a>, e.g. it cannot <i>yet</i> be live-migrated or suspended: </p>
<div class="figure">
<p><a href="https://blog.adamspiers.org/wp-content/uploads/2019/09/SEV-CLI-live-migrate-suspend-forbidden.png" title="Enabling SEV via flavor extra spec or image property. Click for full size." alt="Enabling SEV via flavor extra spec or image property" style="width: 98%; margin: 0 auto; display: block;"><img decoding="async" src="https://blog.adamspiers.org/wp-content/uploads/2019/09/SEV-CLI-live-migrate-suspend-forbidden.png" alt="Enabling SEV via flavor extra spec or image property" title="Enabling SEV via flavor extra spec or image property. Click for full size." style="width: 98%; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> Behind the scenes, nova takes care of quite a few important details in how the VM is configured in libvirt.  Firstly it performs sanity checks on the flavor and image properties.  Then it adds a crucial new <code>&lt;launchSecurity&gt;</code> element: </p>
<div class="figure">
<p><a href="https://blog.adamspiers.org/wp-content/uploads/2019/09/SEV-CLI-server-launchSecurity-XML.png" title="Enabling SEV via flavor extra spec or image property. Click for full size." alt="Enabling SEV via flavor extra spec or image property" style="width: 98%; margin: 0 auto; display: block;"><img decoding="async" src="https://blog.adamspiers.org/wp-content/uploads/2019/09/SEV-CLI-server-launchSecurity-XML.png" alt="Enabling SEV via flavor extra spec or image property" title="Enabling SEV via flavor extra spec or image property. Click for full size." style="width: 98%; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> and also enables IOMMU for <code>virtio</code> devices: </p>
<div class="figure">
<p><a href="https://blog.adamspiers.org/wp-content/uploads/2019/09/SEV-CLI-server-iommu-XML.png" title="Enabling IOMMU for virtio devices. Click for full size." alt="Enabling IOMMU for virtio devices" style="width: 98%; margin: 0 auto; display: block;"><img decoding="async" src="https://blog.adamspiers.org/wp-content/uploads/2019/09/SEV-CLI-server-iommu-XML.png" alt="Enabling IOMMU for virtio devices" title="Enabling IOMMU for virtio devices. Click for full size." style="width: 98%; margin: 0 auto; display: block;" /></a> </p>
</p></div>
</div>
</div>
<div id="outline-container-orgb46ad8b" class="outline-2">
<h2 id="orgb46ad8b">What&#8217;s next?</h2>
<div class="outline-text-2" id="text-orgb46ad8b">
<p> This area of technology is new and rapidly evolving, so there is still plenty of work left to be done, especially on the software side. </p>
<p> Of course we&#8217;ll be adding this functionality to <a href="https://www.suse.com/products/suse-openstack-cloud/">SUSE OpenStack Cloud</a>, initially as a technical preview for our customers to try out. </p>
<p> Probably the most important feature needed next on the SEV side is the ability to verify the attestation which cryptographically proves that the memory was encrypted correctly and can only be decrypted by the owner.  In addition specification of the work required to add support to OpenStack for Intel&#8217;s MKTME already <a href="https://review.opendev.org/#/c/666769/">started</a>, so I would expect that to continue. </p>
</div>
</div>
<div id="footnotes">
<h2 class="footnotes">Footnotes: </h2>
<div id="text-footnotes">
<div class="footdef"><sup><a id="fn.1" name="fn.1" class="footnum" href="#fnr.1">1</a></sup> </p>
<div class="footpara">
<p class="footpara"> There are still potential attacks, e.g. snooping unencrypted memory cache or CPU registers.  Work by AMD and others is ongoing to address these. </p>
</div>
</div>
</div>
</div>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2019%2F09%2F13%2Fimproving-trust-in-the-cloud-with-openstack-and-amd-sev%2F&#038;title=Improving%20trust%20in%20the%20cloud%20with%20OpenStack%20and%20AMD%20SEV" data-a2a-url="https://blog.adamspiers.org/2019/09/13/improving-trust-in-the-cloud-with-openstack-and-amd-sev/" data-a2a-title="Improving trust in the cloud with OpenStack and AMD SEV"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2019/09/13/improving-trust-in-the-cloud-with-openstack-and-amd-sev/">Improving trust in the cloud with OpenStack and AMD SEV</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2019/09/13/improving-trust-in-the-cloud-with-openstack-and-amd-sev/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What does negative harmony sound like? Here&#8217;s the answer!</title>
		<link>https://blog.adamspiers.org/2019/06/23/negative-harmony-app-shimanator/</link>
					<comments>https://blog.adamspiers.org/2019/06/23/negative-harmony-app-shimanator/#comments</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Sun, 23 Jun 2019 10:00:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[Barak Schmool]]></category>
		<category><![CDATA[composition]]></category>
		<category><![CDATA[harmony]]></category>
		<category><![CDATA[Jacob Collier]]></category>
		<category><![CDATA[jazz]]></category>
		<category><![CDATA[MIDI]]></category>
		<category><![CDATA[music theory]]></category>
		<category><![CDATA[negative harmony]]></category>
		<category><![CDATA[SHIMANator]]></category>
		<category><![CDATA[SuperCollider]]></category>
		<guid isPermaLink="false">https://blog.adamspiers.org/?p=1675</guid>

					<description><![CDATA[<p>In the last year or so there&#8217;s been quite a buzz in the music theory world about the concept of negative harmony, mainly thanks to a few YouTube interviews with Jacob Collier which have gone viral, especially the ones by June Lee. But while this has been great for introducing the idea to many people, [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2019/06/23/negative-harmony-app-shimanator/">What does negative harmony sound like? Here&#8217;s the answer!</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> In the last year or so there&#8217;s been quite a buzz in the music theory world about the concept of <b>negative harmony</b>, mainly thanks to a few YouTube interviews with Jacob Collier which have gone viral, especially the ones by June Lee. </p>
<p> But while this has been great for introducing the idea to many people, still most people don&#8217;t really know what music based on negative harmony actually <b>sounds</b> like!  And as Jacob mentioned in some of these interviews, clever theoretical tricks are rather pointless unless you can actually make some great music from them.  Most of the videos just focus on a few chords, which is a great start but far from the full picture. </p>
<div id="outline-container-orgacc49d4" class="outline-2">
<h2 id="intro">Introducing the SHIMANator negative harmony app!</h2>
<div class="outline-text-2" id="text-intro">
<p> So I&#8217;ve built an app called &#8220;the SHIMANator&#8221; which can convert any music into its negative harmony equivalent, and I&#8217;m very excited to finally announce it to the world!  Check out the video: </p>

<div data-mode="normal" data-oembed="1" data-provider="youtube" id="arve-youtube-9zsazdo9ptm" style="max-width:900px;" class="arve">
	<div class="arve-inner">
		<div style="aspect-ratio:500/281" class="arve-embed arve-embed--has-aspect-ratio">
			<div class="arve-ar" style="padding-top:56.200000%"></div>
			<iframe allow="accelerometer &apos;none&apos;;autoplay &apos;none&apos;;bluetooth &apos;none&apos;;browsing-topics &apos;none&apos;;camera &apos;none&apos;;clipboard-read &apos;none&apos;;clipboard-write;display-capture &apos;none&apos;;encrypted-media &apos;none&apos;;gamepad &apos;none&apos;;geolocation &apos;none&apos;;gyroscope &apos;none&apos;;hid &apos;none&apos;;identity-credentials-get &apos;none&apos;;idle-detection &apos;none&apos;;keyboard-map &apos;none&apos;;local-fonts;magnetometer &apos;none&apos;;microphone &apos;none&apos;;midi &apos;none&apos;;otp-credentials &apos;none&apos;;payment &apos;none&apos;;picture-in-picture;publickey-credentials-create &apos;none&apos;;publickey-credentials-get &apos;none&apos;;screen-wake-lock &apos;none&apos;;serial &apos;none&apos;;summarizer &apos;none&apos;;sync-xhr;usb &apos;none&apos;;web-share;window-management &apos;none&apos;;xr-spatial-tracking &apos;none&apos;;" allowfullscreen="" class="arve-iframe fitvidsignore" credentialless data-arve="arve-youtube-9zsazdo9ptm" data-lenis-prevent="" data-src-no-ap="https://www.youtube.com/embed/9zsAzDO9pTM?feature=oembed&amp;enablejsapi=1&amp;origin=https%3A%2F%2Fblog.adamspiers.org&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;autohide=1&amp;playsinline=0&amp;autoplay=0" frameborder="0" height="505.8" loading="lazy" name="" referrerpolicy="strict-origin-when-cross-origin" sandbox="allow-scripts allow-same-origin allow-presentation allow-popups allow-popups-to-escape-sandbox" scrolling="no" src="https://www.youtube.com/embed/9zsAzDO9pTM?feature=oembed&#038;enablejsapi=1&#038;origin=https%3A%2F%2Fblog.adamspiers.org&#038;iv_load_policy=3&#038;modestbranding=1&#038;rel=0&#038;autohide=1&#038;playsinline=0&#038;autoplay=0" title="" width="900"></iframe>
			
		</div>
		
	</div>
	
	
	<script type="application/ld+json">{"@context":"http:\/\/schema.org\/","@id":"https:\/\/blog.adamspiers.org\/2019\/06\/23\/negative-harmony-app-shimanator\/#arve-youtube-9zsazdo9ptm","@type":"VideoObject","embedURL":"https:\/\/www.youtube.com\/embed\/9zsAzDO9pTM?feature=oembed&enablejsapi=1&origin=https%3A%2F%2Fblog.adamspiers.org&iv_load_policy=3&modestbranding=1&rel=0&autohide=1&playsinline=0&autoplay=0"}</script>
	
<div class="arve-error"><p><small><abbr title="Advanced Responsive Video Embedder">ARVE</abbr> error: Mode: lazyload not available (ARVE Pro not active?), switching to normal mode</small></p></div>
</div></div>
</div>
<div id="outline-container-orgb49a42c" class="outline-2">
<h2 id="point">OK, but what&#8217;s the point?</h2>
<div class="outline-text-2" id="text-point">
<p> I mainly wrote this app because a) Jacob asked me to, b) it sounded like a fun challenge, and c) the thought of being able to instantly hear the negative harmony equivalent of any music was very appealing. </p>
<p> But in the process of getting it working, it became apparent that this could actually be a useful tool for generating fresh new musical ideas and sounds.  For example, I&#8217;ve talked to film / TV composers who got excited about using it to quickly generate music which is coherent with and relating to their existing material.  For example if a musical motif in a major key represented a character in a film, flipping it about an axis would give you the negative version, which would sound in a minor key and could be used to represent the &#8220;dark side&#8221; of that character&#8217;s personality. </p>
</div>
</div>
<div id="outline-container-org015e564" class="outline-2">
<h2 id="beta">Can I try it out?</h2>
<div class="outline-text-2" id="text-beta">
<p> Not yet, but I&#8217;m aiming to offer early beta access to a select group of people at some point soon.  Please show your interest by taking the following actions! </p>
</div>
</div>
<div id="outline-container-org8caf60c" class="outline-2">
<h2 id="sign-up">1. Sign up for updates on the SHIMANator</h2>
<div class="outline-text-2" id="text-sign-up">
<script type="text/javascript" src="//mautic.adamspiers.org/form/generate.js?id=2"></script>
</div>
</div>
<div id="outline-container-orgb4faa63" class="outline-2">
<h2 id="feedback">2. Let me know what you think and win a free copy!</h2>
<div class="outline-text-2" id="text-feedback">
<p> Do you find this app interesting?  Could you imagine using it yourself?  If so, would you use it for composition, or as an extra effect in live improvisation, or maybe even for something else? </p>
<p> So I&#8217;d love to hear what you think &#8211; and the person who gives the best feedback will win a free copy of the software when it&#8217;s fully productised and ready to publish! </p>
<p> Please leave comments on the <a href="http://fb.me/SHIMANator">Facebook page</a> or <a href="https://youtu.be/qgJFh7ESysc">the YouTube video</a>. </p>
</div>
</div>
<div id="outline-container-orgc6ebf60" class="outline-2">
<h2 id="subscribe">3. Subscribe to <a href="https://www.youtube.com/user/roink">my YouTube channel</a>:</h2>
<div class="outline-text-2" id="text-subscribe">
<script src="https://apis.google.com/js/platform.js"></script></p>
<div style="width: fit-content; margin: 1em auto 2em auto">
<div class="g-ytsubscribe" data-channel="roink" data-layout="full" data-count="hidden"></div>
</div>
</div>
</div>
<div id="outline-container-orgc763060" class="outline-2">
<h2 id="work">How does it work?</h2>
<div class="outline-text-2" id="text-work">
<p> At the simplest level, it takes MIDI events in, does some magic to convert to negative harmony, and then outputs the same events with modified pitches.  So it should work with pretty much any piece of MIDI-compatible software or hardware under the sun. </p>
<p> The actual algorithm for the conversion is very complicated, so I&#8217;ll save the explanation for another time.  But you can see from the video how melodic motion is inverted, as is motion around the circle of fifths. </p>
</div>
</div>
<div id="outline-container-org5007357" class="outline-2">
<h2 id="history">How did this all come about?</h2>
<div class="outline-text-2" id="text-history">
<p> Here&#8217;s the history, in case you&#8217;re curious. </p>
<p> I was introduced to negative harmony a few years ago by <a href="http://www.f-ire.com/?portfolio=57">Barak Schmool</a>, who later taught <a href="https://jacobcollier.com/">Jacob</a> in <a href="https://www.ram.ac.uk/about-us/staff/barak-schmool">his role as professor of jazz and world rhythms at the Royal Academy of Music</a>.  (Barak&#8217;s awareness of the technique was heavily influenced by his friend <a href="https://m-base.com/">Steve Coleman</a>, an incredible jazz saxophonist who has been using negative harmony in his music for many decades.) </p>
<p> At the time I built a really dumb prototype for fun, and fed Mozart&#8217;s 40th Symphony through it.  The results were promising, but also sounded amusingly terrible due to every high note being converted to a very low note and vice-versa. </p>
<p> It was clear that without some magic octave transposition algorithm, notes would stray too far from their original register and completely screw up the voicing &#8220;texture&#8221; which the composer had intended.  So shortly afterwards, Barak and I basically forgot about it, and instead got distracted experimenting on Giant Steps with some brilliant ideas he had regarding unequally tempered systems of intonation (which later inspired some of Jacob&#8217;s great work with microtonal voice-leading). </p>
<p> A year or two later, Barak told Jacob about my prototype.  He was interested enough to get in touch, and you already know the rest of the story. </p>
<p> By the way, there is already some great music out there made entirely using negative harmony.  For example see <a href="https://www.youtube.com/channel/UCurOAVtqb7kM1siNlDynzFw">Steve Cruickshank&#8217;s fantastic YouTube channel</a>, which is full of negative harmony covers of famous music.  And I&#8217;m not even the first to come up with <a href="https://soundcloud.com/tolga-zafer/beethoven-moonlight-sonata-negative-harmony">a negative version of Beethoven&#8217;s Moonlight Sonata</a>.  But I&#8217;m not yet aware of any other software which does what mine does.  Hopefully you find its potential interesting. </p>
</div>
</div>
<div id="outline-container-orgf69da85" class="outline-2">
<h2 id="other">Have you made any other music software?</h2>
<div class="outline-text-2" id="text-other">
<p> Funny you should ask!  Actually yes: in an earlier collaboration with Barak I built <a href="http://scalematcher.adamspiers.org/">the Scale Matcher</a> &#8211; a free app (web page) for finding which scales match a given chord.  Check it out <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> </p>
<p> If you read this far, <a href="https://youtu.be/SAS6ng6kt-c?t=531">congratulations &#8211; you are a most excellent</a> and dedicated music theory nerd.  Let&#8217;s have a pint some time.  But until then, don&#8217;t forget to subscribe and let me know what you think! </p>
<p><script src="https://apis.google.com/js/platform.js"></script></p>
<div style="width: fit-content; margin: 1em auto 2em auto">
<div class="g-ytsubscribe" data-channel="roink" data-layout="full" data-count="hidden"></div>
</div>
</div>
</div>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2019%2F06%2F23%2Fnegative-harmony-app-shimanator%2F&#038;title=What%20does%20negative%20harmony%20sound%20like%3F%20Here%E2%80%99s%20the%20answer%21" data-a2a-url="https://blog.adamspiers.org/2019/06/23/negative-harmony-app-shimanator/" data-a2a-title="What does negative harmony sound like? Here’s the answer!"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2019/06/23/negative-harmony-app-shimanator/">What does negative harmony sound like? Here&#8217;s the answer!</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2019/06/23/negative-harmony-app-shimanator/feed/</wfw:commentRss>
			<slash:comments>24</slash:comments>
		
		
			</item>
		<item>
		<title>git branch auto-magic: git-splice, git-transplant, git-deps, and announcing git-explode!</title>
		<link>https://blog.adamspiers.org/2018/06/14/git-auto-magic/</link>
					<comments>https://blog.adamspiers.org/2018/06/14/git-auto-magic/#comments</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Thu, 14 Jun 2018 22:00:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[backporting]]></category>
		<category><![CDATA[branches]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[forward-porting]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[upstreaming]]></category>
		<category><![CDATA[version control]]></category>
		<category><![CDATA[workflow]]></category>
		<guid isPermaLink="false">https://blog.adamspiers.org/?p=1655</guid>

					<description><![CDATA[<p>For the last few years I&#8217;ve been enjoying the luxury of SUSE&#8217;s generous HackWeek policy to work on building four tools supporting higher-level workflows on top of git. I&#8217;d already (quietly) announced three of them: git-splice, git-transplant, git-deps (more details below). But I&#8217;m now excited to announce that I&#8217;ve just released the fourth: git-explode ! [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2018/06/14/git-auto-magic/">git branch auto-magic: git-splice, git-transplant, git-deps, and announcing git-explode!</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> For the last few years I&#8217;ve been enjoying the luxury of SUSE&#8217;s generous <a href="https://hackweek.suse.com/about">HackWeek</a> policy to work on building four tools supporting higher-level workflows on top of <code>git</code>.  I&#8217;d already (quietly) announced three of them: <code>git-splice</code>, <code>git-transplant</code>, <code>git-deps</code> (more details below).  But I&#8217;m now excited to announce that I&#8217;ve just released the fourth: <a href="https://github.com/aspiers/git-explode"><code>git-explode</code></a> ! </p>
<p> <code>git-explode</code> automatically explodes a large topic branch into a set of smaller, independent topic branches.  It does this by harnessing <code>git-deps</code> to automatically detect inter-dependencies between commits in the large source branch and using that dependency tree to construct the smaller topic branches. </p>
<p> I recently presented all four tools at a Meetup of the <a href="http://londongit.org/">Git London User Group</a>, and thanks to the awesome services of the host venue <a href="https://skillsmatter.com/">Skills Matter</a>, I&#8217;m delighted to announce that the <a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic">talk is now online</a>: </p>
<div class="figure">
<p><a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic" width="99%" align="center" alt="video of my talk on git auto-magic at the Git London User Group Meetup" title="my talk on git auto-magic at the Git London User Group Meetup"><img decoding="async" src="https://blog.adamspiers.org/wp-content/uploads/2018/06/automagic.png" alt="video of my talk on git auto-magic at the Git London User Group Meetup" width="99%" align="center" title="my talk on git auto-magic at the Git London User Group Meetup" /></a> </p>
</p></div>
<p> If you don&#8217;t have time to watch the whole thing, you can look at <a href="https://aspiers.github.io/london-git-automagic-may-2018/">the slides</a>, or just keep on reading to see which ones you might be interested in.  I&#8217;ll list them first, and then talk about the motivation for writing them. </p>
<p><span id="more-1655"></span></p>
<div id="outline-container-orge9751bc" class="outline-2">
<h2 id="orge9751bc">The tools</h2>
<div class="outline-text-2" id="text-orge9751bc">
<p> The first pair are available as patches to <code>git</code> itself: </p>
<ul class="org-ul">
<li>
<p> <a href="https://github.com/git/git/compare/master...aspiers:splice">git-splice</a> &#8211; splices commits onto/into/out of current branch </p>
<p> Jump to 08:44 in <a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic">the video</a> to see me introduce and demo this, or <a href="https://aspiers.github.io/london-git-automagic-may-2018/#/splice-transplant">look at the slides</a>, or <a href="https://github.com/aspiers/git/blob/splice/Documentation/git-splice.txt">read the man page</a> for example usage. </p>
</li>
<li>
<p> <a href="https://github.com/aspiers/git/compare/splice...transplant">git-transplant</a> &#8211; transplants commits from current branch onto/into another </p>
<p> Jump to 32:22 in <a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic">the video</a> to see me introduce and demo this, or <a href="https://aspiers.github.io/london-git-automagic-may-2018/#/transplant">look at the slides</a>, or <a href="https://github.com/aspiers/git/blob/transplant/Documentation/git-transplant.txt">read the man page</a> for example usage. </p>
</li>
</ul>
<p> The second pair are available as Python modules on PyPI, but both have a command-line interface too: </p>
<ul class="org-ul">
<li>
<p> <a href="https://github.com/aspiers/git-deps">git-deps</a> &#8211; automatically detects textual dependencies between commits </p>
<p> Jump to 41:28 in <a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic">the video</a> to see me introduce and demo this, or <a href="https://aspiers.github.io/london-git-automagic-may-2018/#/deps">look at the slides</a>, or <a href="https://github.com/aspiers/git-deps/blob/master/README.md">read the README</a> (which has a couple of short YouTube videos demoing the tool including the fancy web interface), or read <a href="https://blog.adamspiers.org/git-deps">my previous blog post about this</a>. </p>
</li>
<li>
<p> <a href="https://github.com/aspiers/git-explode">git-explode</a> &#8211; explodes a linear sequence of git commits into new independent topic branches </p>
<p> Jump to 51:10 in <a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic">the video</a> to see me introduce and demo this, or <a href="https://aspiers.github.io/london-git-automagic-may-2018/#/firework">look at the slides</a>, or <a href="https://github.com/aspiers/git-explode/blob/master/README.rst">read the README</a>. </p>
</li>
</ul>
<p> It&#8217;s taken a while to get them to a reasonable degree of polish, during which this work has been mostly under the radar, but now I&#8217;m now going to make a more concerted effort to advertise the tools, hence this blog post. </p>
</div>
</div>
<div id="outline-container-org7927f37" class="outline-2">
<h2 id="org7927f37">The Big Idea</h2>
<div class="outline-text-2" id="text-org7927f37">
<p> (Jump to 02:27 in <a href="https://skillsmatter.com/skillscasts/11825-git-auto-magic">the video</a> to see me talk about this, or <a href="https://aspiers.github.io/london-git-automagic-may-2018/#/problems">look at the slides</a>.) </p>
<p> All developers face common problems: </p>
<ul class="org-ul">
<li>It&#8217;s difficult to predict what you&#8217;ll be doing next.  One minute you might be working on a feature, the next you find a bug you need to fix, and the next you find some technical debt which requires refactoring.</li>
<li>Multi-tasking is almost unavoidable.</li>
<li>We&#8217;re human, so we sometimes screw up when trying to follow best practice workflow.</li>
</ul>
<p> What does this mean when using <code>git</code>?  Typically it means we are constantly juggling branches, and often need to manipulate the history of branches for various reasons, for example: </p>
<ul class="org-ul">
<li>Maintaining clean separation of topics between branches to facilitate code reviews: one branch for a refactoring, one for a bugfix, one for a feature, and so on.</li>
<li><a href="https://blog.adamspiers.org/easier-upstreaming-with-git/">Backporting or forward-porting series of patches between branches.</a></li>
</ul>
<p> My feeling is that while the <code>git</code> ecosystem has continued to evolve incrementally over the last few years, not much progress has been made in terms of automating this janitorial work, and that most people either do it by hand, or don&#8217;t bother doing it at all.  This leads to unclean history, and/or more work and frustration for reviewers. </p>
<p> So I wrote these tools (<a href="https://blog.adamspiers.org/easier-upstreaming-with-git/">and others</a>) in an attempt to push the boundaries of automating git workflows to higher levels, <a href="https://public-inbox.org/git/20170801011421.veyuviur3mi4hjir@pacific.linksys.moosehall/">as I explained on the <code>git</code> mailing list last year</a>.  Even if all the use cases they can cover have yet to be discovered, I hope you find them useful, or at least thought-provoking enough that you might join the effort! </p>
<p> I&#8217;d love some feedback, so do let me know what you think in the comments below. </p>
</div>
</div>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2018%2F06%2F14%2Fgit-auto-magic%2F&#038;title=git%20branch%20auto-magic%3A%20git-splice%2C%20git-transplant%2C%20git-deps%2C%20and%20announcing%20git-explode%21" data-a2a-url="https://blog.adamspiers.org/2018/06/14/git-auto-magic/" data-a2a-title="git branch auto-magic: git-splice, git-transplant, git-deps, and announcing git-explode!"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2018/06/14/git-auto-magic/">git branch auto-magic: git-splice, git-transplant, git-deps, and announcing git-explode!</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2018/06/14/git-auto-magic/feed/</wfw:commentRss>
			<slash:comments>10</slash:comments>
		
		
			</item>
		<item>
		<title>Credify &#8211; Reputation as a Service</title>
		<link>https://blog.adamspiers.org/2018/05/04/credify-reputation-as-a-service/</link>
					<comments>https://blog.adamspiers.org/2018/05/04/credify-reputation-as-a-service/#respond</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Fri, 04 May 2018 18:30:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[blockchain]]></category>
		<category><![CDATA[Credify]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[gamification]]></category>
		<category><![CDATA[karma]]></category>
		<category><![CDATA[Reddit]]></category>
		<category><![CDATA[reputation]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[StackOverflow]]></category>
		<guid isPermaLink="false">https://blog.adamspiers.org/?p=1647</guid>

					<description><![CDATA[<p>I went to a blockchain event this week out of curiosity, and heard a talk which really impressed me in that it could solve many unrelated problems with online sites in a single stroke. But before I tell you what it was, let&#8217;s set the scene with some example contexts in which I could see [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2018/05/04/credify-reputation-as-a-service/">Credify &#8211; Reputation as a Service</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> I went to a blockchain event this week out of curiosity, and heard a talk which really impressed me in that it could solve many unrelated problems with online sites in a single stroke.  But before I tell you what it was, let&#8217;s set the scene with some example contexts in which I could see it helping in the future. </p>
<p> Some websites such as <a href="https://stackoverflow.com/">StackOverflow</a> and <a href="https://www.reddit.com/">Reddit</a> have achieved a fairly impressive and high profile degree of success by harnessing <a href="https://en.wikipedia.org/wiki/Gamification">gamification</a>, i.e. a system based on a reputation metric (sometimes labelled &#8220;karma&#8221; or &#8220;gold&#8221;), together with a set of rules and rewards engineered in a way which incentivizes the desired behaviour, namely the contribution of high quality content.  These generally work pretty well, but their systems can still be abused / manipulated in undesirable ways, and also typically there is no mechanism by which a user who has acquired a high reputation score on one site can benefit by transferring that reputation to another domain.  (Although reputation earned within one community within the Stack Exchange network does give you an initial boost when joining other communities within that network.) </p>
<p> A different problem I&#8217;ve been mulling over for years is how to create a reliable marketplace for placing bounties on <a href="https://www.gnu.org/philosophy/floss-and-foss.en.html">FLOSS</a> engineering problems.  Companies such as <a href="https://www.bountysource.com/">BountySource</a> are already having some success doing this, but it feels to me that we&#8217;re still a long way from fully realising the potential for a freelance FLOSS development industry.  One of the big problems in this space is figuring out how to measure good behaviour and reward it appropriately, whilst discouraging bad behaviour.  Sound familiar? </p>
<p> A third area I&#8217;ve been considering is that of bug/issue trackers for public FLOSS projects (and even commercial products).  Unfortunately it&#8217;s not uncommon for these systems to get <a href="https://github.com/isaacs/github/issues/967">spammed to hell and back by idiots</a>.  For instance GitHub is so scared of this problem that <a href="https://github.com/isaacs/github/issues/6">they&#8217;ve chosen not to open this particular Pandora&#8217;s box</a>.  However a karma-based approach could drastically improve the signal-to-noise ratio on these systems. </p>
<p> After spotting the common theme between these use cases, I concluded a few years ago that building a Reputation as a Service (RaaS?) platform to track reputation in a reliable manner, and allow federation of reputation between different communities, could make a lot of sense. That way each service which relies on reputation metrics doesn&#8217;t need to reinvent the wheel. </p>
<p> Fast forwarding several years, blockchain is a proven technology, and its transparency, immutability, and global decentralized nature all suggest that it&#8217;s a near perfect technology on which to build my (probably unoriginal) RaaS idea.  And the good news is that there is already an organisation apparently well on the way to solving this: Credify.  (No need to google it &#8211; the links are below!) </p>
<p> One significant hurdle to building RaaS (which needs to support thousands or even ultimately hundreds of thousands of transactions per second in order to work on a truly global scale) on a blockchain is the poor scalability of the blockchains offered by the likes of Bitcoin and Ethereum.  However Credify has neatly side-stepped this by building on top of EOS, and they&#8217;ve taken advantage of the blockchain to design a much more powerful system which rewards not only good behaviour but crucially also good recommendations and punishes bad ones. </p>
<p> One of their obvious initial targets is the online product/service review industry, since sites like Yelp, TripAdvisor, Amazon etc.  are plagued with fake reviews, and that translates to a huge financial impact within those markets.  However I&#8217;m very interested to see whether this kind of approach will extend to less commercial areas like the ones I highlighted above. </p>
<p> If you want to play around with Credify, here&#8217;s <a href="https://app.credify.one/registration?ref=5ae8ed03a0f31602f4ac13fb">a referral link</a>.  Or if you just want to learn more, check out <a href="https://credify.one/">their very nifty home page</a>. If this thing takes off like I suspect it will, I suspect there might be some advantages to becoming an early adopter. </p>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2018%2F05%2F04%2Fcredify-reputation-as-a-service%2F&#038;title=Credify%20%E2%80%93%20Reputation%20as%20a%20Service" data-a2a-url="https://blog.adamspiers.org/2018/05/04/credify-reputation-as-a-service/" data-a2a-title="Credify – Reputation as a Service"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2018/05/04/credify-reputation-as-a-service/">Credify &#8211; Reputation as a Service</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2018/05/04/credify-reputation-as-a-service/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Report from the OpenStack PTG in Dublin</title>
		<link>https://blog.adamspiers.org/2018/03/09/openstack-ptg-dublin/</link>
					<comments>https://blog.adamspiers.org/2018/03/09/openstack-ptg-dublin/#comments</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Fri, 09 Mar 2018 18:30:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[travel]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[OpenStack]]></category>
		<guid isPermaLink="false">https://blog.adamspiers.org/?p=1599</guid>

					<description><![CDATA[<p>Last week I attended OpenStack&#8217;s PTG (Project Teams Gathering) in Dublin. This event happens every 6 months in a different city, and is a fantastic opportunity for OpenStack developers and upstream contributors to get together and turbo-charge the next phase of collaboration. I wrote a private report for my SUSE colleagues summarising my experience, but [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2018/03/09/openstack-ptg-dublin/">Report from the OpenStack PTG in Dublin</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> Last week I attended OpenStack&#8217;s <a href="https://www.openstack.org/ptg">PTG (Project Teams Gathering)</a> in Dublin.  This event happens every 6 months in a different city, and is a fantastic opportunity for OpenStack developers and upstream contributors to get together and turbo-charge the next phase of collaboration. </p>
<p> I wrote a private report for my SUSE colleagues summarising my experience, but then <a href="http://www.gazlene.net/dublin-ptg.html">Colleen posted her report publicly</a>, which made me realise that it would be far more in keeping with <a href="https://governance.openstack.org/tc/reference/opens.html">OpenStack&#8217;s Four Opens</a> to publish mine online.  So here it is! </p>
<p><span id="more-1599"></span></p>
<div id="outline-container-org8fff103" class="outline-2">
<h2 id="org8fff103">General observations</h2>
<div class="outline-text-2" id="text-org8fff103">
<p> The PTG was well-attended with just over 400 people from all over the world.  As with previous PTGs this felt like just the right size: enough to have most projects / organizations well represented, but not too big to prevent serendipitous meetings happening many times throughout the week, where I would just be wandering around and bump into exactly the right person I needed to talk to 🙂 </p>
<p> <a href="https://wiki.openstack.org/wiki/PTG/Rocky/Etherpads">All the etherpads are publicly available</a> in case you want to dive into the gory details. </p>
<p> IMHO <a href="https://git.openstack.org/cgit/openstack/ptgbot/tree/README.rst">the ptgbot</a> continued to work really well for adapting to the dynamic and fast-changing agenda.  I submitted a few patches to polish it further. </p>
<p> The &#8220;extreme&#8221; (for Ireland, anyway) weather, which was reportedly the heaviest snow in 40 years, caused a lot of disruption, not just for travel, but also that our conference venue in Croke Park Stadium was forced to shut on Thursday afternoon, rather than Friday evening as originally planned.  Luckily our amazing hotel, <a href="https://www.doylecollection.com/hotels/the-croke-park-hotel">The Croke Park</a>, stepped up to the plate and allowed us to continue the conference there.  It was quite a squash fitting everyone in, but somehow they managed it, and the ensuing organized mayhem had the unexpected side effect of building really strong comradery between everyone. </p>
<p> There was a <a href="https://twitter.com/e_monty/status/968658891507732481">piano-bar style sing-along night</a> (with OpenStack&#8217;s Executive Director <a href="https://twitter.com/jbryce">Jonathan Bryce</a> doing a great job on the piano), <a href="https://twitter.com/knelson92/status/969515964176969734">a board games night</a> &#x2026;  I think it was my colleague Keith Berger who shrewdly observed that it was like being on a cruise ship 🙂  Having the best Guinness in the world on tap probably helped too.  Check out <a href="https://twitter.com/hashtag/SnowpenStack">#SnowpenStack on Twitter</a> for some of the hilarious antics. </p>
<p> We managed a couple of SUSE team dinners and it was great to spend more time with teammates, especially the ones who are normally on a different continent 🙂 </p>
</div>
</div>
<div id="outline-container-org2cb7aa0" class="outline-2">
<h2 id="org2cb7aa0">Self-healing SIG</h2>
<div class="outline-text-2" id="text-org2cb7aa0">
<ul class="org-ul">
<li><a href="https://etherpad.openstack.org/p/self-healing-ptg-rocky">https://etherpad.openstack.org/p/self-healing-ptg-rocky</a></li>
</ul>
<p> My main reason for attending the PTG was bootstrapping <a href="https://blog.adamspiers.org/announcing-openstacks-self-healing-sig/">this new SIG which I founded a few months ago</a>.  We had a really good session filling Tuesday afternoon, with about 30 people attending. </p>
<div class="figure">
<p><a href="https://blog.adamspiers.org/wp-content/uploads/2018/03/self-healing-PTG-Dublin.jpeg" width="99%" align="center" alt="The subset of self-healing attendees brave enough to venture out into the cold" title="The subset of self-healing attendees brave enough to venture out into the cold"><img decoding="async" src="https://blog.adamspiers.org/wp-content/uploads/2018/03/self-healing-PTG-Dublin-50.jpeg" alt="The subset of self-healing attendees brave enough to venture out into the cold" width="99%" align="center" title="The subset of self-healing attendees brave enough to venture out into the cold" /></a> </p>
</p></div>
<p> There were discussions about various use cases, and some people are already keen to start work on use cases immediately.  We also had representatives from the <a href="https://wiki.openstack.org/wiki/API_SIG">API SIG</a>, including <a href="http://graham.hayes.ie/">Graham Hayes a.k.a. <code>mugsie</code></a> who is leading the new <a href="https://review.openstack.org/#/c/531456/">health-check API initiative</a>, and from OPNFV, since <a href="http://lists.openstack.org/pipermail/openstack-dev/2018-March/127956.html">we are trying to promote better sharing of work on automated testing of self-healing / HA functionality</a>.  (If you&#8217;re interested, please <a href="https://etherpad.openstack.org/p/extreme-testing-contacts">sign up here</a>!) </p>
<p> We agreed some concrete next steps, some of which I already started working on: </p>
<ul class="org-ul">
<li><a href="https://storyboard.openstack.org/#!/story/2001628">Populate our self-healing-sig repo with the standard Sphinx stuff and templates for use cases and specs</a></li>
<li><a href="https://storyboard.openstack.org/#!/story/2001639">Compile a list of contact info for self-healing stakeholders across the various projects / organizations</a></li>
<li>Start to visualize the architectural integration points between involved projects.</li>
<li>Start to document use cases and write specs for proposed work.</li>
</ul>
<p> You can follow all activity via <a href="https://storyboard.openstack.org/#!/project/917">the StoryBoard project</a>. </p>
<p> The only disappointment with this session was that no operators attended.  However I managed to coordinate with some people involved with <a href="https://etherpad.openstack.org/p/TYO-ops-meetup-2018">the Tokyo Ops meetup this week</a>, in order to gather feedback from ops, and we got a session slot booked in that agenda which happened yesterday.  Additionally I am speaking on self-healing and leading a discussion session on it at <a href="https://www.meetup.com/Openstack-London/events/247958746/">the London OpenStack Meetup next Monday</a>, so hopefully we&#8217;ll get some good feedback there too. </p>
</div>
</div>
<div id="outline-container-orgda7e8a1" class="outline-2">
<h2 id="orgda7e8a1">First Contact SIG</h2>
<div class="outline-text-2" id="text-orgda7e8a1">
<ul class="org-ul">
<li><a href="https://etherpad.openstack.org/p/FC_SIG_Rocky_PTG">https://etherpad.openstack.org/p/FC_SIG_Rocky_PTG</a></li>
</ul>
<p> I joined the contributor guide part of this session briefly to give some feedback and also organise collaboration on writing a quickstart guide for people who are used to GitHub and don&#8217;t know Gerrit, since I promised to write that after creating <a href="https://ethercalc.openstack.org/github-gerrit">a comparison matrix</a> in Denver, which provides a base for the guide. </p>
</div>
</div>
<div id="outline-container-org295e4bb" class="outline-2">
<h2 id="org295e4bb">StoryBoard</h2>
<div class="outline-text-2" id="text-org295e4bb">
<p> The Self-healing SIG <a href="http://lists.openstack.org/pipermail/openstack-sigs/2017-November/000180.html">previously agreed to use StoryBoard for tracking work</a>, not just to aid collaboration within the SIG, but also to help dogfood StoryBoard and provide feedback.  So I spent quite a bit of time with the StoryBoard folks giving feedback and brainstorming ideas for improving usability.  I also started work on a &#8220;Rosetta stone&#8221; matrix which aims to show the key differences between StoryBoard and other issue trackers people are used to, such as JIRA, Trello, GitHub, Bugzilla, Redmine etc.  Similarly to the approach with the GitHub / Gerrit matrix above, it could serve as the basis for a document which helps &#8220;port&#8221; people to StoryBoard from other issue trackers. </p>
</div>
</div>
<div id="outline-container-orgf78a52f" class="outline-2">
<h2 id="orgf78a52f">Fast-forward upgrades (FFU)</h2>
<div class="outline-text-2" id="text-orgf78a52f">
<ul class="org-ul">
<li><a href="https://etherpad.openstack.org/p/ffu-ptg-rocky">https://etherpad.openstack.org/p/ffu-ptg-rocky</a></li>
</ul>
<p> This was a really full session, with some good discussions.  Main points: </p>
<ul class="org-ul">
<li>It was agreed to form an Upgrade SIG, and <a href="https://governance.openstack.org/sigs/">this has now happened</a>.</li>
<li>AFAICS everyone is not yet on the same page about what FFU means exactly, especially regarding online migrations.  There is perhaps room for improvement in the <a href="https://governance.openstack.org/tc/reference/tags/index.html">governance tags</a> provided for tracking upgradability (<a href="https://governance.openstack.org/tc/reference/tags/assert_supports-upgrade.html">assert:supports-upgrade</a>, <a href="https://governance.openstack.org/tc/reference/tags/assert_supports-accessible-upgrade.html">assert:supports-accessible-upgrade</a>), which would help clarify this.</li>
<li>IIUC <a href="https://wiki.openstack.org/wiki/Kolla">Kolla</a> seem to be going in a slightly different direction based on online rolling upgrades, although I don&#8217;t think they necessarily have any strong objections to supporting offline upgrades so maybe things will converge in the long term.</li>
<li>Noone from <a href="https://wiki.openstack.org/wiki/Openstack-helm"><code>openstack-helm</code></a> present 🙁</li>
<li>Lots of gotchas, and consequent debates on how best to capture and share these.</li>
</ul>
</div>
</div>
<div id="outline-container-org57e226e" class="outline-2">
<h2 id="org57e226e">Oslo</h2>
<div class="outline-text-2" id="text-org57e226e">
<ul class="org-ul">
<li><a href="https://etherpad.openstack.org/p/oslo-ptg-rocky">https://etherpad.openstack.org/p/oslo-ptg-rocky</a></li>
</ul>
<p> I only had time to pop into the <code>oslo</code> room briefly, to discuss an interesting new initiative in <code>oslo.config</code> to automate migration of config between releases (a bit like DB migrations, but for <code>oslo.config</code> instead of DB schema).  This was also mentioned in the FFU session. </p>
<ul class="org-ul">
<li><a href="https://review.openstack.org/#/c/520043/">gerrit#I851628c0 (Propose spec for handle config changes in code)</a></li>
<li><a href="https://review.openstack.org/#/c/526314/">gerrit#I0a14a4a4 (Handle config mapping changes)</a></li>
<li><a href="https://review.openstack.org/#/c/526261/">gerrit#I0b95d3ea ({WIP}{POC} Handle config mapping changes)</a></li>
</ul>
<p> I posed some questions about how this would handle config which requires extra per-project logic to migrate, and also how it would handle config which has been <b>explicitly</b> set to the default value. We had some interesting discussions on that but I think ultimately the answer was &#8220;let&#8217;s cross that bridge when we come to it&#8221;. </p>
<p> I also had a quick chat with Ken Giusti about <a href="https://bugs.launchpad.net/barbican/+bug/1705543">a long-standing <code>oslo.service</code> bug we&#8217;ve worked on</a>, but we ran out of time and agreed to take it online. </p>
</div>
</div>
<div id="outline-container-org061e0f7" class="outline-2">
<h2 id="org061e0f7">OpenStack Ansible</h2>
<div class="outline-text-2" id="text-org061e0f7">
<p> I demo&#8217;d <a href="https://github.com/aspiers/ansible-viz">ansible-viz</a>, the Ansible visualization tool of which I recently became the maintainer, to the <a href="https://docs.openstack.org/openstack-ansible/latest/">OpenStack Ansible</a> folks.  They seemed really enthusiastic, and are looking into using it for embedding diagrams in their docs.  Hopefully this means they will start contributing to make it better! </p>
<p> My colleague Dirk Müller and I also talked to them in general about other areas for potential collaboration.  We were both impressed with how open they are to help and collaborate! </p>
</div>
</div>
<div id="outline-container-org36a5675" class="outline-2">
<h2 id="org36a5675">Misc</h2>
<div class="outline-text-2" id="text-org36a5675">
<p> As usual with the PTGs, I got huge value from random unplanned conversations in hallways, at lunch tables, in the bar etc. </p>
<p> I spent a lot of time talking to Emmet Hickory (a.k.a. <code>persia</code>) and he gave me some great ideas about new use cases for the <code>git</code> workflow tools I have been building in <a href="https://hackweek.suse.com/">hackweeks</a> and spare time.  I already knew that my <a href="https://github.com/aspiers/git-deps"><code>git-deps</code></a> tool allows fairly accurate predictions of how difficult it will be to backport a given commit to a stable branch, but a new idea emerged that this could be added as a non-voting job to <a href="https://docs.openstack.org/infra/zuul/">Zuul</a>&#8216;s checks pipeline, to facilitate a more proactive / preemptive approach to backporting. </p>
<p> I talked with Tony Breeds (PTL of stable branch maintenance) about this who told me that Neutron is already extremely proactive when it comes to backporting, so they might be interested in this.  So I met Miguel Lavalle (Neutron PTL) and he was really interested and requested that I put it on the agenda for a future Neutron IRC meeting.  <a href="https://wiki.openstack.org/wiki/Network/Meetings#On_Demand_Agenda">This has now happened</a> and we will discuss during next Tuesday&#8217;s meeting. </p>
<p> Emmet helped me realise that my <code>git-explode</code> tool could also help with backporting work, so I need to finish packaging that and publish it.  There is a <a href="https://www.meetup.com/londongit/">London Git meetup</a> coming up soon, and I might present the tools at that. </p>
<p> I&#8217;m getting off-topic now so I&#8217;ll finish here 🙂  If you found this report useful please leave a comment below, so that I know it&#8217;s worth bothering to do next time 🙂 </p>
</div>
</div>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2018%2F03%2F09%2Fopenstack-ptg-dublin%2F&#038;title=Report%20from%20the%20OpenStack%20PTG%20in%20Dublin" data-a2a-url="https://blog.adamspiers.org/2018/03/09/openstack-ptg-dublin/" data-a2a-title="Report from the OpenStack PTG in Dublin"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2018/03/09/openstack-ptg-dublin/">Report from the OpenStack PTG in Dublin</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2018/03/09/openstack-ptg-dublin/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Abstraction As A Service</title>
		<link>https://blog.adamspiers.org/2017/12/19/abstraction-as-a-service/</link>
					<comments>https://blog.adamspiers.org/2017/12/19/abstraction-as-a-service/#respond</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Tue, 19 Dec 2017 18:55:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[fake news]]></category>
		<category><![CDATA[humour]]></category>
		<category><![CDATA[OpenStack]]></category>
		<guid isPermaLink="false">https://blog.adamspiers.org/?p=1569</guid>

					<description><![CDATA[<p>The birth of abstraction layers The last five decades of computing have seen a gradual progression of architectural abstraction layers. Around 50 years ago, IBM mainframes gained virtualization capabilities. Despite explosive progress in the sophistication of hardware following Moore&#8217;s Law, there wasn&#8217;t too much further innovation in abstraction layers in server computing until well after [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2017/12/19/abstraction-as-a-service/">Abstraction As A Service</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div id="outline-container-orgf0b3819" class="outline-2">
<h2 id="orgf0b3819">The birth of abstraction layers</h2>
<div class="outline-text-2" id="text-orgf0b3819">
<p> The last five decades of computing have seen a gradual progression of architectural abstraction layers.  <a href="https://www.networkworld.com/article/2254433/virtualization/with-long-history-of-virtualization-behind-it--ibm-looks-to-the-future.html">Around 50 years ago, IBM mainframes gained virtualization capabilities.</a>  Despite explosive progress in the sophistication of hardware following Moore&#8217;s Law, there wasn&#8217;t too much further innovation in abstraction layers in server computing until well after the dawn of the microcomputer era, in the early 2000s, when virtualization suddenly became all the rage again.  (I heard a rumour that this was due to certain IBM patents expiring, but maybe that&#8217;s an urban myth.)  Different types of hypervisors emerged, including <a href="https://virtuozzo.com/support/pvc/">early forms of containers</a>. </p>
<p> Then we started to realise that a hypervisor wasn&#8217;t enough, and we needed a whole management layer to keep control of the new &#8220;VM sprawl&#8221; problem which had arisen.  A whole bunch of solutions appeared, including the concept of &#8220;cloud&#8221;, but many were proprietary, and so after a few years OpenStack came along to the rescue! </p>
</div>
</div>
<div id="outline-container-org1acf60d" class="outline-2">
<h2 id="org1acf60d">The cloud era</h2>
<div class="outline-text-2" id="text-org1acf60d">
<p> But then we realised that managing OpenStack itself was a pain, and someone had the idea that rather than building a separate management layer for managing OpenStack, we could just use OpenStack to manage itself!  And so OpenStack on OpenStack, or Triple-O as it&#8217;s now known, was born. </p>
<p> Within and alongside OpenStack, several other new exciting trends emerged: Software-Defined Networking (SDN), Software-Defined Storage (e.g. Ceph), etc.  So the umbrella term Software-Defined Infrastructure was coined to refer to this group of abstraction layers. </p>
<p><span id="more-1569"></span>
</div>
</div>
<div id="outline-container-orgec1b76b" class="outline-2">
<h2 id="orgec1b76b">The container era</h2>
<div class="outline-text-2" id="text-orgec1b76b">
<p> Whilst OpenStack was busy growing up and moving past the Peak of Inflated Expectations, all of a sudden Docker and containers burst onto the scene and provided a lot of new buzzwords to get everyone excited again.  But after the excitement started to fade, that familiar sinking feeling came back with the realisation that just like VMs, containers need something to manage them. </p>
<p> But then Kubernetes leapt in to the rescue!  And all the excitement returned.  Except that of course then you need something to manage Kubernetes, but fortunately we already had OpenStack, so we could just use that!  And so Magnum was born.  And since Kubernetes is so awesome, we realised that we could also use it as the basis for deploying OpenStack.  At <a href="https://www.openstack.org/summit/sydney-2017/">the recent OpenStack Summit in Sydney</a>, we saw <a href="https://www.openstack.org/summit/sydney-2017/summit-schedule/global-search?t=kubernetes">the continued rise in popularity of running both Kubernetes on OpenStack, and OpenStack on Kubernetes</a>. </p>
</div>
</div>
<div id="outline-container-org3c2e3c9" class="outline-2">
<h2 id="org3c2e3c9">Looking to the future</h2>
<div class="outline-text-2" id="text-org3c2e3c9">
<p> But that still leaves the pesky job of managing raw hardware to put all this stuff on top.  Fortunately there are services you can pay for so that other people do that for you, and they even have APIs you can hook into!  This is called public cloud.  And even better, many companies use OpenStack to drive their public clouds. </p>
<p> So now we&#8217;re running Kubernetes on OpenStack on Kubernetes on OpenStack.  And now we&#8217;re done!  Right? </p>
<p> Well &#x2026; if we&#8217;re to learn anything from this history, it should be that we&#8217;ll always find more good reasons for new abstraction layers.  I mean, there&#8217;s already a huge amount of work going into things like Cloud Foundry on the PaaS layer, NFV in the telco space, serverless computing, &#x2026;  And I hear that Kubernetes is a great platform for running Cloud Foundry, just like it is for OpenStack.  And wouldn&#8217;t OpenStack be a cool platform to provide inside Cloud Foundry, e.g. for people who just want to quickly try it out?  So who knows, maybe in the next few years we&#8217;ll have OpenStack on Cloud Foundry on Kubernetes on OpenStack on Kubernetes on OpenStack. </p>
</div>
</div>
<div id="outline-container-org462e47e" class="outline-2">
<h2 id="org462e47e">A proposal to make things simpler</h2>
<div class="outline-text-2" id="text-org462e47e">
<p> Of course this starts getting a bit unwieldly.  Every time we introduce a new abstraction layer there&#8217;s extra complexity to deal with.  But that&#8217;s OK, because <b>we can always deal with complexity by abstracting it away!</b> It&#8217;s a bit like the cyber-equivalent of delegating difficult tasks to someone else.  So I&#8217;d like to propose a new concept, and corresponding meta-component of the overall architecture: </p>
<p> Whenever we realise we need a new abstraction layer, rather than having to deal with the complexity of deploying and managing this layer, we could just invoke APIs to a central service which takes care of this complexity for us.  We could call this new concept (drum roll, please&#x2026;) <b>Abstraction As A Service, or AaaS.</b> (If you&#8217;re British or Australian you may prefer to pronounce this as if there was an &#8220;r&#8221; in the middle, to distinguish from similar-sounding existing words such as &#8220;as&#8221;.  Or maybe we should call it <i>Sweeping Stuff Under The Carpet As A Service</i>?  Or SSUtCaaS for short, which can be pronounced &#8220;suitcase&#8221; (thanks to <a href="https://www.hastexo.com/who/florian/">Florian</a> for pointing this out). </p>
<p> With AaaS, if we wanted say, NFV on serverless on CF on Kubernetes on OpenStack on Kubernetes on OpenStack on public cloud on COBOL, we could simply write some declarative YAML or JSON describing the stack we want, push it to the AaaS REST API endpoint via an HTTP POST, and it would set the whole thing up for us automatically.  We could build any number and combination of abstraction layers we would possibly need, so at this point the job could be considered well and truly done, once and for all! </p>
<p> Except, ya know, we&#8217;d need a way to deploy and manage our AaaS service, of course.  Maybe we could build an AaaSaaS service for that &#x2026; </p>
</div>
</div>
<div id="outline-container-org8b61ca6" class="outline-2">
<h2 id="org8b61ca6">Sheepish postscript / disclaimer</h2>
<div class="outline-text-2" id="text-org8b61ca6">
<p> P.S. I know, it&#8217;s a terrible joke if you have to explain it, but based on <a href="https://blog.adamspiers.org/2011/11/29/linux-desktop-community-outraged-by-latest-torvalds-comments/">previous experiences</a> of my dry British humour being misunderstood (especially given the inevitably international audience), I feel the need to point out that this blog post was intended as nothing more than poking a bit of gentle fun at the cloud software industry.  I&#8217;m a huge fan of all the technologies mentioned here, and yes, I&#8217;m even in favour of multiple abstraction layers, despite occasionally wondering if we&#8217;ve all gone a bit insane 😉  Thanks to <a href="https://www.hastexo.com/who/florian/">Florian</a>, <a href="http://blog.clusterlabs.org/">Andrew</a>, and <a href="https://launchpad.net/~dmllr">Dirk</a> for reviewing an earlier draft, but I take responsibility for any mistakes or any offence unintentionally caused! </p>
</div>
</div>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2017%2F12%2F19%2Fabstraction-as-a-service%2F&#038;title=Abstraction%20As%20A%20Service" data-a2a-url="https://blog.adamspiers.org/2017/12/19/abstraction-as-a-service/" data-a2a-title="Abstraction As A Service"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2017/12/19/abstraction-as-a-service/">Abstraction As A Service</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2017/12/19/abstraction-as-a-service/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Announcing OpenStack&#8217;s Self-healing SIG</title>
		<link>https://blog.adamspiers.org/2017/11/24/announcing-openstacks-self-healing-sig/</link>
					<comments>https://blog.adamspiers.org/2017/11/24/announcing-openstacks-self-healing-sig/#respond</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Fri, 24 Nov 2017 15:15:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[OpenStack]]></category>
		<guid isPermaLink="false">https://blog.adamspiers.org/?p=1577</guid>

					<description><![CDATA[<p>One of the biggest promises of the cloud vision was the idea that all infrastructure could be managed in a policy-driven fashion, reacting to failures and other events by automatically healing and optimising services. In OpenStack, most of the components required to implement such an architecture already exist, and are nicely scoped, for the most [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2017/11/24/announcing-openstacks-self-healing-sig/">Announcing OpenStack&#8217;s Self-healing SIG</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> One of the biggest promises of the cloud vision was the idea that all infrastructure could be managed in a policy-driven fashion, reacting to failures and other events by automatically healing and optimising services. </p>
<p> In OpenStack, most of the components required to implement such an architecture already exist, and are nicely scoped, for the most part without too much overlap: </p>
<ul class="org-ul">
<li><a href="http://monasca.io/">Monasca</a>: monitoring</li>
<li><a href="https://docs.openstack.org/aodh/latest/">Aodh</a>: alarming</li>
<li><a href="https://docs.openstack.org/congress/latest/">Congress</a>: policy-based governance</li>
<li><a href="https://docs.openstack.org/mistral/latest/">Mistral</a>: workflow</li>
<li><a href="https://docs.openstack.org/senlin/latest/">Senlin</a>: clustering service</li>
<li><a href="https://docs.openstack.org/vitrage/latest/">Vitrage</a>: root cause analysis</li>
<li><a href="https://docs.openstack.org/watcher/latest/">Watcher</a>: optimization</li>
<li><a href="https://wiki.openstack.org/wiki/Masakari">Masakari</a>: compute plane HA</li>
<li><a href="https://docs.openstack.org/freezer/latest/">Freezer-dr</a>: compute plane HA</li>
<li><a href="https://docs.openstack.org/heat/latest/">Heat</a>: orchestration (normally used for cloud applications, but could also potentially <a href="https://github.com/openstack/heat-templates/tree/master/hot/autohealing">auto-heal</a> cloud infrastructure via <a href="https://wiki.openstack.org/wiki/TripleO">TripleO</a>)</li>
<li><a href="https://www.opnfv.org/community/projects/doctor">Doctor</a>: fault management and maintenance for OPNFV</li>
<li><a href="https://wiki.openstack.org/wiki/Fault_Genes_Working_Group">Fault Genes Working Group</a>: Fault classification &amp; Recovery Strategy</li>
<li><a href="http://craton.readthedocs.io/en/latest/readme.html">Craton</a>: Fleet management (currently stalled)</li>
</ul>
<p> However, there is not yet a clear strategy within the community for how these should all tie together.  (The OPNFV community is arguably further ahead in this respect, but hopefully some of their work could be applied outside NFV-specific environments.) </p>
<div id="outline-container-orgd7eb223" class="outline-2">
<h2 id="orgd7eb223">Designing a new SIG</h2>
<div class="outline-text-2" id="text-orgd7eb223">
<p> To address this, I organised <a href="https://etherpad.openstack.org/p/self-healing-queens-ptg">an unofficial kick-off meeting</a> at the <a href="https://www.openstack.org/ptg/">PTG</a> in <a href="https://wiki.openstack.org/wiki/PTG/Queens/Etherpads">Denver</a>, at which it became clear that there was sufficient interest in this idea from many of the above projects in order to create a new &#8220;Self-healing&#8221; <a href="https://wiki.openstack.org/wiki/OpenStack_SIGs">SIG</a>.  However, there were still open questions: </p>
<ol class="org-ol">
<li>What exactly should be the scope of the SIG?  Should it be for developers and operators, or also end users?</li>
<li>What should the name be?  Is &#8220;self-healing&#8221; good enough, or should it also include, say, non-failure scenarios like optimization?</li>
</ol>
<p><span id="more-1577"></span></p>
<p> In an attempt to answer these, I formally <a href="http://lists.openstack.org/pipermail/openstack-sigs/2017-September/000054.html">proposed the creation of the SIG</a>, asking the community to fill in <a href="https://docs.google.com/forms/d/e/1FAIpQLSekIFAFYc1mpBkQHgZwIVLOj-rQQPjw9Di3-hXL03ilhI80rg/viewform">a short survey</a> to vote on its creation, and to provide their feedback regarding the name and scope. Unfortunately whilst everyone unanimously supported its creation, opinions were split more or less 50%-50% on the name and the scope! So on advice from <a href="https://ttx.re/">Thierry</a>, I listed the SIG as &#8220;forming&#8221;, created <a href="https://wiki.openstack.org/wiki/Self-healing_SIG">the corresponding wiki page</a>, and <a href="http://forumtopics.openstack.org/cfp/details/26">proposed</a> a session for <a href="https://wiki.openstack.org/wiki/Forum/Sydney2017">the Sydney Forum</a>, which was subsequently <a href="https://www.openstack.org/summit/sydney-2017/summit-schedule/events/20508/self-healing-and-optimization-sig">accepted</a>. </p>
</div>
</div>
<div id="outline-container-org8dad8c6" class="outline-2">
<h2 id="org8dad8c6">A SIG is born!</h2>
<div class="outline-text-2" id="text-org8dad8c6">
<p> We had around 30 people attend the Sydney Forum session, which was extremely encouraging!  You can read more details in <a href="https://etherpad.openstack.org/p/self-healing-rocky-forum">the etherpad</a>, but here is the quick summary &#x2026; </p>
<p> Most importantly, we resolved the naming and scoping issues, concluding that to avoid biting off too much in one go, it was better to be pragmatic and start small: </p>
<ul class="org-ul">
<li>Initially focus on cloud infrastructure, and not worry too much about the user-facing impact of failures yet; we can add that concern whenever it makes sense (which is particularly relevant for telcos / NFV).</li>
<li>Not worry too much about optimization initially; <a href="https://docs.openstack.org/watcher/latest/">Watcher</a> is possibly the only project focusing on this right now, and again we can expand to include optimization any time we want.</li>
</ul>
<p> So now that the naming and scoping issues are resolved, I am excited to announce that the Self-healing SIG is officially formed! </p>
<p> Discussion went beyond mere administravia, however: </p>
<ul class="org-ul">
<li>We collected a few initial use cases.</li>
<li>We informally decided the governance of the SIG.  I asked if anyone else would like to assume leadership, but noone seemed keen, dashing my hopes of avoiding extra work 😉 But <a href="https://www.openstack.org/summit/sydney-2017/summit-schedule/speakers/9844">Eric Kao</a>, <a href="https://docs.openstack.org/project-team-guide/ptl.html">PTL</a> of <a href="https://docs.openstack.org/congress/latest/">Congress</a>, generously offered to act as co-chair.</li>
<li>We discussed health check APIs, which were mentioned in at least 2 or 3 other Forum sessions this time round.</li>
<li>We agreed that we wanted an IRC channel, and that it could host bi-weekly meetings.  However as usual there was no clean solution to choosing a time which would suit everyone ;-/  I&#8217;ll try to figure out what to do about this!</li>
</ul>
</div>
</div>
<div id="outline-container-org78400a8" class="outline-2">
<h2 id="org78400a8">Get involved</h2>
<div class="outline-text-2" id="text-org78400a8">
<p> You are warmly invited to join, if this topic interests you: </p>
<ul class="org-ul">
<li>Ensure you are <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-sigs">subscribed to the <code>openstack-sigs</code> mailing list</a>, and watch out for posts tagged <code>[self-healing]</code>.</li>
<li>Bookmark <a href="https://wiki.openstack.org/wiki/Self-healing_SIG">the wiki page</a> which is the SIG&#8217;s official home.</li>
</ul>
</div>
</div>
<div id="outline-container-org9c6bac0" class="outline-2">
<h2 id="org9c6bac0">Next steps</h2>
<div class="outline-text-2" id="text-org9c6bac0">
<p> I have sent out <a href="http://lists.openstack.org/pipermail/openstack-sigs/2017-November/000170.html">a similar announcement to the mailing list</a>, and next will set up the IRC channel, and see if we can make progress on agreeing times for regular IRC meetings. </p>
<p> Other than this administravia, it is of course up to the community to decide in which direction the SIG should go, but my suggestions are: </p>
<ul class="org-ul">
<li>Continue to collect use cases.  It makes sense to have a very lightweight process for this (at least, initially), so Eric has created <a href="https://docs.google.com/document/d/13N36g2RlUYs8mw7hbfRXw6y2Jc-V2XGrXgfPXPpUvuU/edit?usp=sharing">a Google Doc</a> and populated it with a suggested template and a first example.  Feel free to add your own based on this template.</li>
<li>Collect links to any existing documentation or other resources which describe how existing services can be combined.  This <a href="https://www.openstack.org/videos/sydney-2017/advanced-fault-management-with-vitrage-and-mistral">awesome talk on Advanced Fault Management with Vitrage and Mistral</a> is a perfect example, and <a href="https://www.openstack.org/videos/barcelona-2016/building-self-healing-applications-with-aodh-zaqar-and-mistral">here is another</a>, but we need to make it easier for operators to understand which combinations like this are possible, and easier for them to be set up.</li>
<li>Finish <a href="https://docs.google.com/drawings/d/1kEFtVpQ4c8HipSp34EVAkcSGmwyg1MzWf_H5oGTtl-Y/edit?usp=sharing">the architecture diagram drafted in Denver</a>.</li>
<li>At a higher level, we could document reference stacks which address multiple self-healing cases.</li>
<li>Talk more with the OPNFV community to find out what capabilities they have which could be reused within non-NFV OpenStack clouds.</li>
<li>Perform gaps analysis on the use cases, and liase with specific projects to drive development in directions which can address those gaps.</li>
</ul>
</div>
</div>
<div id="outline-container-orgb5fad4d" class="outline-2">
<h2 id="orgb5fad4d">The origin of the idea for the SIG</h2>
<div class="outline-text-2" id="text-orgb5fad4d">
<p> In case you&#8217;re interested in the history &#x2026; </p>
<p> I first became aware of the need for this SIG while working upstream within the community on OpenStack HA &#8211; specifically on compute plane HA, where failures of compute nodes or hypervisors are automatically handled by resurrecting affects VMs on other compute nodes.  I saw many groups independently trying to solve the same problem, so I <a href="http://lists.openstack.org/pipermail/openstack-dev/2015-October/077735.html">created the <code>#openstack-ha</code> IRC channel</a>, <a href="http://lists.openstack.org/pipermail/openstack-dev/2015-November/079127.html">organised weekly meetings</a>, and <a href="http://lists.openstack.org/pipermail/openstack-dev/2016-June/096820.html">tried to bring all stakeholders together to converge on a single upstream solution</a>.  Progress was gradually made, which we presented in <a href="https://www.openstack.org/videos/video/high-availability-for-pets-and-hypervisors-state-of-the-nation">Austin</a>, <a href="https://www.openstack.org/videos/boston-2017/high-availability-for-instances-moving-to-a-converged-upstream-solution">Boston</a>, and most recently in Tel Aviv at <a href="https://youtu.be/uMCMDF9VkYk">OpenStack Day Israel 2017</a>. </p>
<p> After the talk I had a great conversation with Ifat Afek, who is the <a href="https://docs.openstack.org/project-team-guide/ptl.html">PTL</a> of OpenStack <a href="https://docs.openstack.org/vitrage/latest/">Vitrage</a>, which is an awesome project providing RCA (Root Cause Analysis) of faults within OpenStack.  Since Vitrage can do things like receive an alert about a fault on a compute node (e.g. from <a href="https://docs.openstack.org/aodh/latest/">Aodh</a>) and then automatically determine all affected VMs and call out to another service like <a href="https://docs.openstack.org/mistral/latest/">Mistral</a> to enact appropriate remediation, there was obvious synergy between our work. </p>
<p> However Vitrage goes much further than just compute HA: since it can receive various alerts from multiple types of data source, model relationships between many types of resource, and trigger external services to take action, this kind of combination has tremendous potential for building automatically self-healing cloud infrastructure.  And as shown above, there are several other OpenStack projects operating in the same space, which could take this approach further; for example, <a href="https://docs.openstack.org/congress/latest/">Congress</a> can be used to specify policies regarding how failures should be handled. </p>
<p> Talking with Ifat resulted in the idea to create a new <a href="https://wiki.openstack.org/wiki/OpenStack_SIGs">SIG</a> with the goals of identifying self-healing use cases, establishing and documenting what can already be achieved by combining existing OpenStack services, and enhancing collaboration between the projects and with operators to fill in any remaining gaps.  And now you know the rest of the story 🙂 </p>
</div>
</div>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2017%2F11%2F24%2Fannouncing-openstacks-self-healing-sig%2F&#038;title=Announcing%20OpenStack%E2%80%99s%20Self-healing%20SIG" data-a2a-url="https://blog.adamspiers.org/2017/11/24/announcing-openstacks-self-healing-sig/" data-a2a-title="Announcing OpenStack’s Self-healing SIG"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2017/11/24/announcing-openstacks-self-healing-sig/">Announcing OpenStack&#8217;s Self-healing SIG</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2017/11/24/announcing-openstacks-self-healing-sig/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Squash-merging and other problems with GitHub</title>
		<link>https://blog.adamspiers.org/2017/08/16/squash-merging-and-other-problems-with-github/</link>
					<comments>https://blog.adamspiers.org/2017/08/16/squash-merging-and-other-problems-with-github/#comments</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Wed, 16 Aug 2017 17:45:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[hacking]]></category>
		<guid isPermaLink="false">http://blog.adamspiers.org/?p=1534</guid>

					<description><![CDATA[<p>(Thanks to Ben North, Colleen Murphy, and Nicolas Bock for reviewing earlier drafts of this post.) In April 2016, GitHub announced a new feature supporting squashing of multiple commits in a PR at merge-time (announced on April 1st, but it was actually bona-fide 😉 ). I appreciate that there was high demand for this feature [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2017/08/16/squash-merging-and-other-problems-with-github/">Squash-merging and other problems with GitHub</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> (Thanks to <a href="http://redfrontdoor.org/blog/">Ben North</a>, <a href="http://www.gazlene.net/">Colleen Murphy</a>, and <a href="https://nicolasbock.github.io/">Nicolas Bock</a> for reviewing earlier drafts of this post.) </p>
<p> In April 2016, <a href="https://github.com/blog/2141-squash-your-commits">GitHub announced a new feature supporting squashing of multiple commits in a PR at merge-time</a> (announced on April 1st, but it was actually bona-fide <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> ). </p>
<p> I appreciate that there was high demand for <a href="https://github.com/isaacs/github/issues/406">this feature</a> (and <a href="https://gitlab.com/gitlab-org/gitlab-ce/issues/4106">similarly</a> <a href="https://gitlab.com/gitlab-org/gitlab-ce/issues/34591">on</a> <a href="https://gitlab.uservoice.com/forums/176466-deprecated-feedback-forum/suggestions/5662794-provide-squash-option-when-merging-merge-requests">GitLab</a>), and apparently that <a href="https://softwareengineering.stackexchange.com/questions/263164/why-squash-git-commits-for-pull-requests">many projects have a &#8220;squash before submitting a PR&#8221; policy</a>, but I&#8217;d like to contend that this is a poor-man&#8217;s workaround for the lack of a real solution to the underlying problems. </p>
<div id="outline-container-orgf03e50a" class="outline-2">
<h2 id="why"><a id="orgf03e50a" name="orgf03e50a"></a>Why squash-merge?</h2>
<div class="outline-text-2" id="text-why">
<p> So what are the underlying problems which made this such a frequently requested feature?  From reading the various links above, it seems that by far the biggest motivator is that people frequently submit pull requests (or merge requests, in GitLab-speak) which contain multiple commits, and these commits are seen as too &#8220;noisy&#8221; / fine-grained.  In other words there is a desire to not pollute the target/trunk branch (e.g. <code>master</code>) with these fine-grained commits, and instead only have larger, less fine-grained commits merged. </p>
<p> But where does this desire come from?  Well, if the fine-grained commits which accumulate on a PR branch are frequently amendments to earlier commits in the same PR (like &#8220;oops, fix typo I just made&#8221; or &#8220;oops, fix bug I just introduced&#8221;) then this desire is entirely understandable, because noone wants to see that kind of mess on <code>master</code>.  However the real problem here is that that kind of mess should have never made it onto GitHub in the first place &#8211; not even onto a PR branch!  It should have instead been fixed in the developer&#8217;s local repository.  That is why there is <a href="https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History">a whole section in the &#8220;Pro Git&#8221; book dedicated to explaining how to rewrite local history</a>, and why <a href="https://git-scm.com/docs/git-commit"><code>git-commit(1)</code></a> and <a href="https://git-scm.com/docs/git-rebase"><code>git-rebase(1)</code></a> have native support for creating and squashing &#8220;fixup&#8221; commits into commits which they fix. </p>
</div>
</div>
<div id="outline-container-orgb78c08e" class="outline-2">
<h2 id="use-the-force"><a id="orgb78c08e" name="orgb78c08e"></a>Use the force-push, Luke</h2>
<div class="outline-text-2" id="text-use-the-force">
<p> If an existing PR needs to be amended, make the change and then rewrite local history so that it&#8217;s clean.  The new version of the branch can then be force-pushed to GitHub via <code>git push -f</code>, which is an operation GitHub understands and in many situations handles reasonably gracefully.  <a href="http://blog.adamspiers.org/why-and-how-to-correctly-amend-github-pull-requests/">I have previously blogged about why this way is better</a>, but one way of quickly summarising it is: <b>don&#8217;t wash your dirty linen in public any more than you have to</b>. </p>
<p><span id="more-1534"></span></p>
<p> In other words, <b>if you do your history rewriting locally, there will be a substantial increase in the quality of what you publish to the PR</b>, because you will only ever publish commits which (at the time) you believed to be the final candidate, ready for merging. (And later, when you benefit from the hindsight of peer reviews and/or your own realisations about how to make things better, you simply force-push a new final candidate.) Consequently, people reviewing your PR don&#8217;t have to waste time reviewing anything unless it was a candidate for merging, and nor do CI systems. </p>
<p> Granted, there are some exceptions to this approach, where you really do want to publish a PR which is still work in progress in order to get early feedback.  In that case you can explicitly state in the PR description (or via a <a href="https://help.github.com/articles/creating-and-editing-labels-for-issues-and-pull-requests/">label</a>) that this PR is WIP so that anyone reviewing it will know to expect some mess, and that&#8217;s totally fine. </p>
</div>
</div>
<div id="outline-container-orge131a8c" class="outline-2">
<h2 id="force-push-problems"><a id="orge131a8c" name="orge131a8c"></a>The force-push is not so strong with this one</h2>
<div class="outline-text-2" id="text-force-push-problems">
<p> Unfortunately, the force-push approach is not perfect either: the full history (a.k.a. <a href="https://git-scm.com/docs/git-reflog"><code>reflog</code></a>) of the PR branch is <a href="https://github.com/isaacs/github/issues/999">not exposed via GitHub&#8217;s UI</a>, <a href="https://github.com/isaacs/github/issues/997">nor are there even guarantees that it will be preserved</a>.  This is one of GitHub&#8217;s serious flaws, which in contrast <a href="https://www.mediawiki.org/wiki/Gerrit/Tutorial#Comparing_patch_sets">Gerrit gets right</a>, and services integrating with GitHub such as <a href="https://reviewable.io/">https://reviewable.io/</a> and <a href="http://gerrithub.io/">http://gerrithub.io/</a> can also help fill in the gaps here.  The poor man&#8217;s workaround is to manually add comments every time you force-push, which explain what changed and how the changes address feedback from reviewers, but this of course requires discipline and extra effort, and does not show the exact changes, so it&#8217;s far from ideal. </p>
</div>
</div>
<div id="outline-container-orged0b022" class="outline-2">
<h2 id="other-problems"><a id="orged0b022" name="orged0b022"></a>I&#8217;ve got a bad feeling about this</h2>
<div class="outline-text-2" id="text-other-problems">
<p> These drawbacks with GitHub are another reason that some people prefer to append fixup commits to the PR and then squash at merge-time &#8211; at least then the history of the PR is visible to all.  But this approach only works with PRs which represent a single logical change.  <a href="https://wiki.openstack.org/wiki/GitCommitMessages#Structural_split_of_changes">If you squash multiple logical changes into a single commit, you lose valuable history.</a>  (In fact, this value can extend as far as <a href="https://github.com/bennorth/git-dendrify/blob/master/README.md">using the history for literate programming</a>.)  So I strongly recommend keeping the GitHub repo configured with the default setting which allows normal merges, so that you don&#8217;t force this history loss on merge of PRs. </p>
<p> In response to the previous issue, you could decide a policy where you insist on clean commits and normal merging if the PR contains multiple logical changes, but allow unclean commits and squash merging if the PR contains only a single logical change.  However the decision whether to do squash merge or normal merge is left to the merger, and it&#8217;s made at merge-time, outside the peer review process.  So on a bigger project where many people have merge permissions, that reduces the chance of merges being done in a correct and consistent way. </p>
<p> By the way, <a href="https://julien.danjou.info/blog/2013/rant-about-github-pull-request-workflow-implementation">I&#8217;m not the first person who has highlighted these problems</a>. </p>
</div>
</div>
<div id="outline-container-orgedc8f76" class="outline-2">
<h2 id="no-dependencies"><a id="orgedc8f76" name="orgedc8f76"></a>I find your lack of dependencies disturbing</h2>
<div class="outline-text-2" id="text-no-dependencies">
<p> OK sorry, that&#8217;s enough Star Wars quotes. </p>
<p> But this awkwardness highlights another fundamental issue with GitHub: it does not <i>conveniently</i> support &#8220;stacking&#8221; one PR on top of another, i.e. where the head of the first is the base of the second, with a dependency modelled between the two.  (You <i>can</i> do it, but it&#8217;s awkward when the PRs come from different <a href="https://help.github.com/articles/fork-a-repo/">forks</a>, and you also have to <a href="https://github.com/blog/2224-change-the-base-branch-of-a-pull-request">change the base branch</a> of the second once the first is merged.) </p>
<p> So the only convenient way to group two dependent commits together is to put them in the same PR.  This encourages the creation of PRs with many commits, which suck up more and more review effort each time their history is rewritten, and take longer to merge on average, because controversial and non-controversial commits tend to get mixed up within the same PR, and the former block the latter. </p>
<p> This is another area where Gerrit beats GitHub, since <a href="https://www.mediawiki.org/wiki/Gerrit/Advanced_usage#Create_a_dependency">Gerrit natively supports dependencies between reviews</a>, making the need for multiple commits per review redundant.  Another advantage of this is that you don&#8217;t have to write a separate description for the PR, since all the info the reviewer requires is provided in a single commit message. </p>
<p> Anyway, I digress; back to squash merging.  Another issue with it is that the final editing of the squashed commit message is <b>after</b> the review process, not during.  If, like me, you work on <a href="https://wiki.openstack.org/wiki/GitCommitMessages#Information_in_commit_messages">projects which care deeply about the quality of the commit message</a>, this is a deal-breaker. </p>
<p> Finally, the GitHub web UI doesn&#8217;t show when squash merging has been used, which can create confusion. </p>
</div>
</div>
<div id="outline-container-org7647710" class="outline-2">
<h2 id="summary"><a id="org7647710" name="org7647710"></a>Summary</h2>
<div class="outline-text-2" id="text-summary">
<p> To wrap up, there is no perfect solution right now.  However the following guidelines should help: </p>
<ul class="org-ul">
<li>Always adhere to <a href="https://wiki.openstack.org/wiki/GitCommitMessages">best practice for constructing git commits</a>.</li>
<li>Try to keep your mess to yourself as much as possible, by rewriting history locally before publishing to or updating a GitHub PR.</li>
<li>Squash merging will <b>not</b> work well for projects with stricter review policies, or projects which receive PRs comprising of multiple logical changes.</li>
<li>Squash merging <i>might</i> work OK as a workaround for smaller projects with less stringent review policies, where PRs only ever consist of a single logical change which can reasonably be squashed into a single commit without harm.</li>
<li>Keep PRs as small as possible, and aim for quick, short review cycles.</li>
</ul>
<p> And in case the right people are listening: </p>
<ul class="org-ul">
<li>GitHub needs to <a href="https://github.com/isaacs/github/issues/997">track PR history</a> and <a href="https://github.com/isaacs/github/issues/998">expose it</a> through <a href="https://github.com/isaacs/github/issues/999">the UI</a>.</li>
<li><a href="https://github.com/isaacs/github/issues/959">GitHub needs to support stacking of PRs</a> (i.e. tracking dependencies between PRs, and correctly handling when a dependency gets merged).</li>
</ul>
</div>
</div>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2017%2F08%2F16%2Fsquash-merging-and-other-problems-with-github%2F&#038;title=Squash-merging%20and%20other%20problems%20with%20GitHub" data-a2a-url="https://blog.adamspiers.org/2017/08/16/squash-merging-and-other-problems-with-github/" data-a2a-title="Squash-merging and other problems with GitHub"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2017/08/16/squash-merging-and-other-problems-with-github/">Squash-merging and other problems with GitHub</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2017/08/16/squash-merging-and-other-problems-with-github/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>Cloud rearrangement for fun and profit</title>
		<link>https://blog.adamspiers.org/2015/05/17/cloud-rearrangement/</link>
					<comments>https://blog.adamspiers.org/2015/05/17/cloud-rearrangement/#comments</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Sun, 17 May 2015 03:42:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[DPM]]></category>
		<category><![CDATA[DRS]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[OpenStack]]></category>
		<category><![CDATA[placement]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[vSphere]]></category>
		<category><![CDATA[workloads]]></category>
		<guid isPermaLink="false">http://blog.adamspiers.org/?p=1070</guid>

					<description><![CDATA[<p>In a populated compute cloud, there are several scenarios in which it&#8217;s beneficial to be able to rearrange VM guest instances into a different placement across the hypervisor hosts via migration (live or otherwise). These use cases typically fall into three categories: Rebalancing &#8211; spread the VMs evenly across as many physical VM host machines [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2015/05/17/cloud-rearrangement/">Cloud rearrangement for fun and profit</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> In a populated compute cloud, there are several scenarios in which it&#8217;s beneficial to be able to rearrange VM guest instances into a different placement across the hypervisor hosts via migration (live or otherwise).  These use cases typically fall into three categories: </p>
<ol class="org-ol">
<li><b>Rebalancing</b> &#8211; spread the VMs evenly across as many physical VM host machines as possible (conceptually similar to <a href="http://www.vmware.com/products/vsphere/features-drs-dpm">vSphere DRS</a>). Example use cases:
<ul class="org-ul">
<li>Optimise workloads for performance, by reducing CPU / I/O hotspots.</li>
<li>Maximise headroom on each physical machine.</li>
<li>Reduce thermal hotspots in order to reduce power consumption; for example, back in 2003, HP showed that <a href="http://www.hpl.hp.com/techreports/2003/HPL-2003-5.pdf">intelligent workload placement can reduce energy consumption by more than 14%</a>. (Here&#8217;s an <a href="http://blog.adamspiers.org/wp-content/uploads/2015/05/heatmap.pdf">old slidedeck I made years ago when researching this use case</a>.)</li>
</ul>
</li>
<li><b>Consolidation</b> &#8211; condense VMs onto fewer physical VM host machines (conceptually similar to <a href="http://www.vmware.com/products/vsphere/features-drs-dpm">vSphere DPM</a>).  Typically involves some degree of defragmentation.  Example use cases:
<ul class="org-ul">
<li>Increase CPU / RAM / I/O utilization.  <a href="http://openstack-in-production.blogspot.co.uk/2014/07/openstack-plays-tetris-stacking-and.html">CERN blogged last summer about this Tetris-like challenge</a>, and it can be taken even further over-committing CPU/RAM and/or memory page sharing.</li>
<li>Free up physical servers to reduce power consumption.</li>
</ul>
</li>
<li><b>Evacuation</b> &#8211; free up physical servers:
<ul class="org-ul">
<li>for repurposing or decommissioning</li>
<li>for maintenance (BIOS upgrades, re-cabling etc.) or repair</li>
<li>to protect SLAs, e.g. when monitors indicate potential imminent hardware failure, or when <a href="https://en.wikipedia.org/wiki/HVAC">HVAC</a> failures are likely to cause servers to shutdown due to over-heating.  (This is different to the somewhat <a href="http://www.hastexo.com/misc/static/presentations/chosugmeetup201302/index.html#/step-18">confusingly</a> named <a href="https://wiki.openstack.org/wiki/Evacuate"><code>nova evacuate</code></a> functionality which <a href="http://docs.openstack.org/admin-guide-cloud/content/nova_cli_evacuate.html">moves VMs to a new host <i>after</i> the server has already failed</a>.)</li>
</ul>
</li>
</ol>
<p> Whilst one-shot manual or semi-automatic rearrangement can bring immediate benefits, the biggest wins often come when continual rearrangement is automated.  The approaches can also be combined, e.g. first evacuate and/or consolidate, then rebalance on the remaining physical servers. </p>
<p> Other custom rearrangements may be required according to other IT- or business-driven policies, e.g. only rearrange VM instances relating to a specific workload, in order to increase locality of reference, reduce latency, respect availability zones, or facilitate other out-of-band workflows or policies (such as data privacy or other legalities). </p>
<p> In the rest of this post I will expand this topic in the context of OpenStack, talk about the computer science behind it, propose a possible way forward, and offer a working prototype in Python. </p>
<p> If you&#8217;re in Vancouver for <a href="https://www.openstack.org/summit/vancouver-2015/">the OpenStack summit</a> which starts this Monday and you find this post interesting, ping me for a face-to-face chat! </p>
<p><span id="more-1070"></span> <!--break--></p>
<div id="outline-container-unnumbered-1" class="outline-2">
<h2 id="unnumbered-1">VM placement in OpenStack: present and future</h2>
<div class="outline-text-2" id="text-unnumbered-1">
<p> It is clear from the diversity of the use cases listed above that VM placement policies are likely to vary greatly across clouds, and sometimes even within a single cloud.  <a href="http://www.openstack.org/software/openstack-compute/">OpenStack Compute</a> (<code>nova</code>) has fairly sophisticated <a href="http://docs.openstack.org/kilo/config-reference/content/section_compute-scheduler.html">scheduling capabilities</a> which can be configured to implement some of the above policies on an incremental basis, i.e. every time a VM instance is started or migrated, the destination VM host can be automatically chosen according to filters and weighted cost functions.  However, this approach is somewhat limited for migration, because the placement policies are only considered one migration at a time.  Like in Tetris, more efficient arrangements can be achieved by thinking further ahead! </p>
<p> OpenStack clouds can already be segregated in various ways via <a href="http://docs.openstack.org/openstack-ops/content/scaling.html#segregate_cloud">cells, regions, availability zones, host aggregates</a>, and <a href="http://dev.cloudwatt.com/en/blog/affinity-and-anti-affinity-in-openstack.html">server groups</a>, and so there are various techniques available for implementing different placement policies to different areas of your cloud.  For example you could have groups of hosts dedicated to CPU-intensive or I/O-bound workloads using an anti-affinity placement policy, and other groups dedicated to light workloads using an affinity placement policy.  But these policies are static in nature (e.g. <a href="http://docs.openstack.org/kilo/config-reference/content/section_compute-scheduler.html"><code>nova</code> filters and schedulers are configured by the cloud administrator in <code>nova.conf</code></a>), which somewhat limits their flexibility. </p>
<p> OpenStack is still relatively new, however with <a href="https://wiki.openstack.org/wiki/Cinder">Cinder</a> and <a href="https://wiki.openstack.org/wiki/Neutron">Neutron</a> rapidly evolving, it is at the point where a VM&#8217;s network and storage dependencies can be live migrated along with the workload in a near seamless fashion.  So now we should be able to start developing mechanisms for implementing more sophisticated placement policies, where not only is VM rearrangement performed automatically, but the policies themselves can be varied dynamically over time as workload requirements change. </p>
</div>
</div>
<div id="outline-container-unnumbered-2" class="outline-2">
<h2 id="unnumbered-2">VMware is not the (complete) solution</h2>
<div class="outline-text-2" id="text-unnumbered-2">
<p> VMware advocates might instinctively recommend running <a href="https://wiki.openstack.org/wiki/VSphere">vSphere clusters underneath nova</a>, to harness vSphere&#8217;s pre-existing <a href="http://www.vmware.com/products/vsphere/features-drs-dpm">DRS / DPM functionality</a>.  However, there are still unresolved problems with this approach, as this <a href="http://cloudarchitectmusings.com/2013/06/26/openstack-for-vmware-admins-nova-compute-with-vsphere-part-2/">article on <code>nova-scheduler</code> and DRS</a> highlights. (Funnily enough, I encountered exactly these same problems a few years ago when I was part of a team adding vSphere integration into the orchestration component of what has since become <a href="https://www.netiq.com/products/cloud-manager/">NetIQ Cloud Manager</a> &#x2026;)  Besides, a vSphere cluster and an OpenStack cloud are very different beasts, and of course not everyone wants to build their cloud exclusively with VMware technology anyway. </p>
</div>
</div>
<div id="outline-container-unnumbered-3" class="outline-2">
<h2 id="unnumbered-3">The computer science behind cloud rearrangement</h2>
<div class="outline-text-2" id="text-unnumbered-3">
<p> Unfortunately developing algorithms to determine optimal placement is distinctly non-trivial.  For example, the consolidation scenario above is a complex variant of the <a href="https://en.wikipedia.org/wiki/Bin_packing_problem">bin packing problem</a>, which is <a href="https://en.wikipedia.org/wiki/NP-hard">NP-hard</a>. The following constraints add significant complexity to the problem: </p>
<ul class="org-ul">
<li>A useful real world solution should take into account not only the RAM footprint of the VMs, but also CPU, disk, and network.</li>
<li>The algorithm needs to ensure that <a href="https://en.wikipedia.org/wiki/Service-level_agreement">SLAs</a> are maintained whilst any rearrangement takes place.</li>
<li>If the cloud is too close to full capacity, it may not be possible to rearrange the VMs from their current placement to a more optimal placement without first shutting down some VMs, which could be prohibited by the SLAs.</li>
<li>Even if the cloud is at low utilization, live migration is not always possible, e.g.
<ul class="org-ul">
<li>the hypervisor may not support it (especially across non-identical CPU architectures)</li>
<li>shared storage may be required but unavailable</li>
<li>the network may not support it</li>
</ul>
</li>
<li>Even if the arrangement is achievable purely via a sequence of live migrations, the algorithm must also be sensitive to the performance impact to running workloads when performing multiple live migrations, since live migrations require intensive bursts of network I/O in order to synchronize the VM&#8217;s memory contents between the source and target hosts, followed by a momentary freezing of the VM as it flips from the source to the target. This trade-off between optimal resource utilization and service availability means that a sub-optimal final placement may be preferable to an optimal one.</li>
<li>In the case where the hypervisor is capable of sharing memory pages between VMs (e.g. <a href="http://www.linux-kvm.org/page/KSM">KSM on KVM</a>), the algorithm should try to place together VMs which are likely to share memory pages (e.g. VMs running the same OS platform, OS version, software libraries, or applications.  A <a href="http://lass.cs.umass.edu/papers/pdf/SPAA11-vmsharing.pdf">research paper published in 2011</a> demonstrated that VM packing which optimises placement in this fashion can be approximated in polytime, achieving 32% to 50% reduction in servers and a 25% to 57% reduction in memory footprint compared to sharing-oblivious algorithms.</li>
</ul>
<p> (There is prior art of course.  For example, several years ago, <a href="http://blog.clusterlabs.org/blog/2010/feature-spotlight-utilization/">Pacemaker implemented a <i>best effort</i> algorithm for VM host selection</a>.) </p>
</div>
</div>
<div id="outline-container-unnumbered-4" class="outline-2">
<h2 id="unnumbered-4">Divide and conquer?</h2>
<div class="outline-text-2" id="text-unnumbered-4">
<p> As noted by the 2011 research paper referenced above, this area of computer science is still evolving.  There is one constant however: any rearrangement solution must not only provide a final VM placement optimised according to the chosen constraints, but also a sequence of migrations to it from the current placement.  There will often be multiple migration sequences reaching the optimised placement from the current one, and their efficiency can vary widely.  In other words, there are two questions which need answering: </p>
<ol class="org-ol">
<li>Given a starting placement <i>A</i>, which is the best (or near-optimal) final placement <i>B</i> to head for?</li>
<li>What&#8217;s the best way to get from <i>A</i> to <i>B</i>?</li>
</ol>
<p> The above considerations strongly suggest that the first question is much harder to answer than the second, although the two are not necessarily orthogonal; for example there could be two different final placements <i>B</i> and <i>C</i> which are equally near-optimal, but it may be much harder to reach <i>C</i> from <i>A</i> than <i>B</i>. </p>
<p> I propose that it is worth examining the effectiveness of a <b>divide and conquer</b> approach: solving the second question may simplify the first, and also provide a mechanism for comparatively evaluating the effectiveness of potential answers to the first.  Another bonus of this decoupling is that it should be possible for the path-finding algorithm to also discover opportunities for parallelizing live migrations when walking the path, so that the target placement <i>B</i> can be reached more quickly. </p>
</div>
</div>
<div id="outline-container-unnumbered-5" class="outline-2">
<h2 id="unnumbered-5">A proof of concept algorithm for VM migration path-finding</h2>
<div class="outline-text-2" id="text-unnumbered-5">
<p> I&#8217;ve designed an algorithm which solves the second problem, and hacked together a proof of concept implementation in Python.  This <a href="http://youtu.be/aHK3UF3ffNg">video</a> shows it solving three randomly generated scenarios: </p>
<p><iframe width="640" height="480" src="https://www.youtube.com/embed/aHK3UF3ffNg?rel=0" frameborder="0" allowfullscreen></iframe></p>
<p> It&#8217;s far from perfect, but as a proof of concept it seems to hold up fairly well under soak testing.  I&#8217;m pleased to announce that the code is now on github: <a href="https://github.com/aspiers/migrationpaths">https://github.com/aspiers/migrationpaths</a> and I would love to hear feedback on it. </p>
</div>
</div>
<div id="outline-container-unnumbered-6" class="outline-2">
<h2 id="unnumbered-6">Feedback</h2>
<div class="outline-text-2" id="text-unnumbered-6">
<p> If you found this blog interesting, feel free to get in touch!  I&#8217;m <code>aspiers</code> on FreeNode IRC, and <a href="https://twitter.com/adamspiers"><code>adamspiers</code> on Twitter</a>. </p>
<p> I&#8217;m also in Vancouver for <a href="https://www.openstack.org/summit/vancouver-2015/">the OpenStack summit</a> which starts this Monday, so if you are, come and say hello! </p>
</div>
</div>
<div id="outline-container-unnumbered-7" class="outline-2">
<h2 id="unnumbered-7">Acknowledgements</h2>
<div class="outline-text-2" id="text-unnumbered-7">
<p> Many thanks to <a href="http://www.hastexo.com/who/florian">Florian Haas</a>, <a href="http://hardysteven.blogspot.com/">Steven Hardy</a>, and Christoph Thiel for their input on an earlier draft version of this post, and apologies that it took me SO long to publish it! </p>
</div>
</div>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2015%2F05%2F17%2Fcloud-rearrangement%2F&#038;title=Cloud%20rearrangement%20for%20fun%20and%20profit" data-a2a-url="https://blog.adamspiers.org/2015/05/17/cloud-rearrangement/" data-a2a-title="Cloud rearrangement for fun and profit"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2015/05/17/cloud-rearrangement/">Cloud rearrangement for fun and profit</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2015/05/17/cloud-rearrangement/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Tories to limit use of mathematics in amendment to anti-terrorism bill</title>
		<link>https://blog.adamspiers.org/2015/05/09/tories-limit-maths-via-snoopers-charter/</link>
					<comments>https://blog.adamspiers.org/2015/05/09/tories-limit-maths-via-snoopers-charter/#comments</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Sat, 09 May 2015 02:45:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[government]]></category>
		<category><![CDATA[politics]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[satire]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[Tories]]></category>
		<category><![CDATA[UK]]></category>
		<guid isPermaLink="false">http://blog.adamspiers.org/?p=1483</guid>

					<description><![CDATA[<p>Following on from the Conservative Party&#8217;s plans to take immediate advantage of their new majority in the House of Commons by pushing through surveillance powers known as the Snoopers’ Charter, the party has announced an amendment to the bill which will make it illegal for anyone to use any form of mathematics not on a [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2015/05/09/tories-limit-maths-via-snoopers-charter/">Tories to limit use of mathematics in amendment to anti-terrorism bill</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> Following on from <a href="http://www.independent.co.uk/life-style/gadgets-and-tech/news/snoopers-charter-set-to-return-to-law-as-theresa-may-suggests-conservative-majority-could-lead-to-huge-increase-in-surveillance-powers-10235578.html">the Conservative Party&#8217;s plans to take immediate advantage of their new majority in the House of Commons by pushing through surveillance powers known as the Snoopers’ Charter</a>, the party has announced an amendment to the bill which will make it illegal for anyone to use any form of mathematics not on a government-approved whitelist. </p>
<p> In yesterday&#8217;s announcement, Theresa May, who as home secretary led the original legislation, said: &#8220;We were disappointed to receive feedback on the original Communications Data Bill from technology experts and civil liberties campaigners who considered it more important for citizens to be able to continue using encryption for non-essential activities like secure online shopping / banking, than for the police to be able to monitor the communications of anyone who could be a terrorist.  The country was extremely healthy under John Major&#8217;s government in the 1990s before online services such as e-commerce and e-banking even existed, so it is a trivial and easily justifiable sacrifice to replace the freedom to use those services securely with laws creating a powerful deterrent for terrorists, who would face stiff fines and potentially even jail-time if found guilty of using encrypted communications.&#8221; </p>
<p> &#8220;However, during consultations with the financial sector in the City, we have been advised that banning use of all encryption software would prevent large UK corporations from trading on global markets.&#8221; </p>
<p> She continued, &#8220;We also discovered that <a href="http://www.revk.uk/2015/01/z226etuo57q9m6brbblz6ztkpea5ct23rmex0vl.html">communication can be encrypted non-electronically, for example using simple mathematical techniques on pen and paper</a>, and we cannot in good conscience allow potential terrorists to use these techniques without fear of being arrested and detained for an arbitrary amount of questioning.&#8221; </p>
<p> &#8220;Therefore the only logical course of action is to amend the bill to ban use of all types of mathematics for which permission has not been explicitly granted by the government.  A whitelist will be drafted for the upcoming debate on the bill.  In order to avoid any impact on the economy, a special security exception will be made to allow financial institutions to continue using mathematics as before.  For ordinary citizens, basic arithmetic will of course be allowed, although in financial contexts some restrictions will be imposed; for example, in the interests of national security, it will be forbidden for the general public to perform calculations relating to any personal expenditure of MPs or peers in the House of Lords.&#8221; </p>
<p> David Cameron issued a separate statement reinforcing the Home Secretary&#8217;s announcement and also rejecting an opposing argument which highlighted that whilst <a href="http://blog.nexusuk.org/2015/01/using-attack-on-freedom-to-attack.html">every year in the UK around 2,000 people die from traffic accidents and 65,000 from heart disease, in the past 5 years there have only been 2 people killed through terrorism</a>. &#8220;Terrorism is a rising global threat, and must be countered at any cost, even at the expense of civil liberties and personal privacy&#8221;, the newly re-elected Prime Minster said.  &#8220;If you have nothing to hide, why would you need privacy anyway?  Everybody already shares everything on Facebook anyway.&#8221; </p>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2015%2F05%2F09%2Ftories-limit-maths-via-snoopers-charter%2F&#038;title=Tories%20to%20limit%20use%20of%20mathematics%20in%20amendment%20to%20anti-terrorism%20bill" data-a2a-url="https://blog.adamspiers.org/2015/05/09/tories-limit-maths-via-snoopers-charter/" data-a2a-title="Tories to limit use of mathematics in amendment to anti-terrorism bill"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2015/05/09/tories-limit-maths-via-snoopers-charter/">Tories to limit use of mathematics in amendment to anti-terrorism bill</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2015/05/09/tories-limit-maths-via-snoopers-charter/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Why and how to correctly amend GitHub pull requests</title>
		<link>https://blog.adamspiers.org/2015/03/24/why-and-how-to-correctly-amend-github-pull-requests/</link>
					<comments>https://blog.adamspiers.org/2015/03/24/why-and-how-to-correctly-amend-github-pull-requests/#comments</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Tue, 24 Mar 2015 14:00:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[hacking]]></category>
		<guid isPermaLink="false">http://blog.adamspiers.org/?p=1465</guid>

					<description><![CDATA[<p>Like many F/OSS developers, I&#8217;m a heavy user of GitHub, collaborating on many projects which use the typical &#8220;fork &#38; pull&#8221; workflow based on pull requests. The GitHub documentation on pull requests covers this workflow fairly comprehensively, but there seems to be one area which is significantly lacking in detail: why and how to amend [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2015/03/24/why-and-how-to-correctly-amend-github-pull-requests/">Why and how to correctly amend GitHub pull requests</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> Like many <a href="http://en.wikipedia.org/wiki/Free_and_open-source_software">F/OSS</a> developers, I&#8217;m a <a href="https://github.com/aspiers">heavy user</a> of <a href="https://github.com/">GitHub</a>, collaborating on many projects which use the typical &#8220;fork &amp; pull&#8221; workflow based on <a href="https://help.github.com/articles/using-pull-requests/">pull requests</a>.  The <i>GitHub documentation on pull requests</i> covers this workflow fairly comprehensively, but there seems to be one area which is significantly lacking in detail: why and how to <b>amend</b> <b>existing</b> pull requests.  The article simply says: </p>
<blockquote><p>
After your pull request is sent, any new commits pushed to your branch will automatically be added to the pull request. This is especially useful if you need to make more changes.
</p></blockquote>
<p> The problem is that this completely ignores the fact that there are often very good reasons for <b>amending</b> existing commits within the pull request, not just for <b>adding</b> new commits it. </p>
<div id="outline-container-sec-1" class="outline-2">
<h2 id="sec-1">Why amend an existing pull request?</h2>
<div class="outline-text-2" id="text-1">
<p> A peer review cycle can potentially reveal many issues which make the pull request unready for merging, e.g. </p>
<ul class="org-ul">
<li>typos
</li>
<li>bugs in the proposed code changes
</li>
<li>missing features in the proposed code changes
</li>
<li>incomplete test coverage
</li>
<li>incomplete documentation changes
</li>
<li>style inconsistencies (including whitespace issues)
</li>
<li>incorrect or incomplete commit messages
</li>
<li>the commits violate the rule of <a href="https://wiki.openstack.org/wiki/GitCommitMessages#Structural_split_of_changes">one logical change per commit</a>
</li>
<li>some changes are outside the scope of the pull request
</li>
</ul>
<p> This is of course what makes peer review of pull requests so valuable: the problems can be addressed even before they hit the <code>master</code> branch, which helps maintain high quality in the development trunk.  But then <b>how</b> do we address the issues? </p>
<p><span id="more-1465"></span>
</div>
</div>
<div id="outline-container-sec-2" class="outline-2">
<h2 id="sec-2">How <b>not</b> to amend your existing pull requests</h2>
<div class="outline-text-2" id="text-2">
<p> One approach is for the submitter fix the issues in their original local branch, close the pull request, and submit a new one. However in most cases this is a bad idea, because each time you do it, you create an &#8220;orphaned&#8221; abandoned pull request, and there is no automatic linking between the new revised one and the abandoned one, which makes it a lot harder to follow the history of the review process. </p>
<p> Another approach (the one apparently implied by the GitHub documentation mentioned above) is to append &#8220;fixup&#8221; commits to the series which fix issues introduced by commits earlier in the series.  But that&#8217;s almost always a really bad idea, because again it violates the rule of <a href="https://wiki.openstack.org/wiki/GitCommitMessages#Structural_split_of_changes">one logical change per commit</a>.  In particular: </p>
<ul class="org-ul">
<li>
<p> It makes life much harder for reviewers, because they have to review a combination of broken commits and subsequent commits which are supposed to fix that brokenness.  So for each change, they have follow this process: </p>
<ol class="org-ol">
<li>Review it as normal.
</li>
<li>If they spot brokenness, refrain from immediately commenting on it, and instead look ahead for any subsequent commit in the series which may claim to fix that brokenness.
</li>
<li>If such a commit is found, verify that it really does fix the brokenness.
</li>
<li>If it does fix it, selectively ignore that brokenness, whilst taking care not to accidentally ignore other brokenness in the same area.
</li>
</ol>
<p> This problem is significantly compounded each review cycle, i.e. each time fixup commits are appended to the pull request. </p>
<p> The only workaround is to review via the &#8220;Files changed&#8221; tab, but that brings considerable disadvantages when the pull request contains more than one commit, because then the reviewer cannot review individual logical changes one at a time. </p>
</li>
<li>After merging the pull request, it pollutes the project&#8217;s history with useless noise: fixup commits which are not linked to the commits they are fixing.
</li>
<li>It breaks <code>git bisect</code>, <code>git revert</code>, and <code>git blame</code>.
</li>
</ul>
</div>
</div>
<div id="outline-container-sec-3" class="outline-2">
<h2 id="sec-3">The <b>right</b> way to amend your existing pull requests</h2>
<div class="outline-text-2" id="text-3">
<p> The good news is that GitHub actually supports a much better alternative which works really nicely.  As a maintainer and reviewer of many GitHub repositories, I&#8217;ve been continually surprised how many people are unaware of this simple trick; perhaps it&#8217;s due to the hole in GitHub&#8217;s pull request documentation which I mentioned above?  The trick is simply this: </p>
<ol class="org-ol">
<li>Rewrite the history of your local branch corresponding to the pull request, so that the issues revealed during the review of the pull request are addressed.
</li>
<li>Do a <b>force push</b> (i.e. a <code>git push</code> command which includes the <code>--force-with-lease</code> option, <em>not</em> <code>-f</code> / <code>--force</code> which is dangerous and should never be used).
</li>
</ol>
<p> I won&#8217;t go into details here about how to rewrite history.  <code>git</code> history rewriting via <code>git rebase</code> (with <code>fixup</code>, <code>squash</code>), <code>git commit --amend</code> etc. is something of an art form, and there are already <a href="https://www.google.com/#q=git+rewrite+history">many great resources</a> out there which there would be no value in me replicating. </p>
<p> So really this whole blog post is a long way of saying: </p>
<blockquote><p>
<b>When you force-push a new head for a pull request branch, GitHub handles it gracefully and automatically updates</b> <b>the pull request in the way you want.</b>
</p></blockquote>
<p> It&#8217;s almost like magic.  For example, if a reviewer commented on two hunks in the original pull request, and your force-push effectively rewrites one of those hunks but not the other, then the GitHub pull request UI will get updated to say something like &#8220;@reviewer commented on an outdated diff&#8221; for the rewritten hunk, but any outstanding review comments on the changed hunk will be presented as before the force-push. </p>
<p> Now don&#8217;t get me wrong &#8211; GitHub is not perfect.  In some (but not all) ways, it is inferior to <a href="https://code.google.com/p/gerrit/">Gerrit&#8217;s review system</a> which is better at exposing the complete history of the review cycle.  I previously wrote <a href="http://blog.adamspiers.org/2013/05/12/in-partial-defense-of-githubs-review-system/">another blog post examining GitHub&#8217;s review system in more depth</a>.  But in general, it&#8217;s usually plenty good enough. </p>
</div>
</div>
<div id="outline-container-sec-4" class="outline-2">
<h2 id="sec-4">A footnote about git&#8217;s force-push</h2>
<div class="outline-text-2" id="text-4">
<p> If you&#8217;ve previously been fed the mantra &#8220;git force-push is evil, don&#8217;t ever use it&#8221;, or the more specific version &#8220;don&#8217;t ever force-push to public branches&#8221; then hopefully you now realise neither are correct.  There are many perfectly valid use cases for force push, otherwise the extremely clever developers who implemented it wouldn&#8217;t have bothered (and let&#8217;s face it, they know far more about <code>git</code> than you or I ever will).  Ultimately the validity / safety of doing a force push to a public branch depends on the audience&#8217;s expectations for the stability of that branch.  If people expect it to be stable and never get rewritten (only fast-forwarded), then you shouldn&#8217;t force push, or at least not without a decent effort to correct those people&#8217;s expectations.  However there is generally no reason why people should expect GitHub pull request branches to be stable, because people generally don&#8217;t base other branches on top of them. </p>
<p> The article entitled <a href="http://willi.am/blog/2014/08/12/the-dark-side-of-the-force-push/">&#8220;The Dark Side of the Force Push&#8221;</a> may help further your understanding. </p>
</div>
</div>
<div id="outline-container-sec-5" class="outline-2">
<h2 id="sec-5">Taking over amendment of someone else&#8217;s pull requests</h2>
<div class="outline-text-2" id="text-5">
<p> Note that the title of the previous sections referred to <b>your</b> existing pull requests.  GitHub doesn&#8217;t let you amend anyone <b>else&#8217;s</b> pull requests, and that&#8217;s a good thing for obvious reasons.  But what if one developer submits a pull request, vanishes off on holiday, and whilst they are away, it gets reviewed and issues are revealed? </p>
<p> In this case it&#8217;s easy to effectively take over the process.  Simply create a local branch which points to the same commit as the head of the pull request.  If you have the totally awesome <a href="https://hub.github.com/"><code>hub</code> CLI tool</a> installed, then this is as simple as: </p>
<pre class="brush: bash; light: true; title: ; notranslate">
git checkout https://github.com/github/hub/pull/134
</pre>
<p> Then amend your branch as necessary according to the existing reviews, and submit a new pull request which references the old pull request it&#8217;s superceding, either by URL or by number.  You will probably also want to arrange for the old pull request to be closed with a comment linking to its successor. </p>
</div>
</div>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2015%2F03%2F24%2Fwhy-and-how-to-correctly-amend-github-pull-requests%2F&#038;title=Why%20and%20how%20to%20correctly%20amend%20GitHub%20pull%20requests" data-a2a-url="https://blog.adamspiers.org/2015/03/24/why-and-how-to-correctly-amend-github-pull-requests/" data-a2a-title="Why and how to correctly amend GitHub pull requests"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2015/03/24/why-and-how-to-correctly-amend-github-pull-requests/">Why and how to correctly amend GitHub pull requests</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2015/03/24/why-and-how-to-correctly-amend-github-pull-requests/feed/</wfw:commentRss>
			<slash:comments>13</slash:comments>
		
		
			</item>
		<item>
		<title>Announcing git-deps: commit dependency analysis / visualization tool</title>
		<link>https://blog.adamspiers.org/2015/01/19/git-deps/</link>
					<comments>https://blog.adamspiers.org/2015/01/19/git-deps/#comments</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Sun, 18 Jan 2015 23:15:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[OpenStack]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[version control]]></category>
		<guid isPermaLink="false">http://blog.adamspiers.org/?p=1452</guid>

					<description><![CDATA[<p>I&#8217;m happy to announce a new tool called git-deps which performs automatic analysis and visualization of dependencies between commits in a git repository. Here&#8217;s a screencast demonstration! Back in 2013 I blogged about some tools I wrote which harness the notes feature of git to help with the process of porting commits from one branch [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2015/01/19/git-deps/">Announcing git-deps: commit dependency analysis / visualization tool</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> I&#8217;m happy to announce a new tool called <a href="https://github.com/aspiers/git-deps"><code>git-deps</code></a> which performs automatic analysis and visualization of dependencies between commits in a <a href="http://git-scm.com/">git</a> repository.  Here&#8217;s <a href="http://youtu.be/irQ5gMMz-gE">a screencast demonstration</a>! </p>
<p><iframe width="640" height="360" src="//www.youtube.com/embed/irQ5gMMz-gE" frameborder="0" allowfullscreen></iframe></p>
<p> Back in 2013 I <a href="http://blog.adamspiers.org/easier-upstreaming-with-git/">blogged about some tools I wrote</a> which harness the <a href="https://www.kernel.org/pub/software/scm/git/docs/git-notes.html"><code>notes</code></a> feature of git to help with the process of porting commits from one branch to another.  These are mostly useful in the cases where porting is more complex than just cherry-picking a small number of commits. </p>
<p> However, even in the case where there are a small number of <b>desired</b> commits, sometimes those commits have hidden dependencies on other commits which you didn&#8217;t particularly want, but need to pull in anyway, e.g. in order to avoid conflicts during cherry-picking.  Of course those secondary commits may in turn require other commits, and before you know it, you&#8217;re in dependency hell, which is only supposed to happen if you&#8217;re trying to install Linux packages and it&#8217;s still 1998 &#x2026; but in fact that&#8217;s exactly what happened to me at <a href="http://www.susecon.com/">SUSEcon</a> 2013, when I attempted to help a colleague backport a bugfix in <a href="http://www.openstack.org/">OpenStack</a> <a href="http://docs.openstack.org/developer/nova/">Nova</a> from the <code>master</code> branch to a stable release branch. </p>
<p> At first sight it looked like it would only require a trivial <code>git cherry-pick</code>, but that immediately revealed conflicts due to related code having changed in <code>master</code> since the release was made.  I manually found the underlying commit which the bugfix required by using <code>git blame</code>, and tried another <code>cherry-pick</code>.  The same thing happened again.  Very soon I found myself in a quagmire of dependencies between commits, with no idea whether the end was in sight. </p>
<p> So wouldn&#8217;t it be nice if you could see the dependency tree ahead of time, rather than spending a whole bunch of time resolving unexpected conflicts due to missing dependencies, only to realise that the tree&#8217;s way deeper than you expected, and that actually a totally different approach is needed?  Well, I thought it would, and so <a href="https://github.com/aspiers/git-deps"><code>git-deps</code></a> was born! </p>
<p> In coffee breaks during the ensuing openSUSE conference at the same venue, I feverishly hacked together a prototype and it seemed to work. Then normal life intervened, and no progress was made for another year. </p>
<p> However thanks to SUSE&#8217;s generous <a href="https://hackweek.suse.com/">Hack Week</a> policy, I have had the luxury of being able to spending some of early January 2015 working to bring this tool to the next level.  I submitted a <a href="https://hackweek.suse.com/11/projects/366">Hack Week project page</a>, <a href="http://article.gmane.org/gmane.comp.version-control.git/262000">announced my intentions on the <code>git</code> mailing list</a>, started hacking, missed quite a bit of sleep, and finally recorded the above screencast. </p>
<p> The tool is available here: <a href="https://github.com/aspiers/git-deps">https://github.com/aspiers/git-deps</a> </p>
<p> Please give it a go and let me know what you think!  I&#8217;m particularly interested in hearing ideas for use cases I didn&#8217;t think of yet, and proposals for <a href="https://github.com/aspiers/git-deps/issues/23">integration with other <code>git</code> web front-ends</a>. </p>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2015%2F01%2F19%2Fgit-deps%2F&#038;title=Announcing%20git-deps%3A%20commit%20dependency%20analysis%20%2F%20visualization%20tool" data-a2a-url="https://blog.adamspiers.org/2015/01/19/git-deps/" data-a2a-title="Announcing git-deps: commit dependency analysis / visualization tool"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2015/01/19/git-deps/">Announcing git-deps: commit dependency analysis / visualization tool</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2015/01/19/git-deps/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>Rethinking traditional scale practice on the cello</title>
		<link>https://blog.adamspiers.org/2014/12/20/rethinking-cello-scales/</link>
					<comments>https://blog.adamspiers.org/2014/12/20/rethinking-cello-scales/#comments</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Sat, 20 Dec 2014 01:28:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[cello]]></category>
		<category><![CDATA[classical]]></category>
		<category><![CDATA[fingerings]]></category>
		<category><![CDATA[jazz]]></category>
		<category><![CDATA[practice]]></category>
		<category><![CDATA[scales]]></category>
		<category><![CDATA[technique]]></category>
		<guid isPermaLink="false">http://blog.adamspiers.org/?p=1405</guid>

					<description><![CDATA[<p>(Please note that while this post was written with the cello in mind, several of the principles apply to other instruments too.) I&#8217;ve previously blogged about how back in 2011, I decided to get serious about trying to become a jazz cellist. Since then I&#8217;ve had some really interesting and fulfilling musical experiences, but it&#8217;s [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2014/12/20/rethinking-cello-scales/">Rethinking traditional scale practice on the cello</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> (Please note that while this post was written with the cello in mind, several of the principles apply to other instruments too.) </p>
<p> I&#8217;ve <a href="http://blog.adamspiers.org/2013/01/28/cello-lessons-from-a-dead-genius">previously blogged</a> about how back in 2011, <a href="http://blog.adamspiers.org/2011/08/12/rediscovering-music/">I decided to get serious about trying to become a jazz cellist</a>.  Since then I&#8217;ve had some really interesting and fulfilling musical experiences, but it&#8217;s also been a struggle in some areas.  I studied and performed classical (in the western sense) cello for many years, but the demands of jazz are so different to most things I worked on during my classical training that I&#8217;ve had to fundamentally rethink many aspects of the way I practise. </p>
<p> Scales are one good example of this.  I was taught to practise B♭ major something like the following: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-standard-classical.png" style="width: 600px; margin: 0 auto; display: block;" title="standard classical cellistic approach to practising a B♭ major scale" alt="standard classical cellistic approach to practising a B♭ major scale"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-standard-classical.png" alt="standard classical cellistic approach to practising a B♭ major scale" style="width: 600px; margin: 0 auto; display: block;" title="standard classical cellistic approach to practising a B♭ major scale" /></a> </p>
</p></div>
<p> The first interesting thing to note about this is that it omits almost the entire bottom octave of the instrument!  There&#8217;s really no good reason for this; the bottom octave deserves attention just like the rest of the instrument.  It&#8217;s only taught this way because the tradition has become incredibly &#8220;tonic-biased&#8221;, with no awareness of the different <a href="http://en.wikipedia.org/wiki/Mode_(music)">modes</a> which even beginner jazz students get taught about. </p>
<p> So one of the first adjustments I made (and I probably stole this idea from one of my mentors, the great jazz violinist <a href="http://christianhowes.com/">Christian Howes</a>, who calls it &#8220;extended range&#8221;) was to always start from the lowest note of the scale reachable on the instrument: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-start-on-lowest.png" style="width: 600px; margin: 0 auto; display: block;" title="starting B♭ major on C" alt="starting B♭ major on C"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-start-on-lowest.png" alt="starting B♭ major on C" style="width: 600px; margin: 0 auto; display: block;" title="starting B♭ major on C" /></a> </p>
</p></div>
<p> Similarly, if the top tonic is not near the top of the range you want to practise in, just keep going until you hit a note high enough to make you think &#8220;OK, I don&#8217;t need to practise any higher than this!&#8221; Whether or not that note happens to be the tonic of the scale should be irrelevant; the most important thing is that you are practising the full range of the instrument which you need to use when performing. </p>
<div id="outline-container-sec-1" class="outline-2">
<h2 id="sec-1">Turning it all upside-down</h2>
<div class="outline-text-2" id="text-1">
<p> Another bias which exists in the western classical tradition for dubious reasons is that everything is <i>bottom-heavy</i>: almost all exercises start at the bottom, go up to the top, and come back down again.  This inevitably results in the bottom end being practised more than the top, which is particularly bad because the top end is way harder to play well.  So let&#8217;s swap it all around! </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-start-at-top.png" style="width: 600px; margin: 0 auto; display: block;" title="starting B♭ major at the top" alt="starting B♭ major at the top"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-start-at-top.png" alt="starting B♭ major at the top" style="width: 600px; margin: 0 auto; display: block;" title="starting B♭ major at the top" /></a> </p>
</p></div>
<p> (By the way, along similar lines I recommend this <a href="http://antonjazz.com/2014/06/back-to-front-learning/">great blog post on back-to-front learning by Anton Schwarz</a>.) </p>
</div>
</div>
<div id="outline-container-sec-2" class="outline-2">
<h2 id="sec-2">Developing new &#8220;real world&#8221; fingering systems</h2>
<div class="outline-text-2" id="text-2">
<p> The next odd thing to note about the classical tradition is that <i>scales are almost always played using a single fingering</i>, and that fingering is typically tonic-biased in another way: the tonic notes are very commonly played using first finger.  Perhaps the classical pedagogy evolved this way simply because a single fingering system for each scale was perceived as easier to teach and also for students to memorise.  But this approach is hopelessly inconsistent with the real world.  If you don&#8217;t believe me, take a look at every fragment of a B♭ major scale present in <a href="http://petrucci.mus.auth.gr/imglnks/usimg/8/89/IMSLP07221-Boccherini_Cello_Concerto_B-Dur_solo_part.pdf">the solo part of Boccherini&#8217;s cello concerto in B♭ major</a>, and count for how many of those fragments it would make sense to use the fingering system shown above.  If we don&#8217;t use those fingering systems when playing actual music, why spend so much time practising them? </p>
<p> So it seems clear to me that practising multiple fingering systems is beneficial for technical reasons, and in the case of jazz for musical reasons too: the improvisatory nature of which means that unless you rely very heavily on licks, you rarely know far in advance what notes you want to play, let alone what fingerings to use.  So for any given tonality and position on the instrument, you should practise as many fingering positions as possible, so that when you are in the moment of improvising a solo, whichever hand position you&#8217;re in, as many notes are physically accessible from there because you&#8217;ve already covered those transitions in practice. </p>
</div>
</div>
<div id="outline-container-sec-3" class="outline-2">
<h2 id="sec-3">A system for practising all fingerings</h2>
<div class="outline-text-2" id="text-3">
<p> But where do we draw the line?  After all there are an enormous number of different possible fingerings for a 3-octave scale, and there&#8217;s just not enough time in the day to practise even a fraction of them. Or is there? </p>
</div>
<div id="outline-container-sec-3-1" class="outline-3">
<h3 id="sec-3-1">Violin fingerings</h3>
<div class="outline-text-3" id="text-3-1">
<p> On the violin, this is a bit simpler to understand because pretty much any scale can be played in any hand position without shifting (at least, until you hit the top or bottom notes in that position).  So on violin, you can simply practise any scale in any position, and carve up your available practice time accordingly: for example on Monday you could focus on 1st position, on Tuesday 2nd position, and so on. </p>
</div>
</div>
<div id="outline-container-sec-3-2" class="outline-3">
<h3 id="sec-3-2">Cello fingerings</h3>
<div class="outline-text-3" id="text-3-2">
<p> On cello, it&#8217;s not possible to play any diatonic scale without a considerable amount of shifting of the hand position, so the problem of how to methodically practise all possible fingerings is far less obvious. </p>
<p> I think the answer lies in considering how to group notes into hand positions.  It&#8217;s clear from the above examples that typically the hand position shifts every three notes, i.e. the majority of notes in scales on the cello are grouped in threes: <i>1-2-4</i> or <i>1-3-4</i> in the lower octaves, and <i>1-2-3</i> when playing higher up the string.  Most exceptions to this are when the open strings are played (but they could be considered as &#8220;outside&#8221; the groupings anyway), and in the higher octaves of most cello scales, where 2-note groupings are common (e.g. the <i>1-2 1-2 1-2-3</i> type of fingering system is very commonly taught in the classical tradition for the top octave of a 3-octave scale). </p>
<p> My opinion is that practising 2-note groupings is really not that useful (at least to me as a jazz cellist), because </p>
<ol class="org-ol">
<li>the shift distance is smaller so the shift is easier,
</li>
<li>2-note groupings require 50% more frequent shifts when compared to 3-note groupings, which is a big hindrance when attempting to play at speed,
</li>
<li>every 2-note finger grouping is already covered by a 3-note grouping, and
</li>
<li>I&#8217;ve already logged years of classical practice covering 2-note groupings anyway!
</li>
</ol>
<p> So I decided to practise all my scales in only 3-note groupings: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-3-note-groupings.png" style="width: 600px; margin: 0 auto; display: block;" title="using 3 note finger groupings" alt="using 3 note finger groupings"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-3-note-groupings.png" alt="using 3 note finger groupings" style="width: 600px; margin: 0 auto; display: block;" title="using 3 note finger groupings" /></a> </p>
</p></div>
<p> Notice here that I&#8217;ve also stopped using the open strings (except for the bottom C, since there&#8217;s no other way to play it).  I made this decision for three reasons.  Firstly, in jazz it&#8217;s important to be able to transpose to another key at any moment, so I don&#8217;t want to become too reliant on scale fingerings which use open strings, since they only work in one key. </p>
<p> Secondly, it makes it very easy to extend this system so that it covers <i>every possible fingering of the scale using 3-note groupings</i>! This is possible simply by shifting the starting hand position by a single note: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-offset-by-1.png" style="width: 600px; margin: 0 auto; display: block;" title="starting with the hand position offset" alt="starting with the hand position offset"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-offset-by-1.png" alt="starting with the hand position offset" style="width: 600px; margin: 0 auto; display: block;" title="starting with the hand position offset" /></a> </p>
</p></div>
<p> and then shifting it once more: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-offset-by-2.png" style="width: 600px; margin: 0 auto; display: block;" title="starting with the hand position offset twice" alt="starting with the hand position offset twice"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-offset-by-2.png" alt="starting with the hand position offset twice" style="width: 600px; margin: 0 auto; display: block;" title="starting with the hand position offset twice" /></a> </p>
</p></div>
</div>
</div>
</div>
<div id="outline-container-sec-4" class="outline-2">
<h2 id="sec-4">String variations</h2>
<div class="outline-text-2" id="text-4">
<p> Thirdly, it allows freedom to introduce variations on which string is used for a particular group.  For example bars 5 and 6 of the above example could be played like this: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-string-variation.png" style="width: 350px; margin: 0 auto; display: block;" title="string variations" alt="string variations"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-string-variation.png" alt="string variations" style="width: 350px; margin: 0 auto; display: block;" title="string variations" /></a> </p>
</p></div>
<p> I don&#8217;t use a strict system to ensure I always cover all possible string variations; instead I like to improvise the choice of string on the spur of the moment, since this matches more closely what can happen when improvising on stage. </p>
</div>
</div>
<div id="outline-container-sec-5" class="outline-2">
<h2 id="sec-5">Connecting the dots</h2>
<div class="outline-text-2" id="text-5">
<p> Of course this system of 3-note groupings with 3 different starting positions for every scale triples the amount of scales to practise! However since I would normally practise each scale more than once anyway, I aim to seamlessly join up the different offsets in order to cover all combinations without requiring significantly more practice time: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2015/01/wpid-connecting-the-dots.png" style="width: 600px; margin: 0 auto; display: block;" title="connecting different hand position offsets" alt="connecting different hand position offsets"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2015/01/wpid-connecting-the-dots.png" alt="connecting different hand position offsets" style="width: 600px; margin: 0 auto; display: block;" title="connecting different hand position offsets" /></a> </p>
</p></div>
<p> and so on.  Actually the hand position &#8220;offset&#8221; can be changed at any point in the scale, and this is also something I like to improvise on. </p>
</div>
</div>
<div id="outline-container-sec-6" class="outline-2">
<h2 id="sec-6">Changing the tonality</h2>
<div class="outline-text-2" id="text-6">
<p> So far the examples have all used a major scale.  The classical tradition also covers harmonic minor and melodic minor (which is different ascending to descending).  In the jazz world (especially for more modern jazz), the ascending form of the melodic minor is particularly important, so I practise that in both directions: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-melodic-minor.png" style="width: 600px; margin: 0 auto; display: block;" title="melodic minor practice" alt="melodic minor practice"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-melodic-minor.png" alt="melodic minor practice" style="width: 600px; margin: 0 auto; display: block;" title="melodic minor practice" /></a> </p>
</p></div>
<p> Jazz also uses the <a href="http://en.wikipedia.org/wiki/Harmonic_major_scale">harmonic major scale</a> and many other scales, so I mix some of these into my practice, although I find it easier to spend a few weeks/months focusing on one particular scale rather than attempt to cover all scales in every practice routine, which just seems too ambitious.  Incidentally, back in 2013 I built the <a href="http://blog.adamspiers.org/2013/08/23/announcing-the-scale-matcher/">&#8220;Scale Matcher&#8221;, a web application to show which scales can be used for improvisation in any given chordal context</a>. </p>
</div>
</div>
<div id="outline-container-sec-7" class="outline-2">
<h2 id="sec-7">Changing the key</h2>
<div class="outline-text-2" id="text-7">
<p> Fortunately not all music in the world is written purely in B♭. Unfortunately this means we have to practise other keys too!  I try to change key seamlessly without stopping, because this is one of the most fundamental requirements in jazz for improvising over a series of chord changes.  Again I like to avoid any tonic bias by changing key on other degrees of the scale.  For example, after completing one cycle of all 3 hand positions in B♭ minor, I could shift tonality up a semitone to B minor, changing near the top of the instrument: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-key-change-at-top.png" style="width: 600px; margin: 0 auto; display: block;" title="seamlessly changing the key at the top" alt="seamlessly changing the key at the top"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-key-change-at-top.png" alt="seamlessly changing the key at the top" style="width: 600px; margin: 0 auto; display: block;" title="seamlessly changing the key at the top" /></a> </p>
</p></div>
<p> or on the lowest note of the instrument: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-key-change-at-bottom.png" style="width: 600px; margin: 0 auto; display: block;" title="seamlessly changing the key at the bottom" alt="seamlessly changing the key at the bottom"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-key-change-at-bottom.png" alt="seamlessly changing the key at the bottom" style="width: 600px; margin: 0 auto; display: block;" title="seamlessly changing the key at the bottom" /></a> </p>
</p></div>
<p> or even somewhere in the middle: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-key-change-in-middle.png" style="width: 600px; margin: 0 auto; display: block;" title="seamlessly changing the key in the middle" alt="seamlessly changing the key in the middle"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-key-change-in-middle.png" alt="seamlessly changing the key in the middle" style="width: 600px; margin: 0 auto; display: block;" title="seamlessly changing the key in the middle" /></a> </p>
</p></div>
<p> This is a fun workout for the brain as well as the fingers! </p>
</div>
</div>
<div id="outline-container-sec-8" class="outline-2">
<h2 id="sec-8">Hand position &#8220;windows&#8221;</h2>
<div class="outline-text-2" id="text-8">
<p> Above I&#8217;ve suggested a system for dealing with the cello&#8217;s limitation of not being able to play a continuous scale in any key without shifting the hand, which ensures that every possible fingering of a given scale can be methodically covered during practice. </p>
<p> However there&#8217;s a completely opposite approach, which is to <i>embrace</i> this limitation and simply fix your hand in a single position and only play the notes of the scale which you can reach from that position, dropping the others!  This is particularly useful when improvising at speed, since it drastically reduces the amount of shifting required. I learnt this idea from three of my all-time cello heroes (<a href="http://www.erikfriedlander.com/">Erik Friedlander</a>, <a href="http://www.mikeblockmusic.com/">Mike Block</a>, and <a href="http://rushadicus.tumblr.com/">Rushad Eggleston</a>), and then extended it to apply to every scale I work on: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-windows.png" style="width: 500px; margin: 0 auto; display: block;" title="position windows in B♭ minor" alt="position windows in B♭ minor"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-windows.png" alt="position windows in B♭ minor" style="width: 500px; margin: 0 auto; display: block;" title="position windows in B♭ minor" /></a> </p>
</p></div>
<p> I&#8217;ve found that improvising within a given &#8220;window&#8221; can result in some interesting melodic shapes. </p>
</div>
</div>
<div id="outline-container-sec-9" class="outline-2">
<h2 id="sec-9">Patterns / shapes</h2>
<div class="outline-text-2" id="text-9">
<p> Rather than simply ascending or descending, there are an infinite number of patterns to choose from for varying the shapes generated by traversing the scale.  Here are a few simple examples: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-patterns.png" style="width: 500px; margin: 0 auto; display: block;" title="position patterns in B♭ minor" alt="position patterns in B♭ minor"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-patterns.png" alt="position patterns in B♭ minor" style="width: 500px; margin: 0 auto; display: block;" title="position patterns in B♭ minor" /></a> </p>
</p></div>
<p> (The last two were shamelessly stolen from <a href="http://christianhowes.com/">Christian Howes</a>.) </p>
</div>
</div>
<div id="outline-container-sec-10" class="outline-2">
<h2 id="sec-10">Rhythm / metronome usage</h2>
<div class="outline-text-2" id="text-10">
<p> So far I haven&#8217;t said anything about rhythm or use of the metronome (which in my opinion is an essential part of scale practice).  In fact this topic is so huge I&#8217;ll leave it for another blog post at another time!  But of course there are an infinite number of ways to vary rhythm, and the western tradition tends not to examine these in much detail.  One thing I enjoy doing is freely improvising the rhythm when playing scales, even if everything else (notes, fingerings etc.) is fixed. </p>
</div>
</div>
<div id="outline-container-sec-11" class="outline-2">
<h2 id="sec-11">Articulation</h2>
<div class="outline-text-2" id="text-11">
<p> How to articulate with the bow is another huge topic, but this post is already way too long! </p>
</div>
</div>
<div id="outline-container-sec-12" class="outline-2">
<h2 id="sec-12">Conclusion</h2>
<div class="outline-text-2" id="text-12">
<p> It&#8217;s clear that there are zillions of ways to vary scale practice and keep it interesting whilst challenging yourself in new ways.  Perhaps the most important thing for any diligent musician is to constantly invent their own new practice systems, rather than just copying someone else&#8217;s verbatim. </p>
<p> If you&#8217;ve made it this far, congratulations!  This is pretty dry reading, but I hope you found it useful or at least interesting.  If you have any feedback of any sort, I&#8217;d love to hear it, so please leave a comment! </p>
<p> P.S. For the curious geeks, this blog post was created from <a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-rethinking-cello-scales.o2b.txt">a single text file</a> with the combination of some incredible <a href="http://en.wikipedia.org/wiki/Free_software">free software</a>: the <a href="http://www.gnu.org/software/emacs/">GNU Emacs editor</a>, <a href="http://lilypond.org/">GNU Lilypond music typesetter</a>, <a href="http://orgmode.org/">Org mode</a>, <a href="https://github.com/punchagan/org2blog/">org2blog</a>, and the <a href="http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html">Org-babel-lilypond</a> backend to <a href="http://orgmode.org/worg/org-contrib/babel/">Babel</a>. </p>
</div>
</div>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2014%2F12%2F20%2Frethinking-cello-scales%2F&#038;title=Rethinking%20traditional%20scale%20practice%20on%20the%20cello" data-a2a-url="https://blog.adamspiers.org/2014/12/20/rethinking-cello-scales/" data-a2a-title="Rethinking traditional scale practice on the cello"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2014/12/20/rethinking-cello-scales/">Rethinking traditional scale practice on the cello</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2014/12/20/rethinking-cello-scales/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
		<item>
		<title>How to build an OpenStack cloud from SUSEcon&#8217;s free USB stick handouts</title>
		<link>https://blog.adamspiers.org/2014/12/11/susecon-usb-stick-howto/</link>
					<comments>https://blog.adamspiers.org/2014/12/11/susecon-usb-stick-howto/#comments</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Thu, 11 Dec 2014 14:28:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[appliance]]></category>
		<category><![CDATA[Crowbar]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[OpenStack]]></category>
		<category><![CDATA[SLES]]></category>
		<category><![CDATA[suse]]></category>
		<category><![CDATA[SUSEcon]]></category>
		<guid isPermaLink="false">http://blog.adamspiers.org/?p=1182</guid>

					<description><![CDATA[<p>Once again, SUSEcon was a blast! Thanks to everyone who helped make it such a great success, especially all our customers and partners who attended. If you attended the final Thursday keynote, you should have been given a free USB stick preloaded with a bootable SUSE Cloud appliance. And if you missed out or couldn&#8217;t [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2014/12/11/susecon-usb-stick-howto/">How to build an OpenStack cloud from SUSEcon&#8217;s free USB stick handouts</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> Once again, <a href="http://www.susecon.com/">SUSEcon</a> was a blast!  Thanks to everyone who helped make it such a great success, especially all our customers and partners who attended. </p>
<p> If you attended the final Thursday keynote, <a href="http://youtu.be/nulEm8wdPKw?t=1m45s">you should have been given a free USB stick preloaded with a bootable SUSE Cloud appliance</a>.  And if you missed out or couldn&#8217;t attend, <a href="http://cdn.novell.com/cached/video/2014/suse/cloud4-admin.x86_64-0.2.1-Build3.15.install.iso">download a copy here</a>!  This makes it possible for anyone to build an OpenStack cloud from scratch extremely quickly and easily.  (In fact, it&#8217;s almost identical to the appliance we used a few weeks ago to <a href="http://blog.adamspiers.org/2014/11/05/ruler-of-the-stack/">win the &#8220;Ruler of the Stack&#8221; competition at the OpenStack summit in Paris</a>.) </p>
<p> <a href="http://youtu.be/nulEm8wdPKw?t=1m45s">Erin explained on stage at a high-level what this appliance does</a>, but below are some more specific technical details which may help in case you haven&#8217;t yet tried it out. </p>
<p> The appliance can be booted on any physical or virtual 64-bit x86 machine &#x2026; but before we start! &#8211; if you would like try running the appliance in a VM using either KVM or VirtualBox, then there is an <b>even easier alternative which uses <a href="https://www.vagrantup.com/">Vagrant</a> to reduce the whole setup to a one-line command</b>.  If you like the sound of that, stop reading and <a href="https://github.com/SUSE-Cloud/suse-cloud-vagrant/blob/master/demos/README.md">go here instead</a>.  However if you want to try it on bare metal or with a different hypervisor such as VMware or HyperV, read on! </p>
<p><span id="more-1182"></span></p>
<div id="outline-container-sec-1" class="outline-2">
<h2 id="sec-1">Requirements</h2>
<div class="outline-text-2" id="text-1">
<p> You&#8217;ll need the following: </p>
<ul class="org-ul">
<li>
<p> At least three physical or virtual 64-bit x86 machines, each with at least 2GB RAM and 8GB disk, and no valuable data on any of the attached disks: </p>
<ul class="org-ul">
<li>one admin node running the Crowbar deployment tool which will provision the other nodes from scratch,
</li>
<li>at least one controller node which will run OpenStack infrastructure services, and
</li>
<li>at least one compute node which will host VM instances within the cloud.  (If this compute node is a VM, then the VM instances in the cloud will have to be run either using KVM nested virtualization, or QEMU software virtualization which is slower but good enough for &#8220;kicking the tires&#8221;.)
</li>
</ul>
</li>
<li>
<p> A private IPv4 network which all the machines must be connected to. <i>Setting this up is the only potentially tricky bit of the whole exercise.</i>  By default the network in question needs to be <code>192.168.124.0/24</code> <b>with no DHCP server enabled</b>, so: </p>
<ul class="org-ul">
<li>if you are installing the appliance in a VM, you should be able to set up a NAT or host-only virtual network and configure your hypervisor so that it does not serve DHCP on that network, or
</li>
<li>if you are installing on bare metal, ensure there is no DHCP server active on that <a href="http://en.wikipedia.org/wiki/OSI_model#Layer_2:_data_link_layer">L2 segment</a>.
</li>
</ul>
</li>
<li>
<p> Another machine (physical or virtual) with a modern web browser on the same private IPv4 network. </p>
</li>
</ul>
</div>
</div>
<div id="outline-container-sec-2" class="outline-2">
<h2 id="sec-2">Installing the appliance</h2>
<div class="outline-text-2" id="text-2">
<p> Attach the bootable USB media (physical or virtual), and boot the machine.  This will automatically install a SUSE Cloud Admin Node onto the disk.  <b>Caution: this will wipe any pre-existing OS</b>, so only use it on a spare machine or freshly-created VM, with no valuable data on any of the attached disks! </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-destroy-confirmation.png" style="width: 400px; margin: 0 auto; display: block;" alt="disk-destroying confirmation dialog box"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-destroy-confirmation.png" alt="disk-destroying confirmation dialog box" style="width: 400px; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> After confirming you are OK to wipe all existing data on the disk, the appliance will be written to disk and then booted.  Shortly after, YaST will appear, allowing you to configure: </p>
<ul class="org-ul">
<li>which keyboard layout you want,
</li>
<li>what password to use for the <code>root</code> user,
</li>
</ul>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-password.png" style="width: 300px; margin: 0 auto; display: block;" alt="root password configuration dialog box"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-password.png" alt="root password configuration dialog box" style="width: 300px; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<ul class="org-ul">
<li>what hostname and domain name to use (the defaults are fine),
</li>
</ul>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-hostname.png" style="width: 300px; margin: 0 auto; display: block;" alt="hostname/DNS configuration dialog box"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-hostname.png" alt="hostname/DNS configuration dialog box" style="width: 300px; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<ul class="org-ul">
<li>the network setup (the default of <code>192.168.124.10/24</code> is recommended, otherwise you will also have to configure Crowbar prior to installation),
</li>
<li>the clock and time zone, and finally
</li>
<li>the NTP configuration (supplying an upstream NTP server is recommended but not required).
</li>
</ul>
</div>
</div>
<div id="outline-container-sec-3" class="outline-2">
<h2 id="sec-3">Logging in to the Admin Node</h2>
<div class="outline-text-2" id="text-3">
<p> Log in as <code>root</code> (with the password you specified above) either on the console or via <code>ssh root@192.168.124.10</code> if you have another machine configured to be on the same subnet. </p>
<p> Press <code>q</code> and then <code>y</code> to accept the beta EULA, which highlights that the appliance is partially based on unreleased code.  Please do not use it for production deployments! </p>
</div>
</div>
<div id="outline-container-sec-4" class="outline-2">
<h2 id="sec-4">Configuring Crowbar (optional)</h2>
<div class="outline-text-2" id="text-4">
<p> Crowbar is very powerful and flexible in terms of network configuration.  If you have other traffic on the <a href="http://en.wikipedia.org/wiki/OSI_model#Layer_2:_data_link_layer">L2 network segment</a> (e.g. if you are using bare metal hardware and a physical network rather than a dedicated virtual network) then you should check that its default networks don&#8217;t conflict with your existing traffic.  To do this, type <code>yast crowbar</code>: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-yast-crowbar.png" style="width: 400px; margin: 0 auto; display: block;" alt="how to launch the YaST Crowbar module"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-yast-crowbar.png" alt="how to launch the YaST Crowbar module" style="width: 400px; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> and select the <code>Networks</code> tab: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-crowbar-net-config.png" style="width: 400px; margin: 0 auto; display: block;" alt="Crowbar network configuration dialog"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-crowbar-net-config.png" alt="Crowbar network configuration dialog" style="width: 400px; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> From here you can examine and change the networks Crowbar will use. Some are only used when various options are selected later on, but at a minimum, <code>admin</code>, <code>nova_fixed</code>, and <code>nova_floating</code> will all be used.  For more information, see the <a href="https://www.suse.com/documentation/suse-cloud4/book_cloud_deploy/data/sec_depl_req_network.html">Networking section of the SUSE Cloud Deployment Guide</a>. </p>
</div>
</div>
<div id="outline-container-sec-5" class="outline-2">
<h2 id="sec-5">Installing SUSE Cloud</h2>
<div class="outline-text-2" id="text-5">
<p> From the shell prompt, type <code>screen go</code> to initiate the installation of SUSE Cloud.  This will take several minutes. </p>
</div>
</div>
<div id="outline-container-sec-6" class="outline-2">
<h2 id="sec-6">Exploring the Crowbar web interface</h2>
<div class="outline-text-2" id="text-6">
<p> On another machine on the same network as the machine running the now-installed appliance, start a browser, and navigate to <a href="http://192.168.124.10:3000/">http://192.168.124.10:3000/</a> (adjust the IP accordingly if you changed the <code>admin</code> network above). </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-crowbar-web-UI.png" style="width: 400px; margin: 0 auto; display: block;" alt="Crowbar web UI"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-crowbar-web-UI.png" alt="Crowbar web UI" style="width: 400px; margin: 0 auto; display: block;" /></a> </p>
</p></div>
</div>
</div>
<div id="outline-container-sec-7" class="outline-2">
<h2 id="sec-7">PXE-boot some other nodes</h2>
<div class="outline-text-2" id="text-7">
<p> Now simply PXE-boot your other nodes.  (Typically this requires PXE-booting to be enabled in the BIOS, and/or manually selecting it from the BIOS boot menu which is often accessible by hitting the F11 key or similar during boot.) </p>
<p> This will run a small inventory ramdisk image on each one to detect its hardware and report the discovery back to Crowbar, without touching the node&#8217;s local disk(s).  Each node will then appear in the Crowbar web UI, and sit in an idle loop whilst awaiting task allocation via Crowbar: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-node1-discovered.png" style="width: 400px; margin: 0 auto; display: block;" alt="Crowbar web UI with new node discovered"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-node1-discovered.png" alt="Crowbar web UI with new node discovered" style="width: 400px; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> Clicking on that node will show the results of the automatic hardware inventorying, and give us the option to allocate the node: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-view-node1.png" style="width: 400px; margin: 0 auto; display: block;" alt="viewing the newly discovered node in Crowbar's web UI"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-view-node1.png" alt="viewing the newly discovered node in Crowbar's web UI" style="width: 400px; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> When editing the node, we can give it a more human-friendly alias (e.g. <code>node1</code>), and then click Allocate to install a minimal SLES OS: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-edit-node1.png" style="width: 400px; margin: 0 auto; display: block;" alt="editing the newly discovered node in Crowbar's web UI"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-edit-node1.png" alt="editing the newly discovered node in Crowbar's web UI" style="width: 400px; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> A full OS will be automatically installed on the node via <a href="http://doc.opensuse.org/projects/autoyast/">AutoYaST</a>: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-autoyast-installation.png" style="width: 400px; margin: 0 auto; display: block;" alt="autoyast installation in progress"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-autoyast-installation.png" alt="autoyast installation in progress" style="width: 400px; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> When OS installation has finished, the console looks like this: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-autoyast-complete.png" style="width: 400px; margin: 0 auto; display: block;" alt="autoyast installation completed"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-autoyast-complete.png" alt="autoyast installation completed" style="width: 400px; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> and then the node turns green in the web UI indicating that it&#8217;s ready to have roles assigned to it: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-node1-ready.png" style="width: 400px; margin: 0 auto; display: block;" alt="Crowbar's web UI showing node1 as ready"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-node1-ready.png" alt="Crowbar's web UI showing node1 as ready" style="width: 400px; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> Multiple nodes can be installed via PXE/AutoYaST at the same time. </p>
</div>
</div>
<div id="outline-container-sec-8" class="outline-2">
<h2 id="sec-8">Deploying OpenStack via Crowbar barclamps</h2>
<div class="outline-text-2" id="text-8">
<p> By this point you should have at least two freshly-installed nodes managed by Crowbar (excluding the admin node itself which Crowbar runs on), in which case you are ready to deploy OpenStack via Crowbar&#8217;s barclamps, which can be found via the <code>Barclamps</code> drop-down in Crowbar&#8217;s web interface: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-show-barclamps.png" style="width: 400px; margin: 0 auto; display: block;" alt="navigating to the OpenStack barclamps in Crowbar's web UI"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-show-barclamps.png" alt="navigating to the OpenStack barclamps in Crowbar's web UI" style="width: 400px; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> This process is relatively straightforward, and a full explanation can be found in <a href="https://www.suse.com/documentation/suse-cloud4/book_cloud_deploy/data/cha_depl_ostack.html">the corresponding chapter of the SUSE Cloud 4 Deployment Guide</a>. </p>
<p> However, it is also possible to automate the whole deployment from this point on, using Crowbar&#8217;s <code>batch</code> subcommand and an appropriately crafted <code>.yaml</code> file.  There are three sample <code>.yaml</code> files in <code>/root</code> on the admin node.  The simplest configuration reflected by these three files is <code>simple-cloud.yaml</code>, which assumes a single controller node and a single compute node, with aliases <code>controller1</code> and <code>compute1</code> respectively: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-simple-cloud-dashboard.png" style="width: 400px; margin: 0 auto; display: block;" alt="simple 2-node cloud scenario shown by Crowbar's UI"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-simple-cloud-dashboard.png" alt="simple 2-node cloud scenario shown by Crowbar's UI" style="width: 400px; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> In this case, assuming your nodes are given the above aliases, you could set up the entire OpenStack cloud with this single command run as <code>root</code> on the admin node: </p>
<pre class="brush: bash; title: ; notranslate">
crowbar batch --timeout 1800 build simple-cloud.yaml
</pre>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-batch-build-database.png" style="width: 400px; margin: 0 auto; display: block;" alt="starting crowbar batch build"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-batch-build-database.png" alt="starting crowbar batch build" style="width: 400px; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> It takes a while to apply all the barclamps, as can be seen from the timestamps whilst it&#8217;s running: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-batch-build-cinder.png" style="width: 400px; margin: 0 auto; display: block;" alt="crowbar batch build on cinder"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-batch-build-cinder.png" alt="crowbar batch build on cinder" style="width: 400px; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> (The other two sample <code>.yaml</code> files are for a highly available control plane which assumes you have three nodes aliased <code>controller1</code>, <code>controller2</code>, and <code>compute1</code>.) </p>
<p> Once the barclamps are all applied, they should show as green in the Crowbar UI view: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-barclamps-green.png" style="width: 400px; margin: 0 auto; display: block;" alt="Crowbar UI showing barclamps successfully applied"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-barclamps-green.png" alt="Crowbar UI showing barclamps successfully applied" style="width: 400px; margin: 0 auto; display: block;" /></a> </p>
</p></div>
</div>
</div>
<div id="outline-container-sec-9" class="outline-2">
<h2 id="sec-9">Exploring OpenStack</h2>
<div class="outline-text-2" id="text-9">
<p> From the main Nodes dashboard in the Crowbar web UI, click the <code>controller1</code> node (or whichever one you deployed OpenStack&#8217;s Dashboard to), and you will see a couple of links to the OpenStack Dashboard (a.k.a &#8220;Horizon&#8221;): </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-link-to-horizon.png" style="width: 400px; margin: 0 auto; display: block;" alt="Crowbar UI showing barclamps successfully applied"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-link-to-horizon.png" alt="Crowbar UI showing barclamps successfully applied" style="width: 400px; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> Click on <code>OpenStack Dashboard (admin)</code> and it will take you to the OpenStack Dashboard, where you can log in as the <code>admin</code> user with a password of (by default) <code>crowbar</code>: </p>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-horizon-login.png" style="width: 400px; margin: 0 auto; display: block;" alt="OpenStack Dashboard login page"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-horizon-login.png" alt="OpenStack Dashboard login page" style="width: 400px; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<div class="figure">
<p><a href="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-horizon.png" style="width: 400px; margin: 0 auto; display: block;" alt="OpenStack Dashboard compute overview page"><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/12/wpid-horizon.png" alt="OpenStack Dashboard compute overview page" style="width: 400px; margin: 0 auto; display: block;" /></a> </p>
</p></div>
<p> Congratulations!  You have set up a full OpenStack cloud from scratch! Now you can start reading the SUSE Cloud <a href="https://www.suse.com/documentation/suse-cloud4/book_cloud_admin/data/book_cloud_admin.html">Admin</a> and <a href="https://www.suse.com/documentation/suse-cloud4/book_cloud_user/data/book_cloud_user.html">End User</a> guides to learn more about how to use OpenStack. </p>
</div>
</div>
<div id="outline-container-sec-10" class="outline-2">
<h2 id="sec-10">Support</h2>
<div class="outline-text-2" id="text-10">
<p> Whilst this bootable appliance is partially based on unreleased, unsupported code, we are still very interested to hear feedback from our customers and partners.  So while we (obviously!) cannot offer unlimited free support for it, if you post any questions / issues to the <a href="https://forums.suse.com/forumdisplay.php?65-SUSE-Cloud">SUSE Cloud web forum</a>, we will try to respond on a best-effort basis.  (And of course full commercial support for the <b>released</b> version of SUSE Cloud is <a href="https://www.suse.com/products/suse-cloud/">available</a> if you want it 😉 ) </p>
<p> As we say in the SUSE world, have a lot of fun! </p>
</div>
</div>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2014%2F12%2F11%2Fsusecon-usb-stick-howto%2F&#038;title=How%20to%20build%20an%20OpenStack%20cloud%20from%20SUSEcon%E2%80%99s%20free%20USB%20stick%20handouts" data-a2a-url="https://blog.adamspiers.org/2014/12/11/susecon-usb-stick-howto/" data-a2a-title="How to build an OpenStack cloud from SUSEcon’s free USB stick handouts"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2014/12/11/susecon-usb-stick-howto/">How to build an OpenStack cloud from SUSEcon&#8217;s free USB stick handouts</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2014/12/11/susecon-usb-stick-howto/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>&#8220;Ruler of the Stack&#8221; competition, OpenStack summit, Paris</title>
		<link>https://blog.adamspiers.org/2014/11/05/ruler-of-the-stack/</link>
					<comments>https://blog.adamspiers.org/2014/11/05/ruler-of-the-stack/#comments</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Wed, 05 Nov 2014 18:32:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[competition]]></category>
		<category><![CDATA[Crowbar]]></category>
		<category><![CDATA[Intel]]></category>
		<category><![CDATA[kiwi]]></category>
		<category><![CDATA[obs]]></category>
		<category><![CDATA[OpenStack]]></category>
		<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[Paris]]></category>
		<guid isPermaLink="false">http://blog.adamspiers.org/?p=1154</guid>

					<description><![CDATA[<p>Today at the OpenStack summit here in Paris, we continued SUSE&#8217;s winning streak at the &#8220;Ruler of the Stack&#8221; competition 🙂 This time, the challenge from the OpenStack Foundation was to deploy an OpenStack cloud as quickly as possible which could withstand &#8220;attacks&#8221; such as one of the controller nodes being killed, and still keep [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2014/11/05/ruler-of-the-stack/">&#8220;Ruler of the Stack&#8221; competition, OpenStack summit, Paris</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> Today at the OpenStack summit here in Paris, we continued SUSE&#8217;s winning streak at <a href="https://communities.intel.com/community/itpeernetwork/datastack/blog/2014/05/11/prove-your-chops-rulethestack-at-openstack-summit">the &#8220;Ruler of the Stack&#8221; competition</a> <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> </p>
<div class="figure">
<p><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2014/11/wpid-ruler-of-the-stack2-25.jpg" alt="ruler-of-the-stack2-25.jpg" width="30%" style="float: right" /> </p>
</p></div>
<p> This time, <a href="https://communities.intel.com/community/itpeernetwork/datastack/blog/2014/11/02/another-chance-to-prove-your-chops-rulethestack-at-openstack-summit-paris">the challenge</a> from the OpenStack Foundation was to deploy an OpenStack cloud as quickly as possible which could withstand &#8220;attacks&#8221; such as one of the controller nodes being killed, and still keep the OpenStack services and VM instances functional. </p>
<p> It was considerably more complex than <a href="https://communities.intel.com/community/itpeernetwork/datastack/blog/2014/06/11/the-first-ruler-of-the-stack-from-openstack-summit">the challenge posed by Intel at the Atlanta summit in May</a> which my teammate Dirk Müller (pictured right) won, since now we needed a minimum of two controller nodes clustered together, two compute nodes, and some shared or replicated storage.  So this time an approach deploying to a single node via a &#8220;quickstart&#8221; script was not an option, and we knew it would take a lot longer than 3 minutes 14 seconds. </p>
<p> However as soon as I saw the rules I thought we had a good chance to win with <a href="http://suse.com/cloud">SUSE Cloud</a>, for four reasons: </p>
<ol class="org-ol">
<li>We already released <a href="https://www.suse.com/company/press/2014/5/suse-brings-high-availability-to-private-clouds.html">the capability to automatically deploy highly available OpenStack clouds back in May, as an update to SUSE Cloud 3</a>.<sup><a id="fnr.1" class="footref" href="#fn.1">1</a></sup>
</li>
<li>With <a href="https://en.opensuse.org/Portal:KIWI">openSUSE&#8217;s KIWI Image System</a> and the <a href="http://openbuildservice.org/">Open Build Service</a>, our ability to build custom appliance images of product packages for rapid deployment is excellent, as already proved by Dirk&#8217;s victory in Atlanta.  KIWI avoids costly reboots by using <a href="http://en.wikipedia.org/wiki/Kexec"><code>kexec</code></a>.
</li>
<li>I have been working hard the last couple of months on reducing the amount of manual interaction during deployment to the absolute minimum, and this challenge was a perfect use case for harnessing these new capabilities.<sup><a id="fnr.2" class="footref" href="#fn.2">2</a></sup>
</li>
<li>The solution had to work within a prescribed set of VLANs and IP subnets, and <a href="http://crowbar.github.io/">Crowbar</a> (the deployment technology embedded in SUSE Cloud) is unique amongst current OpenStack deployment tools for its very flexible approach to network configuration.
</li>
</ol>
<p> I worked with Dirk late in our hotel the night before, preparing and remotely testing two bootable USB images which were custom-built especially for the challenge: one for the Crowbar admin server, and one for the controller and compute nodes. </p>
<p> The clock was started when we booted the first node for installation, and stopped when we declared the nodes ready for stress-testing by the judges.  It took us 53 minutes to prepare 6 servers: two admin servers (one as standby), two controllers, and two compute nodes running the KVM hypervisor.<sup><a id="fnr.3" class="footref" href="#fn.3">3</a></sup>  However we lost ~15 minutes simply through not realising that plugging a USB device directly into the server is far more performant than presenting virtual media through the remote console!  And there were several other optimizations we didn&#8217;t have time to make, so I think in future we could manage the whole thing under 30 minutes. </p>
<p> However the exercise was a lot of fun and also highlighted several areas where we can make the product better. </p>
<p> At least three other well-known combinations of OpenStack distribution and deployment tools were used by other competitors.  No-one else managed to finish deploying a cloud, so we don&#8217;t know how they would have fared against the HA tests.  Perhaps everyone was too distracted by all the awesome sessions going on at the same time <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> </p>
<p> I have to send a huge thank-you to Dirk whose expertise in several areas, especially building custom appliances for rapid deployment, was a massive help.  Also to Bernhard, Tom, and several other members of our kick-ass SUSE Cloud engineering team <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" />  And of course to Intel for arranging a really fun challenge.  I&#8217;m sure next time they&#8217;ll think of some great new ways to stretch our brains! </p>
<div id="footnotes">
<h2 class="footnotes">Footnotes: </h2>
<div id="text-footnotes">
<div class="footdef"><sup><a id="fn.1" class="footnum" href="#fnr.1">1</a></sup> </p>
<p class="footpara"> Automating deployment of an HA cloud presented a lot of architectural and engineering challenges, and I&#8217;m painfully aware that I still owe the OpenStack and Chef communities a long overdue blog post on this, as well as more information about <a href="https://github.com/crowbar/barclamp-pacemaker/">the code on github</a>. </p>
</div>
<div class="footdef"><sup><a id="fn.2" class="footnum" href="#fnr.2">2</a></sup> </p>
<p class="footpara"> The result is a virtualized Vagrant environment can <a href="https://github.com/SUSE-Cloud/suse-cloud-vagrant/tree/master/demos/HA/">deploy a fully HA environment in VMs from a simple one-line command</a>!  It is intended to be used by anyone who wants to quickly deploy/demo/test SUSE Cloud: developers, Sales Engineers, partners, and customers alike.  I also needed it for the hands-on workshop I co-presented with Florian Haas of <a href="http://www.hastexo.com/">Hastexo</a> fame (<a href="http://fghaas.github.io/openstacksummit2014-paris-automateddeployment">slides</a> and <a href="http://youtu.be/1ZdwIFPyMIs">video</a> now available), and also for an <a href="https://susecon2014.smarteventscloud.com/connect/sessionDetail.ww?SESSION_ID=7695">upcoming workshop</a> at <a href="http://www.susecon.com/">SUSEcon</a>. </p>
</div>
<div class="footdef"><sup><a id="fn.3" class="footnum" href="#fnr.3">3</a></sup> </p>
<p class="footpara"> Once the nodes were registered in Crowbar, we fed <a href="https://github.com/aspiers/suse-cloud-vagrant/blob/intel-ruler/kiwi/cloud-admin/source/root/root/NFS.yaml">a simple YAML file</a> into the new <a href="https://github.com/crowbar/barclamp-crowbar/pull/1147"><code>crowbar batch build</code> command</a> and it built the full cluster of OpenStack services in ~20 minutes. </p>
</div>
</div>
</div>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2014%2F11%2F05%2Fruler-of-the-stack%2F&#038;title=%E2%80%9CRuler%20of%20the%20Stack%E2%80%9D%20competition%2C%20OpenStack%20summit%2C%20Paris" data-a2a-url="https://blog.adamspiers.org/2014/11/05/ruler-of-the-stack/" data-a2a-title="“Ruler of the Stack” competition, OpenStack summit, Paris"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2014/11/05/ruler-of-the-stack/">&#8220;Ruler of the Stack&#8221; competition, OpenStack summit, Paris</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2014/11/05/ruler-of-the-stack/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>OpenStack Paris workshop: Automated Deployment of an HA Cloud</title>
		<link>https://blog.adamspiers.org/2014/11/01/openstack-paris-ha-workshop/</link>
					<comments>https://blog.adamspiers.org/2014/11/01/openstack-paris-ha-workshop/#respond</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Sat, 01 Nov 2014 18:39:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[OpenStack]]></category>
		<category><![CDATA[Paris]]></category>
		<category><![CDATA[suse]]></category>
		<category><![CDATA[Vagrant]]></category>
		<guid isPermaLink="false">http://blog.adamspiers.org/?p=1152</guid>

					<description><![CDATA[<p>6 months after its debut in Atlanta, the HA workshop happening again in Paris, this Monday (16:20, Room 241)! If you plan on attending and didn&#8217;t already see Florian&#8217;s blog post, please get downloading and installing the prerequisite files quick, because downloading them over hotel or conference wifi is likely to be painful. (N.B. Unless [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2014/11/01/openstack-paris-ha-workshop/">OpenStack Paris workshop: Automated Deployment of an HA Cloud</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> 6 months after <a href="https://github.com/aspiers/openstacksummit2014-atlanta">its debut in Atlanta</a>, the HA workshop happening again in Paris, this Monday (<a href="http://sched.co/1qePKkc">16:20, Room 241</a>)!  If you plan on attending and didn&#8217;t already see <a href="https://www.hastexo.com/resources/presentations/automated-deployment-highly-available-openstack-cloud-0">Florian&#8217;s blog post</a>, please get downloading and installing <a href="https://github.com/SUSE-Cloud/suse-cloud-vagrant/blob/master/docs/prerequisites.md">the prerequisite files</a> quick, because downloading them over hotel or conference wifi is likely to be painful.  (N.B. Unless you have a really strong reason not to, please go with <a href="https://github.com/SUSE-Cloud/suse-cloud-vagrant/blob/master/docs/prerequisites.md#hypervisor">the VirtualBox option</a>, because there are more <a href="https://github.com/SUSE-Cloud/suse-cloud-vagrant/blob/master/docs/vagrant-libvirt.md">pitfalls when using KVM+libvirt</a>.) </p>
<p> However if you&#8217;re already on the way to Paris, don&#8217;t despair, because we&#8217;ll also do our best to make the files available at the SUSE booth. And failing that, you can still just turn up, enjoy the show, and then try the hands-on exercise any time later at your own leisure! </p>
<p> In case you have no idea what I&#8217;m talking about, here&#8217;s some brief history: </p>
<p> Back before the last OpenStack summit in Atlanta in May, I managed to persuade <a href="http://www.hastexo.com/who/florian">Florian Haas</a> to join me in an endeavour which some might view as slightly insane: run a <a href="https://github.com/aspiers/openstacksummit2014-atlanta">90 minute hands-on workshop</a> in which we&#8217;d have every attendee build a Highly Available OpenStack cloud on their laptop, <i>from scratch</i>. </p>
<p> With so many moving parts and a vast range of different hardware involved, it certainly wasn&#8217;t plain sailing, but by the power of <a href="https://www.vagrantup.com/">Vagrant</a> and VirtualBox, I think overall it was a success. </p>
<p> Since then, we&#8217;ve been working extremely hard to improve the workshop materials based on lessons learnt last time.  So what&#8217;s new?  Well, firstly the workshop environment has been upgraded from Havana Icehouse (<a href="https://www.suse.com/products/suse-cloud/">SUSE Cloud 4</a> vs. version 3 in May), and quite a lot of polish has been applied, since in May the HA code was still relatively new. </p>
<p> Secondly, we&#8217;ve added support for building the cloud using KVM+libvirt (although <a href="https://github.com/SUSE-Cloud/suse-cloud-vagrant/blob/master/docs/prerequisites.md#hypervisor">VirtualBox is still recommended for a smoother ride</a>). </p>
<p> Thirdly, the documentation is way more comprehensive, and should help you avoid many common pitfalls. </p>
<p> Hope to see you at the workshop, and please come and say hello to us at the SUSE booth! </p>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2014%2F11%2F01%2Fopenstack-paris-ha-workshop%2F&#038;title=OpenStack%20Paris%20workshop%3A%20Automated%20Deployment%20of%20an%20HA%20Cloud" data-a2a-url="https://blog.adamspiers.org/2014/11/01/openstack-paris-ha-workshop/" data-a2a-title="OpenStack Paris workshop: Automated Deployment of an HA Cloud"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2014/11/01/openstack-paris-ha-workshop/">OpenStack Paris workshop: Automated Deployment of an HA Cloud</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2014/11/01/openstack-paris-ha-workshop/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to invite groups of friends to a Facebook event</title>
		<link>https://blog.adamspiers.org/2013/11/06/facebook-batch-invites/</link>
					<comments>https://blog.adamspiers.org/2013/11/06/facebook-batch-invites/#comments</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Wed, 06 Nov 2013 18:05:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[friends]]></category>
		<category><![CDATA[invites]]></category>
		<category><![CDATA[javascript]]></category>
		<guid isPermaLink="false">http://blog.adamspiers.org/?p=1094</guid>

					<description><![CDATA[<p>Facebook goes some way towards making it easy for you to invite groups of friends to an event, but it still requires a mouse click for each person you want to invite. If you have a friend list containing more than a handful of people, this rapidly gets tedious. Don&#8217;t worry though! Here&#8217;s a way [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2013/11/06/facebook-batch-invites/">How to invite groups of friends to a Facebook event</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> Facebook goes some way towards making it easy for you to invite groups of friends to an event, but it still requires a mouse click for each person you want to invite.  If you have a friend list containing more than a handful of people, this rapidly gets tedious.  Don&#8217;t worry though!  Here&#8217;s a way to select the whole list in one go. </p>
<p><span id="more-1094"></span> <!--break--></p>
<p> <b>Note:</b> <a href="https://www.facebook.com/help/202545109787461">Facebook imposes a maximum of 500 invites per person</a>! </p>
<ol class="org-ol">
<li>Open the event in Firefox or Google Chrome or Chromium.</li>
<li>Click on the &#8220;Invite friends&#8221; button.</li>
<li>Select the list of friends you want to invite.  This can be any of the displayed lists, whether it&#8217;s one which you created by hand, or one which Facebook generated automatically for you (e.g. friends who live in your home town).</li>
<li>Scroll all the way to the bottom of the list, to ensure that all friends on the list are visible on the page.  (If the list is long</li>
<li>Open the JavaScript console.  In Chrome and Chromium, this is accessed via the drop-down menu icon near the top right of the browser window, by clicking &#8220;Tools&#8221; and then &#8220;JavaScript Console&#8221;. In Firefox, it&#8217;s via the Tools menu, and then &#8220;Web Developer&#8221; and &#8220;Web Console&#8221;.</li>
<li>
<p> Copy and paste these two lines of JavaScript in the console which pops up, and press <code>Enter</code>. </p>
<pre class="brush: jscript; title: ; notranslate">
checkboxes = $x(&#039;//a&#x5B;contains(@class,&quot;_1pu4&quot;) and @aria-checked!=&quot;true&quot;]&#039;);
for (i in checkboxes) { checkboxes&#x5B;i].click() }
</pre>
</li>
<li>Now wait a minute or two! It can be <b>REALLY</b> slow to update, especially if you are inviting a lot of people.</li>
<li>All the displayed friends will now be selected.  You can now click the &#8220;Submit&#8221; button to send the invites!</li>
</ol>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2013%2F11%2F06%2Ffacebook-batch-invites%2F&#038;title=How%20to%20invite%20groups%20of%20friends%20to%20a%20Facebook%20event" data-a2a-url="https://blog.adamspiers.org/2013/11/06/facebook-batch-invites/" data-a2a-title="How to invite groups of friends to a Facebook event"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2013/11/06/facebook-batch-invites/">How to invite groups of friends to a Facebook event</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2013/11/06/facebook-batch-invites/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>more uses for git notes, and hidden treasures in Gerrit</title>
		<link>https://blog.adamspiers.org/2013/10/02/more-uses-for-git-notes/</link>
					<comments>https://blog.adamspiers.org/2013/10/02/more-uses-for-git-notes/#comments</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Wed, 02 Oct 2013 13:05:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[OpenStack]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[version control]]></category>
		<guid isPermaLink="false">http://blog.adamspiers.org/?p=1028</guid>

					<description><![CDATA[<p>I recently blogged about some tools I wrote which harness the notes feature of git to help with the process of porting commits from one branch to another. Since then I&#8217;ve discovered a couple more consumers of this functionality which are pretty interesting: palaver, and Gerrit. palaver It seems the tireless Mark McLoughlin, one of [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2013/10/02/more-uses-for-git-notes/">more uses for git notes, and hidden treasures in Gerrit</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> I <a href="http://blog.adamspiers.org/easier-upstreaming-with-git/">recently blogged about some tools I wrote</a> which harness the <a href="https://www.kernel.org/pub/software/scm/git/docs/git-notes.html"><code>notes</code></a> feature of git to help with the process of porting commits from one branch to another.  Since then I&#8217;ve discovered a couple more consumers of this functionality which are pretty interesting: <code>palaver</code>, and Gerrit. </p>
<p><span id="more-1028"></span></p>
<div id="outline-container-sec-1" class="outline-2">
<h2 id="sec-1">palaver</h2>
<div class="outline-text-2" id="text-1">
<p> It seems the tireless <a href="https://github.com/markmc">Mark McLoughlin</a>, one of the leading lights of <a href="http://openstack.org/">the OpenStack project</a>, was already thinking along similar lines, and wrote a tool called <a href="https://github.com/markmc/palaver/">palaver</a>, which also aims to streamline the porting process, and also uses <code>git notes</code> to persist state pertaining to backporting projects.  Upon first glance, the main differences between our tools seem to be as follows: </p>
<ul class="org-ul">
<li><a href="https://github.com/aspiers/git-config/blob/master/bin/git-cherry-menu"><code>git-cherry-menu</code></a> is a slightly overgrown shell-script (yuk), whereas <code>palaver</code> is Python (yay).
</li>
<li><code>palaver</code> has a nice CLI with numerous non-interactive sub-commands like <code>palaver list merged</code>, and <code>palaver review</code> which provides an interactive mode.  <code>git-cherry-menu</code> only offers an interactive mode (which is very similar in concept to <code>palaver     review</code>); for non-interactive querying of the current state, you have to use a separate command <a href="https://github.com/aspiers/git-config/blob/master/bin/git-icing"><code>git-icing</code></a>.  Personally I prefer <code>palaver</code>&#8216;s unified approach to UI design, even though it doesn&#8217;t yet have the pretty ANSI colour-coding of <code>git-icing</code> and <code>git-cherry-menu</code>.
</li>
<li>Since <code>git-icing</code> wraps around <a href="https://www.kernel.org/pub/software/scm/git/docs/git-cherry.html"><code>git cherry</code></a>, it can automatically detect some (but not all) commits which have already been ported to the target branch.  As the name suggests, <code>git-cherry-menu</code> enables cherry-picking of commits, whereas that&#8217;s still on the TODO list for <code>palaver</code>.
</li>
<li><code>palaver</code> persists state by writing notes which are JSON blobs, whereas <code>git-cherry-menu</code> uses plain text where lines beginning with <code>skip:</code> are treated specially.  Not much difference here: obviously JSON allows more sophisticated structuring of metadata, but has the disadvantage of being less readable if you view the notes branch via standard git tools such as <code>git log</code> or <code>gitk</code>.
</li>
<li><code>palaver</code> &#8220;manually&#8221; classifies commits into the following states: <code>pass</code> / <code>defer</code> / <code>pick</code> / <code>proposed</code> / <code>merged</code>, whereas my tools have fewer &#8220;manual&#8221; states &#8211; conceptually just <code>skip</code> and <code>todo</code>. <code>merged</code> is either automatically detected via <code>git cherry</code>, or manually flagged via a <code>skip</code>.  I&#8217;d say my approach is marginally uglier but the automatic detection is quite a big advantage.
</li>
<li><a href="https://github.com/aspiers/git-config/blob/master/bin/git-rnotes">git-rnotes</a> allows merging of someone else&#8217;s notes.  That&#8217;s also on     <code>palaver</code>&#8216;s TODO list.
</li>
</ul>
<p> Perhaps the best way forward might be to port the remaining functionality which <code>git-icing</code> and <code>git-cherry-menu</code> offer to <code>palaver</code>, since the latter has a nicer interface, and is pure Python. None of this is rocket science, so hopefully it wouldn&#8217;t take too long. </p>
<p> It probably makes sense to keep <code>git-rnotes</code> separate, since it is a very simple shell-script which is useful for sharing any git notes, not just those generated during a commit porting project. </p>
</div>
</div>
<div id="outline-container-sec-2" class="outline-2">
<h2 id="sec-2">Gerrit review notes</h2>
<div class="outline-text-2" id="text-2">
<p> Secondly, it turns out that <a href="http://code.google.com/p/gerrit/">Gerrit</a> also uses <code>git-notes</code>, in order to annotate each reviewed change with a bunch of very useful metadata, and <a href="http://github.com/">GitHub</a> is clever enough to expose this metadata in its web UI, e.g. </p>
<div class="figure">
<p><img decoding="async" src="http://blog.adamspiers.org/wp-content/uploads/2013/10/wpid-github-notes.png" alt="screenshot of github web UI showing git notes" /> </p>
</p></div>
<p> In Gerrit 2.6 and newer, this functionality was <a href="http://comments.gmane.org/gmane.comp.version-control.repo/5157">moved out from the core</a> into a <a href="https://gerrit-review.googlesource.com/#/admin/projects/plugins/reviewnotes"><code>reviewnotes</code> plugin</a>.  As a result, AFAICS its documentation seems to be <a href="https://gerrit.googlesource.com/plugins/reviewnotes/%2B/master/src/main/resources/Documentation/refs-notes-review.md">buried inside a separate git repository</a> rather than <a href="http://gerrit-documentation.googlecode.com/svn/Documentation/2.5.2/refs-notes-review.html">exposed as a nice web page like it used to be</a>.  However, it&#8217;s very easy to use, and <a href="http://review.openstack.org/">OpenStack&#8217;s Gerrit instance</a> certainly has the feature enabled. </p>
<p> For example, simply <code>cd</code> into any OpenStack git repository you happen to have checked out (or <a href="https://github.com/openstack/nova">clone one</a> first if not).  Then type the following: </p>
<div class="org-src-container">
<pre class="src src-text">git fetch origin refs/notes/review:refs/notes/review
export GIT_NOTES_REF=refs/notes/review
git log
</pre>
</div>
<p> You&#8217;ll see that each non-merge commit now shows annotations like the ones in the image above, explaining how the commit made its way through the review process before getting merged by Jenkins.  Perhaps the most useful piece of data in the note is the link to the relevant review on <code>http://review.openstack.org</code>, so you can quickly navigate to it in your browser and review the er, review. </p>
<p> If you don&#8217;t want <code>git log</code> to default to showing the notes, you can omit the <code>export GIT_NOTES_REF</code>, and instead do: </p>
<div class="org-src-container">
<pre class="src src-text">git log --notes=refs/notes/review
</pre>
</div>
<p> If you don&#8217;t want to have to remember the slightly cryptic method for fetching notes, my <a href="https://github.com/aspiers/git-config/blob/master/bin/git-rnotes">git-rnotes</a> wrapper offers simpler syntax: </p>
<div class="org-src-container">
<pre class="src src-text">git rnotes fetch origin
</pre>
</div>
<p> However, this currently requires <code>GIT_NOTES_REF</code> to have the right value exported. </p>
</div>
</div>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2013%2F10%2F02%2Fmore-uses-for-git-notes%2F&#038;title=more%20uses%20for%20git%20notes%2C%20and%20hidden%20treasures%20in%20Gerrit" data-a2a-url="https://blog.adamspiers.org/2013/10/02/more-uses-for-git-notes/" data-a2a-title="more uses for git notes, and hidden treasures in Gerrit"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2013/10/02/more-uses-for-git-notes/">more uses for git notes, and hidden treasures in Gerrit</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2013/10/02/more-uses-for-git-notes/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Easier upstreaming / back-porting of patch series with git</title>
		<link>https://blog.adamspiers.org/2013/09/19/easier-upstreaming-with-git/</link>
					<comments>https://blog.adamspiers.org/2013/09/19/easier-upstreaming-with-git/#comments</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Thu, 19 Sep 2013 20:22:00 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[backporting]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[forward-porting]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[OpenStack]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[upstreaming]]></category>
		<category><![CDATA[version control]]></category>
		<guid isPermaLink="false">http://blog.adamspiers.org/?p=981</guid>

					<description><![CDATA[<p>Have you ever needed to port a selection of commits from one git branch to another, but without doing a full merge? This is a common challenge, e.g. forward-porting / upstreaming bugfixes from a stable release branch to a development branch, or back-porting features from a development branch to a stable release branch. Of course, [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2013/09/19/easier-upstreaming-with-git/">Easier upstreaming / back-porting of patch series with git</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> Have you ever needed to port a selection of commits from one <a href="http://git-scm.com/">git</a> branch to another, but without doing a full merge?  This is a common challenge, e.g. </p>
<ul class="org-ul">
<li>forward-porting / upstreaming bugfixes from a stable release branch to a development branch, or
</li>
<li>back-porting features from a development branch to a stable release branch.
</li>
</ul>
<p> Of course, git already goes quite some way to making this possible: </p>
<ul class="org-ul">
<li><a href="https://www.kernel.org/pub/software/scm/git/docs/git-cherry-pick.html"><code>git cherry-pick</code></a> can port individual commits, or even a range of commits (since git 1.7.2) from anywhere, into the current branch.
</li>
<li><a href="https://www.kernel.org/pub/software/scm/git/docs/git-cherry.html"><code>git cherry</code></a> can compare a branch with its upstream branch and find which commits have been upstreamed and which haven&#8217;t.  This command is particularly clever because, thanks to <a href="https://www.kernel.org/pub/software/scm/git/docs/git-patch-id.html"><code>git patch-id</code></a>, it can correctly spot when a commit has been upstreamed, even when the upstreaming process resulted in changes to the commit message, line numbers, or whitespace.
</li>
<li><a href="https://www.kernel.org/pub/software/scm/git/docs/git-rebase.html"><code>git rebase --onto</code></a> can transplant a contiguous series of commits onto another branch.
</li>
</ul>
<div id="outline-container-sec-1" class="outline-2">
<h2 id="sec-1">It&#8217;s not always that easy &#x2026;</h2>
<div class="outline-text-2" id="text-1">
<p> However, on the occasions when you need to sift through a larger number of commits on one branch, and port them to another branch, complications can arise: </p>
<ul class="org-ul">
<li>If cherry-picking a commit results in changes to its patch context, <code>git patch-id</code> will return a different SHA-1, and subsequent invocations of <code>git cherry</code> will incorrectly tell you that you haven&#8217;t yet ported that commit.
</li>
<li>If you mess something up in the middle of a <code>git rebase</code>, recovery can be awkward, and <code>git rebase --abort</code> will land you back at square one, undoing a lot of your hard work.
</li>
<li>If the porting process is big enough, it could take days or even weeks, so you need some way of reliably tracking which commits have already been ported and which still need porting.  In this case you may well want to adopt a divide-and-conquer approach by sharing out the porting workload between team-mates.
</li>
<li>The more the two branches have diverged, the more likely it is that conflicts will be encountered during cherry-picking.
</li>
<li>There may be commits within the range you are looking at which after reviewing, you decide should be excluded from the port, or at least porting them needs to be postponed to a later point.
</li>
</ul>
<p> It could be argued that all of these problems can be avoided with the right branch and release management workflows, and I don&#8217;t want to debate that in this post.  However, this is the real world, and sometimes it just happens that you have to deal with a porting task which is less than trivial.  Well, that happened to me and my team not so long ago, so I&#8217;m here to tell you that I have written and published some tools to solve these problems.  If that&#8217;s of interest, then read on! </p>
<p><span id="more-981"></span>
</div>
</div>
<div id="outline-container-sec-2" class="outline-2">
<h2 id="sec-2">Building tools around <code>git notes</code></h2>
<div class="outline-text-2" id="text-2">
<p> Since <code>git patch-id</code> doesn&#8217;t guarantee to return an SHA-1 which is stable enough for us to always depend on, we need some other way of reliably tracking which commits have been upstreamed, and where upstreamed commits came from.  It would also be useful to be able to mark selected commits as <i>blacklisted</i>, i.e. permanently excluded from the current porting process, or at least as <i>deferred</i>, i.e. <i>temporarily</i> excluded. </p>
<p> Of course, we could do that simply by maintaining an out-of-band text file somewhere outside the repositories in question, but that doesn&#8217;t integrate at all with existing git workflows.  Whilst pondering these challenges, I discovered a little-known and seldom-used feature of git, which is the ability to attach arbitrary text as notes on a given commit, via the <a href="https://www.kernel.org/pub/software/scm/git/docs/git-notes.html"><code>git notes</code></a> command.  &#8220;This sounds perfect!&#8221;, I thought, and actually as it turned out, it served as a pretty nice foundation for some higher-level tools which needed building: </p>
<ul class="org-ul">
<li><a href="https://github.com/aspiers/git-config/blob/master/bin/git-icing">git-icing</a> &#8211; an &#8220;interface-candy&#8221; wrapper around git cherry which adds a splash of colour, and checks for specially formatted notes attached to commits which indicate that those commits are temporarily or permanently excluded from the upstreaming backlog
</li>
<li><a href="https://github.com/aspiers/git-config/blob/master/bin/git-cherry-menu">git-cherry-menu</a> &#8211; an interactive wrapper around <code>git-icing</code> and <code>git-notes</code> which makes it easy to cherry-pick and/or blacklist non-upstreamed commits
</li>
<li><a href="https://github.com/aspiers/git-config/blob/master/bin/git-rnotes">git-rnotes</a> &#8211; a wrapper around <code>git notes</code> which makes it easier to share notes to and from remote repositories
</li>
</ul>
</div>
</div>
<div id="outline-container-sec-3" class="outline-2">
<h2 id="sec-3">A &#8220;real world&#8221; example</h2>
<div class="outline-text-2" id="text-3">
<p> Let&#8217;s see how this works in practice, by pretending we need to backport a bunch of commits from <a href="https://github.com/openstack/nova">OpenStack Nova</a>&#8216;s <code>master</code> branch to its <code>stable/grizzly</code> release branch. </p>
<div class="org-src-container">
<pre class="src src-text">$ git clone git@github.com:openstack/nova.git
Cloning into 'nova'...
remote: Counting objects: 208984, done.
remote: Compressing objects: 100% (54766/54766), done.
remote: Total 208984 (delta 167220), reused 188334 (delta 148279)
Receiving objects: 100% (208984/208984), 124.50 MiB | 4.42 MiB/s, done.
Resolving deltas: 100% (167220/167220), done.
$ cd nova
</pre>
</div>
<p> Now, <code>master</code> has changed a <b>lot</b> since <code>grizzly</code> was released, so let&#8217;s keep our pretend project to a manageable size by only attempting to backport only commits which appeared in the first few days after the stable branch was established: </p>
<div class="org-src-container">
<pre class="src src-text">$ git describe $( git merge-base origin/stable/grizzly master )
2013.1.rc1
$ git show 2013.1.rc1 | head -n3
tag 2013.1.rc1
Tagger: Thierry Carrez <a href="mailto:thierry%40CENSORED.org">&lt;thierry@CENSORED.org&gt;</a>
Date:   Wed Mar 20 17:13:32 2013 +0100
</pre>
</div>
<p> OK, so <code>grizzly</code> was branched at the point where the first release candidate was tagged.  That makes sense.  Now let&#8217;s choose a point about 5 days later: </p>
<div class="org-src-container">
<pre class="src src-text">$ git rev-list --no-merges --before='25 March 2013' origin/stable/grizzly..master | head -n1
d6a9d38a0b7488dd77d3a01ae9c4171c271d7314
$ git tag to-backport d6a9d38
</pre>
</div>
<p> &#x2026; and get ready to backport commits from <code>to-backport</code> back into our local <code>stable/grizzly</code> branch: </p>
<div class="org-src-container">
<pre class="src src-text">$ git checkout stable/grizzly
Branch stable/grizzly set up to track remote branch stable/grizzly from origin.
Switched to a new branch 'stable/grizzly'
</pre>
</div>
<p> (If you are following along at home, your <code>rev-list</code> will give a different result, since <code>origin/stable/grizzly</code> will have changed since I wrote this.  Don&#8217;t worry &#8211; just copy the <code>git tag</code> command above verbatim, and create your local grizzly branch via <code>git checkout -b stable/grizzly fc9af8f0a9</code> so that it points to the same place mind did when writing this article.) </p>
<p> At this point, two quick clarifications are needed, because things can get a bit confusing. </p>
</div>
</div>
<div id="outline-container-sec-4" class="outline-2">
<h2 id="sec-4">A quick aside: some observations on terminology</h2>
<div class="outline-text-2" id="text-4">
<p> Firstly, if you read the <a href="https://www.kernel.org/pub/software/scm/git/docs/git-cherry.html"><code>git cherry</code> man page</a> or <code>-h</code> usage text, it is described as a tool to &#8220;find commits not merged upstream&#8221;, with the expectation that you would cherry-pick the commits it finds <i>onto</i> the upstream branch.  But if you happen to be backporting, then the cherry-picking will happen in the <i>opposite</i> direction, so the &#8220;upstream&#8221; referred to by the man page is actually the real downstream, and vice-versa.  Confused yet?  If so, wherever you read the word &#8220;upstream&#8221; in the <code>git cherry</code> documentation / help text, pretend that you actually read &#8220;target&#8221;.  Then just think of &#8220;source&#8221; and &#8220;target&#8221; branches, and remember that the process is always to look for commits in the source which are not yet in the target, and then cherry-pick those into the target (or decide that you don&#8217;t want to). The same applies for the <code>git icing</code> and <code>cherry-menu</code> help text. </p>
<p> Secondly, normally we&#8217;d be porting from one branch to another, not from a tag to a branch.  But in this artificially constructed scenario, it wouldn&#8217;t make much sense to create a <code>to-backport</code> <i>branch</i> pointing to <code>d6a9d38</code>, because that branch isn&#8217;t going to move; the only branch which will be changing is our <code>stable/grizzly</code> branch, as we cherry-pick stuff into it.  In other words, the target has to be a branch, because that will change during the cherry-picking, but the source can be a branch / tag / ref / commit SHA-1 &#x2026; basically anything which <a href="https://www.kernel.org/pub/software/scm/git/docs/git-rev-parse.html"><code>git rev-parse</code></a> understands. </p>
</div>
</div>
<div id="outline-container-sec-5" class="outline-2">
<h2 id="sec-5">How far behind?</h2>
<div class="outline-text-2" id="text-5">
<p> When embarking on a porting project, the first question is usually &#8220;how much work is this going to be?&#8221;  Fortunately <code>git-icing</code> is here to help! </p>
<p> (By the way, if you want to follow along with the below by trying this yourself, simply download the three scripts either from the links above or </p>
<div class="org-src-container">
<pre class="src src-text">git clone https://github.com/aspiers/git-config
</pre>
</div>
<p> and then copy them to any directory on your <code>$PATH</code>, making sure that they are executable.) </p>
<p> <code>git-icing</code> is designed to be invoked in exactly the same way as <code>git cherry</code>, but it has some extra options, including the convenient <code>--summary</code> option, and a verbosity parameter which controls which categories of commits are displayed: </p>
<div class="org-src-container">
<pre class="src src-text">$ git icing -h
usage: git icing [options] [git cherry args]

    -v, --verbosity [N]              Set verbosity level
    -s, --summary                    Show summary

first | verbosity | description of
field |   level   | classification
------+-----------+-----------------------------------------------------
  +   |     1     | not yet upstream
  !   |     1     | still needs to be upstreamed, tracked on a TODO list
  .?  |     1     | upstream *and* blacklisted?!
  !?  |     1     | upstream *and* marked as a TODO?
  .   |     2     | blacklisted - should not be pushed to this upstream
  ?   |     2     | not yet upstream, with unparseable note
  -   |     3     | already upstream
  #   |     3     | already upstream with an annotation note
</pre>
</div>
<p> (When you run that on a colour-capable terminal, you&#8217;ll also see that the classifications are also nicely colour-coded so that commits which require attention naturally capture your eye more than those which don&#8217;t.) </p>
<p> Let&#8217;s see all commits (basically a colour-coded version of what <code>git cherry</code> would show us), plus a summary of the status quo: </p>
<div class="org-src-container">
<pre class="src src-text">$ git icing -v3 --summary stable/grizzly to-backport
+ 348cfedfcadc377fa91029b932b2a93d16475822 nova-manage: remove redundant 'dest' args
+ f16534db22d63ce9f762ee6f7a9245126e9f28ed nova-manage: remove unused import
- 775e3b02b2afbf101db22b87a1c3b189d68532e1 Pass project id in quantum driver secgroup list
+ dbbbbf4ecb2c7b03ebb30fa11e077d35b2186cbb Enable tox use of site-packages for libvirt.
- 76844433f69a7c29ed4566ad34d7e9740feaf660 Add caching for ec2 mapping ids.
+ def5fa1e0e1c0426d973e4d8e3935c6eb18698dc Set version to 2013.2
+ 3aa80834e6aab2456f0f5229a63c2dcef007cb36 Change type of ssh_port option from Str to Int
+ 26aa01094a79939320d58f2fe2d5731f169987b1 Change arguments to volume_detach()
+ b52a2157bedba693c5da7dcb783b7a151769d6b1 Add placeholder migrations to allow backports.
+ 8d5159dd6dd36d6f3d1aadc1123574c5b0aa0614 Don't actually connect to libvirtd in unit tests.
+ 8cd5f862ac071023d5a7984f07513e5aa91f7d3d Bring back sexy colorized test results.
- 45e65d8c0301da689de1afcbc9f45756e71097ab Update instance network info cache to include vif_type.
- b8f9815c5ab61466009c0447f54abc4c309e4e3f nova-manage vm list fails looking 'instance_type'
+ c199fd6fa39311305b5b5d94c2e3732b826a6414 Remove outdated try except block in ec2 code
- 03a2463be8034ee4764ac97e8020fc3d3a32f1fd Make nova.virt.fake.FakeDriver useable in integration testing
- 67628c56caf9d84588a92448880ecdb33eea08b4 Fixes passing arbitrary conductor_api argument
+ e136de1aea8d1469465272942fa3d2769cbe3a80 xenapi: fix console for rescued instance
+ 5df18f6b915cf49ac8559274a631f1366eab00fd Add a comment to placeholder migrations.
- 9075069098e32b47bd5011e2653a23b61c18d4a3 Initialize compute manager before loading driver.
- 3801a4d2f4c59dbfda49131ddde22fcb3976d651 translate cinder BadRequest exception
- 132a0c1fd1eb127e393e5794ffa6d4a3a4950567 Don't log traceback on rpc timeout.
+ 81204d4020712cf5b5b368b75d934d637b2c001b Sync rpc from oslo-incubator.
+ f665d798234c19cccc148a178e94c3717ba8bd6e Sync everything from oslo-incubator.
- 12f7d6332a731421d6e2a190ac60828c1cf98910 Reset ec2 image cache between S3 tests.
+ 7a9ce26aaf03459a7ea367fbdb91d91626a1ee93 py2.6 doesn't support TextTestRunner resultclass
- 5908b60b0420f1ad528e56b0c147a330e9a1a5d6 Make _downsize_quota_delta() use stashed instance types
+ 91b9c208f0c6e21759c7828aa42b3216853be425 disable colorizer as it swallows fails
+ df0560f0353bc0837cc62cfaa9029d21d45c529e Imported Translations from Transifex
+ d6a9d38a0b7488dd77d3a01ae9c4171c271d7314 set up FakeLogger for root logger.

Summary
=======

11 commits processed:
    11 already upstream

18 commits remaining:
    18 not yet upstream

Progress: 11 / 29 commits (37%)
</pre>
</div>
<p> OK, not bad!  We didn&#8217;t even do any real work yet, we&#8217;re already 37% of the way through.  That&#8217;s because some of the commits (the ones prefixed by <code>-</code>) have already been cherry-picked into <code>stable/grizzly</code>.  Let&#8217;s prove this for the first commit prefixed by <code>-</code> in the above output, which was <code>775e3b02</code>: </p>
<div class="org-src-container">
<pre class="src src-text">$ git log -n1 775e3b02
commit 775e3b02b2afbf101db22b87a1c3b189d68532e1
Author: Kieran Spear <a href="mailto:kispear%40CENSORED.com">&lt;kispear@CENSORED.com&gt;</a>
Date:   Mon Mar 18 17:32:26 2013 +1100

    Pass project id in quantum driver secgroup list

    The quantum driver is always returning security groups from every tenant
    a user has access to, even when the "project" filter is supplied.

    Make sure we pass along the project value when we call
    quantum.list_security_groups() so it's properly filtered.

    Fixes bug 1155381.

    Change-Id: I682c66a1f3f9db18b5f9924a37b45c759ff259f7
</pre>
</div>
<p> This commit appears to be only on <code>master</code>, not on <code>stable/grizzly</code>: </p>
<div class="org-src-container">
<pre class="src src-text">$ git branch --all --contains 775e3b02
  master
  remotes/origin/HEAD -&gt; origin/master
  remotes/origin/master
</pre>
</div>
<p> Let&#8217;s try to find the commit which cherry-picked it into <code>stable/grizzly</code>: </p>
<div class="org-src-container">
<pre class="src src-text">$ git log --format=fuller --no-merges --grep='Pass project id' stable/grizzly
commit 989435822e5841bc1355e75bbdb003b10a3baf58
Author:     Kieran Spear <a href="mailto:kispear%40CENSORED.com">&lt;kispear@CENSORED.com&gt;</a>
AuthorDate: Mon Mar 18 17:32:26 2013 +1100
Commit:     Chuck Short <a href="mailto:chuck.short%40CENSORED.com">&lt;chuck.short@CENSORED.com&gt;</a>
CommitDate: Tue Mar 26 10:09:40 2013 -0500

    Pass project id in quantum driver secgroup list

    The quantum driver is always returning security groups from every tenant
    a user has access to, even when the "project" filter is supplied.

    Make sure we pass along the project value when we call
    quantum.list_security_groups() so it's properly filtered.

    Fixes bug 1155381.

    Change-Id: I682c66a1f3f9db18b5f9924a37b45c759ff259f7
    (cherry picked from commit 775e3b02b2afbf101db22b87a1c3b189d68532e1)
$ git branch --all --contains 9894358
* stable/grizzly
  remotes/origin/stable/grizzly
</pre>
</div>
<p> There it is!  Notice that it was committed 6 days after RC1 was tagged, but it has the same <code>patch-id</code> as the original, even though the commit message/date and committer are all different: </p>
<div class="org-src-container">
<pre class="src src-text">$ git patch-id &lt; &lt;(git show 9894358)
42dd410cf36ad1c16ceb1bb7f6ed6e3f01cc28bf 989435822e5841bc1355e75bbdb003b10a3baf58
$ git patch-id &lt; &lt;(git show 775e3b02)
42dd410cf36ad1c16ceb1bb7f6ed6e3f01cc28bf 775e3b02b2afbf101db22b87a1c3b189d68532e1
</pre>
</div>
</div>
</div>
<div id="outline-container-sec-6" class="outline-2">
<h2 id="sec-6"><code>git cherry-menu</code> &#8211; let the picking commence</h2>
<div class="outline-text-2" id="text-6">
<p> Now we can actually start porting the remaining commits. <a href="https://github.com/aspiers/git-config/blob/master/bin/git-cherry-menu"><code>git-cherry-menu</code></a> provides an interactive interface to make this process less tedious: </p>
<div class="org-src-container">
<pre class="src src-text">$ git cherry-menu -h
usage: git [options] cherry-menu &lt;command&gt; [&lt;args&gt;...]
suggested options:

[... snipped ...]

&lt;command&gt; &lt;args&gt; are typically "git icing -v3" or "git cherry", but
can be anything which gives output in the same format.  This allows
more control over which commits constitute the upstreaming backlog,
e.g.

    git icing -v2 $upstream $downstream | grep ... &gt; tmpfile
    # Could edit tmpfile here if we want
    git-cherry-menu cat tmpfile

Provides an interactive wrapper around git-icing (or git cherry).  For
each commit provided on STDIN by COMMAND which has not yet been
upstreamed, asks the user whether they want to cherry-pick the commit,
blacklist it, or skip it.  After a successful cherry-pick, the source
commit will be automatically blacklisted if the patch-id changed.

You can quit the process at any time and safely re-run it later - it
will resume from where you left off.

Invoking icing with "-v2" ensures that previously blacklisted /
upstreamed commits are also processed.
</pre>
</div>
<p> Let&#8217;s give it a go &#x2026; </p>
<div class="org-src-container">
<pre class="src src-text">$ git cherry-menu git icing -v3 stable/grizzly to-backport
commit 348cfedfcadc377fa91029b932b2a93d16475822
Author: Zhiteng Huang <a href="mailto:zhiteng.huang%40CENSORED.com">&lt;zhiteng.huang@CENSORED.com&gt;</a>
Date:   Tue Feb 26 09:23:13 2013 +0800

    nova-manage: remove redundant 'dest' args

    Includes a hack to calculate 'dest' from the argument name. This hack is
    removed in a later commit.

    Change-Id: I60567ff232ab7699f3234b3bfc1618a17a648976

diff --git a/bin/nova-manage b/bin/nova-manage
index 0fde8ba..4919d88 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -127,10 +127,10 @@ def param2id(object_id):
 class VpnCommands(object):
     """Class for managing VPNs."""

-    @args('--project', dest="project_id", metavar='&lt;Project name&gt;',
+    @args('--project', dest='project_id', metavar='&lt;Project name&gt;',

[... snipped ...]

Cherry-pick / blacklist / skip 348cfedfca, or quit ?
</pre>
</div>
<p> It&#8217;s showing us the first commit in the porting backlog, and asking us to decide whether to cherry-pick it, blacklist it (i.e. permanently exclude it from the porting process), or defer the decision by skipping it and moving onto the next commit in backlog.  (<code>q</code> quits the whole process, of course.) </p>
<p> Let&#8217;s try cherry-picking it: </p>
<div class="org-src-container">
<pre class="src src-text">Cherry-pick / blacklist / skip 348cfedfca, or quit ? c

error: could not apply 348cfed... nova-manage: remove redundant 'dest' args
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add &lt;paths&gt;' or 'git rm &lt;paths&gt;'
hint: and commit the result with 'git commit'

Spawning a shell so you can fix; exit the shell when done.
$
</pre>
</div>
<p> Oh dear, this one&#8217;s going to need some further thought.  Let&#8217;s skip it for now: </p>
<div class="org-src-container">
<pre class="src src-text">$ git reset --hard
HEAD is now at ddb676d Merge "Typo: certicates=&gt;certificates in nova.conf"
$ exit
Warning: HEAD did not change; no action taken.
Press enter to continue ... 

-----------------------------------------------------------------------

commit f16534db22d63ce9f762ee6f7a9245126e9f28ed
Author: Zhiteng Huang <a href="mailto:zhiteng.huang%40CENSORED.com">&lt;zhiteng.huang@CENSORED.com&gt;</a>
Date:   Tue Feb 26 09:23:13 2013 +0800

    nova-manage: remove unused import

    Unused since commit 9ff3121b

    Change-Id: I76bb49669d1cdfc3bf5b1c20087b4bd77420cd91

diff --git a/bin/nova-manage b/bin/nova-manage
index 4919d88..e93c3d8 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -88,7 +88,6 @@ from nova.openstack.common import timeutils
 from nova import quota
 from nova.scheduler import rpcapi as scheduler_rpcapi
 from nova import servicegroup
-from nova import utils
 from nova import version

 CONF = cfg.CONF

Cherry-pick / blacklist / skip f16534db22, or quit ?
</pre>
</div>
<p> <code>cherry-menu</code> presents the next commit in the backlog, which in this case is removing an unused import from <code>bin/nova-manage</code>.  Sounds pretty straight-forward, so let&#8217;s cherry-pick: </p>
<div class="org-src-container">
<pre class="src src-text">Cherry-pick / blacklist / skip f16534db22, or quit ? c

[stable/grizzly 3f013e4] nova-manage: remove unused import
 Author: Zhiteng Huang <a href="mailto:zhiteng.huang%40CENSORED.com">&lt;zhiteng.huang@CENSORED.com&gt;</a>
 1 file changed, 1 deletion(-)
</pre>
</div>
<p> Looks like this worked fine.  The output continues: </p>
<div class="org-src-container">
<pre class="src src-text">-----------------------------------------------------------------------

Already upstream: 775e3b02b2 - Pass project id in quantum driver secgroup list
</pre>
</div>
<p> Here <code>cherry-menu</code> is telling us it automatically skipped over a commit which is already in our target branch.  The output continues with the next commit in the backlog, which we can also successfully pick: </p>
<div class="org-src-container">
<pre class="src src-text">commit dbbbbf4ecb2c7b03ebb30fa11e077d35b2186cbb
Author: Clark Boylan <a href="mailto:clark.boylan%40CENSORED.com">&lt;clark.boylan@CENSORED.com&gt;</a>
Date:   Thu Feb 7 21:39:31 2013 -0800

    Enable tox use of site-packages for libvirt.

    Enable the use of site-packages in tox which will allow the use of the
    system install of libvirt while testing.

    Hardcode the libvirt host UUID for tests that check this UUID when
    system libvirt is being used. Without this hardcoding eight tests
    would fail when using the system libvirt install.

    Partially fixes bug #1113181

    Change-Id: I59c5fbd45639962c0963298203c39759b6ca2d11

[... snipped ...]

Cherry-pick / blacklist / skip dbbbbf4ecb, or quit ? c

[stable/grizzly b4fdf14] Enable tox use of site-packages for libvirt.
 Author: Clark Boylan <a href="mailto:clark.boylan%40CENSORED.com">&lt;clark.boylan@CENSORED.com&gt;</a>
 2 files changed, 8 insertions(+)

-----------------------------------------------------------------------

Already upstream: 76844433f6 - Add caching for ec2 mapping ids.
commit def5fa1e0e1c0426d973e4d8e3935c6eb18698dc
Author: Thierry Carrez <a href="mailto:thierry%40CENSORED.org">&lt;thierry@CENSORED.org&gt;</a>
Date:   Wed Mar 20 16:21:48 2013 +0100

    Set version to 2013.2

    Open Havana development by setting version to 2013.2.

    Change-Id: I37917d28a1f9e0adc2fe3e382412ebc4ed0f3bee

diff --git a/setup.py b/setup.py
index fd968ee..e4bc7d4 100644
--- a/setup.py
+++ b/setup.py
@@ -25,7 +25,7 @@

 setuptools.setup(
       name=project,
-      version=common_setup.get_version(project, '2013.1'),
+      version=common_setup.get_version(project, '2013.2'),
       description='cloud computing fabric controller',
       author='OpenStack',
       author_email='nova@CENSORED.launchpad.net',

Cherry-pick / blacklist / skip def5fa1e0e, or quit ?
</pre>
</div>
<p> Now, obviously we don&#8217;t want to backport this version change, so let&#8217;s blacklist it in order to permanently excluded it from the porting backlog: </p>
<div class="org-src-container">
<pre class="src src-text">Cherry-pick / blacklist / skip def5fa1e0e, or quit ? b
</pre>
</div>
<p> At this point, your favourite <code>$EDITOR</code> will be launched via an invocation of <code>git notes edit</code>, and you&#8217;ll be presented with a text buffer which looks like this: </p>
<div class="org-src-container">
<pre class="src src-text">skip: all
XXX  (you can optionally change the "all" above to the name of the
XXX  upstream branch if you want to limit blacklisting to that upstream)

XXX  Enter your justification for blacklisting here or
XXX  remove the whole note to cancel blacklisting.

#
# Write/edit the notes for the following object:

# commit def5fa1e0e1c0426d973e4d8e3935c6eb18698dc
# Author: Thierry Carrez <a href="mailto:thierry%40CENSORED.org">&lt;thierry@CENSORED.org&gt;</a>
# Date:   Wed Mar 20 16:21:48 2013 +0100
#
#     Set version to 2013.2
#     
#     Open Havana development by setting version to 2013.2.
#     
#     Change-Id: I37917d28a1f9e0adc2fe3e382412ebc4ed0f3bee
#
#  setup.py | 2 +-
#  1 file changed, 1 insertion(+), 1 deletion(-)
</pre>
</div>
<p> At this point you should remove all the lines beginning <code>XXX</code>, and decide whether you want this commit to be blacklisted from <b>any</b> future porting operation.  If so, you can leave the <code>skip: all</code> line as is and simply save the buffer and quit the editor, although it&#8217;s best practice to also give a sentence or two justifying why you&#8217;re blacklisting the commit. </p>
<p> Alternatively you can change <code>all</code> to the name of the branch to which this commit should never be ported, which in this case is <code>stable/grizzly</code>.  It is also permitted to use Ruby regular expressions here, by surrounding the regexp with forward slashes, e.g. </p>
<div class="org-src-container">
<pre class="src src-text">skip: /stable/

It never makes sense to port version number changes back to
stable releases.
</pre>
</div>
<p> Once the editor has been quit, we see: </p>
<div class="org-src-container">
<pre class="src src-text">Blacklisted def5fa1e0e
Press enter to continue ...
</pre>
</div>
<p> Behind the scenes, <code>cherry-menu</code> has attached a note to this commit within the <code>refs/notes/upstreaming</code> namespace: </p>
<div class="org-src-container">
<pre class="src src-text">$ git notes --ref=upstreaming show def5fa
skip: all
</pre>
</div>
<p> and you can even see the complete history of your note-editing: </p>
<div class="org-src-container">
<pre class="src src-text">$ git log notes/upstreaming
commit ed6cf5fa75921f23088656b7a8d8a96faa9d769d
Author: Adam Spiers <a href="mailto:aspiers%40CENSORED.com">&lt;aspiers@CENSORED.com&gt;</a>
Date:   Fri Sep 20 15:59:04 2013 +0100

    Notes added by 'git notes edit'

commit c1f6ba13e643de4da354375b479470599f92b272
Author: Adam Spiers <a href="mailto:aspiers%40CENSORED.com">&lt;aspiers@CENSORED.com&gt;</a>
Date:   Fri Sep 20 15:44:15 2013 +0100

    Notes added by 'git notes add'

[... snipped ...]
</pre>
</div>
<p> After all this hard work, maybe it&#8217;s time for lunch.  We can safely quit <code>cherry-menu</code> via <code>Control-C</code> or <code>q</code>, and resume it later. Before tucking into a tasty sandwich, let&#8217;s quickly review our progress: </p>
<div class="org-src-container">
<pre class="src src-text">$ git icing -v3 -s stable/grizzly to-backport
+ 348cfedfcadc377fa91029b932b2a93d16475822 nova-manage: remove redundant 'dest' args
- f16534db22d63ce9f762ee6f7a9245126e9f28ed nova-manage: remove unused import
- 775e3b02b2afbf101db22b87a1c3b189d68532e1 Pass project id in quantum driver secgroup list
- dbbbbf4ecb2c7b03ebb30fa11e077d35b2186cbb Enable tox use of site-packages for libvirt.
- 76844433f69a7c29ed4566ad34d7e9740feaf660 Add caching for ec2 mapping ids.
. def5fa1e0e1c0426d973e4d8e3935c6eb18698dc Set version to 2013.2
+ 3aa80834e6aab2456f0f5229a63c2dcef007cb36 Change type of ssh_port option from Str to Int
+ 26aa01094a79939320d58f2fe2d5731f169987b1 Change arguments to volume_detach()

[... snipped ...]

Summary
=======

14 commits processed:
    13 already upstream
     1 blacklisted - should not be pushed to this upstream

15 commits remaining:
    15 not yet upstream

Progress: 14 / 29 commits (48%)
</pre>
</div>
<p> Wow, almost half-way!  Notice also how the prefix by <code>def5fa1</code> has changed to a period sign to indicate that it&#8217;s now blacklisted. </p>
<p> After lunch, we can resume the process: </p>
<div class="org-src-container">
<pre class="src src-text">$ git cherry-menu git icing -v3 stable/grizzly to-backport
commit 348cfedfcadc377fa91029b932b2a93d16475822
Author: Zhiteng Huang <a href="mailto:zhiteng.huang%40CENSORED.com">&lt;zhiteng.huang@CENSORED.com&gt;</a>
Date:   Tue Feb 26 09:23:13 2013 +0800

    nova-manage: remove redundant 'dest' args

[... snipped ...]

Cherry-pick / blacklist / skip 348cfedfca, or quit ?
</pre>
</div>
<p> This is the same commit which caused conflicts last time we tried to pick it.  Let&#8217;s officially postpone resolving conflicts by adding it to a &#8220;TODO&#8221; blacklist.  Press <code>b</code>, then as before, remove the <code>XXX</code>, and also replace the <code>skip: all</code> line with: </p>
<div class="org-src-container">
<pre class="src src-text">TODO: fix conflicts next week
</pre>
</div>
<div class="org-src-container">
<pre class="src src-text">Blacklisted 348cfedfca
Press enter to continue ... 

-----------------------------------------------------------------------

Already upstream: f16534db22 - nova-manage: remove unused import
Already upstream: 775e3b02b2 - Pass project id in quantum driver secgroup list
Already upstream: dbbbbf4ecb - Enable tox use of site-packages for libvirt.
Already upstream: 76844433f6 - Add caching for ec2 mapping ids.
Blacklisted: def5fa1e0e - Set version to 2013.2
commit 3aa80834e6aab2456f0f5229a63c2dcef007cb36
Author: Devananda van der Veen <a href="mailto:devananda.vdv%40CENSORED.com">&lt;devananda.vdv@CENSORED.com&gt;</a>
Date:   Wed Mar 20 09:19:44 2013 -0700

    Change type of ssh_port option from Str to Int

    The type of CONF option virtual_power_ssh_port was incorrectly defaulted
    to Str. This can cause Paramiko to raise when casting to %d.

    Fixes bug 1157824.

    Change-Id: I30ddd1ff0da45f8392085249f1bd2a539b201a7e
</pre>
</div>
<p> Now we are taken immediately to where we left off just before lunch, because <code>git-icing</code> automatically detected the cherry-picks we did earlier, and also that we blacklisted the 2013.2 version change commit. </p>
<p> If we run <code>git-icing</code> again, we&#8217;ll see that it understands the significance of the <code>TODO</code> attached to the first commit in the backlog: </p>
<div class="org-src-container">
<pre class="src src-text">$ git icing -v3 -s stable/grizzly to-backport                                                        
! 348cfedfcadc377fa91029b932b2a93d16475822 nova-manage: remove redundant 'dest' args
- f16534db22d63ce9f762ee6f7a9245126e9f28ed nova-manage: remove unused import
- 775e3b02b2afbf101db22b87a1c3b189d68532e1 Pass project id in quantum driver secgroup list

[... snipped ...]

Summary
=======

14 commits processed:
    13 already upstream
     1 blacklisted - should not be pushed to this upstream

15 commits remaining:
    14 not yet upstream
     1 still needs to be upstreamed, tracked on a TODO list

Progress: 14 / 29 commits (48%)
</pre>
</div>
<p> On subsequent invocations of <code>git cherry-menu</code>, it will offer the option of editing existing notes.  There is also an option to automatically skip any notes including the word <code>TODO</code>: </p>
<div class="org-src-container">
<pre class="src src-text">$ git cherry-menu -h
usage: git [&lt;options&gt;] cherry-menu &lt;command&gt; [&lt;args&gt;...]
suggested options:

[... snipped ...]

-c cherry-menu.skip-todos=true
      Skip commits which have notes including 'TODO'.  This allows
      unresolved upstreaming tasks to be tracked via an external
      issue tracker without getting in the way during repeated
      runs of cherry-menu.

[... snipped ...]
</pre>
</div>
<p> So that&#8217;s the majority of <code>cherry-menu</code>&#8216;s functionality explained. It&#8217;s not rocket science, just a quick hack of a shell-script, but it gets the job done pretty well. </p>
<p> There&#8217;s one more important feature I didn&#8217;t cover: if the <code>patch-id</code> changes during cherry-picking, <code>cherry-menu</code> will notice, and automatically add the old commit to the blacklist: </p>
<div class="org-src-container">
<pre class="src src-text">Cherry-pick / blacklist / skip 81204d4020, or quit ? c

[stable/grizzly 65cd526] Sync rpc from oslo-incubator.
 Author: Russell Bryant <a href="mailto:rbryant%40CENSORED.com">&lt;rbryant@CENSORED.com&gt;</a>
 4 files changed, 47 insertions(+), 21 deletions(-)
The git patch-id changed during cherry-picking.  This is normal when
the diff context changes or merge conflicts are resolved.
Blacklisted 81204d4020 so future runs won't attempt to duplicate the upstreaming.
</pre>
</div>
</div>
</div>
<div id="outline-container-sec-7" class="outline-2">
<h2 id="sec-7"><code>git rnotes</code> &#8211; sharing the fruits of your labours</h2>
<div class="outline-text-2" id="text-7">
<p> Maybe our project manager comes over and says &#8220;hey, we need those features backported to stable ASAP &#8211; I&#8217;ve asked Joe and Fred to help you out, OK?&#8221; </p>
<p> So far, all the work has happened in a local repository.  Of course we can push our updated <code>stable/grizzly</code> branch to a public repository somewhere, so that Joe and Fred can see what we already cherry-picked. But they&#8217;d be still missing some valuable meta-data, i.e. the git notes we created which mark which commits to exclude from porting, and why.  Unfortunately, git doesn&#8217;t yet natively provide a convenient way for pushing/pulling notes between repositories, because <a href="http://thread.gmane.org/gmane.comp.version-control.git/222644/focus%3D222812">the <code>refs/*</code> namespace hasn&#8217;t been sufficiently standardized yet</a>. To work around that, I wrote <a href="https://github.com/aspiers/git-config/blob/master/bin/git-rnotes"><code>git-rnotes</code></a> to avoid having to remember a slightly arcane sequence of git commands. </p>
<p> Usage is very simple, and mimics <code>git fetch/push/merge/pull</code>: </p>
<div class="org-src-container">
<pre class="src src-text">Usage: git-rnotes [options] SUBCOMMAND REMOTE
Options:
  -h, --help     Show this help and exit

Subcommands:

  fetch
  push
  merge
  pull
</pre>
</div>
<p> For example, if you have a remote called <code>public</code>: </p>
<div class="org-src-container">
<pre class="src src-text">export GIT_NOTES_REF=refs/notes/upstreaming
git rnotes push public
</pre>
</div>
<p> or if Joe has updated his notes and pushed them to <code>public</code> whilst you also updated yours, simply do a <code>pull</code>, which is equivalent to a <code>fetch</code> followed by a <code>merge</code>: </p>
<div class="org-src-container">
<pre class="src src-text">export GIT_NOTES_REF=refs/notes/upstreaming
git rnotes pull public
</pre>
</div>
</div>
</div>
<div id="outline-container-sec-8" class="outline-2">
<h2 id="sec-8">Wrapping up</h2>
<div class="outline-text-2" id="text-8">
<p> Sorry that was so long.  But hopefully you agree it&#8217;s relatively simple once you try it out.  I&#8217;d love to know if anyone finds this useful &#8211; if you do, please leave a comment below!  Of course pull requests against <a href="https://github.com/aspiers/git-config">my <code>git-config</code> repository</a> are always welcome. There are many other git-related hacks in that repository which you may also find useful. </p>
<p> Thanks for reading! </p>
</div>
</div>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2013%2F09%2F19%2Feasier-upstreaming-with-git%2F&#038;title=Easier%20upstreaming%20%2F%20back-porting%20of%20patch%20series%20with%20git" data-a2a-url="https://blog.adamspiers.org/2013/09/19/easier-upstreaming-with-git/" data-a2a-title="Easier upstreaming / back-porting of patch series with git"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2013/09/19/easier-upstreaming-with-git/">Easier upstreaming / back-porting of patch series with git</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2013/09/19/easier-upstreaming-with-git/feed/</wfw:commentRss>
			<slash:comments>15</slash:comments>
		
		
			</item>
		<item>
		<title>new music video: acoustic version of Jóga by Björk, with Emma Smith</title>
		<link>https://blog.adamspiers.org/2013/09/18/joga-acoustic-cover/</link>
					<comments>https://blog.adamspiers.org/2013/09/18/joga-acoustic-cover/#respond</comments>
		
		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Wed, 18 Sep 2013 12:20:07 +0000</pubDate>
				<category><![CDATA[front page]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[Bjork]]></category>
		<category><![CDATA[covers]]></category>
		<category><![CDATA[Emma Smith]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[Joga]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[kdenlive]]></category>
		<category><![CDATA[pop]]></category>
		<category><![CDATA[video]]></category>
		<guid isPermaLink="false">http://blog.adamspiers.org/?p=972</guid>

					<description><![CDATA[<p>I&#8217;m a long-time fan of Björk, and was recently lucky enough to snarf a spare ticket to a show here in London at the end of her Biophilia tour. It was a fairly insane show (in a good way), involving an all female Icelandic choir, a drummer, an organ, a musically aware lightning bolt generator, [&#8230;]</p>
<p>The post <a href="https://blog.adamspiers.org/2013/09/18/joga-acoustic-cover/">new music video: acoustic version of Jóga by Björk, with Emma Smith</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I&#8217;m a long-time fan of <a href="http://en.wikipedia.org/wiki/Bj%C3%B6rk">Björk</a>, and was recently lucky enough to snarf a spare ticket to a show here in London at the end of her <a href="http://en.wikipedia.org/wiki/Biophilia_Tour">Biophilia tour</a>.  It was a fairly insane show (in a good way), involving an all female Icelandic choir, a drummer, an organ, a musically aware lightning bolt generator, a pin-barrel harp, and <a href="http://en.wikipedia.org/wiki/David_Attenborough">David Attenborough</a> (obviously).  Really impressive to see how she&#8217;s still trail-blazing rather than just churning out the old favourites (although some of the latter were presented in imaginative new ways).</p>
<p>On a related note, back in February I revisited my old haunt the <a href="http://ram.ac.uk">Royal Academy of Music</a> to record/film a version of Björk&#8217;s famous tune <a href="http://en.wikipedia.org/wiki/J%C3%B3ga">Jóga</a>, arranged and sang by the amazing and consistently entertaining singer <a href="http://en.wikipedia.org/wiki/Bj%C3%B6rk">Emma Smith</a>.  Yesterday I finally finished the video editing (done with the awesome <a href="http://www.kdenlive.org/">Kdenlive</a> video editor which is <a href="http://en.wikipedia.org/wiki/Free_software">Free Software</a>), and here is the result.  Hope you enjoy it! </p>
<p><iframe width="640" height="480" src="//www.youtube.com/embed/ZlpAl-ni5KU" frameborder="0" allowfullscreen></iframe></p>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.adamspiers.org%2F2013%2F09%2F18%2Fjoga-acoustic-cover%2F&#038;title=new%20music%20video%3A%20acoustic%20version%20of%20J%C3%B3ga%20by%20Bj%C3%B6rk%2C%20with%20Emma%20Smith" data-a2a-url="https://blog.adamspiers.org/2013/09/18/joga-acoustic-cover/" data-a2a-title="new music video: acoustic version of Jóga by Björk, with Emma Smith"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a href="https://blog.adamspiers.org/2013/09/18/joga-acoustic-cover/">new music video: acoustic version of Jóga by Björk, with Emma Smith</a> appeared first on <a href="https://blog.adamspiers.org">Structured Procrastination</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.adamspiers.org/2013/09/18/joga-acoustic-cover/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
