tag:blogger.com,1999:blog-10113432198016145252024-03-12T20:55:30.556-07:00/var/log/lifelog Michael's log of lifeMichael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.comBlogger22125tag:blogger.com,1999:blog-1011343219801614525.post-39611918934363592662021-05-06T19:35:00.000-07:002021-05-06T19:36:56.880-07:00Building multiarchitecture aware containers<p>Multi-architecture is not something that most people think about - everyone assumes that the only architecture that counts is x86_64, but that's not the case!</p><p>In my job at <a href="https://www.redhat.com/">Red Hat</a> I care about making sure that software running on ppc64le, arm64 and s390x behaves just the same as it does on x86_64, which brings me to containers. Did you know that container images are architecture specific?</p><p>It makes sense, right? Containers contain software, and often software is architecture specific. When you pull down a container, you never specify an architecture to use. So how does that work? And more importantly to us developers, how do I ensure my containers are multiarch-aware and "just work" no matter which platform we are running on?</p><p>For the purposes of this post, I'm going to be using <a href="https://podman.io/">podman</a> and <a href="http://quay.io">quay.io</a>, but you could just as easily use docker and dockerhub. I much prefer the serviceless design of podman, but that's up to you.</p><p>[Aside: From here on in I'm going to use the term <i>amd64</i> in lieu of <i>x86_64</i>. You can read more about that <a href="https://askubuntu.com/questions/601553/what-is-the-difference-between-x86-64-amd64-and-64-bit#:~:text=x86_64%20is%20name%20of%20specific,released%20by%20Intel%20in%201999)." target="_blank">here</a>. Likewise you might be wondering why we use <i>arm64</i> instead of <i>aarch64</i>, you can read about <a href="https://stackoverflow.com/questions/31851611/differences-between-arm64-and-aarch64/47274698#47274698">that too</a>. And if that's not enough, here's a nice link on <a href="https://golang.org/doc/install/source#environment">golang architectures</a>]</p><h2 style="text-align: left;">A simple application we want to containerise</h2><p>To begin with, let's build a simple Flask python application. Something that is super trivial, but can demonstrate software running in a container. To that end, I present you <a href="https://github.com/mrda/moo-chop">moo-chop</a>. It just prints a hello world message in a random colour, like this:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCb_T1tjyoggfNgCzTFTSZ6EDhffCxJdMHyzdzl2h9nvgKpJkfe5iXza5tDHJ8csHVZMwYL_33y-KWc9eUvy9EXcnk3BTsY3kMIABv_10biDwfNyion2BXqMLJpAKDgHTPub7SZCbOlu3J/s611/HelloWorld.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="277" data-original-width="611" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCb_T1tjyoggfNgCzTFTSZ6EDhffCxJdMHyzdzl2h9nvgKpJkfe5iXza5tDHJ8csHVZMwYL_33y-KWc9eUvy9EXcnk3BTsY3kMIABv_10biDwfNyion2BXqMLJpAKDgHTPub7SZCbOlu3J/s320/HelloWorld.png" width="320" /></a></div><div><br /></div><div>We want to deploy this application via a container on any of {arm64, amd64, ppc64le, s390x}, so how do we do it?</div><div><br /></div><h2 style="text-align: left;">Setting up a container registry</h2><div><br /></div><div>Next we need to create an account on a container registry, and create a repository. Pretty trivial for the likes of you I'm sure. I've done this over on <a href="http://quay.io">quay.io</a>, which you can see here: <a href="https://quay.io/repository/mrdaredhat/moo-chop">https://quay.io/repository/mrdaredhat/moo-chop</a></div><div><br /></div><h2 style="text-align: left;">Setting up our environment</h2><div>Just for readability, I'll define some environment variable here that you'll need to use on each architecture build host and where you construct your manifest. </div><div><br /></div><div><div><span style="font-family: courier;"># One time setup</span></div><div><div><span style="font-family: courier;">$ ARCH=ppc64le # or amd64, arm64 or s390x</span></div><div><span style="font-family: courier;">$ QUSER=#your quay.io username</span></div><div><span style="font-family: courier;">$ QPASS=#your quay.io password</span></div><div><span style="font-family: courier;">$ PROJECT=moo-chop</span></div><div><span style="font-family: courier;">$ GITREPO=https://github.com/mrda/$PROJECT.git</span></div><div></div></div><div><br /></div></div><h2 style="text-align: left;">Building our containers on each architecture, and pushing them to quay.io</h2><div>Now we have source code we want to build, and have access to a container repository, we want to build containers for each architecture and push these to the container repository.</div><div><br /></div><div>The process we follow is exactly the same for each architecture, so I'll only show the steps once.</div><div><br /></div><div><span style="font-family: courier;"># Repeat for each architecture you want to support</span></div><div><span style="font-family: courier;">$ ssh <build-host-for-this-architecture></span></div><div><span style="font-family: courier;"># Paste in your environment variables here</span></div><div><span style="font-family: courier;">$ mkdir -p src</span></div><div><div><span style="font-family: courier;">$ cd src</span></div><div><span style="font-family: courier;">$ git clone $GITREPO</span></div><div><span style="font-family: courier;">$ cd $PROJECT</span></div></div><div><span style="font-family: courier;"># Build your software. In our case, there's no compiling needed</span></div><div><span style="font-family: courier;"># as we're only distributing python code. But if this were C or Go</span></div><div><span style="font-family: courier;"># or something else, this would be your build step.</span></div><div><div><span style="font-family: courier;">$ podman build -t quay.io/$QUSER/$PROJECT:$ARCH --arch $ARCH .</span></div><div><span style="font-family: courier;">$ podman login quay.io --username $QUSER --password $QPASS</span></div><div><span style="font-family: courier;">$ podman push quay.io/$QUSER/$PROJECT:$ARCH</span></div></div><div><span style="font-family: courier;">^D</span></div><div><br /></div><div>And that's one architecture down. Rinse, lather, repeat for all architectures that you want to build for.</div><div><br /></div><h2 style="text-align: left;">Checking your architecture specific containers on quay.io</h2><div>The podman push commands that you did in the step above pushed your built containers into the container registry. You should verify they are all there as expected. In my case, I can do this by visiting <a href="https://quay.io/repository/mrdaredhat/moo-chop?tab=tags">https://quay.io/repository/mrdaredhat/moo-chop?tab=tags</a> and seeing the tag for each container build that is now available.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqKPZ3ZWGEAHJrOYFXmz81ZR0PUtV0vMlgsQ_wfp13rla7W3f4I8BPm1DX9Wg0vmcMkD7aMXyqx0AmSKVtBnMT0KZzoGW1m-Xx47NtCHI3stQg9EunuPwhLEJFNgxuyyoyGJ1yq6TqvTc6/s1292/repo-tags.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="933" data-original-width="1292" height="462" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqKPZ3ZWGEAHJrOYFXmz81ZR0PUtV0vMlgsQ_wfp13rla7W3f4I8BPm1DX9Wg0vmcMkD7aMXyqx0AmSKVtBnMT0KZzoGW1m-Xx47NtCHI3stQg9EunuPwhLEJFNgxuyyoyGJ1yq6TqvTc6/w640-h462/repo-tags.png" width="640" /></a></div><h2 style="text-align: left;"><br /></h2><h2 style="text-align: left;">Building a multiarchecture manifest</h2><div>We now have built containers for each architecture, and uploaded them to our favourite container registry. We now need to build a <a href="https://docs.docker.com/registry/spec/manifest-v2-2/#manifest-list-field-descriptions">manifest</a> so that the right image is automatically discoverable when we request the base container from the registry. We do this by building a manifest that links the container images to each architecture.</div><div><br /></div><div><span style="font-family: courier;">$ podman login quay.io --username $QUSER --password $QPASS</span></div><div><div><span style="font-family: courier;">$ podman manifest create quay.io/$QUSER/$PROJECT:latest</span></div></div><div><div><span style="font-family: courier;">$ podman manifest add quay.io/$QUSER/$PROJECT:latest --arch s390x docker://quay.io/$QUSER/$PROJECT:s390x</span></div><div><span style="font-family: courier;">$ podman manifest add quay.io/$QUSER/$PROJECT:latest --arch ppc64le docker://quay.io/$QUSER/$PROJECT:ppc64le</span></div><div><span style="font-family: courier;">$ podman manifest add quay.io/$QUSER/$PROJECT:latest --arch amd64 docker://quay.io/$QUSER/$PROJECT:amd64</span></div><div><span style="font-family: courier;"><br /></span></div><div><span style="font-family: courier;"># Push the manifest up to quay.io</span></div><div><span style="font-family: courier;">$ podman manifest push quay.io/$QUSER/$PROJECT:latest docker://quay.io/$QUSER/$PROJECT</span></div></div><div><br /></div><h2 style="text-align: left;">Testing it out to see that it all works</h2><div>Let's examine the manifest to make sure it's multiarchitecture-aware.</div><div><br /></div><div><div><span style="font-family: courier;">$ </span><span style="font-family: courier;">podman manifest inspect docker://quay.io/$QUSER/$PROJECT:latest | jq '.manifests[] | .digest, .platform'</span></div><div><span style="font-family: courier;">"sha256:e9aea7d03e2d6f77aa79ffb395058d68778c72f52cf4264472a86978a6e9d470"</span></div><div><span style="font-family: courier;">{</span></div><div><span style="font-family: courier;"> "architecture": "s390x",</span></div><div><span style="font-family: courier;"> "os": "linux"</span></div><div><span style="font-family: courier;">}</span></div><div><span style="font-family: courier;">"sha256:fd1e3f1a05e8c5df91725760241edf8d676c76da7a451457796f41f6e9ea7940"</span></div><div><span style="font-family: courier;">{</span></div><div><span style="font-family: courier;"> "architecture": "ppc64le",</span></div><div><span style="font-family: courier;"> "os": "linux"</span></div><div><span style="font-family: courier;">}</span></div><div><span style="font-family: courier;">"sha256:60b2cbbc4fe9becb95c9d27b89b966b12d7fa8029d29928c900651a09abd6a3b"</span></div><div><span style="font-family: courier;">{</span></div><div><span style="font-family: courier;"> "architecture": "amd64",</span></div><div><span style="font-family: courier;"> "os": "linux"</span></div><div><span style="font-family: courier;">}</span></div></div><div><br /></div><div>Let's try pulling down and starting the container (note: we aren't specifying the architecture in the <span style="font-family: courier;">podman run</span> command. It determines the correct container image based on architecture and pulls and runs the correct one)</div><div><br /></div><div><div><span style="font-family: courier;">$ podman run --rm -it -p 5000:5000 quay.io/$QUSER/$PROJECT</span></div></div><div><br /></div><div><span style="font-family: inherit;">And that works on any of </span>arm64, amd64, <span style="font-family: inherit;">ppc64le, s390x!</span></div><p><br /></p>Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com0tag:blogger.com,1999:blog-1011343219801614525.post-54393748553202721262018-07-01T23:42:00.001-07:002018-07-01T23:45:27.869-07:00LCA2019 Call for Proposals (CFP) is now open!<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">On behalf of the LCA2019 team we are pleased to announce that the Call</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">for Proposals for </span><a data-saferedirecturl="https://www.google.com/url?hl=en&q=http://linux.conf.au&source=gmail&ust=1530596594127000&usg=AFQjCNEYshS_9KZ7YSaAlE-586dcq_07PA" href="http://linux.conf.au/" rel="noreferrer" style="background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px;" target="_blank">linux.conf.au</a><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> 2019 is now open! This Call for</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">Proposals will close on July 30.</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<a data-saferedirecturl="https://www.google.com/url?hl=en&q=http://linux.conf.au&source=gmail&ust=1530596594127000&usg=AFQjCNEYshS_9KZ7YSaAlE-586dcq_07PA" href="http://linux.conf.au/" rel="noreferrer" style="background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px;" target="_blank">linux.conf.au</a><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> is one of the best-known community driven Free and Open</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">Source Software conferences in the world. In 2019 we welcome you to</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">join us in Christchurch, New Zealand on Monday 21 January t</span><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">hrough to</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">Friday 25 January.</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">For full details including those not covered by this announcement</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">visit </span><a data-saferedirecturl="https://www.google.com/url?hl=en&q=https://linux.conf.au/call-for-papers/&source=gmail&ust=1530596594127000&usg=AFQjCNGJVWZq_R6kF7iaBhinnx3PTemjpQ" href="https://linux.conf.au/call-for-papers/" rel="noreferrer" style="background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px;" target="_blank">https://linux.conf.au/call-<wbr></wbr>for-papers/</a><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">== IMPORTANT DATES ==</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">* Call for Proposals Opens: 2 July 2018</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">* Call for Proposals Closes: 30 July 2018 </span><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">(no extensions)</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">* Notifications from the programme committee: early-September 2018</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">* Conference Opens: 21 January 2019</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">== HOW TO SUBMIT ==</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">Create an account or login at </span><a data-saferedirecturl="https://www.google.com/url?hl=en&q=https://linux.conf.au/dashboard/&source=gmail&ust=1530596594127000&usg=AFQjCNFTc2kUcjwr_pbLYaHov5hJ7pdA6Q" href="https://linux.conf.au/dashboard/" rel="noreferrer" style="background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px;" target="_blank">https://linux.conf.au/<wbr></wbr>dashboard/</a><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> and</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">click the link to submit your proposal.</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">== ABOUT </span><a data-saferedirecturl="https://www.google.com/url?hl=en&q=http://LINUX.CONF.AU&source=gmail&ust=1530596594127000&usg=AFQjCNEfBgcqHedjKyyHNEhL7sTSqqncJw" href="http://linux.conf.au/" rel="noreferrer" style="background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px;" target="_blank">LINUX.CONF.AU</a><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> ==</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<a data-saferedirecturl="https://www.google.com/url?hl=en&q=http://linux.conf.au&source=gmail&ust=1530596594128000&usg=AFQjCNElHa96yYLBgAG4XDbsUOuuaaI8zw" href="http://linux.conf.au/" rel="noreferrer" style="background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px;" target="_blank">linux.conf.au</a><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> is a conference where people gather to learn about the</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">entire world of Free and Open Source Software, directly from the</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">people who contribute. Many of these contributors give scheduled</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">presentations, but much interaction occurs in-between and after formal</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">sessions between all attendees. Our aim is to create a deeply</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">technical conference where we bring together industry leaders and</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">experts on a wide range of subjects.</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<a data-saferedirecturl="https://www.google.com/url?hl=en&q=http://linux.conf.au&source=gmail&ust=1530596594128000&usg=AFQjCNElHa96yYLBgAG4XDbsUOuuaaI8zw" href="http://linux.conf.au/" rel="noreferrer" style="background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px;" target="_blank">linux.conf.au</a><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> welcomes submissions from first-time and seasoned</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">speakers, from all free and open technology communities, and all walks</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">of life. We respect and encourage diversity at our conference.</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">== CONFERENCE THEME ==</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">Our theme for </span><a data-saferedirecturl="https://www.google.com/url?hl=en&q=http://linux.conf.au&source=gmail&ust=1530596594128000&usg=AFQjCNElHa96yYLBgAG4XDbsUOuuaaI8zw" href="http://linux.conf.au/" rel="noreferrer" style="background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px;" target="_blank">linux.conf.au</a><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> 2019 is "The Linux of Things". Building on</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">the role that Linux plays in our everyday lives, we will address</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">IoT-related opportunities and concerns from the purely technical</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">through environmental, health, privacy, security and more. Please let</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">this inspire you, but not restrict you - we will still have many talks</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">about other interesting things in our community.</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">For some suggestions to get you started with your proposal ideas</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">please visit the CFP page on the </span><a data-saferedirecturl="https://www.google.com/url?hl=en&q=http://linux.conf.au&source=gmail&ust=1530596594128000&usg=AFQjCNElHa96yYLBgAG4XDbsUOuuaaI8zw" href="http://linux.conf.au/" rel="noreferrer" style="background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px;" target="_blank">linux.conf.au</a><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> website.</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">== PROPOSAL TYPES ==</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">We're accepting submissions for three different types of proposal:</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">* Presentation (45 minutes): These are generally presented in lecture</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> format and form the bulk of the available conference slots.</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">* Tutorial (100 minutes): These are generally presented in a classroom</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> format. They should be interactive or hands-on in nature. Tutorials</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> are expected to have a specific learning outcome for attendees.</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">* Miniconf (full-day): Single-track mini-conferences that run for the</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> duration of a day on either Monday </span><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">or Tuesday. </span><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">We provide the room,</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> and you provide the speakers. Together, you can explore a field in</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> Free and Open Source software in depth.</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">== PROPOSER RECOGNITION ==</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">In recognition of the value that presenters and miniconf organisers</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">bring to our conference, once a proposal is accepted, one presenter or</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">organiser per proposal is entitled to:</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">* Free registration, which holds all of the benefits of a Professional</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> Delegate Ticket</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">* A complimentary ticket to the Speakers' Dinner, with additional</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> tickets for significant others and children available for purchase.</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">* 50% off the advertised price for sponsorship at the White-Flippered</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> Blue Penguin tier.</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">If your proposal includes more than one presenter or organiser, these</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">additional people will be entitled to:</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">* Professional or hobbyist registration at the Early Bird rate,</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> regardless of whether the Early Bird rate is generally available</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">* Speakers' dinner tickets available for purchase at cost</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">Important Note for miniconf organisers: These discounts apply to the</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">organisers only. All participants in your miniconf must arrange or</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">purchase tickets for themselves via the regular ticket sales process</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">or they may not be able to attend!</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">As a volunteer-run non-profit conference, </span><a data-saferedirecturl="https://www.google.com/url?hl=en&q=http://linux.conf.au&source=gmail&ust=1530596594128000&usg=AFQjCNElHa96yYLBgAG4XDbsUOuuaaI8zw" href="http://linux.conf.au/" rel="noreferrer" style="background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px;" target="_blank">linux.conf.au</a><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> does not pay</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">speakers to present at the conference; but you may be eligible for</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">financial assistance.</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">== FINANCIAL ASSISTANCE ==</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<a data-saferedirecturl="https://www.google.com/url?hl=en&q=http://linux.conf.au&source=gmail&ust=1530596594128000&usg=AFQjCNElHa96yYLBgAG4XDbsUOuuaaI8zw" href="http://linux.conf.au/" rel="noreferrer" style="background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px;" target="_blank">linux.conf.au</a><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> is able to provide limited financial assistance for some speakers.</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">Financial assistance may be provided to cover expenses that might</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">otherwise prohibit a speaker from attending such as:</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">* Cost of flight</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">* Accommodation</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">* Other accessibility related costs</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">To be considered for assistance you can indicate this when making your</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">proposal. We will try to accommodate as many requests for assistance</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">as possible within our limited budget.</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">== ACCESSIBILITY ==</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<a data-saferedirecturl="https://www.google.com/url?hl=en&q=http://linux.conf.au&source=gmail&ust=1530596594128000&usg=AFQjCNElHa96yYLBgAG4XDbsUOuuaaI8zw" href="http://linux.conf.au/" rel="noreferrer" style="background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px;" target="_blank">linux.conf.au</a><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> aims to be accommodating to everyone who wants to attend</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">or present at the conference. We recognise that some people face</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">accessibility challenges. If you have special accessibility</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">requirements, you can provide that information when submitting your</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">proposal so that we can plan to properly accommodate you.</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">We recognise that childcare and meeting dietary requirements also fall</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">under the general principle of making it possible for everyone to</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">participate, and will be announcing our offering for these in the near</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">future; if you have concerns or needs in these areas, or in any area</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">that would impact your ability to participate, please let us when</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">submitting your proposal.</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">== CODE OF CONDUCT ==</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">By agreeing to present at or attend the conference you are agreeing to</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">abide by the terms and conditions</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">(</span><a data-saferedirecturl="https://www.google.com/url?hl=en&q=https://linux.conf.au/attend/terms-and-conditions/&source=gmail&ust=1530596594128000&usg=AFQjCNEgtvJtCKEO6F8iIZimcus2UBVK8A" href="https://linux.conf.au/attend/terms-and-conditions/" rel="noreferrer" style="background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px;" target="_blank">https://linux.conf.au/attend/<wbr></wbr>terms-and-conditions/</a><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">). We require all</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">speakers and delegates to have read, understood, and act according to</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">the standards set forth in our Code of Conduct</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">(</span><a data-saferedirecturl="https://www.google.com/url?hl=en&q=https://linux.conf.au/attend/code-of-conduct/&source=gmail&ust=1530596594128000&usg=AFQjCNGFTapQl97r-iHQSW0TJgbzKCJEJA" href="https://linux.conf.au/attend/code-of-conduct/" rel="noreferrer" style="background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px;" target="_blank">https://linux.conf.au/attend/<wbr></wbr>code-of-conduct/</a><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">).</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">== RECORDING ==</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">To increase the number of people that can view your presentation,</span><br />
<a data-saferedirecturl="https://www.google.com/url?hl=en&q=http://linux.conf.au&source=gmail&ust=1530596594128000&usg=AFQjCNElHa96yYLBgAG4XDbsUOuuaaI8zw" href="http://linux.conf.au/" rel="noreferrer" style="background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 12.8px;" target="_blank">linux.conf.au</a><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"> will record your talk and make it publicly available</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">after the event. We plan to release recordings of every talk at the</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">conference under a Creative Commons Share-Alike Licence. When</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">submitting your proposal you may note that you do not wish to have</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">your talk released, although we prefer and encourage all presentations</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">to be recorded.</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">== LICENSING ==</span><br />
<br style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;" />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">If the subject of your presentation is software, you must ensure the</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">software has an Open Source Initiative-approved licence at the time of</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;">the close of our CFP.</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 12.8px;"><br /></span>Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com0tag:blogger.com,1999:blog-1011343219801614525.post-79296533011814138982016-11-10T14:26:00.001-08:002016-11-10T16:29:38.032-08:00Speaking at the OpenStack Summit in BarcelonaLast month I had the wonderful opportunity to visit Barcelona, Spain to attend the OpenStack <a href="https://releases.openstack.org/" target="_blank">Ocata</a> Summit where I was able to speak about the work we've been doing <a href="https://github.com/openstack/openstack-ansible-os_ironic" target="_blank">integrating</a> <a href="https://github.com/openstack/ironic" target="_blank">Ironic</a> into <a href="https://github.com/openstack/openstack-ansible" target="_blank">OpenStack-Ansible</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/taAtFJ7_4qE/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/taAtFJ7_4qE?feature=player_embedded" width="320"></iframe></div>
<div style="text-align: center;">
(Video link: <a href="https://youtu.be/taAtFJ7_4qE">https://youtu.be/taAtFJ7_4qE</a>)</div>
<div style="text-align: center;">
<br /></div>
I really enjoyed the experience, and very much enjoyed co-presenting with <a href="https://twitter.com/andymccrae" target="_blank">Andy McCrae</a> - a great guy and an very clever and hard-working developer. If I ever make it to the UK (and see more than the inside of <a href="http://www.heathrow.com/" target="_blank">LHR</a>), I'm sure going to go visit!<br />
<br />
And here's a few happy snaps from Barcelona - lovely place, wish I could've stayed more than 6 days :-)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNaRVbAPXEk6auWJPCfRg1w_BwGxky59ZIsWbQiqPcls3GtxtYRilnkqLYe3xLnWIijThNGCMlnD-VQ-dBGTmrn8E57uJOGN3FMLd3Ksq7cgzlVRvpoJnDb6ZC9HhyTFCm3srEllfUNzHr/s1600/FullSizeRender+%25281%2529.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNaRVbAPXEk6auWJPCfRg1w_BwGxky59ZIsWbQiqPcls3GtxtYRilnkqLYe3xLnWIijThNGCMlnD-VQ-dBGTmrn8E57uJOGN3FMLd3Ksq7cgzlVRvpoJnDb6ZC9HhyTFCm3srEllfUNzHr/s320/FullSizeRender+%25281%2529.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioy5P48R6kC7GFOpTJGMuhpJDUA9WjUdCkLo4NH4dOpv0wj6r4XDje5VrACuZlWjTQ9bWfR1D3TxdnrQcOnkjhpVA5kDgEvW2IFG5L5_FEQI0waB8WW7cuwBQEpjKnvTEwEpEHLp9XrdvR/s1600/FullSizeRender+%25282%2529.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioy5P48R6kC7GFOpTJGMuhpJDUA9WjUdCkLo4NH4dOpv0wj6r4XDje5VrACuZlWjTQ9bWfR1D3TxdnrQcOnkjhpVA5kDgEvW2IFG5L5_FEQI0waB8WW7cuwBQEpjKnvTEwEpEHLp9XrdvR/s320/FullSizeRender+%25282%2529.jpg" width="195" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUj2HrF-zEjalgkT4zR3JCwk6563qg4XmoX-nfUfwMw2cV1gFRgEA18zJJJpToD9qyhIhh0Km7Q7Ympv5m0nM5UFJ3C0hqFhHmBdcA9N4y31_ALP_eMrx0YqdCEd24WC9G6LPvVUxK7HlX/s1600/FullSizeRender+%25283%2529.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUj2HrF-zEjalgkT4zR3JCwk6563qg4XmoX-nfUfwMw2cV1gFRgEA18zJJJpToD9qyhIhh0Km7Q7Ympv5m0nM5UFJ3C0hqFhHmBdcA9N4y31_ALP_eMrx0YqdCEd24WC9G6LPvVUxK7HlX/s320/FullSizeRender+%25283%2529.jpg" width="213" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ_JmL0zHy8WNeqwb7WGPXfhiEgJ1W0c681Rf24V8QDCp7kTauO_K_phZHh-JMCLgfmgmINxubUi9IagTfr4lV3a9N7eg2uYD7Ebygmd0zNtGp5tVV855xxk6JONPv3sCRTekafmvYHGLt/s1600/FullSizeRender+%25284%2529.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ_JmL0zHy8WNeqwb7WGPXfhiEgJ1W0c681Rf24V8QDCp7kTauO_K_phZHh-JMCLgfmgmINxubUi9IagTfr4lV3a9N7eg2uYD7Ebygmd0zNtGp5tVV855xxk6JONPv3sCRTekafmvYHGLt/s320/FullSizeRender+%25284%2529.jpg" width="240" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsLFGgblFDqLMA4YBuJ2qiWrhyphenhyphen38Q-E_JA4XxFVdmEOKNIKumlathfF-IBpxIVkKChRf9f27bkx-NlLQfOOrlhLUXbdnQ8mUzmzfHJxbvo9ZdUuIceo7gHXq17QBgB2TUCc-cXRVrryT7l/s1600/FullSizeRender.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsLFGgblFDqLMA4YBuJ2qiWrhyphenhyphen38Q-E_JA4XxFVdmEOKNIKumlathfF-IBpxIVkKChRf9f27bkx-NlLQfOOrlhLUXbdnQ8mUzmzfHJxbvo9ZdUuIceo7gHXq17QBgB2TUCc-cXRVrryT7l/s320/FullSizeRender.jpg" width="240" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh48-ElpmwoKrLX8n7YQLdVPZTtbvGf1pz3crAPcK89NYk9iBw3sgZ3wvQ9-97Hz5rx6hTW3kbHs9Djbpx1JeEW8xW9vr1JiO_DefvHVUtsxU6I3lt4QUMvp1AlTRbKOCgGZ05NByWUZbot/s1600/IMG_6941.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh48-ElpmwoKrLX8n7YQLdVPZTtbvGf1pz3crAPcK89NYk9iBw3sgZ3wvQ9-97Hz5rx6hTW3kbHs9Djbpx1JeEW8xW9vr1JiO_DefvHVUtsxU6I3lt4QUMvp1AlTRbKOCgGZ05NByWUZbot/s320/IMG_6941.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVJdT8Y82zb-ooKUo7Lc8IZALA0xGUfGfXjB8Au5HEKzp4cr8V2BAovZ_fKJeIkk2LIjF8IatFbremKut_awI3Dpq13B0huL3-FwRG1k1twaX9J6va3sI-EYnDR7ujQkkzOz4vaJstYKsi/s1600/IMG_6947.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVJdT8Y82zb-ooKUo7Lc8IZALA0xGUfGfXjB8Au5HEKzp4cr8V2BAovZ_fKJeIkk2LIjF8IatFbremKut_awI3Dpq13B0huL3-FwRG1k1twaX9J6va3sI-EYnDR7ujQkkzOz4vaJstYKsi/s320/IMG_6947.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp2gDEGL-bUCQn5eZz40TruJzM8qT_BSNKfXTaU_uqEsQjxXgnxcToyih5mz6D1NyLsp41NIs9ts2EHHxmX_r630PrsGgoEzlZWfnaqV5Jt9mDH-aHzUbcbeKuWTiuOcHB1R2ZsGpWUZOL/s1600/IMG_6954.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp2gDEGL-bUCQn5eZz40TruJzM8qT_BSNKfXTaU_uqEsQjxXgnxcToyih5mz6D1NyLsp41NIs9ts2EHHxmX_r630PrsGgoEzlZWfnaqV5Jt9mDH-aHzUbcbeKuWTiuOcHB1R2ZsGpWUZOL/s320/IMG_6954.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8sd0l8GmpxnwnXxty3ljDOHrrA84yUFamSa_ppEWK-5zYAUYYbYUSj_QsD_Tk-_kHdWZCjubinZpuG_xhpNDigbze-UR5CSkov82qoKtzQVWe460rhbz5fLZw5ml7_hogEt-3WVXhvmXV/s1600/IMG_6965.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8sd0l8GmpxnwnXxty3ljDOHrrA84yUFamSa_ppEWK-5zYAUYYbYUSj_QsD_Tk-_kHdWZCjubinZpuG_xhpNDigbze-UR5CSkov82qoKtzQVWe460rhbz5fLZw5ml7_hogEt-3WVXhvmXV/s320/IMG_6965.JPG" width="240" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc2XkaKMdXehpjMl9-Zsd391WmmmT9R8pPI8B228EHbLxutMx9MldZQsWcXOvsbbS1NKxK8bxSvk0WUhwW34GkVcx5LguDCRL7nBCmOeG56gNTUQp6EIK5BnSuyInxr5-KA8RhV_riP-aa/s1600/IMG_6992.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc2XkaKMdXehpjMl9-Zsd391WmmmT9R8pPI8B228EHbLxutMx9MldZQsWcXOvsbbS1NKxK8bxSvk0WUhwW34GkVcx5LguDCRL7nBCmOeG56gNTUQp6EIK5BnSuyInxr5-KA8RhV_riP-aa/s320/IMG_6992.JPG" width="240" /></a></div>
<br />Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com0tag:blogger.com,1999:blog-1011343219801614525.post-2754323718681324602016-10-06T17:06:00.000-07:002016-10-06T17:06:32.175-07:00Fixing broken Debian packagesIn my job we make use of <a href="http://www.vidyo.com/" target="_blank">Vidyo</a> for videoconferencing, but today I ran into an issue after re-imaging my Ubuntu 16.04 desktop.<br />
<br />
The latest version of <span style="font-family: "courier new" , "courier" , monospace;">vidyodesktop</span> requires <span style="font-family: "courier new" , "courier" , monospace;">libqt4-gui</span>, which doesn't exist in Ubuntu anymore. This always seems to be a problem with non-free software targeting multiple versions of multiple operating systems.<br />
<br />
You can work around the issue, doing something like:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">sudo dpkg -i --ignore-depends=libqt4-gui VidyoDesktopInstaller-*.deb</span><br />
<br />
but then you get the dreaded unmet dependencies roadblock which prevents you from future package manager updates and operations. i.e.<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">You might want to run 'apt-get -f install' to correct these:</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> vidyodesktop : Depends: libqt4-gui (>= 4.8.1) but it is not installable</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).</span><br />
<div>
<br /></div>
It's a known problem, and it's been <a href="http://askubuntu.com/questions/766615/how-to-install-libqt4-core-and-libqt4-gui-on-ubuntu-16-04" target="_blank">well documented</a>. The suggested solution was to modify the <span style="font-family: "courier new" , "courier" , monospace;">VidyoDesktopInstaller-*.deb</span> package, but I didn't want to do that (because when the next version comes out, it will need to be handraulicly fixed too - and that's an ongoing burden I'm not prepared to live with). So I went looking for another solution - and found Debian's <span style="font-family: "courier new" , "courier" , monospace;">equivs</span> package (and thanks to <a href="https://twitter.com/tonybreeds" target="_blank">tonyb</a> for pointing me in the right direction!)<br />
<br />
So what we want to do is to create a dummy Debian package that will satisfy the <span style="font-family: "courier new" , "courier" , monospace;">libqt4-gui</span> requirement. So first off, let's uninstall <span style="font-family: "courier new" , "courier" , monospace;">vidyodesktop</span>, and install <span style="font-family: "courier new" , "courier" , monospace;">equivs</span>:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get -f install</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get install equivs</span><br />
<br />
Next, let's make a fake package:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">mkdir -p ~/src/fake-libqt4-gui</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">cd ~/src/fake-libqt4-gui</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">cat << EOF > fake-libqt4-gui</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Section: misc</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Priority: optional</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Standards-Version: 3.9.2</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">Package: libqt4-gui</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Version: 1:100</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Maintainer: Michael Davies <michael@the-davies.net></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Architecture: all</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Description: fake libqt4-gui to keep vidyodesktop happy</span><br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;">EOF</span></div>
<div>
<br /></div>
<div>
And now, let's build and install the dummy package:</div>
<div>
<br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">equivs-build fake-libqt4-gui</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo dpkg -i libqt4-gui_100_all.deb</span></div>
<div>
<br /></div>
<div>
And now vidyodesktop installs cleanly!</div>
<div>
<br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo dpkg -i VidyoDesktopInstaller-*.deb</span></div>
Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com1tag:blogger.com,1999:blog-1011343219801614525.post-38436696636148090522016-05-10T20:55:00.001-07:002016-05-10T20:55:25.888-07:00Planet Linux Australia... rebootedRecently <a href="http://linux.org.au/" target="_blank">Linux Australia</a> needed to <a href="http://lists.linux.org.au/pipermail/linux-aus/2016-April/022691.html" target="_blank">move its infrastructure to a different place</a>, and so we took the opportunity to build a fresh new instance of the <a href="http://planet.linux.org.au/" target="_blank">Planet Linux Australia</a> blog aggregator.<br />
<br />
It made me realise how crusty the old site had become, how many things I had planned to do which I had left undone, and how I hadn't applied simple concepts such as <a href="https://www.thoughtworks.com/insights/blog/infrastructure-code-reason-smile" target="_blank">Infrastructure as Code</a> which have become accepted best-practices in the time since <a href="http://lists.linux.org.au/pipermail/linux-aus/2005-February/011289.html" target="_blank">I originally set this up</a>.<br />
<br />
Of course things <i>have</i> changed in this time. People blog less now, so I've also taken the opportunity to <a href="https://github.com/mrda/planet-linux-australia/commit/e84ccbb6" target="_blank">remove</a> what appear to be dead blogs from the aggregator. If you have a blog of interest to the Linux Australia community, you can ask to be added via emailing planet at linux dot org dot au. All you need is a valid Atom or RSS feed.<br />
<br />
The other thing that is that the blog aggregator software we use hasn't seen an update since 2011. It started out as <a href="http://www.planetplanet.org/" target="_blank">PlanetPlanet</a>, then moved on to <a href="http://intertwingly.net/code/venus/" target="_blank">Venus</a>, and so I've taken <a href="https://github.com/mrda/venus" target="_blank">a fork</a> to hopefully improve this some more when I find <a href="http://cherrypixel.com/new/wp-content/uploads/2015/08/round-tuit.png" target="_blank">my round tuit</a>. Fortunately I don't still need to run it under python 2.4 which is getting a little long in the tooth.<br />
<br />
Finally, the <a href="https://github.com/mrda/planet-linux-australia" target="_blank">config for Planet Linux Australia</a> is up on github. Just like <a href="https://github.com/mrda/venus" target="_blank">the venus code</a> itself, pull requests welcome. Share and Enjoy :-)<br />
<br />Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com0tag:blogger.com,1999:blog-1011343219801614525.post-69825839659320623392015-09-20T23:51:00.000-07:002015-09-20T23:51:04.412-07:00Mocking python objects and object functions using both class-level and function-level mocksHad some fun solving an issue with <a href="https://bugs.launchpad.net/ironic/+bug/1298362" target="_blank">partitions larger than 2Tb</a>, and came across a little gotcha when it comes to mocking in python when a) you want to mock both an object and a function in that object, and b) when you want to mock.patch.object at both the test class and test method level.<br />
<br />
Say you have a function you want to test that looks like this:<br />
<br />
<br />
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"><span class="s1">def</span> <span class="s2">make_part</span><span class="s3">itions</span>(...):</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"> ...</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"> dp <span class="s1">=</span> disk_partitioner<span class="s1">.</span>DiskPartitioner(...)</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"> dp.add_partition(...)</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"> ...</span></div>
<div class="p1">
<br /></div>
<div class="p1">
where the <span style="font-family: Courier New, Courier, monospace;">DiskPartitioner</span> class looks like this:</div>
<div class="p1">
<br /></div>
<div class="p1">
<br /></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"><span class="s1">class</span><span class="s2"> </span>DiskPartitioner<span class="s2">(</span><span class="s1">object</span><span class="s2">):</span></span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="p1">
</div>
<div class="p3">
<span style="font-family: Courier New, Courier, monospace;"> <span class="s1">def</span> <span class="s3">__init__</span>(<span class="s1">self</span>, ...):</span></div>
<div class="p3">
<span style="font-family: Courier New, Courier, monospace;"> ...</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"> <span class="s1">def</span> <span class="s2">add_partition</span>(<span class="s1">self</span>, ...):</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"> ...</span></div>
<div class="p1">
<br /></div>
<div class="p1">
<br /></div>
<div class="p1">
and you have existing test code like this:</div>
<div class="p1">
<br /></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;">@mock.patch.object<span class="s1">(utils, </span><span class="s2">'execute'</span><span class="s1">)</span></span></div>
<div class="p1">
</div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace;"><span class="s3">class</span> <span class="s4">MakePartitionsTestCase</span>(test_base<span class="s5">.</span>BaseTestCase):</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace;"> ...</span></div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p2">
and you want to add a new test function, but adding a new patch just for your new test.</div>
<div class="p2">
<br /></div>
<div class="p2">
You want to verify that the class is instantiated with the right options, and you need to mock the <span style="font-family: Courier New, Courier, monospace;">add_partition</span> method as well. How do you use the existing test class (with the mock of the <span style="font-family: Courier New, Courier, monospace;">execute</span> function), add a new mock for the <span style="font-family: Courier New, Courier, monospace;">DiskPartitioner.add_partition</span> function, and the <span style="font-family: Courier New, Courier, monospace;">__init__ </span>of the <span style="font-family: Courier New, Courier, monospace;">DiskPartitioner</span> class?</div>
<div class="p2">
<br /></div>
<div class="p2">
After a little trial and error, this is how:</div>
<div class="p2">
<br /></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"> <span class="s1">@mock.patch.object</span>(disk_partitioner, <span class="s2">'DiskPartitioner'</span>,</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"> autospec<span class="s3">=</span><span class="s4">True</span>)</span></div>
<div class="p2">
<span style="font-family: Courier New, Courier, monospace;"><span class="s5"> </span><span class="s4">def</span><span class="s5"> </span>test_make_partitions_with_gpt<span class="s5">(</span><span class="s4">self</span><span class="s5">, mock_dp, mock_exc):</span></span></div>
<div class="p3">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="p4">
<span style="font-family: Courier New, Courier, monospace;"><span class="s5"> </span># Need to mock the function as well</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"> mock_dp<span class="s3">.</span>add_partition <span class="s3">=</span> mock<span class="s3">.</span>Mock(return_value<span class="s3">=</span><span class="s4">None</span>)</span></div>
<div class="p3">
<span style="font-family: Courier New, Courier, monospace;"> ...</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"> disk_utils<span class="s3">.</span>make_partitions(...) # Function under test</span></div>
<div class="p2">
</div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"> mock_dp<span class="s3">.</span>assert_called_once_with(...)</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"> mock_dp.add_partition.assert_called_once_with(...)</span></div>
<div class="p2">
<br /></div>
<div class="p2">
<br /></div>
<div class="p1">
<b>Things to note:</b></div>
<div class="p1">
<br /></div>
<div class="p1">
1) The ordering of the mock parameters to <span style="font-family: Courier New, Courier, monospace;">test_make_partitions_with_gpt</span> isn't immediately intuitive (at least to me). You specify the function level mocks first, followed by the class level mocks.</div>
<div class="p1">
<br /></div>
<div class="p1">
2) You need to manually mock the instance method of the mocked class. (i.e. the <span style="font-family: Courier New, Courier, monospace;">add_partition</span> function)</div>
<div class="p1">
<br /></div>
<br />
You can see the whole enchilada over here in <a href="https://review.openstack.org/#/c/225556" target="_blank">the review</a>.<br />
<br />Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com0tag:blogger.com,1999:blog-1011343219801614525.post-88240793442253443412015-09-10T14:31:00.004-07:002015-09-10T19:11:14.885-07:00Ironic on a NUC - part 2 - Running services, building and deploying images, and testingThis is a continuation of the <a href="http://lifelog.michaeldavies.org/2015/09/ironic-on-nuc-part-1-setting-things-up.html" target="_blank">previous post</a> on Ironic on a NUC - setting things up. If you're following along at home, read that first.<br />
<br />
<h3>
Creating disk images for deployment</h3>
Now let's build some images for use with Ironic. First off, we'll need a deploy ramdisk image for the initial load, and we'll also need the image that we want to deploy to the hardware. We can build these using diskimage builder, part of the triple-o effort.<br />
<br />
So let's do that in a virtual environment:<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~/src$ mkvirtualenv dib</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(dib)mrda@irony:~/src$ pip install diskimage-builder six</span><br />
<div>
<br /></div>
<div>
And because we want to use some of the triple-o elements, we'll refer to these as we do the build. Once the images are built we'll put them in a place where tftpd-hpa can serve them.</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(dib)mrda@irony:~/src$ export ELEMENTS_PATH=~/src/tripleo-image-elements/elements</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(dib)mrda@irony:~/src$ mkdir images</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(dib)mrda@irony:~/src$ cd images</span></div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(dib)mrda@irony:~/src/images$ disk-image-create ubuntu baremetal localboot dhcp-all-interfaces local-config -o my-image</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(dib)mrda@irony:~/src/images$ ramdisk-image-create ubuntu deploy-ironic -o deploy-ramdisk</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">(dib)mrda@irony:~/src/images$ cp -rp * /tftpboot</span><br />
<div>
<br /></div>
<h3>
Starting Ironic services</h3>
I like to do my development in virtualenvs, so we'll run our services there. Let's start with ironic-api.<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(dib)mrda@irony:~/src/images$ deactivate</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~/src/images$ cd ~/src/ironic/</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~/src/ironic (master)$ tox -evenv --notest</span><br />
<div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~/src/ironic (master)$ source .tox/venv/bin/activate</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(venv)mrda@irony:~/src/ironic (master)$ ironic-api -v -d --config-file etc/ironic/ironic.conf.local</span></div>
</div>
<div>
<br /></div>
<div>
Now in a new terminal window for our VM, let's run ironic-conductor:</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~/src/images$ cd ~/src/ironic/</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">mrda@irony:~/src/ironic (master)$ source .tox/venv/bin/activate</span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">(venv)mrda@krypton:~/src/ironic (master)$ </span><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">python setup.py develop</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">(venv)mrda@krypton:~/src/ironic (master)$ ironic-conductor -v -d --config-file etc/ironic/ironic.conf.local</span></div>
<div>
<br /></div>
<div>
(If you get an error about unable to load the pywsman library, follow the workaround over here in a <a href="http://lifelog.michaeldavies.org/2015/07/virtualenv-and-library-fun.html" target="_blank">previous blog post</a>)</div>
<div>
<br /></div>
<h3>
Running Ironic Client</h3>
Let's open a new window on the VM for running an ironic command-line client to exercise what we've built:<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~$ cd src/python-ironicclient/</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~/src/python-ironicclient (master)$ tox -evenv --notest</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~/src/python-ironicclient (master)$ source .tox/venv/bin/activate</span><br />
<br />
Now we need to fudge authentication, and point at our running ironic-api:<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(venv)mrda@irony:~/src/python-ironicclient (master)$ export OS_AUTH_TOKEN=fake-token</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(venv)mrda@irony:~/src/python-ironicclient (master)$ export IRONIC_URL=http://localhost:6385/</span><br />
<div>
<br /></div>
<div>
Let's try it out and see what happens, eh?</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br class="Apple-interchange-newline" />(venv)mrda@irony:~/src/python-ironicclient (master)$ ironic driver-list</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">+---------------------+----------------+</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| Supported driver(s) | Active host(s) |</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">+---------------------+----------------+</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| pxe_amt | test-host |</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">+---------------------+----------------+</span><br />
<div>
<br /></div>
<div>
Looking good! Let's try registering the NUC as an Ironic node, specifying the deployment ramdisk:</div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(venv)mrda@irony:~/src/python-ironicclient (master)$ ironic node-create -d pxe_amt -i amt_password='<the-nuc-amin-password>' -i amt_username='admin' -i amt_address='10.0.0.251' -i deploy_ramdisk='file:///tftpboot/deploy-ramdisk.initramfs' -i deploy_kernel='file:///tftpboot/deploy-ramdisk.kernel' -n thenuc</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">+--------------+--------------------------------------------------------------------------+</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| Property | Value |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">+--------------+--------------------------------------------------------------------------+</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| uuid | 924a5447-930e-4d27-837e-6dd5d5f10e16 |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| driver_info | {u'amt_username': u'admin', u'deploy_kernel': u'file:///tftpboot/deploy- |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| | ramdisk.kernel', u'amt_address': u'10.0.0.251', u'deploy_ramdisk': |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| | u'file:///tftpboot/deploy-ramdisk.initramfs', u'amt_password': |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| | u'******'} |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| extra | {} |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| driver | pxe_amt |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| chassis_uuid | |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| properties | {} |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| name | thenuc |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">+--------------+--------------------------------------------------------------------------+</span></div>
</div>
<div>
<br /></div>
<div>
Again more success! Since we're not using Nova to manage or kick-off the deploy, we need to tell ironic where the instance we want deployed is, along with some of the instance information:</div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(venv)mrda@irony:~/src/python-ironicclient (master)$ ironic node-update thenuc add instance_info/image_source='file:///tftpboot/my-image.qcow2' instance_info/kernel='file:///tftpboot/my-image.vmlinuz' instance_info/ramdisk='file:///tftpboot/my-image.initrd' instance_info/root_gb=10</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">+------------------------+-------------------------------------------------------------------------+</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| Property | Value |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">+------------------------+-------------------------------------------------------------------------+</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| target_power_state | None |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| extra | {} |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| last_error | None |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| updated_at | None |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| maintenance_reason | None |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| provision_state | available |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| clean_step | {} |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| uuid | 924a5447-930e-4d27-837e-6dd5d5f10e16 |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| console_enabled | False |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| target_provision_state | None |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| provision_updated_at | None |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| maintenance | False |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| inspection_started_at | None |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| inspection_finished_at | None |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| power_state | None |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| driver | pxe_amt |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| reservation | None |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| properties | {} |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| instance_uuid | None |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| name | thenuc |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| driver_info | {u'amt_username': u'admin', u'amt_password': u'******', u'amt_address': |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| | u'10.0.0.251', u'deploy_ramdisk': u'file:///tftpboot/deploy- |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| | ramdisk.initramfs', u'deploy_kernel': u'file:///tftpboot/deploy- |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| | ramdisk.kernel'} |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| created_at | 2015-09-10T00:55:27+00:00 |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| driver_internal_info | {} |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| chassis_uuid | |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| instance_info | {u'ramdisk': u'file:///tftpboot/my-image.initrd', u'kernel': |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| | u'file:///tftpboot/my-image.vmlinuz', u'root_gb': 10, u'image_source': |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| | u'file:///tftpboot/my-image.qcow2'} |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">+------------------------+-------------------------------------------------------------------------+</span></div>
</div>
<div>
<br />
Let's see what we've got:<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(venv)mrda@irony:~/src/python-ironicclient (master)$ ironic node-list</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">+--------------------------------------+--------+---------------+-------------+--------------------+-------------+</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| UUID | Name | Instance UUID | Power State | Provisioning State | Maintenance |</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">+--------------------------------------+--------+---------------+-------------+--------------------+-------------+</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| f8af4d4e-e3da-4a04-9596-8e4fef15e4eb | thenuc | None | None | available | False |</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">+--------------------------------------+--------+---------------+-------------+--------------------+-------------+</span><br />
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<br /></div>
<div>
We now need to create a network port in ironic, and associate it with the mac address of the NUC. But I'm lazy, so let's extract the node UUID first:<br />
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(venv)mrda@irony:~/src/python-ironicclient (master)$ NODEUUID=$(ironic node-list | tail -n +4 | head -n -1 | awk -F "| " '{print $2}')</span></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(venv)mrda@irony:~/src/python-ironicclient (master)$ ironic port-create -n $NODEUUID -a <nuc-mac-address></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">+-----------+--------------------------------------+</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| Property | Value |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">+-----------+--------------------------------------+</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| node_uuid | 924a5447-930e-4d27-837e-6dd5d5f10e16 |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| extra | {} |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| uuid | c6dddc3d-b9b4-4fbc-99e3-18b8017c7b01 |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| address | <nuc-mac-address> |</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">+-----------+--------------------------------------+</span></div>
</div>
<div>
<br /></div>
<br />
<div>
</div>
So let's validate everything we've done, before we try this out in anger:</div>
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(venv)mrda@irony:~/src/python-ironicclient (master)$ ironic node-validate thenuc</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">+------------+--------+---------------+</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| Interface | Result | Reason |</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">+------------+--------+---------------+</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| boot | True | |</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| console | None | not supported |</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| deploy | True | |</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| inspect | None | not supported |</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| management | True | |</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| power | True | |</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">| raid | None | not supported |</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">+------------+--------+---------------+</span><br />
<div>
<br /></div>
<div>
And one more thing to do before we really start things rolling - ensure the NUC is listening to us:</div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(venv)mrda@irony:~/src/python-ironicclient (master)$ telnet 10.0.0.251 16992</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Trying 10.0.0.251...</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Connected to 10.0.0.251.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Escape character is '^]'.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">^]close</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">telnet> close</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Connection closed.</span></div>
</div>
<div>
<br /></div>
<div>
You might have to try that a couple of times to wake up the AMT interface, but it's important that you do to ensure you don't get a failed deploy.</div>
<div>
<br /></div>
And then we take the node active, which will DHCP the deploy ramdisk, which will in turn write the user image to the disk - if everything goes well. This will also take quite a long time, so time to go make that cup of tea :-)<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(venv)mrda@irony:~/src/python-ironicclient (master)$ ironic node-set-provision-state thenuc active</span><br />
<br />
Your NUC should have just booted into your user image and should be ready for you to use!<br />
<br />
<h4>
Postscript #1:</h4>
Actually, that's not what really happened. It's what I would have <i>liked</i> to happen.<br />
<br />
But there were some issues. Firstly, ironic-conductor complained about not being able to find 'ironic-rootwrap'. And then once I symlinked that into place, it couldn't find the config for rootwrap, so I symlinked that into place. Then it complained that <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">iscsiadm</span> didn't have the correct permissions in rootwrap to do it's thing...<br />
<br />
So I gave up, and did the thing I didn't want to. Back on the VM I ended up doing a "<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">sudo python setup.py install</span>" in the ironic directory so everything got installed into the correct system place and then I could restart ironic-conductor.<br />
<br />
It should all work in <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">develop</span> mode, but clearly it doesn't, so in the interests of getting something up and going (and finish this blog post :) I did the quick solution and installed system-wide. Perhaps I'll circle back and work out why someday :)<br />
<br />
<h4>
Postscript #2:</h4>
When doing this, the deployment can fail for a number of reasons. To recover, you need to delete the enrolled node and start again once you've worked out what the problem is, and worked out how to fix it. To do that you need to do:<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(venv)mrda@irony:~/src/python-ironicclient (master)$ ironic node-set-maintenance thenuc on</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">(venv)mrda@irony:~/src/python-ironicclient (master)$ ironic node-delete thenuc</span><br />
<div>
<br /></div>
Isn't it great that we can use names for nodes instead of UUIDs for most operations :)<br />
<br />
<h3>
</h3>
Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com2tag:blogger.com,1999:blog-1011343219801614525.post-6411750211180253722015-09-10T00:35:00.000-07:002015-09-17T21:56:12.749-07:00Ironic on a NUC - part 1 - Setting things upJust because a few people have asked, here is what I did to get a standalone <a href="https://wiki.openstack.org/wiki/Ironic" target="_blank">Ironic</a> installation going and running in an Intel NUC. <br />
<br />
Why a NUC? Well, the Intel NUC is a cute little piece of hardware that is well suited as a test lab machine that can sit on my desk. I'm using a <a href="http://www.intel.com/content/www/us/en/nuc/nuc-kit-dc53427hye-board-d53427rke.html" target="_blank">DC53427HYE</a>, which is an i5 with vPro. vPro is a summary term for a bunch of Intel technologies, including AMT (Active Management Technology). This allows us to remotely manage this desktop for things like power management - think of this as an analogy to IPMI for servers.<br />
<br />
<h3>
Getting the VM ready</h3>
I like to do my development in VMs, after all, isn't that what the cloud is for? :-) So first off using your virtualisation technology of choice, build a VM with Ubuntu 14.04.2 server on it. I've allocated 2Gb RAM and 30Gb disk. The reason for the larger than average disk is so that I have room for building ramdisk and deployment disk images. I've called this box '<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">irony</span>'.<br />
<br />
On the VM you'll need a few extra things installed once you've got the base OS installed:<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~$ sudo apt-get install python-openwsman ack-grep python-dev python-pip libmysqlclient-dev libxml2-dev git rabbitmq-server mysql-server isc-dhcp-server tftpd-hpa syslinux syslinux-common libxslt1-dev qemu-utils libpq-dev python-yaml open-iscsi</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">mrda@irony:~$ </span><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">sudo pip install virtualenvwrapper six tox mysql-python</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<br />
<h3>
Thinking about the network</h3>
<h3>
<div style="font-size: medium; font-weight: normal;">
For this set up, I'm going to run separate networks for the control plane and data plane. I've added a <a href="http://www.amazon.com/gp/product/B00484IEJS" target="_blank">USB NIC</a> to the NUC so I can separate the networks. My public net connection to the internet will be on the 192.168.1.X network, whereas the service net control plane will be on 10.x.x.x. To do this I've added a new network interface to the VM, changed the networking to bridging for both NICs, and assigned eth0 and eth1 appropriately, and updated /etc/network/interfaces in the VM, so the right adapter is on the right network. It ended up looking like this in <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">/etc/network/interfaces</span>:</div>
<div style="font-size: medium; font-weight: normal;">
<br /></div>
<div style="font-size: medium; font-weight: normal;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># The loopback network interface</span></div>
<div style="font-size: medium; font-weight: normal;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">auto lo</span></div>
<div style="font-size: medium; font-weight: normal;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">iface lo inet loopback</span></div>
<div style="font-size: medium; font-weight: normal;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span><span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># The primary (public) network interface</span></div>
<div style="font-size: medium; font-weight: normal;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">auto eth0</span></div>
<div style="font-size: medium; font-weight: normal;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">iface eth0 inet dhcp</span></div>
<div style="font-size: medium; font-weight: normal;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> gateway 192.168.1.1</span></div>
<div style="font-size: medium; font-weight: normal;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span><span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># Control plane</span></div>
<div style="font-size: medium; font-weight: normal;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">auto eth1</span></div>
<div style="font-size: medium; font-weight: normal;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">iface eth1 inet static</span></div>
<div style="font-size: medium; font-weight: normal;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> address 10.0.0.5</span></div>
<div style="font-size: medium; font-weight: normal;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> netmask 255.255.255.0</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div>
<br /></div>
<div>
Setting up DHCP </div>
</h3>
We need to make sure we're listening for DHCP requests on the right interface<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~$ sudo sed -i 's/INTERFACES=""/INTERFACES="eth1"/' /etc/default/isc-dhcp-server</span><br />
<br />
Now configure your DHCP server to hand out an address to the NUC, accounting for some of the uniqueness of the device :) The tail of my <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">/etc/dhcp/dhcpd.conf</span> looks a bit like this:<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">allow duplicates;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">ignore-client-uids true;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">authoritative;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">subnet 10.0.0.0 netmask 255.255.255.0 {</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> group {</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> host nuc {</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> hardware ethernet <your-nucs-mac-address>;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> fixed-address 10.0.0.251; # NUC's IP address</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> allow booting;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> allow bootp;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> next-server <this-servers-ip-address>;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> filename "pxelinux.0";</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> }</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> }</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span><br />
<div>
<br /></div>
<div>
There some more background on this in a <a href="http://lifelog.michaeldavies.org/2015/07/dhcp-and-nucs.html" target="_blank">previous blog post</a>.</div>
<br />
<h3>
Setting up TFTP</h3>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~$ sudo mkdir /tftpboot</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~$ sudo chmod a+rwx /tftpboot/</span><br />
<br />
We'll need to configure tftpd-hpa rather specifically, so<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> /etc/default/tftpd-hpa</span> looks like this:<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">TFTP_USERNAME="tftp"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">TFTP_DIRECTORY="/tftpboot"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">TFTP_ADDRESS="[::]:69"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">TFTP_OPTIONS="-vvvv --map-file /tftpboot/map-file"</span><br />
<div>
<br /></div>
<div>
We'll also need to create <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">/tftpboot/map-file</span> which will need to look like this:</div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">re ^(/tftpboot/) /tftpboot/\2</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">re ^/tftpboot/ /tftpboot/</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">re ^(^/) /tftpboot/\1</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">re ^([^/]) /tftpboot/\1</span></div>
</div>
<div>
<br /></div>
<div>
This is because of a weird combination of the feature sets of tftpd-hpa, isc-dhcp-server, ironic and diskimage-builder. Basically the combination of relative and dynamic paths are incompatible, and we need to work around the limitations by setting up a map-file. This would be a nice little patch one-day to send upstream to one or more of these projects. Of course, if you're deploying ironic in a production Openstacky way where you use neutron and dnsmasq, you don't need the map file - it's only when you configure all these things handrolicly that you face this problem.</div>
<br />
And we'll want to make sure the PXE boot stuff is all in place ready to be served over TFTP.<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~$ sudo cp /usr/lib/syslinux/pxelinux.0 /tftpboot/</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~$ sudo cp /usr/lib/syslinux/chain.c32 /tftpboot/</span><br />
<div>
<br /></div>
And now let's start these services<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~$ service tftpd-hpa restart</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~$ service isc-dhcp-server restart</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<br />
<h3>
Installing Ironic</h3>
Just install straight from github (HEAD is always installable, right?)<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~$ mkdir ~/src; cd ~/src</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~/src$ git clone https://github.com/openstack/ironic.git </span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~/src$ git clone https://github.com/openstack/python-ironicclient.git </span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~/src$ git clone https://github.com/openstack/tripleo-image-elements.git</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<br />
<h3>
Configuring Ironic</h3>
Now we'll need to configure ironic to work standalone. There's a few config options that'll need to be changed from the default including changing the authentication policy, setting the right driver for AMT, setting a hostname and turning off that pesky power state syncing task.<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~$ cd src/ironic/</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~/src/ironic (master)$ cp etc/ironic/ironic.conf.sample etc/ironic/ironic.conf.local</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~/src/ironic (master)$ sed -i "s/#auth_strategy=keystone/auth_strategy=noauth/" etc/ironic/ironic.conf.local</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~/src/ironic (master)$ sed -i "s/#enabled_drivers=pxe_ipmitool/enabled_drivers=pxe_amt/" etc/ironic/ironic.conf.local</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~/src/ironic (master)$ sed -i "s/#host=.*/host=test-host/" etc/ironic/ironic.conf.local</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~/src/ironic (master)$ sed -i "s/#sync_power_state_interval=60/sync_power_state_interval=-1/" etc/ironic/ironic.conf.local</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">mrda@irony:~/src/ironic (master)$ sed -i "s%#api_url=<None>%api_url=http://10.0.0.5:6385/%" etc/ironic/ironic.conf.local</span>
<br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">mrda@irony:~/src/ironic (master)$ sed -i "s/#dhcp_provider=neutron/dhcp_provider=none/" </span><span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">etc/ironic/ironic.conf.local</span><br />
<br />
There's also the little matter of making sure the image directories are ready:<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">mrda@irony:~/src/ironic (master)$ sudo mkdir -p /var/lib/ironic/images</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">mrda@irony:~/src/ironic (master)$ sudo mkdir -p /var/lib/ironic/master_images</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">mrda@irony:~/src/ironic (master)$ sudo chmod a+rwx /var/lib/ironic/images</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">mrda@irony:~/src/ironic (master)$ sudo chmod a+rwx /var/lib/ironic/master_images</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"></span><br />
<br />
<h3>
Initialising the database</h3>
<div>
Since we've decided to use MySQL instead of SQLite, we'll need to setup the schema and update the database connection string.</div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~/src/ironic (master)$ mysql -u root -p -e "create schema ironic"</span></div>
</div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mrda@irony:~/src/ironic (master)$ sed -i "s/#connection=.*/connection=mysql:\/\/root:<database-password>@localhost\/ironic/" etc/ironic/ironic.conf.local</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">mrda@irony:~/src/ironic (master)$ </span><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">ironic-dbsync --config-file etc/ironic/ironic.conf.local create_schema</span></div>
<div>
<br />
And that's everything that needs to be done to prepare the VM for running ironic. The next post will cover starting the ironic services, building images for deployment, and poking ironic from the command line.</div>
<br />
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<br />
<br />
<br />
<br />Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com1tag:blogger.com,1999:blog-1011343219801614525.post-65075967369599118462015-07-23T16:44:00.000-07:002015-07-23T16:44:21.828-07:00Virtualenv and library funDoing python development means using virtualenv, which is wonderful. Still, sometimes you find a gotcha that trips you up.<br />
<br />
Today, for whatever reason, inside a venv inside a brand new Ubuntu 14.04 install, I could not see a system-wide install of pywsman (installed via <span style="font-family: Courier New, Courier, monospace;">sudo apt-get install python-openwsman</span><span style="font-family: inherit;">)</span><br />
<br />
For example:<br />
<span style="font-family: 'Courier New', Courier, monospace;">mrda@host:~$</span><span style="font-family: 'Courier New', Courier, monospace;"> </span><span style="font-family: 'Courier New', Courier, monospace;">python -c 'import pywsman'</span><br />
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"># Works</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="p1">
</div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;">mrda@</span><span style="font-family: 'Courier New', Courier, monospace;">host</span><span style="font-family: Courier New, Courier, monospace;">:~$ tox -evenv --notest</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;">(venv)mrda@</span><span style="font-family: 'Courier New', Courier, monospace;">host</span><span style="font-family: Courier New, Courier, monospace;">:~$ python -c 'import pywsman'</span></div>
<div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;">Traceback (most recent call last):</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"> File "<string>", line 1, in <module></span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;">ImportError: No module named pywsman</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"># WAT?</span></div>
<div class="p1">
<br /></div>
<div class="p1">
Let's try something else that's installed system-wide</div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;">(venv)</span><span style="font-family: Courier New, Courier, monospace;">mrda@</span><span style="font-family: 'Courier New', Courier, monospace;">host</span><span style="font-family: Courier New, Courier, monospace;">:~$ python -c 'import six'</span></div>
<div class="p1">
</div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"># Works</span></div>
<div class="p1">
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div class="p1">
Why does six work, and pywsman not?</div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;">(venv)mrda@host:~$ ls -la /usr/lib/python2.7/dist-packages/six*</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;">-rw-r--r-- 1 root root 1418 Mar 26 22:57 /usr/lib/python2.7/dist-packages/six-1.5.2.egg-info</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;">-rw-r--r-- 1 root root 22857 Jan 6 2014 /usr/lib/python2.7/dist-packages/six.py</span></div>
<div class="p1">
</div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;">-rw-r--r-- 1 root root 22317 Jul 23 07:23 /usr/lib/python2.7/dist-packages/six.pyc</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;">(venv)mrda@host:~$ ls -la /usr/lib/python2.7/dist-packages/*pywsman*</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;">-rw-r--r-- 1 root root 80590 Jun 16 2014 /usr/lib/python2.7/dist-packages/pywsman.py</span></div>
<div class="p1">
</div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;">-rw-r--r-- 1 root root 293680 Jun 16 2014 /usr/lib/python2.7/dist-packages/_pywsman.so</span></div>
<div class="p1">
<br /></div>
<div class="p1">
The only thing that comes to mind is that pywsman wraps a .so</div>
<div class="p1">
<br /></div>
<div class="p1">
A work-around is to tell venv that it should use the system-wide install of pywsman, like this:</div>
<div class="p1">
<br /></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"># Kill the old venv first</span></div>
<div class="p1">
</div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;">(venv)mrda@host:~$ deactivate</span></div>
<div class="p1">
</div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;">mrda@host:~$ rm -rf .tox/venv</span></div>
<div class="p1">
<br /></div>
<div class="p1">
Now startover</div>
<div class="p1">
</div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;">mrda@host:~$ tox -evenv --notest --sitepackages pywsman</span></div>
<div class="p1">
</div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;">(venv)mrda@host:~$ python -c "import pywsman"</span></div>
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;"># Fun and Profit!</span></div>
<div class="p1">
<br /></div>
<div class="p1">
<br /></div>
</div>
Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com0tag:blogger.com,1999:blog-1011343219801614525.post-27035601235107943812015-07-22T01:23:00.001-07:002015-07-22T01:23:39.294-07:00DHCP and NUCsI've put together a little test network at home for doing some <a href="https://github.com/openstack/ironic" target="_blank">Ironic</a> testing on hardware using <a href="http://www.intel.com/content/www/us/en/nuc/nuc-kit-dc53427hye.html" target="_blank">NUC</a>s. So far it's going quite well, although one problem that had me stumped for a while was getting the NUC to behave itself when obtaining an IP address with DHCP.<br />
<br />
Each time I booted the network, a different IP address from the pool was being allocated (i.e. the next one in the DHCP address pool).<br />
<br />
There's already a <a href="https://bugs.launchpad.net/maas/+bug/1405288" target="_blank">documented problem</a> with isc-dhcp-server for devices where the BMC and host share a NIC (including the same MAC address), but this was even worse because on closer examination a different Client UID is being presented as part of the DHCPDISCOVER for the node each time. (Fortunately the NUC's BMC doesn't do this as well).<br />
<br />
So I couldn't really find a solution online, but the answer was there all the time in the man page - there's a cute little option "<span style="font-family: Courier New, Courier, monospace;">ignore-client-uids true;</span>" that ensures only the MAC address is used for DHCP lease matching, and not Client UID. Turning this on means now that on each deploy the NUC receives the same IP address - and not just for the node, but also for the BMC - it works around the aforementioned bug as well. Woohoo!<br />
<br />
There's still one remaining problem, I can't seem to get a fixed IP address returned in the DHCPOFFER, I have to configure a dynamic pool instead (which is fine because this is a test network with limited nodes in it). One to resolve another day...Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com1tag:blogger.com,1999:blog-1011343219801614525.post-82625428960771809052015-04-28T19:08:00.000-07:002015-04-28T19:11:20.372-07:00OpenStack Hint of the Day: Wed Apr 29When running <span style="font-family: Courier New, Courier, monospace;">tox</span> and you get something like this:<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">mrda@garner:~/src/python-ironicclient (review/michael_davies/file-caching)$ tox -e py34</span><br />
<span style="font-family: Courier New, Courier, monospace;">py34 runtests: PYTHONHASHSEED='3098345924'</span><br />
<span style="font-family: Courier New, Courier, monospace;">py34 runtests: commands[0] | python setup.py testr --slowest --testr-args=</span><br />
<span style="font-family: Courier New, Courier, monospace;">running testr</span><br />
<span style="font-family: Courier New, Courier, monospace;">running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./ironicclient/tests/unit} --list </span><br />
<span style="background-color: yellow; font-family: Courier New, Courier, monospace;">db type could not be determined</span><br />
<span style="font-family: Courier New, Courier, monospace;">error: testr failed (3)</span><br />
<span style="font-family: Courier New, Courier, monospace;">ERROR: InvocationError: '/home/mrda/src/python-ironicclient/.tox/py34/bin/python setup.py testr --slowest --testr-args='</span><br />
<span style="font-family: Courier New, Courier, monospace;">________________________________________________________________________________________________ summary _________________________________________________________________________________________________</span><br />
<span style="font-family: Courier New, Courier, monospace;">ERROR: py34: commands failed</span><br />
<div>
<br /></div>
<div>
The solution is to "<span style="font-family: Courier New, Courier, monospace;">rm -rf .testrepository/</span>" and try again.<br />
<br />
(Thanks to this little reference hidden away <a href="https://wiki.openstack.org/wiki/Python3#tox.2Ftestr_error:_db_type_could_not_be_determined">https://wiki.openstack.org/wiki/Python3#tox.2Ftestr_error:_db_type_could_not_be_determined</a>)</div>
Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com0tag:blogger.com,1999:blog-1011343219801614525.post-514818445688691662014-11-20T18:34:00.003-08:002014-11-20T18:45:53.210-08:00Playing with the networkI'm in the position of needing to improve my internet connectivity, so one of the first steps is to decouple all the things that provide the services I rely upon.<br />
<div>
<br /></div>
<div>
Stage one is to turn my modem into just an ADSL endpoint, removing any DHCP, NAT, and PPPoE termination from the device so that it has a single function.</div>
<div>
<br /></div>
<div>
Fortunately my nb604n ADSL modem has a nice easy-to-follow guide for taking it into bridge mode: <a href="http://support.netcommwireless.com/sm/videos/nb604n/nb604n-bridge-mode-setup-guide">http://support.netcommwireless.com/sm/videos/nb604n/nb604n-bridge-mode-setup-guide</a></div>
<div>
<br /></div>
<div>
Now onto greater things!</div>
<div>
<br /></div>
Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com0tag:blogger.com,1999:blog-1011343219801614525.post-10949433079487866642014-07-05T18:54:00.000-07:002014-07-10T21:15:39.149-07:00LCA2015 CFP Closing Real Soon NowIt's July, which means the <a href="http://lca2015.linux.org.au/" target="_blank">LCA2015</a> <a href="http://lca2015.linux.org.au/cfp" target="_blank">CFP</a> is open... but not for much longer.<br />
<br />
I've been reading through what's been submitted so far, and it looks like linux.conf.au will again have an <b>excellent</b> program. But, as Co-Chair of the Papers Committee, I want the program to be even better! :-)<br />
<br />
So if you're working on a open-source or open-hardware project, and you're doing cool stuff, why not come to Auckland in January and speak at one of the best community-driven open-source conferences in the world? We've got some great information on <a href="http://lca2015.linux.org.au/cfp/gettingyourproposal" target="_blank">how to get your proposal accepted</a> (also in <a href="https://www.youtube.com/watch?v=Fbg2txfYbaM" target="_blank">video</a>) to help you put your proposal together.<br />
<br />
But to be a speaker at LCA2015 you need to make a proposal to speak to the CFP (which closes next <strike>Friday</strike> Sunday on July 13). So hurry up, and <a href="http://lca2015.linux.org.au/cfp" target="_blank">submit your proposal</a> today!<br />
<br />Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com1tag:blogger.com,1999:blog-1011343219801614525.post-80348020845861794882014-05-25T19:02:00.002-07:002014-05-25T19:05:14.603-07:00OpenStack Summit KeysigningIt's been a while since I've gone to a <a href="https://www.gnupg.org/" target="_blank">GPG</a> <a href="http://keysigning.org/methods/sassaman-efficient" target="_blank">keysigning</a>, but at the Juno <a href="https://www.openstack.org/summit/openstack-summit-atlanta-2014/" target="_blank">OpenStack Summit in Atlanta</a> I joined in. After all, it was my first summit and getting some id authentication is worthwhile.<br />
<br />
After the keysigning party I made use of <a href="http://bloc.eurion.net/archives/2010/gpg-key-signing-with-caff/" target="_blank">caff</a> to sign all those keys. But of course I needed to configure SMTP first in my development VM. There's a nice guide to <a href="http://blog.bobbyallen.me/2013/12/30/using-gmail-with-postfix-as-an-smtp-relay/" target="_blank">getting postfix working with gmail</a> which helped that go quickly. Just remember that <a href="https://support.google.com/mail/answer/1173270?hl=en" target="_blank">gmail likes Application-specific passwords</a> nowadays.<br />
<br />
Oh, and another thing. GPG has awful error messages. When you receive your key signed by a third-party and you try to <span style="font-family: Courier New, Courier, monospace;">gpg --import</span> it and you get the dreaded:<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">$ gpg --import your-signed-key.asc </span><br />
<span style="font-family: Courier New, Courier, monospace;">gpg: no valid OpenPGP data found.</span><br />
<span style="font-family: Courier New, Courier, monospace;">gpg: Total number processed: 0</span><br />
<span style="font-family: Courier New, Courier, monospace;">$ file your-signed-key.asc </span><br />
<span style="font-family: Courier New, Courier, monospace;">your-signed-key.asc: PGP message</span><br />
<div>
<br /></div>
<div>
...remember that the key has probably been encrypted with your public key so only you can read it. The way around this is a simple:</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">$ gpg --decrypt your-signed-key.asc | gpg --import</span></div>
<div>
<br /></div>
<div>
Things would be mush easier if gnupg provided suggestions, but life often isn't that easy :)</div>
<div>
<br /></div>
Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com0tag:blogger.com,1999:blog-1011343219801614525.post-74046438894649971682014-01-18T02:55:00.001-08:002014-01-18T02:57:22.059-08:00LCA TV: More fun at linux.conf.au 2014<a href="http://lca2014.linux.org.au/" target="_blank">LCA2014</a> was a whole lot of fun, for so many reasons! One thing I love is talking with people from all over the Free and Open Source community from around the world - meeting new people doing exciting things, as well as catching up with those who have become dear friends from years of shared experiences.<br />
<br />
This year James Bromberger had a wonderful idea: LCA TV. How about we interview people on the couch and broadcast these casual chats live alongside the conference video streams? A kind of free software equivalent of David Letterman or Steve Vizard. This fantastic new thing allowed me to combine a few of my favourite things together, and allow others to get to know some of the conference attendees in a more casual setting.<br />
<br />
So, how did it go? It went off like a bang, and despite having a few technical challenges, I think this 'experiment' was a raving success, and hopefully the start of yet another LCA tradition!<br />
<br />
The result of these videos are now available over on youtube: <a href="http://www.youtube.com/playlist?list=SPmiuOcBMoxjdzEQTvqwHH46VbCib-_Icd">http://www.youtube.com/playlist?list=SPmiuOcBMoxjdzEQTvqwHH46VbCib-_Icd</a> and will soon also appear on the <a href="http://mirror.linux.org.au/" target="_blank">LCA mirror</a>.Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com0tag:blogger.com,1999:blog-1011343219801614525.post-78369210213553622712014-01-13T18:11:00.002-08:002014-01-13T18:12:33.141-08:00Getting your CFP abstract accepted 101 - linux.conf.au 2014I had the wonderful privilege of speaking at <a href="http://lca2014.linux.org.au/" target="_blank">linux.conf.au 2014</a> last week in Perth, Australia on <i>Getting your CFP abstract accepted 101</i>. This is in the context of the linux.conf.au papers committee, which I've been a part of for the past decade.<br />
<br />
I feel like it's an important service to the community to help some of the amazingly smart people who attend linux.conf.au take the step up to becoming a speaker. I hope that what I've had to say will assist, and I feel honoured that I myself was given the opportunity to speak to this (despite my protestations that other talks be accepted instead).<br />
<br />
Here's a link to the <a href="http://mirror.linux.org.au/linux.conf.au/2014/Wednesday/72-Getting_your_CFP_abstract_accepted_101_-_Michael_Davies.mp4" target="_blank">video of my talk</a>, and to the <a href="http://michaeldavies.org/talks/LCA2014-Getting-your-CFP-abstract-accepted-101.pdf" target="_blank">slide pack</a>.<br />
<br />
Any comments on this material, or on my presentation, are of course welcomed!<br />
<br />Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com0tag:blogger.com,1999:blog-1011343219801614525.post-24068772617347281922014-01-02T19:46:00.000-08:002014-01-02T19:46:00.590-08:00LCA2014 - 2 sleeps to go!Somehow, 99 days have flown by and we're now at 2 sleeps until <a href="http://lca2014.linux.org.au/">LCA2014</a>. Wow.<br />
<br />
So what's happened in this period? How can 99 days pass without comment? It's only by examining my photo-stream and Tripit that I can piece together what's been happening:<br />
<br />
I started a great new job at <a href="http://www.rackspace.com/">Rackspace</a> working on upstream <a href="http://openstack.org/">OpenStack</a> - which has been wonderful! I've helped out on a school camp for 10 year olds. I've been to San Antonio for the first time, and Sydney 4 times. I've dressed up as a mullet-toting 80's rocker and had weekends away on Yorke Peninsula, Victor Harbor and Mt Crawford forrest (twice) with my family. And spent many nights playing board games with good friends.<br />
<br />
<br />
<div>
Life is busy but such a blessing.</div>
<div>
<br /></div>
<div>
The next week is also a highlight of the year - linux.conf.au. The best conference going, along with a great community of freedom lovers! Not to mention catching up with a whole bunch of people I only get to see once a year. What talks am I looking forward to this coming week?</div>
<div>
<ul>
<li>Monday: </li>
<ul>
<li>There's a bunch of stuff on the <b>Developer, Testing, Release and Continuous Integration Automation</b> miniconf that's interesting, especially <i>failtest: more path testing for C</i>. </li>
</ul>
<li>Tuesday: </li>
<ul>
<li>Just about everything in the <b>OpenStack Miniconf</b>. This will be fantastic!</li>
</ul>
<li>Wednesday: </li>
<ul>
<li>VirtIO 1.0: A Standard Emerges</li>
<li>Building an affordable differential GPS positioning system</li>
<li>Linception: Playing with containers under linux</li>
<li>Python 3: Making the Leap</li>
<li>HTTP/2.0 And You</li>
<li>Rock your Emacs</li>
<li>The changing Linux kernel development process</li>
<li>Building 2D rendering acceleration with OpenGL</li>
<li>Embedding Codec 2</li>
<li>Bringing more women to Free and Open Source Software</li>
<li>Advances in Validation of Concurrent Software</li>
<li>Continuous Integration for your database migrations</li>
</ul>
<li>Thursday:</li>
<ul>
<li>Python Packagin 2.0: Playing well with others</li>
<li>Rapid OpenStack Deployment for Novices and Experts Alike</li>
<li>Gtk to Qt - a strange journey</li>
<li>Going Global: Building Global Clusters for OpenStack Swift</li>
<li>OpenCL, saving parallel programmers pain today!</li>
<li>Zero-Copy Compositing Research to Reality</li>
<li>There and Back Again: An Unexpected Journey in Agile Documentation</li>
<li>Introduction to Go</li>
</ul>
<li>Friday:</li>
<ul>
<li>Raspberry Pi Hacks</li>
<li>Building APIs Develoers Love</li>
<li>How OpenStack Improves Code Quality with Project Gating and Zuul</li>
<li>The Rust Language: memory, ownership and lifetimes</li>
<li>Diskimage-builder: deep-dive into a machine compiler</li>
<li>The best CTDB bugs ever!</li>
<li>Processing Continuous Integration Log Events for Great Good</li>
<li>Best of Breed vs Batteries Included: Design Decisions When Building Frameworks</li>
<li>Provisioning Baremetal with OpenStack</li>
</ul>
</ul>
</div>
<div>
<br /></div>
Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com0tag:blogger.com,1999:blog-1011343219801614525.post-45188977035081015502013-09-25T17:08:00.001-07:002013-09-26T14:45:09.818-07:00LCA2014 - only 101 days to go!<a href="http://www.timeanddate.com/countdown/generic?iso=20140106T09&p0=5&msg=LCA2014" target="_blank">Only 101 days</a> until <a href="http://lca2014.linux.org.au/">LCA2014</a> begins. All very exciting!<br />
<br />
Early Bird registrations are already open, if you haven't already you should <a href="https://lca2014.linux.org.au/registration/new">secure your spot</a> before they sell out.<br />
<br />
In other news, the miniconfs are all getting themselves organised, and for various reasons, I'm quite looking forward to the <a href="http://sites.rcbops.com/lca2014_openstack/">LCA2014 OpenStack miniconf</a>. Should be a blast!Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com0tag:blogger.com,1999:blog-1011343219801614525.post-62655504508182322742013-07-17T16:37:00.001-07:002013-07-17T17:40:08.483-07:00Continuous Integration with python and blink(1)I've been a big fan of <a href="https://en.wikipedia.org/wiki/Continuous_integration">Continuous Integration</a> / <a href="https://en.wikipedia.org/wiki/Continuous_deployment">Continuous Deployment</a> (CI/CD) for some time now, and we've been using it with great success in my day job building <a href="https://secure2.internode.on.net/nodetools/coverage-checker">something awesome</a>. But that setup is team-focussed, uses a build server, is triggered from revision code checkin, with promotion between development, test, staging and production environments gated by passing all the regression suite tests. We even spam the team over Jabber when tests fail.<br />
<br />
At the other end of the scale is personal software development on my laptop. Here I want something more lightweight that the excellent <a href="http://jenkins-ci.org/">Jenkins</a>, and I want builds triggered not on revision control checkins, but on <i>every</i> save. In essence, something <i>compatible</i> with the team-focussed environment, but something <i>even more</i> agile and lightweight.<br />
<br />
My personal development is more likely to be in Python than anything else, and I like to write my code <a href="http://en.wikipedia.org/wiki/Test-driven_development">test-first</a>. Normally I have three windows open - one editor for code, one editor for test code, and one shell with <a href="https://github.com/mrda/junkcode/blob/master/onchange.pl">onchange.pl</a> running to automatically run tests every time a change is made to tests or code. This is all well and good, but it still requires me to take my focus off the editors and check that tests succeeded in the shell window. This can be improved upon.<br />
<br />
Enter my latest toy, <a href="http://thingm.com/products/blink-1.html">blink(1)</a>. It's a USB multi-coloured RGB LED, that's <a href="https://github.com/todbot/blink1">easily programmable with code available</a>. But they provide a command-line tool which is sufficient for many use cases.<br />
<br />
With a small script that checks the result of the test run, it's very easy to get blink(1) to give me a quick visual indication of the result of my development efforts. It's as simple as...<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#!/bin/bash</span><br />
<span style="font-family: Courier New, Courier, monospace;">nosetests</span><br />
<span style="font-family: Courier New, Courier, monospace;">if [ "$?" -eq "1" ]</span><br />
<span style="font-family: Courier New, Courier, monospace;">then</span><br />
<span style="font-family: Courier New, Courier, monospace;"> blink1-tool --red --blink 5 2>&1 >/dev/null</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">else</span><br />
<span style="font-family: Courier New, Courier, monospace;"> blink1-tool --green 2>&1 >/dev/null</span><br />
<span style="font-family: Courier New, Courier, monospace;"> sleep 5</span><br />
<span style="font-family: Courier New, Courier, monospace;">fi</span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;">blink1-tool --off 2>&1 >/dev/null</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiofWdPhsRr7roc68MF-cJwM0enFp-u3K2B_AMYXf4j8jzMn8tN0NalUwmsdkXSC90RWIPucsY0U7nzSBK78E3L3fwVfH92ZK7oddFFLdoZ7vXbjuAJP1cmr5NUbQOGhuJkRFJbQe25JJyq/s1600/photo.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiofWdPhsRr7roc68MF-cJwM0enFp-u3K2B_AMYXf4j8jzMn8tN0NalUwmsdkXSC90RWIPucsY0U7nzSBK78E3L3fwVfH92ZK7oddFFLdoZ7vXbjuAJP1cmr5NUbQOGhuJkRFJbQe25JJyq/s320/photo.JPG" width="320" /></a></div>
<br />
Maybe it's a bit gimmicky, but so far I'm <i>loving</i> it!<br />
<br />Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com0tag:blogger.com,1999:blog-1011343219801614525.post-91352598539806770732013-07-08T21:26:00.002-07:002014-06-25T02:10:35.238-07:00Updating Ubuntu's sources.list<span style="font-family: Arial, Helvetica, sans-serif;">Frustratingly, I keep on forgetting to:</span><br />
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">sudo bash
</span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;">cd /etc/apt</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">cp sources.list sources.list-`date +%Y%m%d`</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">sed -i 's#au.archive.ubuntu.com/ubuntu#mirror.internode.on.net/pub/ubuntu/ubuntu#g' sources.list
</span><br />
<div>
<span style="background-color: white; color: #444444; font-family: Consolas, Monaco, 'Lucida Console', monospace; font-size: 12px; line-height: 24px;"><br /></span>
<span style="background-color: white; color: #444444; font-family: Arial, Helvetica, sans-serif; line-height: 24px;">This really needs to be a post-install hook or something.</span></div>
</div>
</div>
Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com1tag:blogger.com,1999:blog-1011343219801614525.post-17478540697396914442013-06-26T19:52:00.000-07:002013-06-26T19:53:40.938-07:00New Work MBP has arrived!Just took hold of my new work MacBook Pro. It's one of the new Retina 15-inch laptops (early 2013) running Mac OS X 10.8.4. With a 2.4 GHz i7 with 8GB DDR3 1600 MHz RAM, 250Gb SSD, & NVIDIA GeForce GT 650M 1025Mb graphics it should fly.<br />
<br />
[The old MBP was getting a little long in the tooth - it has developed some heat-related hardware faults such as wireless network failures and sticky keyboards keys. It was a 15-inch Early 2008 running Mac OS X 10.7.5, 2.4GHz Core 2 Duo, 4 Gb DDR2 667 MHz RAM, 200Gb SATA Disk, & NVIDIA GeForce 8600M GT 256Mb graphics. But at least it had an optical drive!]<br />
<br />
Just for posterity, here's the list of things I needed to do to set it up:<br />
<br />
<ul>
<li>Apply OS updates to bring it up to the latest Mac OS X release</li>
<li>Move over my GPG and SSH keys</li>
<li>Install <a href="https://www.virtualbox.org/">VirtualBox</a> 4.2.14 and move over the VMs from my old laptop.</li>
<li>Setup Mac Mail and Calendar to connect to the local Exchange server and to hit my Google accounts</li>
<li>Install <a href="https://gpgtools.org/">GPGTools</a></li>
<li>Install <a href="https://www.google.com/intl/en/chrome/browser/">Google Chrome</a></li>
<li>Install <a href="https://www.dropbox.com/">Dropbox</a></li>
<li>Install <a href="https://developer.apple.com/xcode/">XCode</a> (and then the Command-line Tools from inside XCode)</li>
<li>Install <a href="http://mxcl.github.io/homebrew/">Homebrew</a> (and then a whole schwag of things: ack, bcrypt, berkeley-db, boost, cowsay, daemontools, gearman, git, glib, gnupg, graphviz, postgresql, python3, s3sync, sipcalc, sl, sqlite, wget etc :-)</li>
<li>Install <a href="http://agilebits.com/onepassword">1Password3</a> (moving the licence over)</li>
<li>Install <a href="http://caffeine.en.softonic.com/mac">Caffeine</a></li>
<li>Install <a href="http://www.omnigroup.com/products/omnigraffle/">Omnigraffle</a> (moving the licence over)</li>
<li>Install <a href="http://culturedcode.com/things/">Things</a> (moving the licence over)</li>
<li>Install <a href="http://www.appzapper.com/">AppZapper2</a> (moving the licence over)</li>
<li>Install <a href="https://itunes.apple.com/au/app/bettersnaptool/id417375580?mt=12">BetterSnapTool</a> (out of the Apple AppStore)</li>
<li>Install <a href="http://colloquy.info/">Colloquy</a></li>
<li>Install <a href="http://www.dbvis.com/">DBVisualiser</a></li>
<li>Install <a href="http://www.soapui.org/">SoapUI</a></li>
<li>Transfer over ~/src, ~/Documents, ~/Downloads from my account on the old laptop</li>
</ul>
<div>
And then reimage the old laptop before handing it back.</div>
<div>
<br /></div>
Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com0tag:blogger.com,1999:blog-1011343219801614525.post-34081633444550587102013-05-20T22:10:00.002-07:002013-05-20T22:12:00.179-07:00First post!My website disappeared earlier this month as a result of costly disk crash. I was bitten by some lovely EXT4 corruption, on an Ubuntu 10.04 image, in a VirtualBox environment. Of course I had backups, but they likewise failed me when the time came to restore.<br />
<br />
So I've lost 9 years of weblog.<br />
<br />
I have rediscovered the importance of testing the restorability of your backups, and yet again read <a href="http://www.taobackup.com/">The Tao of Backup</a>. I've taken my cod liver oil and learnt my lesson.<br />
<br />
So it's time to start again, hence this log of life that I'm now starting...Michael Davieshttp://www.blogger.com/profile/00273052548165190651noreply@blogger.com0