<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
  <title>Pete Wilcock</title>
  <atom:link href="https://www.petewilcock.com/feed/" rel="self" type="application/rss+xml"/>
  <link>https://www.petewilcock.com/</link>
  <description>Notes on AWS, DevOps, contracting and the occasional marathon training plan.</description>
  <lastBuildDate>Wed, 30 Sep 2026 11:04:24 +0000</lastBuildDate>
  <language>en-US</language>
  <item>
    <title>Walking the talk of IR35 – by quitting a contract</title>
    <link>https://www.petewilcock.com/walking-the-talk-of-ir35-by-quitting-a-contract/</link>
    <guid isPermaLink="true">https://www.petewilcock.com/walking-the-talk-of-ir35-by-quitting-a-contract/</guid>
    <pubDate>2021-02-22</pubDate>
    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator>
    <category>IR35</category>
    <category>Recruitment</category>
    <description>Should you offer notice on a contract when it’s not compliant? I did, and I’ll tell you why. Reading Time: 6 minutes Winning the Work A while back, I agreed to commence on a contract for a large Financial Services institution. After completing the ‘interview’ process (a format which, in my...</description>
    <content:encoded>&lt;p&gt;Should you offer notice on a contract when it’s not compliant? I did, and I’ll tell you why.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Reading Time: &lt;/strong&gt;6 minutes&lt;/p&gt;
&lt;h3&gt;Winning the Work&lt;/h3&gt;
&lt;p&gt;A while back, I agreed to commence on a contract for a large Financial Services institution. After completing the ‘interview’ process (a format which, in my previous article on IR35, shouldn’t exist for B2B), I was sent a contract by the agency. I had this promptly reviewed for IR35 compliance and, as it always does, it came back with a couple of recommended changes. One of the offending clauses was a requirement for my business to notify the agency ‘by 9am’ if for any reason I wasn’t able to work that day. The language was deemed to be unduly controlling – in the event my business’ staff are out of action, I will of course notify my client as a professional courtesy. But to have this written as a strict requirement smacks too much of making sure you’re reporting in like an employee. It’s an example of confused writing that afflicts the average contract and unwittingly structures and refers to clauses as if the engagement is employer/employee and not, as it should be, business to business.&lt;/p&gt;
&lt;p&gt;There was a significant delay going back and forth, as the agency’s legal advisers were pushing back on the minor changes, either claiming that they were redundant or outright accusing my own advisers of not understanding the wording properly. Eventually the agency decided to use a different contract template from their parent company which was compliant with being clearly outside-IR35 , and we went ahead. Because of all the toing and froing the desired commencement date was pushed slightly but I eventually turned up on the client site ready to get started….&lt;/p&gt;
&lt;h3&gt;Hitting the ground running?&lt;/h3&gt;
&lt;p&gt;The client was perhaps not best prepared for my arrival.&lt;/p&gt;
&lt;p&gt;Many contractors will have had a similar experience where they arrive on site only for it to occur to the client for the first time that there’s a variety of system on-boarding, familiarisation, discussion on project objectives et al. that are needed to get started. Consequently the first few days are spent sat in limbo whilst you await turgid processes to be enacted and then grind their way through the system. In a proper B2B relationship this is something that should happen asynchronously ‘offline’ before you even commence. Since this is an expensive industry to engage a consultancy in, it’s terribly poor value for money to have your consultant turn up only to then allow them to spin their wheels to no productive end. This is exacerbated by the illogical insistence of the client to have you on-site continuously, even when it’s clear there’s nothing to require you to be physically present.&lt;/p&gt;
&lt;h3&gt;This doesn’t feel right&lt;/h3&gt;
&lt;p&gt;It was at this point the alarm bells really started to ring. I was expecting to have a significant discussion to clearly define what would be deliverable in the engagement’s duration (6 months), but this didn’t transpire. What actually happened is that I was given a brief overview of their system’s chequered history – hard to maintain, poor processes, extreme difficulty in deploying and upgrading – and I was then asked to attend to a couple of minor work items within their existing constraints.&lt;/p&gt;
&lt;p&gt;This didn’t sound right to me, but I supposed this might be a tentative water-testing exercise to ensure I was capable of what my business had represented during ‘interview’. After knocking these off pretty easily, I was then in the awkward position of having to go back and ask for more. What do I do now? What do you want next? These are questions a contractor should &lt;strong&gt;never&lt;/strong&gt; have to ask. A clearly defined project of work with objectives and milestones should allow you to work fairly autonomously whilst only providing the client with updates or asking for some clarifications. That also means you shouldn’t need to be on-site unless there’s a clear reason to be. Some senior purse-string types have an unfortunate tenancy to want to see ‘bums on seats’ to justify the costs, but I maintain that unless there is a clear requirement, the consulting business has the discretion as to whether they need to be there.&lt;/p&gt;
&lt;p&gt;What didn’t help was that their system was entirely undocumented. No wiki pages or comments in code describing how any of their system worked – it all existed in the heads of two senior engineering leads. Whilst a lot of it can be worked out by an experienced engineer, albeit very slowly and with much frustration, there are often various areas of ‘magic’ that simply need explaining. This constant dependence again just felt too employee-esque – there wasn’t enough information available to do any independent working.&lt;/p&gt;
&lt;p&gt;So I sat there, bored out of my mind, attending to a couple of rudimentary tweaks to their existing system whilst documenting other parts for my own future reference.&lt;/p&gt;
&lt;h3&gt;Breaking Point&lt;/h3&gt;
&lt;p&gt;After exactly 3 weeks, I felt I had no choice but to offer notice on the contract. There wasn’t a project here to do. I was sitting there, wasting time, attending to dribs and drabs within an existing and pretty poor system. A bad system isn’t a problem – quite the contrary, it represents a bursting seam of potential to be mined – with a formalised appraisal, project plan to remediate, and then execution and delivery. That’s what you engage a consultant contractor to do – not have them sit there like an employee doing whatever occurs to you on an entirely ad-hoc basis.&lt;/p&gt;
&lt;p&gt;Since my contract was actually with the agency – I contacted them to offer notice. Amusingly they then asked if I’d told the client and I reminded them that, technically, they were the ones I had to offer notice to, and it was up to them to notify their own client. Which they then dutifully do, and exactly 10 minutes later the client asks for a meeting.&lt;/p&gt;
&lt;h3&gt;Hope for the future?&lt;/h3&gt;
&lt;p&gt;First of all – ouch, it felt awkward. Having to tell a perfectly nice bunch of people that you can’t work for them any more – but also that it’s nothing personal. There are very many ways this can turn into a very nasty and unpleasant conversation if not handled well.&lt;/p&gt;
&lt;p&gt;Much to my relief, it was actually a really positive experience. After carefully explaining my concerns around the nature of the work, lack of specification, and the need for IR35 compliance, they completely conceded to all of it. They admitted that they often treat contractors like backfilled employees, and whilst they were somewhat aware of IR35 regulations they agreed they needed to be better, and that engagements should be properly scoped pieces of work. It was simply that they were under too much day-to-day pressure, and their need was too urgent to stop to try to work it out properly. They’d also not had any top-down guidance from management, but also seemingly felt like they didn’t have enough internal political punching power to make the structural changes required. In a word, they were between a rock and a hard place.&lt;/p&gt;
&lt;p&gt;I felt sincerely sorry for them. They were genuinely nice guys, working hard, doing their best under pressure. I also felt like I was leaving them in the lurch when they clearly needed help – and yet everything I’d said was true, and to remain was just too much of a risk for my business. They asked if I’d consider re-engaging if they could get their act together and come up with a project specification – and I said I would. I also said that such an effort wouldn’t be wasted regardless, as the next contractor would have a much better time of it.&lt;/p&gt;
&lt;h3&gt;Why not just shut up and keep your head down?&lt;/h3&gt;
&lt;p&gt;A lot of contractors might take this attitude, and fair enough. There are a three factors that allowed me to take such a position, namely:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;My business has cash reserves. Contractors usually refer to this as a ‘warchest’. It means that if I don’t have a contract right now I won’t die of hunger any time soon.&lt;/li&gt;
&lt;li&gt;My industry is a busy one – at least for the moment. Endless demand for particular skills means there’s always someone knocking at the door wanting to know if I’m available. Quite the fortunate luxury not available to many people.&lt;/li&gt;
&lt;li&gt;I’m annoyingly principled whilst being sensibly cautious. Sometimes you deliberately shoot yourself in the foot because it’s the right or safest thing to do.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Three simple things, and yet if I didn’t have the first two I seriously doubt I’d have the third. If I needed the work badly and contracts were few and far between, could I really afford to argue the toss with an agency or client that their terms of engagement weren’t strictly by the regulations? My fellow contractors have often told me that it’s not worth the martyrdom to quit a contract on the principle. Consistently late payments, poor treatment, horrendous working environment – sure, switch to a new contract as soon as possible. But because you’re trying to future-proof against possible non-compliance with IR35? Madness.&lt;/p&gt;
&lt;h3&gt;Not all contractors are equal&lt;/h3&gt;
&lt;p&gt;It does make me wonder – how many ‘businesses’ are falling foul of the rules not because they’re willfully non-compliant, but because they have no choice? The responses to &lt;a href=&#34;https://www.linkedin.com/pulse/ir35-easily-avoided-its-time-get-programme-pete-wilcock/&#34; rel=&#34;noopener&#34;&gt;my last article&lt;/a&gt; raised an important point that I hadn’t addressed – some individuals are being compelled to register and work through a limited company. Clients and agencies are often demanding it as part of the contract, and individuals want the boxes ticked and so they comply. But unlike me, they don’t want to be a business, and probably don’t think of themselves as such. They’re in prime position to fall foul of the rules, probably have very little awareness of that fact, and will not be well-armed if and when the taxman comes knocking.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.contractoruk.com/forums/ir35-reform/129193-forced-into-contracting-read.html&#34; rel=&#34;noopener&#34;&gt;https://www.contractoruk.com/forums/ir35-reform/129193-forced-into-contracting-read.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Not every industry has a specialist-skills shortage, and very many people can’t be precious or demanding about their terms. Yet at the current time Her Majesty’s finest will come down on these people with a sledgehammer if given the merest hint that there’s avoided tax to be clawed back, legitimately or not.&lt;/p&gt;
&lt;p&gt;It’s a sorry state of affairs where, in classic style, the Treasury’s response to a relatively minor issue is to &lt;a href=&#34;https://www.youtube.com/watch?v=aCbfMkh940Q&#34; rel=&#34;noopener&#34;&gt;nuke it from orbit, because it’s the only way to be sure&lt;/a&gt;. The collateral damage to legitimate industry has already been felt in the public sector, but it’s at least hoped that the private sector will be much less-inclined to bend the knee, whilst also proving itself more adept to ensuring technical and genuine compliance with the rules, no matter how pedantic those rules are.&lt;/p&gt;
&lt;p&gt;—-&lt;/p&gt;
&lt;h2&gt;Related: &lt;a href=&#34;https://www.petewilcock.com/ir35-is-easily-avoided-but-its-time-to-get-with-the-programme/&#34;&gt;IR35 is easily avoided, but it’s time to get with the programme&lt;/a&gt;&lt;/h2&gt;</content:encoded>
  </item>
  <item>
    <title>Recommended Daily Allowance (RDA) for Electrolytes while fasting</title>
    <link>https://www.petewilcock.com/recommended-daily-allowance-rda-for-electrolytes-while-fasting/</link>
    <guid isPermaLink="true">https://www.petewilcock.com/recommended-daily-allowance-rda-for-electrolytes-while-fasting/</guid>
    <pubDate>2019-12-27</pubDate>
    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator>
    <category>Health</category>
    <description>If you’re on a keto diet, intermittant-fasting, or water-fasting, you might be supplementing with electrolytes to alleviate Keto-flu, heart palpitations, headaches, muscle-shakes, and a variety of other ailments that can happen when you’re restricting your food intake. But what is the reference...</description>
    <content:encoded>&lt;p&gt;If you&amp;#8217;re on a keto diet, intermittant-fasting, or water-fasting, you might be supplementing with electrolytes to alleviate Keto-flu, heart palpitations, headaches, muscle-shakes, and a variety of other ailments that can happen when you&amp;#8217;re restricting your food intake.&lt;/p&gt;&lt;p&gt;But what is the reference intake, or recommended daily allowance, for these electrolytes?&lt;/p&gt;&lt;p&gt;The list below breaks down the essentials.&lt;/p&gt;&lt;h3&gt;Sodium Chloride (Salt)&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;No more than 6g of salt (2.4g of sodium) a day&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Potassium&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;3500mg a day for adults&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Magnesium&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;300mg a day for men (19 to 64 years)&lt;/li&gt;&lt;li&gt;270mg a day for women (19 to 64 years)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;*Figures based on UK NHS recommendations.&lt;/p&gt;
&lt;h2&gt;What should I take for electrolyte supplementation whilst fasting?&lt;/h2&gt;&lt;p&gt;This is not official medical advice (consult your Doctor, as they say). but my personal recommendation is MyProtein Electrolyte tablets. They&amp;#8217;re easy to swallow, and are very simple and effective. Rather than trying to work in the electrolytes in some other way or just chugging salt directly (yuk)&lt;/p&gt;
&lt;p&gt;If you work out and sweat a lot, &lt;strong&gt;2 of these tablets a day&lt;/strong&gt; will help maintain your electrolytes under a normal diet. Whilst fasting or on keto, I&amp;#8217;d cautiously suggest &lt;strong&gt;3-5 tablets&lt;/strong&gt; spaced throughout the day. &lt;strong&gt;DO&lt;/strong&gt; be very careful with how many you take and start small &amp;#8211; excessive consumption of electrolytes can have many negative side-effects. See this &lt;a href=&#34;https://www.livestrong.com/article/507396-negative-effects-of-drinking-too-many-electrolytes/&#34; rel=&#34;noopener&#34;&gt;LiveStrong&lt;/a&gt; article for details.&lt;/p&gt;</content:encoded>
  </item>
  <item>
    <title>AWS Lambda: “ModuleNotFoundError No Module named _foo or foo” Solution</title>
    <link>https://www.petewilcock.com/aws-lambda-modulenotfounderror-no-module-named-_foo-or-foo-solution/</link>
    <guid isPermaLink="true">https://www.petewilcock.com/aws-lambda-modulenotfounderror-no-module-named-_foo-or-foo-solution/</guid>
    <pubDate>2019-09-23</pubDate>
    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator>
    <category>Amazon Web Services</category>
    <category>Python</category>
    <description>There are two reasons you might encounter this issue on AWS Lambda. You’re attempting to import a library that isn’t available by default in the Lambda Runtime environment. In which case you need to include the dependencies in the /python directory of your function package or included Lambda...</description>
    <content:encoded>&lt;p&gt;There are two reasons you might encounter this issue on AWS Lambda.&lt;/p&gt;&lt;h2&gt;You&amp;#8217;re attempting to import a library that &lt;a href=&#34;https://gist.github.com/gene1wood/4a052f39490fae00e0c3&#34; rel=&#34;noopener&#34;&gt;isn&amp;#8217;t available by default&lt;/a&gt; in the Lambda Runtime environment.&lt;/h2&gt;&lt;p&gt;In which case you need to &lt;a href=&#34;https://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html&#34; rel=&#34;noopener&#34;&gt;include the dependencies&lt;/a&gt; in the /python directory of your function package or included Lambda layer.&lt;/p&gt;&lt;p&gt;You&amp;#8217;ve already done that but it&amp;#8217;s still not working? Does it seem like the function is just denying reality?! Read on&amp;#8230;&lt;/p&gt;&lt;h2&gt;You&amp;#8217;ve included libraries for the wrong version of Python&lt;/h2&gt;&lt;p&gt;Depending on the module, python might insist that you provide the &lt;strong&gt;exact version&lt;/strong&gt; that matches the Lambda runtime that you&amp;#8217;re using in AWS. This means if you&amp;#8217;re using Python 3.7 in AWS, but did a pip install in your build environment on Python 3.6, it might not work.&lt;/p&gt;&lt;p&gt;Easiest solution would be to ensure you have a build environment that can use &lt;code&gt;pip3.7 install -target /targetdir -r requirements.txt&lt;/code&gt; to ensure you&amp;#8217;ve got matching versions.&lt;/p&gt;&lt;p&gt;I&amp;#8217;ve also observed what can only be described as OS-specific &lt;em&gt;weirdness&lt;/em&gt; when trying to do this in MacOS with ostensibly the correct Python version. For safety I ended up performing my packaging builds using the &lt;a href=&#34;https://hub.docker.com/_/python&#34; rel=&#34;noopener&#34;&gt;Official Python 3.7 docker image&lt;/a&gt;, which worked perfectly.&lt;/p&gt;</content:encoded>
  </item>
  <item>
    <title>Using Poppler/pdftotext and other custom binaries on AWS Lambda</title>
    <link>https://www.petewilcock.com/using-poppler-pdftotext-and-other-custom-binaries-on-aws-lambda/</link>
    <guid isPermaLink="true">https://www.petewilcock.com/using-poppler-pdftotext-and-other-custom-binaries-on-aws-lambda/</guid>
    <pubDate>2019-09-20</pubDate>
    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator>
    <category>Amazon Web Services</category>
    <category>DevOps</category>
    <description>A recurring question with AWS Lambda functions is how to properly use third-party binary executables in the Lambda execution environment. A lot of people like to use precompiled binaries but often they’re not available and the only option is to compile the package you want to use from source....</description>
    <content:encoded>&lt;p&gt;A recurring question with AWS Lambda functions is how to properly use third-party binary executables in the Lambda execution environment. A lot of people like to use precompiled binaries but often they&amp;#8217;re not available and the only option is to compile the package you want to use from source.&lt;/p&gt;&lt;p&gt;Before I get into detail I&amp;#8217;ll break it down into the 3 required steps:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Compile the desired package from source in the Lambda Runtime kernel&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Package up the executables and dependent shared libraries into a zip&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Include the package within your Lambda Function/Layer and modify functions settings to find it&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Each of these I found to be pretty poorly documented and spent a mind-numbing afternoon working it out from snippets I&amp;#8217;d found elsewhere. In this example I&amp;#8217;m talking about poppler-utils, a required package for many PDF and OCR conversion tools, but the concept is broadly similar when trying to bundle any third-party binary into a Lambda function. You can&amp;#8217;t just do a yum or apt-get in Lambda, after all.&lt;/p&gt;&lt;h2&gt;Compile the desired package from source in the Lamba Runtime Kernel&lt;/h2&gt;&lt;p&gt;Quick lesson: &lt;a href=&#34;https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html&#34; rel=&#34;noopener&#34;&gt;Lambda natively supports a variety of different language runtimes&lt;/a&gt;: Python 2.7, 3.6, 3.7, Node.js 8.10, 10, Ruby 2.5, Java 8, Go 1.x, .NET Core 1.0 and 2.1.&lt;/p&gt;&lt;p&gt;Each one is based on a specific Amazon Linux AMI and Kernel version, and if you want to compile your own binaries from source, you have to do it in the matching AMI to ensure it works correctly. Other guides I&amp;#8217;ve seen recommend that you spin up an EC2 instance and do it that way, but it&amp;#8217;s current year and Docker can do the same thing but locally and for free!&lt;/p&gt;&lt;p&gt;So we head over to the &lt;a href=&#34;https://hub.docker.com/_/amazonlinux/&#34; rel=&#34;noopener&#34;&gt;Official Dockerhub for Amazon Linux&lt;/a&gt; and pull and appropriate image. At the current time Python is based on &lt;code&gt;&lt;a href=&#34;https://console.aws.amazon.com/ec2/v2/home#Images:visibility=public-images;search=amzn-ami-hvm-2018.03.0.20181129-x86_64-gp2&#34; rel=&#34;noopener&#34;&gt;amzn-ami-hvm-2018.03.0.20181129-x86_64-gp2&lt;/a&gt;&lt;/code&gt; which annoyingly enough did not have a precise docker image available, so I opted for the general tag of &lt;code&gt;amazonlinux:2018.03&lt;/code&gt;&lt;/p&gt;&lt;p&gt;From your preferred local command line terminal running docker, do the following:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;docker pull amazonlinux:2018.03
docker run --name amzn -d -t amazonlinux:2018.03 cat
docker exec -it amzn bash&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;A standard trick to hold a container open is to run it in daemon mode with &lt;code&gt;cat&lt;/code&gt; at the entry command. The container will now run until we decide to kill it, and we get started by hopping inside with a docker exec command for bash.&lt;/p&gt;&lt;p&gt;Poppler has a dependency on OpenJPEG, which must be installed first, and all of the compilation tools we need are missing and must also be certain versions, so we&amp;#8217;ve got to bootstrap a bunch of packages within our docker image:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;yum -y install openjpeg-devel libjpeg-devel fontconfig-devel libtiff-devel libpng-devel xz gcc gcc-c++ epel-release zip cmake3

cd /root
curl -L https://github.com/uclouvain/openjpeg/archive/v2.3.1/openjpeg-2.3.1.tar.gz | tar xvz
cd openjpeg-2.3.1
mkdir -v build &amp;amp;&amp;amp;
cd       build &amp;amp;&amp;amp;
cmake3 -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_INSTALL_PREFIX=/usr \
      -DBUILD_STATIC_LIBS=OFF .. &amp;amp;&amp;amp;
make &amp;amp;&amp;amp; make install &amp;amp;&amp;amp; cd ../../&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That&amp;#8217;s OpenJPEG installed. Next for Poppler itself:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;curl https://poppler.freedesktop.org/poppler-0.59.0.tar.xz | tar xJv
cd poppler-0.59.0/ &amp;amp;&amp;amp; ./configure --enable-static --enable-build-type=release &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And voila, we&amp;#8217;ve manually compiled Poppler in an Amazon Linux docker image. Now, what the heck do we do with it? This is the step that I&amp;#8217;ve found so very badly explained elsewhere.&lt;/p&gt;&lt;h2&gt;&lt;strong&gt;Package up the executables and dependent shared libraries into a zip&lt;/strong&gt;&lt;/h2&gt;&lt;p&gt;This is the trickiest part in a way because whilst you can probably follow steps to compile what you want in a local filesystem, what then? How do we extract what we need to get into Lambda? What do we even need?! Sadly this will vary from package to package so I&amp;#8217;ve got no fixed answer (but read on for what to do with Poppler), but as a guide the make and make install will both create the binaries that you&amp;#8217;re after (perhaps in &lt;code&gt;/usr/bin&lt;/code&gt; or &lt;code&gt;/usr/local/bin&lt;/code&gt; as well as a some shared libraries in&lt;code&gt;/usr/lib64&lt;/code&gt; &lt;code&gt;/lib64&lt;/code&gt; or &lt;code&gt;/lib&lt;/code&gt; that these binaries will rely on.&lt;/p&gt;&lt;p&gt;In the case of Poppler the compiled utility binaries exist (in this example) in in &lt;code&gt;/root/poppler-0.59.0/utils&lt;/code&gt; and include things like pdfimages, pdffonts, pdftohtml, pdftotext, and pdftoppm. Chances are you&amp;#8217;re reading this because you need one of these.&lt;/p&gt;&lt;p&gt;The shared libraries you should probably include are noted below, because now we&amp;#8217;re going to package everything we need up.&lt;/p&gt;&lt;p&gt;Still within our docker image, do the following:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;cd /root
mkdir -p package/lib
mkdir -p package/bin
cp /usr/lib64/{libopenjpeg.so.2,libtiff.so.5,libjpeg.so.62,libpng12.so.0,libfreetype.so.6,libfontconfig.so.1,libjbig.so.2.0} /root/package/lib
cp /lib64/{libz.so.1,libexpat.so.1} /root/package/lib
cp poppler-0.59.0/poppler/.libs/libpoppler.so.70 /root/package/lib
cp poppler-0.59.0/utils/.libs/{pdftotext,pdfinfo,pdfseparate} /root/package/bin&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Modify the last line there to include any of the poppler-utils that your Lambda function needs. Now to zip it all up:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;cd package
zip -r9 ../package.zip *&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now sitting in &lt;code&gt;/root/package.zip&lt;/code&gt; is everything we need! But wait, we&amp;#8217;re still working within our fragile and volatile Docker container here &amp;#8211; as we haven&amp;#8217;t mounted any shared volumes &amp;#8211; everything we&amp;#8217;ve done inside the container will be lost the moment we kill it. That would be bad! We can safely run &lt;code&gt;exit&lt;/code&gt; to exit the container and go back to our local shell, because the container is still running from our original &lt;code&gt;cat&lt;/code&gt; command that started it.&lt;/p&gt;&lt;p&gt;Now we&amp;#8217;re back into our local shell, we can copy the file from within the container to our local filesystem.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;docker cp amzn:/root/package.zip package.zip&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now we&amp;#8217;ve got our local file, package.zip, that has everything we need. Now we need to put this in Lambda!&lt;/p&gt;&lt;h2&gt;&lt;strong&gt;Include the package within your Lambda Function/Layer and modify functions settings to find it. &lt;/strong&gt;&lt;/h2&gt;&lt;p&gt;Firstly, I&amp;#8217;d strongly recommend using a Lambda Layer for this. Layers are what they sound like &amp;#8211; they&amp;#8217;re easily included packages of dependencies that you can reuse with your Lambda functions without having to include everything with each one individually.&lt;/p&gt;&lt;p&gt;So, all we need to do is &lt;a href=&#34;https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html&#34; rel=&#34;noopener&#34;&gt;Create a Lambda layer&lt;/a&gt; and upload our newly created zip as its source.&lt;/p&gt;&lt;p&gt;The mild headache in Lambda is knowing what the &lt;a href=&#34;https://docs.aws.amazon.com/lambda/latest/dg/lambda-environment-variables.html&#34; rel=&#34;noopener&#34;&gt;default environment variables&lt;/a&gt; are for paths and what those paths look like in the execution environment. If you upload a package into a Lambda layer, what paths do they convert to?&lt;/p&gt;&lt;p&gt;The root of your function itself runs in &lt;code&gt;/var/task&lt;/code&gt;&lt;/p&gt;&lt;p&gt;Layers appear to be overlaid into &lt;code&gt;/opt&lt;/code&gt;&lt;/p&gt;&lt;p&gt;So if your Lambda Layer zip contains the folders &lt;code&gt;/bin&lt;/code&gt; and &lt;code&gt;/lib&lt;/code&gt; they&amp;#8217;ll be translated to &lt;code&gt;/opt/bin&lt;/code&gt; and &lt;code&gt;/opt/lib&lt;/code&gt; in the lambda execution environment.&lt;/p&gt;&lt;p&gt;If you were to include these same folders in your function itself, rather than a layer, they&amp;#8217;d be places in &lt;code&gt;/var/task/bin&lt;/code&gt; and &lt;code&gt;/var/task/lib&lt;/code&gt;&lt;/p&gt;&lt;p&gt;This is important to know as the two important environment variables have the following defaults:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;PATH:&lt;/strong&gt;&lt;code&gt;/usr/local/bin:/usr/bin/:/bin:/opt/bin&lt;/code&gt;&lt;br&gt;&lt;strong&gt;LD_LIBRARY_PATH: &lt;/strong&gt;&lt;code&gt;/lib64:/usr/lib64:$LAMBDA_RUNTIME_DIR:$LAMBDA_RUNTIME_DIR/lib:$LAMBDA_TASK_ROOT:$LAMBDA_TASK_ROOT/lib:/opt/lib&lt;/code&gt;&lt;/p&gt;&lt;p&gt;So without doing anything else, Lambda automatically picks up the paths from our Layer and will find them in the execution of your function. &lt;strong&gt;NOTE&lt;/strong&gt; if you were to include a bin directory with your main function, this would not be in the PATH variable by default and wouldn&amp;#8217;t get picked up!&lt;/p&gt;&lt;p&gt;Finally, it&amp;#8217;s important to note that if you want to place libraries or binaries in other paths, you can do so as long as you overwrite the environment variables in the Lambda function itself.&lt;/p&gt;&lt;p&gt;I&amp;#8217;ve seen some crazy workarounds implemented for this on the internet. People copying binaries into Lambda&amp;#8217;s &lt;code&gt;/tmp&lt;/code&gt; directory and then fudging their functions to manually look for the executable there &amp;#8211; but in general this isn&amp;#8217;t necessary if the function is properly configured and you&amp;#8217;re not doing something strange like implementing a custom runtime!&lt;/p&gt;</content:encoded>
  </item>
  <item>
    <title>My experience with the new “remote” AWS Certified Cloud Practitioner Exam</title>
    <link>https://www.petewilcock.com/my-experience-with-the-new-remote-aws-certified-cloud-practitioner-exam/</link>
    <guid isPermaLink="true">https://www.petewilcock.com/my-experience-with-the-new-remote-aws-certified-cloud-practitioner-exam/</guid>
    <pubDate>2019-08-30</pubDate>
    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator>
    <category>Amazon Web Services</category>
    <category>DevOps</category>
    <description>AWS announced on the 28th August 2019 that the entry-level certification – AWS Certified Cloud Practitioner – was now available to be taken remotely from the comfort of your home or office. This certification is comparatively recent, having been released in December 2017, and would be redundant...</description>
    <content:encoded>&lt;p&gt;&lt;a href=&#34;https://aws.amazon.com/about-aws/whats-new/2019/08/take-the-aws-certified-cloud-practitioner-exam-in-your-home-or-office-24-7/&#34; rel=&#34;noopener&#34;&gt;AWS announced on the 28th August 2019&lt;/a&gt; that the entry-level certification &amp;#8211; &lt;strong&gt;AWS Certified Cloud Practitioner&lt;/strong&gt; &amp;#8211; was now available to be taken remotely from the comfort of your home or office.&lt;/p&gt;&lt;p&gt;This certification is comparatively recent, having been released in December 2017, and would be redundant to anyone who had already sat an Associate-level certification or above. For this reason I hadn&amp;#8217;t bothered to trek to an exam centre to sit it, but this new release gave me the chance to lazily knock it off the list in the ongoing quest to &amp;#8220;catch &amp;#8217;em all&amp;#8221;. Here&amp;#8217;s my experience:&lt;/p&gt;&lt;p&gt;The first thing to note is that the announcement doesn&amp;#8217;t immediately make it clear how to begin the process, and on logging into my &lt;a href=&#34;https://www.aws.training/&#34; rel=&#34;noopener&#34;&gt;Certification Account&lt;/a&gt; wasn&amp;#8217;t much help. After some poking around you discover that is is only the &lt;strong&gt;Pearson Vue&lt;/strong&gt; provider who offer this remote exam and NOT PSI.  To register, select the “Schedule New Exam” button, and select “Schedule with Pearson VUE” next to the AWS Certified Cloud Practitioner exam. On the Select Exam Delivery Option page, choose the option “At my home or office.” Online proctoring is not available in China, Japan, and South Korea.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Whilst the exam purports to be available 24&amp;#215;7, this is still constrained by the availability of online proctors, who invigilate (monitor you) during the exam. In my case, I logged on at 10am in the morning and the first spot available to me was 8.45pm that same evening &amp;#8211; so I booked it!&lt;/p&gt;&lt;h2&gt;Set-up&lt;/h2&gt;&lt;p&gt;Now the fun begins! Pearson Vue deliver the exam through a piece of software called &lt;strong&gt;OnVUE&lt;/strong&gt;. Before booking the exam they encourage you to download and pre-test the software to ensure it will work on your system, and that you&amp;#8217;re able to comply with the various requirements of sitting the exam remotely. Aside for some &lt;a href=&#34;https://home.pearsonvue.com/op/OnVUE-min-specs-Network-Admin-Requirements&#34; rel=&#34;noopener&#34;&gt;technical specifications&lt;/a&gt; of running the software, here&amp;#8217;s what you&amp;#8217;ll need:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;A laptop or desktop computer&lt;/li&gt;&lt;li&gt;Webcam&lt;/li&gt;&lt;li&gt;Microphone&lt;/li&gt;&lt;li&gt;Mobile phone&lt;/li&gt;&lt;li&gt;Reliable internet connection&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The pre-test of the software is identical to the steps you must undertake in the 15 minutes before your allocated start time for the exam. The steps are as follows:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Enter the access code provided by PearsonVUE when downloading the software.&lt;/li&gt;&lt;li&gt;Enter your mobile telephone number to receive a text message with a link to &amp;#8216;&lt;strong&gt;ProctorCam&amp;#8217;&lt;/strong&gt; &amp;#8211; a service which will ask you to take pictures of:&lt;ul&gt;&lt;li&gt;Your face&lt;/li&gt;&lt;li&gt;The front and back of your government-issued ID&lt;/li&gt;&lt;li&gt;Your desk when standing from the front, from the back, to the left and to the right. Essentially a 360 degree view of the room you&amp;#8217;ll sit the exam in.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;After this is complete, the test will check your system to ensure there isn&amp;#8217;t any forbidden software running (in my case Malwarebytes had to be turned off) as well as closing any browser windows to help ensure you can&amp;#8217;t cheat. In the pre-test you&amp;#8217;re then asked a single test question and the test is complete.&lt;/p&gt;&lt;h2&gt;The Exam&lt;/h2&gt;&lt;p&gt;In the real exam, it instead gets serious &amp;#8211; your webcam is turned on with a notice to inform you that it&amp;#8217;s &lt;strong&gt;recording&lt;/strong&gt; and your provided details are being checked by a proctor. In my case, a proctor connected after a couple of minutes and spoke to me. They were very polite but very firm in checking the area around my desk to ensure I had no paper, no phone, no stationary, no clutter &amp;#8211; basically nothing at all. I had to pan my camera around (after complying by throwing all of my usual desk clutter onto the floor) to satisfy the proctor. I also had to unplug my scanner, and be seen to physically disconnect the cable of my second monitor. I had to remove my wristwatch, and show my wrists and hands to the webcam to demonstrate I had nothing written on them.  Additionally I had to take my headphones off during the exam but I was allowed to put them back on should I need to speak to a proctor.&lt;/p&gt;&lt;p&gt;Finally, I was allowed to sit back down and attempt to perfectly align my face in the centre of my camera in order for the exam to be released to me. This took a couple of minutes as my face wasn&amp;#8217;t quite perfectly set! Eventually the exam got going, and from this perspective it was like any other exam sat in a test centre. Multiple choice answers to standard questions whilst selecting &amp;#8216;Next&amp;#8217; to move on to the next one. 100 minutes allowed for the exam and 65 questions total.&lt;/p&gt;&lt;p&gt;However after around 5 questions in, a different proctor suddenly connected to my session and asked me to once again confirm that I had no paper or notes nearby, and also to ask if I was able to physically move the second monitor which I&amp;#8217;d earlier disconnected. Once again I got up and panned my camera around, and was able to move my second monitor out of the way to their satisfaction, and then I was allowed to get back on with the exam &amp;#8211; but only after being reminded that I wasn&amp;#8217;t allowed to move or even read the questions out to myself aloud.&lt;/p&gt;&lt;p&gt;So, feeling enormously self-conscious the entire time, I sat as rigidly as possible without moving my head from dead-centre of my camera &amp;#8211; fearful of even panning my eyes down to the &amp;#8216;Next&amp;#8217; button at the bottom of the screen, just in case it was thought I was looking down at some secretly-hidden notes, and completed the exam as quickly as possible.&lt;/p&gt;&lt;p&gt;Without being too boastful, I completed the 65 questions in less than 25 minutes, submitted the exam without reviewing any answers (which is an option), answered a few standard survey questions about my experience, and was informed that I&amp;#8217;d passed &amp;#8211; the score and results apparently being uploaded to my certification account in a few days. This is a curiosity of AWS exams recently that the score and result aren&amp;#8217;t delivered immediately (which it used to be) as I can&amp;#8217;t think of any technical reason this would be the case.&lt;/p&gt;&lt;h2&gt;Conclusion&lt;/h2&gt;&lt;p&gt;But there you have it &amp;#8211; an exam completed remotely and I didn&amp;#8217;t have to leave the house. But was this more convenient than having to go to an official proctored test centre? Well&amp;#8230; not &lt;em&gt;really&lt;/em&gt; if I&amp;#8217;m being honest. The requirement of having to take so many pictures, clearing out the whole area of where you&amp;#8217;re sitting, and feeling under the spotlight much more so than usual in an exam rather negated the convenience of being able to do it at home.&lt;/p&gt;&lt;p&gt;Of course, for certifications to have &lt;strong&gt;any&lt;/strong&gt; merit, AWS must do all it can to try to eliminate cheating and stopping impersonators sitting the exam for you. So all of the measures described above are perfectly reasonable and were as effective as they could be. But could I have still cheated somehow? Sure&amp;#8230; even being on webcam wouldn&amp;#8217;t stop a determined cheat from putting some kind of notes somewhere &amp;#8211;  or by cleverly manipulating the testing area to have someone offer you advice. It&amp;#8217;s for this reason I suspect we&amp;#8217;ll only see this remote option offered for the &lt;strong&gt;lowest&lt;/strong&gt; level of certification. Cheating here would be a lot of effort for a relatively modest qualification &amp;#8211; so I believe this offering is a nice balance between convenience and credible risk of impropriety by the candidate.&lt;/p&gt;&lt;p&gt;More importantly, I think this is designed to encourage both technicians and managers to get an easier initial footing on the AWS certification ladder &amp;#8211; after which graduating up to the Associate, Professional, and Speciality exams in official test centres will be a lot easier.&lt;/p&gt;&lt;p&gt;Speaking for myself &amp;#8211; if I was sitting one of the 3 hour Professional exams I&amp;#8217;d find it a lot &lt;em&gt;less&lt;/em&gt; stressful to calmly sit in a real exam centre than worry about whether the online proctor thinks my home desk&amp;#8217;s cup-coaster is a secretly-encoded cheating aide!&lt;/p&gt;&lt;p&gt;If you&amp;#8217;re studying for the Cloud Practitioner Certification, I will, as always, highly recommend &lt;a href=&#34;https://acloud.guru&#34; rel=&#34;noopener&#34;&gt;A Cloud Guru&lt;/a&gt; for their excellent standard of teaching and preparation for the exam. &lt;a href=&#34;https://acloud.guru/learn/aws-certified-cloud-practitioner&#34; rel=&#34;noopener&#34;&gt;Check out their AWS Certified Cloud Practitioner 2019 course here&lt;/a&gt;.&lt;/p&gt;</content:encoded>
  </item>
  <item>
    <title>Fixing “com.amazon.coral.service.InternalFailure” when using ACM</title>
    <link>https://www.petewilcock.com/fixing-com-amazon-coral-service-internalfailure-when-using-acm/</link>
    <guid isPermaLink="true">https://www.petewilcock.com/fixing-com-amazon-coral-service-internalfailure-when-using-acm/</guid>
    <pubDate>2019-08-13</pubDate>
    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator>
    <category>Amazon Web Services</category>
    <category>DevOps</category>
    <description>If you’re using the AWS ACM console to create a certificate, and at the final stage you get this annoying and useless com.amazon.coral.service.InternalFailure , I’ve got the solution for you. You’re probably working in an AWS Organization with a Service Control Policy (SCP) or a restricted IAM...</description>
    <content:encoded>&lt;p&gt;If you’re using the AWS ACM console to create a certificate, and at the final stage you get this annoying and useless &lt;code&gt;com.amazon.coral.service.InternalFailure&lt;/code&gt;, I’ve got the solution for you. &lt;/p&gt;

&lt;p&gt;You’re probably working in an AWS Organization with a Service Control Policy (SCP) or a restricted IAM user where you’ve been given the &lt;code&gt;acm:*&lt;/code&gt; permissions thinking this is enough. Sadly not, the solution is you additionally need to add:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;kms:CreateGrant&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;to your IAM or SCP policy in order to successfully create the certificate request. Given certificates need to be accessed by Key Management Service (kms) it makes sense that a new certificate needs the permission to create a grant for it. &lt;/p&gt;

&lt;p&gt;That’s it, hope this saved you from fruitless googling!&lt;/p&gt;</content:encoded>
  </item>
  <item>
    <title>IR35 is easily avoided, but it’s time to get with the programme</title>
    <link>https://www.petewilcock.com/ir35-is-easily-avoided-but-its-time-to-get-with-the-programme/</link>
    <guid isPermaLink="true">https://www.petewilcock.com/ir35-is-easily-avoided-but-its-time-to-get-with-the-programme/</guid>
    <pubDate>2019-08-01</pubDate>
    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator>
    <category>IR35</category>
    <category>Recruitment</category>
    <description>I’ve read a lot of articles lately talking in doomworthy terms about the Off-Payroll working rules from April 2020 that will apply to the private-sector for contractors. Similar rules have been in force for the public-sector since 2017, with many widely predicting that private-sector IT firms...</description>
    <content:encoded>&lt;p&gt;I’ve read a lot of articles lately talking in doomworthy terms about the &lt;a href=&#34;https://www.gov.uk/government/consultations/off-payroll-working-rules-from-april-2020&#34; rel=&#34;noopener&#34;&gt;Off-Payroll working rules from April 2020&lt;/a&gt; that will apply to the private-sector for contractors. Similar rules have  been in force for the public-sector since 2017, with many widely predicting that private-sector IT firms will be either curtailing the use of contractors or forcing them to become permanent employees. &lt;/p&gt;

&lt;p&gt;If you somehow haven’t already read an article explaining what all this means, in short the burden of IR35 status determination shifts from the contractor’s business to the end client or ‘fee-payer’ from April 2020. This is designed to catch ‘shadow-employees’ – those who earn money without Tax and National Insurance Contributions deducted – by threatening the fee-payers directly with fines and a large retrospective tax bill if they’re discovered to be using contractors that fall within IR35 – or in other words if they’re considered basically employees where their use of a limited company is just a means to pay less tax on employment earnings. &lt;/p&gt;

&lt;p&gt;The taxman really hates this, and there are certainly situations where this is exactly what’s happening. The simple logic goes that if you were to remove all the indirection that a limited company ‘intermediary’ (or Personal Service Company (PSC) as HMRC like to call it) provides, and still have the same working relationship with the client, would you essentially just be working like an employee? If the answer is yes, then logically you should be taxed like one. &lt;/p&gt;

&lt;h3&gt;Just an attention-grabbing article headline?&lt;/h3&gt;

&lt;p&gt;The reason I say IR35 is easily avoided is because…well, it is. A significant majority of contractor engagements &lt;strong&gt;legitimately&lt;/strong&gt; fall outside of IR35, but risk being considered inside because of a fundamental lack of understanding of the rules by clients, agencies, and contractors alike. Agencies often recruit for permanent employees and contractors both, and have somewhat sleep-walked into a tendency to use the same processes for contractor engagement as they do for ‘permies’. They use the same recruitment terminology, and the engagement follows the same routine of sending a CV and having an ‘interview’ with the client. This is not how a B2B relationship works. &lt;/p&gt;

&lt;p&gt;Meanwhile clients are usually just looking for talent to fulfil a need, and might first look for a permanent employee but resort to backfilling with a contractor due to specialist demand and contention in the IT market. Their unfortunate mentality is that a contractor is essentially an employee but just paid differently. &lt;/p&gt;

&lt;p&gt;And sadly, contractors themselves who aren’t terribly savvy let themselves be carried along in the processes set forth by clients and agencies alike who have got the wrong end of the stick as to how working arrangements and engagement terms should work. They send you a bunch of forms to fill out, and give you a contract, and because you want the work you fill it all out and assume this is how it’s supposed to be. &lt;/p&gt;

&lt;p&gt;The combination of these poor-diligence factors from all parties is a situation where if HMRC come knocking and want to know about a particular engagement, you’re going to have a heck of a time trying to pretend this is a legitimate business-to-business relationship and not just an employee by any other name. &lt;/p&gt;

&lt;h3&gt;The Good News&lt;/h3&gt;

&lt;p&gt;All of this is easy to overcome. Inevitably, it just requires a bit of education and a realignment of the way you engage a business to service the requirement of another business. These are my top tips whether you’re a client looking for talent directly, or an agency seeking a contractor:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Don’t ask me for my CV. A CV is for an individual, and I’m a business. Ask for my business’ experience profile, and I’ll send you all of the skills my company is able to provide along with an overview of its previous clients and achievements. It’ll contain all of the information you’re looking for. &lt;/li&gt;&lt;li&gt;Don’t send me a job description. A JD is for an employee. What your client should have is a project-based scoped requirement for the delivery of work. If this is compressed into a job title, e.g. ‘IT Engineer’, you’re doing it wrong. What does the client actually want achieved within the timeframe they have in mind? Sorry, you’ll need to have a think and fully specify it. &lt;/li&gt;&lt;li&gt;Don’t tell me you want to put ‘me’ forward for an ‘interview’. Employees have interviews – I’m just the person representing the business. I’ll have an exploratory discussion with the client to determine whether we think there’s a feasible working relationship our businesses can have. If we both agree, great!&lt;/li&gt;&lt;li&gt;Remember that because you’re engaging my business, it won’t necessarily be the same person doing all of the work all of the time. At any time the person my business provides might be substituted out for someone else of equal skill who is able to do the work instead. We’ve written that into the contract, so don’t be surprised if it happens. &lt;/li&gt;&lt;li&gt;I don’t want to know about how cool or fun your office workplace is, or how the people who work there go for pizza and beers on a Friday afternoon. That’s great for your employees, but I’m running my own business here and I don’t need to know about that. Similarly I don’t want a company-branded nametag, or t-shirt, or any of the loot that you give your employees. I don’t want to partake of any of your employee benefits. Thanks for the offer though. &lt;/li&gt;&lt;li&gt;Don’t tell me who my line manager will be. I don’t have a line manager. I work for my own company. I might, on the other hand, have a senior point of contact in the client’s business. That’s fine with me, I need to know who to speak to after all, but let’s not get confused that I’m under someone’s direction and control. I’m not.  &lt;/li&gt;&lt;li&gt;Don’t tell me there are opportunities to work from home. Work from home? I’m a business, I’ll be working from my own office (which might happen to be in my home) unless there are reasons to be present on the client site. There might be security constraints that require physical presence, meetings, scheduled updates, etc. But generally speaking you don’t get to control where my employee works. Don’t give ‘me’ my own desk – it’s not my desk, it’s your desk. My business is interested in a productive working relationship, so we’ll discuss the best solution as part of our initial discussion. &lt;/li&gt;&lt;li&gt;I don’t really want to use your equipment. I’ve got my own equipment that my business has bought and paid for. So unless there is an impossible constraint that requires me to use your laptop (usually security, restrictions on encryption, migration of data off-site, etc.), I’ll be using my company’s gear. Thanks though!&lt;/li&gt;&lt;li&gt;Don’t send my business a contract that aligns with IR35 insofar as the wording of the contract goes if you’re not absolutely certain that it properly reflects what the working-relationship with the client will be. An actual IR35 investigation will be far more interested in those critical working practices as described above than whether the contract sounds correct.  &lt;/li&gt;&lt;li&gt;After this project (that the client has carefully specified) concludes, we both understand that the client not obligated to provide any new work to my business, nor is my business obligated to undertake it. If the client has got a new project they’d like my business to work on, we’ll put together a separate contract with those specifications embedded as before. &lt;/li&gt;&lt;/ul&gt;

&lt;p&gt;If all of this sounds really unreasonable, or precious on the part of the contracting business, I can only apologise but also reiterate that this is precisely how it’s supposed to be. Anything less than the above and you risk falling foul of IR35 Off-Payroll rules that would rightfully identify you as effectively an employee, or a ‘permitractor’ as we like to say in the industry. You’re part of the problem. Fee-paying clients have full discretion on how they arrange their internal project-based work requirements, and it should be pretty straightforward, and not the enormous burden that everyone is making it out to be, to properly package work into engagements that legitimate contractor businesses can consume. The taxman is relying on businesses ultimately being too fearful or just plain feeble to address these issues confidently.&lt;/p&gt;

&lt;p&gt;Some of this will require some tweaking in your expectations, your processes, your use of terminology and more importantly your mentality. IR35 is designed to target people using limited company intermediaries as a thin shell for tax avoidance. Ultimately it’s pretty trivial to properly align your terms of engagement to guarantee that your search for a contractor is correctly and legitimately outside of IR35, and way beyond April 2020 private-sector business can continue to legitimately engage contractors as much as they wish, provided they are mindful and take note of the points above. &lt;/p&gt;

&lt;p&gt;It might be possible (but you’d really need to convince me) that your business just cannot comply with the above for one reason or another. At which point you concede and advertise the ‘role’ as inside IR35 and search for contractors on that basis. You pay their Tax and NI and increase your costs. I’d expect them to be harder to find mind you, as their business is probably off working for a client that doesn’t have your problem – although I’ll agree that this is somewhat dependent on industry. &lt;/p&gt;

&lt;p&gt;Contractors are businesses, treat them like one. It’s time to get with the programme. &lt;/p&gt;</content:encoded>
  </item>
  <item>
    <title>Sense-checking AWS Cost Explorer Reserved Instance Purchase Recommendations</title>
    <link>https://www.petewilcock.com/sense-checking-aws-cost-explorer-reserved-instance-purchase-recommendations/</link>
    <guid isPermaLink="true">https://www.petewilcock.com/sense-checking-aws-cost-explorer-reserved-instance-purchase-recommendations/</guid>
    <pubDate>2018-03-31</pubDate>
    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator>
    <category>Amazon Web Services</category>
    <description>In November AWS announced Reserved Instance Purchase Recommendations in the Cost Explorer. Great! I thought, finally some free native support for what a lot of cost-analysis companies offer at a price. And yet when I look at the recommendations, they seem completely wrong to me. Each...</description>
    <content:encoded>&lt;p&gt;In November &lt;a href=&#34;https://aws.amazon.com/about-aws/whats-new/2017/11/identify-opportunities-for-cost-savings-using-aws-cost-explorers-new-amazon-ec2-reserved-instance-purchase-recommendations/&#34; rel=&#34;noopener&#34;&gt;AWS announced Reserved Instance Purchase Recommendations&lt;/a&gt; in the Cost Explorer.&lt;/p&gt;
&lt;p&gt;Great! I thought, finally some free native support for what a lot of cost-analysis companies offer at a price.&lt;/p&gt;
&lt;p&gt;And yet when I look at the recommendations, they seem completely wrong to me. Each recommendation provides a link to see the usage that it was based on – but the main issue there is that Cost Explorer only knows your total EC2 usage hours &lt;strong&gt;per day&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Why is this important? Because RI applied utilisation only span usage within &lt;strong&gt;an hour&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Here’s an example:&lt;/p&gt;
&lt;p&gt;I have an autoscaling web app that runs c5.large instances with a normalisation factor of 4. It idles at 2 instances outside of working hours, where it autoscales up to 10 for 8 hours a day.&lt;/p&gt;
&lt;p&gt;Over the day my normalised units are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2 instances x 4 units x 24 hours = 192&lt;/li&gt;
&lt;li&gt;8 instances x 4 units x 8 hours = 256&lt;/li&gt;
&lt;li&gt;Total units: 448.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That’s consistent every day. AWS sees 448 units per 24 hours = 13.3 normalised units per hour. At 4 per instance, that’s a recommendation of 3 c5.large Reserved Instances.&lt;/p&gt;
&lt;p&gt;So I buy 3 instances. Since I have at least 2 all day, that’s 100% utilisation for those. But the remaining one is only being used for 33% of the day, in the 8 hour period when I scale above 2.&lt;/p&gt;
&lt;p&gt;To recap:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I’ve bought 3 Reserved c5.large Instances. No upfront, N.Virginia, at a price of $39.42 each per month which I’m paying whether I use them or not.&lt;/li&gt;
&lt;li&gt;If I buy the third instance on demand, for 8 hours a day, it costs me only $20.68 per month. But I’ve bought a Reserved Instance for it as recommended, and it’s now costing me $39.42 instead.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;So that’s the problem – the recommendations are completely useless for anything but baseline steady-state load. If you scale during the day, particularly if you have very short windows of high peak usage – it’ll equate to a high number of normalised unit/hours that the recommendation is based on, which completely fail to map to the application of the reserved instance billing as this spans only across an hour.&lt;/p&gt;
&lt;p&gt;This is a significant loss with this small example, and factored out over a large estate the recommendations and indicated savings are irresponsibly misleading. To work properly the tool needs to see a moving hour-window of concurrent instance usage across the day to work out if a lack of full utilisation would result in an overall saving. Currently, for an average auto-scaled application, I can’t see that it would – but in it’s current state it’s impossible to calculate with any accuracy.&lt;/p&gt;
&lt;h4&gt;References&lt;/h4&gt;
&lt;p&gt;&lt;a href=&#34;https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/apply_ri.html&#34; rel=&#34;noopener&#34;&gt;https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/apply_ri.html&lt;br&gt;
&lt;/a&gt;&lt;a href=&#34;https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-reserved-instances-application.html&#34; rel=&#34;noopener&#34;&gt;https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-reserved-instances-application.html&lt;/a&gt;&lt;a href=&#34;https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/ri-recommendations.html&#34; rel=&#34;noopener&#34;&gt;&lt;br&gt;
https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/ri-recommendations.html&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;TL;DR: Recommendations are calculated over an aggregated day, Reserved Instance billing is only applied over an hour, so they’re worse than useless.&lt;/strong&gt;&lt;/p&gt;</content:encoded>
  </item>
  <item>
    <title>Docker-in-Docker Private Repository “No Basic Auth Credentials”</title>
    <link>https://www.petewilcock.com/docker-in-docker-private-repository-no-basic-auth-credentials/</link>
    <guid isPermaLink="true">https://www.petewilcock.com/docker-in-docker-private-repository-no-basic-auth-credentials/</guid>
    <pubDate>2018-03-18</pubDate>
    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator>
    <category>Docker</category>
    <description>Fix Docker-in-Docker “no basic auth credentials” by checking the client’s config.json, login context, registry hostname and ECR region.</description>
    <content:encoded>&lt;p&gt;Recently I was frustrated in a Jenkins build when I was running Docker-in-Docker to build and push a container to AWS Elastic Container Registry (ECR).&lt;/p&gt;
&lt;p&gt;The error on push was a familiar `no basic auth credentials` which means some issue with the credentials stored in &lt;code&gt;~/.docker/config.cfg&lt;/code&gt; (or perhaps &lt;code&gt;~/.dockercfg&lt;/code&gt; in earlier versions).&lt;/p&gt;
&lt;p&gt;In this case I initially couldn’t understand the error, as the Jenkins declarative pipeline was using a &lt;code&gt;docker.withRegistry&lt;/code&gt; function for the registry login, and this was being successfully written to, so what was going on?&lt;/p&gt;
&lt;p&gt;Eventually it occurred to me, although it’s not obvious at first – as we’re running docker-in-docker, you might assume that the credentials are looked for relative to where the Docker &lt;strong&gt;daemon&lt;/strong&gt; is running (i.e. on the host), but actually it’s being looked for relative to where the &lt;em&gt;client&lt;/em&gt; is calling the daemon from. In this case – within the container. The &lt;code&gt;docker.withRegistry&lt;/code&gt; that I was doing with Jenkins was creating credentials on the host – not within the container where the client itself was running.&lt;/p&gt;
&lt;p&gt;There were two possible solutions here – one is to ensure you run the docker login command within the client context of the docker-in-docker container, or to mount the &lt;code&gt;.docker&lt;/code&gt; directory on the host into the container using something like `-v /root/.docker:/root/.docker` depending on what user you’re running your containers as.&lt;/p&gt;</content:encoded>
  </item>
  <item>
    <title>How not to hire a DevOps Engineer</title>
    <link>https://www.petewilcock.com/how-not-to-hire-a-devops-engineer/</link>
    <guid isPermaLink="true">https://www.petewilcock.com/how-not-to-hire-a-devops-engineer/</guid>
    <pubDate>2018-02-15</pubDate>
    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator>
    <category>DevOps</category>
    <category>Recruitment</category>
    <description>This is a true story, although names and details have been removed or changed to protect the awful. Quotes however are verbatim. As often happens when you have ‘DevOps’ in your job title, I received some recruitment agency spam from someone I’ll call Jane, c/o LinkedIn, alerting me to a...</description>
    <content:encoded>&lt;p&gt;This is a true story, although names and details have been removed or changed to protect the awful. Quotes however are verbatim.&lt;/p&gt;
&lt;p&gt;As often happens when you have ‘DevOps’ in your job title, I received some recruitment agency spam from someone I’ll call Jane, c/o LinkedIn, alerting me to a ‘fantastic opportunity’ that I should call to discuss. I replied and asked Jane to send over the job spec. Her reply was ‘Send me your CV first, and I’ll send you the spec’.&lt;/p&gt;
&lt;p&gt;Huh. Given that my LinkedIn profile is complete and public – there should be no need to hand over my personal data before I even get to see the job description, bearing in mind that I was cold-contacted &lt;em&gt;first&lt;/em&gt;, but in any case I fired it over along with an indication of my salary expectations as was requested. I received the spec along with a warning: ‘Keep the company name to yourself!’.  We’ll call the company &lt;strong&gt;Sprockets&lt;/strong&gt; Incorporated (not their real name, but what a great name!)&lt;/p&gt;
&lt;p&gt;Jane then called to more formally introduce herself, and asked to meet with me, stressing that she liked to meet everyone she represents, and we agreed a date for a few days time. At 4pm the day before the meeting I received an email from Jane which said:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hope you are well. We have a meeting set up for tomorrow at 11am, unfortunately I’m going be out of the office therefore need to cancel our meeting.&lt;/p&gt;
&lt;p&gt;I’ve also had feedback from Sprockets and unfortunately they won’t be progressing to interview.&lt;/p&gt;
&lt;p&gt;I’d like to thanks you for your interest and wish you luck in your job search going forward.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Well, what a coincidence! The company didn’t want to proceed to an interview and simultaneously, just by chance, her schedule had suddenly filled up and she could no longer meet me. Almost like the second I wasn’t immediately valuable to her, I wasn’t worth meeting and summarily dropped.&lt;/p&gt;
&lt;p&gt;I &lt;em&gt;almost&lt;/em&gt; replied to remark as much, but instead politely asked if there was any feedback. It transpires that my salary expectations were slightly higher than Sprockets were looking for, although not by much. I said to Jane that money was not the single most important factor in any job, so I would be happy to negotiate on that point and  have a conversation with them on that basis.&lt;/p&gt;
&lt;p&gt;Suddenly, it’s all back on and Jane is my best friend again. She also wants to know if I know any Test Leads that I can put her in touch with because she has other roles to recruit for. Ahem. If you’d like a professional referral you can talk to me about the signing bonuses you’re offering, otherwise I’m not doing your job for you!&lt;/p&gt;
&lt;p&gt;I have a telephone call with Sprockets, which converts into a face to face interview arranged for a couple of days later. Jane sends me an interview confirmation for the ‘Test Lead’ role, and I point out I’m interviewing for the DevOps position. To which she says ‘Oops’, and incredibly asks again if I know of any Test Leads that might be looking.&lt;/p&gt;
&lt;p&gt;As timing would have it, I’m having another interview the day after Sprockets with a company called Spacemax (still not a real name). The interview with Sprockets goes great – everyone seems really nice and they seem like they’d be a good place to work. During the course of the interview they ask if I’m looking anywhere else, so I admit to having another interview the next day (it can’t hurt). To my surprise, a job offer comes through later that same day. I thank them and ask for some time to consider, at least to allow me to have the other interview, but I assure them that afterwards I’ll get back to them promptly.&lt;/p&gt;
&lt;p&gt;Suddenly, I can’t get rid of Jane. She calls me several times, pressuring me to take the offer – telling me Sprockets is great. Not only that, but that her agency has the &lt;strong&gt;exclusive&lt;/strong&gt; contract for Sprockets, and if I let this pass up I won’t see the job advertised anywhere else. I already know that’s a lie, of course, because in the meantime I’ve already been contacted on LinkedIn by another agency representing the same role. I repeat that I’d like to have the Spacemax interview and I’ll let her know after that.&lt;/p&gt;
&lt;p&gt;Unfortunately for me, the interview with Spacemax goes great too, and they make me an offer on the spot. Now I have a difficult decision to make – I like both companies and there’s not a lot to separate them in terms of salary or benefits. Luckily my phone was on silent mode, because it turns out Jane was calling me several times during the interview to see if I’d made up my mind about Sprockets yet. As I’m walking out of Spacemax, my phone rings again and it’s Jane. I tell her I’ve been made an offer and will need time to think.&lt;/p&gt;
&lt;p&gt;This doesn’t go down well. She assures me Sprockets are a great company, with a bright future, and I’d do really well there and she’s not just saying that, and then goes into a little three minute sales pitch about why this place is great and how I should definitely take the job. Incredibly when she’s finished, she says to me: ‘&lt;strong&gt;So what do you think now?&lt;/strong&gt;‘ Wait, what? Did she think a couple of minutes of off-the-cuff pressure selling was going to sway me into accepting?&lt;/p&gt;
&lt;p&gt;Because I like to keep everyone in the loop, I let both companies know I have competing offers and I’ll be deciding shortly. I make it clear this is not a tactic to play one offer off against the other – I’d just like a little time to consider. It’s damn tricky, I really do like them both.&lt;/p&gt;
&lt;p&gt;Jane keeps calling me, Sprockets are keen to convince me and various senior members of their team call me individually to talk through their take on the business and why it’d be great if I joined them. After each call Jane is back onto me –  I am now dreading having to pick up the phone to her – to see if any of it has done the trick in swaying me. She tells me Sprockets is much better than Spacemax, and has a better future ahead. She also tells me that she was so confident that I was the right person for the job that I was the &lt;strong&gt;only&lt;/strong&gt; candidate she put forward.  I wish I could say this is a bit of embellishment for the sake of the story, but it’s not. If I’m the only candidate she’s put forward, it’s because she couldn’t find anyone else – or perhaps they’d been snapped up by the other, much more competent agency. I wish I had.&lt;/p&gt;
&lt;p&gt;After deliberating, I decide I’m going with Spacemax. I thank Sprockets profusely for their consideration and tell them genuinely that it was an incredibly marginal and difficult choice, and wished them the very best for the future.&lt;/p&gt;
&lt;p&gt;I receive the following email from Jane:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Thanks for your email. Really disappointing but you’ve made your decision.&lt;/p&gt;
&lt;p&gt;I wish you every success and if anything changes please get in touch.&lt;/p&gt;
&lt;p&gt;Do you know of anyone else that may be interested?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Sheesh! Crass and absurd.&lt;/p&gt;
&lt;p&gt;But wait, the story isn’t quite over yet. I start with Spacemax a week later (the turnaround on interview and starting was crazy!), and precisely &lt;strong&gt;5 days&lt;/strong&gt; into my new job I get the following email from Jane:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi Pete&lt;/p&gt;
&lt;p&gt;How are you? How’s the new role going? Hope it’s all working out.&lt;/p&gt;
&lt;p&gt;I’d love the opportunity to work with SpaceMax and wondered if you could help me/introduce me to right person to discuss recruitment?&lt;/p&gt;
&lt;p&gt;Speak soon&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Sweet Jesus. I ignore this, and a couple of weeks later I see that I have a missed call from Jane. I email her, asking what the call was about. She replies to repeat her request for an introduction to be able to recruit for us. Having now finally had enough, I tell Jane that I felt her approach was completely inappropriate, particularly in light of the fact she was so recently pushing me very hard &lt;strong&gt;NOT&lt;/strong&gt; to work for Spacemax.&lt;/p&gt;
&lt;p&gt;I believe that even had I been interacting with a credible, competent agency, I’d have made the same decision, but wow Jane did not make it easy and I can only imagine that Sprockets would have been furious if they’d known they were being represented by someone so unprofessional.&lt;/p&gt;
&lt;p&gt;If you ever want to hire anyone, for anything, don’t do this.&lt;/p&gt;
&lt;p&gt;On the flip side, here’s what the &lt;em&gt;other&lt;/em&gt; recruiter representing Spacemax said to me about my competing offers:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Obviously if you go for Spacemax it is in my interests, but I appreciate it’s a decision that’s entirely up to you and Sprockets are another good company.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Much, much better.&lt;/p&gt;</content:encoded>
  </item>
  <item>
    <title>Ansible Slack Failure Handler</title>
    <link>https://www.petewilcock.com/ansible-slack-failure-handler/</link>
    <guid isPermaLink="true">https://www.petewilcock.com/ansible-slack-failure-handler/</guid>
    <pubDate>2018-02-07</pubDate>
    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator>
    <category>Ansible</category>
    <category>DevOps</category>
    <description>So you want a simple Slack failure handler for Ansible to ping your alerts channel whenever a deployment fails. Despite a thorough search I couldn’t find any examples that did this adequately, and even the solution here is a little constrained. The basic requirements are: A Slack notification on...</description>
    <content:encoded>&lt;p&gt;So you want a simple Slack failure handler for Ansible to ping your alerts channel whenever a deployment fails. Despite a thorough search I couldn’t find any examples that did this adequately, and even the solution here is a little constrained. The basic requirements are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A Slack notification on any task failure.&lt;/li&gt;
&lt;li&gt;The name of the task.&lt;/li&gt;
&lt;li&gt;The name of the host.&lt;/li&gt;
&lt;li&gt;The error debug message.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Sadly there isn’t one global failure handler configuration in Ansible. I investigated the native &lt;a href=&#34;http://docs.ansible.com/ansible/devel/plugins/callback/slack.html&#34; rel=&#34;noopener&#34;&gt;Slack Callback plugin&lt;/a&gt; available in Ansible 2.x (and not to be confused with the existing &lt;a href=&#34;http://docs.ansible.com/ansible/latest/slack_module.html&#34; rel=&#34;noopener&#34;&gt;Slack module&lt;/a&gt;) but this seemed to be more of a generic passthrough for outputting all plays into Slack, failed or not, which isn’t what I wanted. After discarding the idea of a custom callback plugin for my purposes (which could work, but felt overly complex), I settled on a &lt;strong&gt;per-playbook&lt;/strong&gt; failure role.&lt;/p&gt;
&lt;p&gt;This is not an actual ‘handler’ as per Ansible parlance, but I was coming from experience of Chef where I could have a global failure handler baked into the Chef-client config.&lt;/p&gt;
&lt;p&gt;To make this work we need to use &lt;a href=&#34;http://docs.ansible.com/ansible/latest/playbooks_blocks.html&#34; rel=&#34;noopener&#34;&gt;Playbook Blocks&lt;/a&gt; (as of 2.0) and essentially enclose the entire playbook in a block/rescue. The main hassle here is that block does not support the top-level pre-task &lt;strong&gt;role&lt;/strong&gt; block (and wouldn’t catch any failures therein), and so I had to convert all of my role calls to tasks that used &lt;strong&gt;include_role&lt;/strong&gt; instead.&lt;/p&gt;
&lt;p&gt;A simple playbook example looks as follows:&lt;/p&gt;
&lt;p&gt;playbooks/playbook.yml&lt;/p&gt;
&lt;pre&gt;- hosts: &#34;{{ target_host | default(&#39;127.0.0.1&#39;) }}&#34;
  gather_facts: true

  tasks:
  - block:
    - include_role:
        name: install_app
    - name: Greet the world
      shell: echo &#34;hello world!&#34;
    - fail:
       msg: &#34;I&#39;ve gone and failed the play!&#34;
    rescue:
      - include_role:
          name: slack_handler
          tasks_from: failure&lt;/pre&gt;
&lt;p&gt;And in my slack_handler role (for reusability):&lt;/p&gt;
&lt;p&gt;roles/slack_handler/tasks/failure.yml&lt;/p&gt;
&lt;pre&gt;- name: Notify Slack of Playbook Failure
  slack:
    username: &#39;Ansible&#39;
    color: danger
    token: &#34;{{ slack_webhook.split(&#39;https://hooks.slack.com/services/&#39;)[1] }}&#34;
    channel: &#34;#deployment-alerts&#34;
    msg: &#34;Ansible failed on *{{ ansible_hostname }} ({{ inventory_hostname }})* \n
    *Task*: {{ ansible_failed_task.name }} \n
    *Action*: {{ ansible_failed_task.action }} \n
    *Error Message*: \n ```{{ ansible_failed_result | to_nice_json }}``` &#34;
  delegate_to: localhost&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;ansible_failed_task&lt;/strong&gt; and &lt;strong&gt;ansible_failed_result&lt;/strong&gt; are two &lt;a href=&#34;https://github.com/ansible/ansible/issues/27970&#34; rel=&#34;noopener&#34;&gt;currently painfully undocumented&lt;/a&gt; (shout-out to &lt;a href=&#34;https://github.com/bcoca&#34; rel=&#34;noopener&#34;&gt;Brian Coca&lt;/a&gt; for pointing me in the right direction) but delightfully detailed variables that are populated on playbook failure. &lt;strong&gt;ansible_failed_task&lt;/strong&gt; is a map that contains a lot of data, so you may want to add additional debug for your purposes. The raw error message is single-line JSON so we prettify it before sending it using the Slack module using our token. The string split is a bit of an ugly hack to extract the webhook token part from the full webhook URL which is used elsewhere in my plays and passed at deploy time. For some reason the Slack module requires only the token rather than the full URL, in contrast to a lot of other integrations that want the whole thing.&lt;/p&gt;
&lt;p&gt;The remaining hassle is the need to implement this per playbook, but aside from the possibility of a custom callback plugin this seems like the simplest way to implement this in Ansible currently.&lt;/p&gt;</content:encoded>
  </item>
  <item>
    <title>ASICS Marathon Training Plans</title>
    <link>https://www.petewilcock.com/asics-marathon-training-plans/</link>
    <guid isPermaLink="true">https://www.petewilcock.com/asics-marathon-training-plans/</guid>
    <pubDate>2017-08-21</pubDate>
    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator>
    <category>Running</category>
    <description>Download the archived ASICS marathon training plans for sub-3, 3:30, 4, 4:30 and 5 hours, preserved here since 2017.</description>
    <content:encoded>&lt;p&gt;The original ASICS Marathon training plans remain one of the most popular, much loved guides for those preparing for their first marathon (or marathon improvers). Having used these myself, I was slightly frantic recently when I realised that Runners World, who had originally hosted the plans, removed them from their site sometime in August 2017.&lt;/p&gt;
&lt;p&gt;To avoid these being lost in the internet ether, I quickly located copies and rehost them here for people like me that want a solid reference guide for their marathon training plans 🙂&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.petewilcock.com/wp-content/uploads/2017/08/ASICS_TRAININGPLANS_Sub-3.00.pdf&#34;&gt;ASICS_TRAININGPLANS_Sub 3.00&lt;/a&gt;&lt;a href=&#34;https://www.petewilcock.com/wp-content/uploads/2017/08/ASICS_TRAININGPLANS_Sub-3.30.pdf&#34;&gt;&lt;br&gt;
ASICS_TRAININGPLANS_Sub 3.30&lt;/a&gt;&lt;br&gt;
&lt;a href=&#34;https://www.petewilcock.com/wp-content/uploads/2017/08/ASICS_TRAININGPLANS_Sub-4.00.pdf&#34;&gt;ASICS_TRAININGPLANS_Sub 4.00&lt;/a&gt;&lt;br&gt;
&lt;a href=&#34;https://www.petewilcock.com/wp-content/uploads/2017/08/ASICS_TRAININGPLANS_Sub-4.30.pdf&#34;&gt;ASICS_TRAININGPLANS_Sub 4.30&lt;/a&gt;&lt;br&gt;
&lt;a href=&#34;https://www.petewilcock.com/wp-content/uploads/2017/08/ASICS_TRAININGPLANS_Sub-5.00.pdf&#34;&gt;ASICS_TRAININGPLANS_Sub 5.00&lt;/a&gt;&lt;/p&gt;</content:encoded>
  </item>
  <item>
    <title>Amazon Web Services has Zombie Apocalypse ToS Clause</title>
    <link>https://www.petewilcock.com/amazon-web-services-has-zombie-apocalypse-tos-clause/</link>
    <guid isPermaLink="true">https://www.petewilcock.com/amazon-web-services-has-zombie-apocalypse-tos-clause/</guid>
    <pubDate>2016-02-10</pubDate>
    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator>
    <category>Amazon Web Services</category>
    <description>Courtesy of the AWS subreddit , I was alerted to the fact the recently-updated AWS Service Terms (to covertheir new 3D Lumberyard Game Engine ) have included this specific clause: 57.10 Acceptable Use; Safety-Critical Systems. Your use of the Lumberyard Materials must comply with the AWS...</description>
    <content:encoded>&lt;p&gt;Courtesy of the &lt;a href=&#34;https://www.reddit.com/r/aws/&#34; rel=&#34;noopener&#34;&gt;AWS subreddit&lt;/a&gt;, I was alerted to the fact the recently-updated AWS Service Terms (to&amp;nbsp;covertheir new &lt;a href=&#34;https://aws.amazon.com/lumberyard/&#34; rel=&#34;noopener&#34;&gt;3D Lumberyard Game Engine&lt;/a&gt;) have included this specific clause:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;b&gt;57.10&lt;/b&gt; Acceptable Use; Safety-Critical Systems. Your use of the Lumberyard Materials must comply with the &lt;a href=&#34;https://aws.amazon.com/aup&#34; rel=&#34;noopener&#34;&gt;AWS Acceptable Use Policy&lt;/a&gt;. The Lumberyard Materials are not intended for use with life-critical or safety-critical systems, such as use in operation of medical equipment, automated transportation systems, autonomous vehicles, aircraft or air traffic control, nuclear facilities, manned spacecraft, or military use in connection with live combat. However, this restriction will not apply in the event of the occurrence (certified by the United States Centers for Disease Control or successor body) of a widespread viral infection transmitted via bites or contact with bodily fluids that causes human corpses to reanimate and seek to consume living human flesh, blood, brain or nerve tissue and is likely to result in the fall of organized civilization.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;It&amp;#8217;s good to know that AWS are accommodating all possible contingencies for social and economic failover.&lt;/p&gt;</content:encoded>
  </item>
  <item>
    <title>Amazon Web Services (AWS) Release new g2.8xlarge GPU instance</title>
    <link>https://www.petewilcock.com/amazon-web-services-aws-release-new-g2-8xlarge-gpu-instance/</link>
    <guid isPermaLink="true">https://www.petewilcock.com/amazon-web-services-aws-release-new-g2-8xlarge-gpu-instance/</guid>
    <pubDate>2015-04-17</pubDate>
    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator>
    <category>Amazon Web Services</category>
    <category>distributed.net</category>
    <description>Today AWS announce a long-awaited upgrade to their G2 family of instances – the g2.8xlarge. The big brother of the 2x , which was hitherto the only GPU-backed instance available on the AWS platform. Here’s how the two compare in specifications: Instance vCPU ECU Memory (GiB) Instance Storage...</description>
    <content:encoded>&lt;p&gt;Today AWS announce a long-awaited upgrade to their G2 family of instances &amp;#8211; the g2.8xlarge. The big brother of the &lt;strong&gt;2x&lt;/strong&gt;, which was hitherto the only GPU-backed instance available on the AWS platform.&lt;/p&gt;&lt;p&gt;Here&amp;#8217;s how the two compare in specifications:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Instance&lt;/th&gt;&lt;th&gt; vCPU&lt;/th&gt;&lt;th&gt; ECU&lt;/th&gt;&lt;th&gt; Memory (GiB)&lt;/th&gt;&lt;th&gt; Instance Storage (GB)&lt;/th&gt;&lt;th&gt; EC2 Spot Price ($/hr)&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;g2.2xlarge&lt;/td&gt;&lt;td&gt; 8&lt;/td&gt;&lt;td&gt; 26&lt;/td&gt;&lt;td&gt; 15&lt;/td&gt;&lt;td&gt; 60 SSD&lt;/td&gt;&lt;td&gt; $0.08&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;g2.8xlarge&lt;/td&gt;&lt;td&gt; 32&lt;/td&gt;&lt;td&gt; 104&lt;/td&gt;&lt;td&gt; 60&lt;/td&gt;&lt;td&gt; 2 x 120 SSD&lt;/td&gt;&lt;td&gt; $0.32&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;The four GPUs are the same NVIDIA GRID K520 seen in the &lt;strong&gt;2x&lt;/strong&gt; instance, and as you can see by the numbers the 8x is exactly four times larger in every respect. The indicative spot price at the time of writing was also very close at roughly 4x the cost.&lt;/p&gt;&lt;p&gt;In my previous post where I ran a &lt;a href=&#34;https://www.petewilcock.com/distributed-net-rc5-72-on-amazon-web-services-aws-ec2-cluster-a-modern-solution-to-an-old-problem/&#34;&gt;benchmark of the g2.2xlarge instances using the Distributed.net RC5-72 project&lt;/a&gt;, I re-ran the same test using an &lt;strong&gt;8x&lt;/strong&gt;. You will not be surprised to learn that the results shows a linear increase in the crunching keyrate to roughly 1.7GKeys/sec (previously 432 Mkeys/sec on the 2x).&lt;/p&gt;&lt;h2&gt;Is bigger better?&lt;/h2&gt;&lt;p&gt;AWS&amp;#8217; fleet and pricing structure is generally linear. For an instance twice the size, you pay twice the cost, both in spot and on-demand. The major difference that is not very clearly advertised is that the network performance is greater for larger instances. AWS are vague as to what &amp;#8216;Low&amp;#8217;, &amp;#8216;Moderate&amp;#8217;, and &amp;#8216;High&amp;#8217; mean in terms of raw speed (&lt;a href=&#34;https://blog.serverdensity.com/network-performance-aws-google-rackspace-softlayer/&#34; rel=&#34;noopener&#34;&gt;many others have tried to benchmark this&lt;/a&gt;), but in the largest instances this is explicitly stated at 10 Gigabit. If you assume a larger box is pumping out more data, it will need a network connection to match. But you also assume that an instance only generating 1/4 as much data will be equally well served by a &amp;#8216;Moderate&amp;#8217; connection.&lt;/p&gt;&lt;h2&gt;A real world use case&lt;/h2&gt;&lt;p&gt;In my day job I set up a variety of analyses on genetic data that is supplemented by EC2 computation clusters (The recent &lt;a href=&#34;http://aws.amazon.com/whitepapers/&#34; rel=&#34;noopener&#34;&gt;AWS Whitepaper on Genomic Architecting in the Cloud&lt;/a&gt; is a really useful resource I can throw at scientists when they have questions). I investigated the viability of G2 instances and for a specific analysis that was GPU-capable, it did indeed run roughly 3-4 times faster than the same job running on a single CPU core. The problem was memory &amp;#8211; each job used roughly 3-5GiB of memory meaning I couldn&amp;#8217;t run more than 3 or 4 jobs on a single g2.2x GPU at once.&lt;/p&gt;&lt;p&gt;However on a r3.8xlarge &amp;#8211; a CPU instance with 32 cores and 244GiB memory, I could run 32 concurrent jobs with memory to spare. Sure, the jobs took 30 minutes each instead of 10, &lt;strong&gt;but I could run 32 of them&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;Then I drilled down on cost/benefit. The G2.2x was $0.08 on spot, and the r3.8x was $0.32. Four times as much per hour to run, but with &lt;strong&gt;10 times&lt;/strong&gt; as many jobs running. It ended up being a no-brainer that a CPU instance was the way to go.&lt;/p&gt;&lt;p&gt;Perhaps this is a poor example, because the capabilities of genetic analysis is badly limited by the tools available for the specific job, and it&amp;#8217;s reasonably rare to find anything that is built for multi-threading, let alone something designed specifically to run on GPUs. The implementation of these analysis tools are black box and we&amp;#8217;re not software developers. Our tests were probably very bad exemplars for the power of a GPU instance, but it did show that a mere 15GiB RAM on the 2X just wasn&amp;#8217;t anywhere near enough. 60GB on the 8x is a little better but in my use case it still wouldn&amp;#8217;t offer me any additional benefit because I wouldn&amp;#8217;t be able to leverage all of the GPUs I&amp;#8217;m paying for (our software just isn&amp;#8217;t good enough). &lt;a href=&#34;http://www.eyesopen.com/fastrocs&#34; rel=&#34;noopener&#34;&gt;FastROCS&lt;/a&gt;, the example cited in &lt;a href=&#34;https://aws.amazon.com/blogs/aws/new-g2-instance-type-with-4x-more-gpu-power/&#34; rel=&#34;noopener&#34;&gt;Jeff Barr&amp;#8217;s AWS Blog annoucement about the g2.8x&lt;/a&gt; also mentions the 15GiB of the 2x being the limiting factor, so presumably they&amp;#8217;re running jobs that can leverage more GPU in a single job without a proportional increase in memory usage.&lt;/p&gt;&lt;p&gt;The main benefit of one vertically-scaled box four times the size is speed. If your application can utilise four GPUs simultaneously within the memory limits then you could, for example, transcode a single video extremely quickly. If speed is the main factor in your service delivery then this is the instance for you. If however you&amp;#8217;re running smaller jobs that are less time-critical that the &lt;strong&gt;2x&lt;/strong&gt; can handle just as well, there&amp;#8217;s little benefit here, unless you consider the logical management of four GPU instances to be more hasslesome than running one four times the size. But then all of your GPU eggs are in one basket, and if the single instance goes down so does all of your capacity.&lt;/p&gt;&lt;p&gt;As with all AWS usage your chosen method of implementation will depend on what&amp;#8217;s right for you. This is going to be great news for a lot of people &amp;#8211; but unfortunately not me!&lt;/p&gt;</content:encoded>
  </item>
  <item>
    <title>CPanel Webserver on EC2  (or How I learned to stop worrying and love the cloud )</title>
    <link>https://www.petewilcock.com/cpanel-webserver-on-ec2-or-how-i-learned-to-stop-worrying-and-love-the-cloud/</link>
    <guid isPermaLink="true">https://www.petewilcock.com/cpanel-webserver-on-ec2-or-how-i-learned-to-stop-worrying-and-love-the-cloud/</guid>
    <pubDate>2015-02-25</pubDate>
    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator>
    <category>Amazon Web Services</category>
    <category>cPanel WHM</category>
    <description>It’s been a long time coming but my company is now fully based on Amazon Web Services EC2 for our web hosting. It’s been a long journey to get here. For more than 15 years we’ve cycled between a variety of providers who offered different things in different ways. First our sites were hosted by...</description>
    <content:encoded>&lt;p&gt;It&amp;#8217;s been a long time coming but my company is now fully based on Amazon Web Services EC2 for our web hosting. It&amp;#8217;s been a long journey to get here.&lt;/p&gt;&lt;p&gt;For more than 15 years we&amp;#8217;ve cycled between a variety of providers who offered different things in different ways. First our sites were hosted by &lt;a href=&#34;http://www.gradwell.com/&#34; rel=&#34;noopener&#34;&gt;Gradwell&lt;/a&gt;, on a single shared server where we paid a per-domain cost for additional hosting. We left them in 2004 after 6 years and following a &lt;em&gt;very&lt;/em&gt; brief flirtation with &lt;a href=&#34;https://www.heartinternet.uk/&#34; rel=&#34;noopener&#34;&gt;Heart Internet&lt;/a&gt; we moved to a now-defunct IT company called Amard. This gave us our first taste of &lt;a href=&#34;http://www.cpanel.net&#34; rel=&#34;noopener&#34;&gt;CPanel&lt;/a&gt; as a way of centralising and easily managing our hosted sites. It was great &amp;#8211; so great that it made moving to ServerShed (also defunct) in 2005 very easy.&lt;/p&gt;&lt;p&gt;This was our first dedicated server with CPanel and we enjoyed that greater level of control while still having the convenience of a largely self-managing service. In 2007 we hopped ship to &lt;a href=&#34;http://www.poundhost.com&#34; rel=&#34;noopener&#34;&gt;PoundHost&lt;/a&gt; where we remained until last week. Three or four times in the last 8 years we&amp;#8217;ve re-negotiated for a new dedicated server and battled with the various frailties of ageing hardware and changing software. Originally we had no RAID and downloaded backups manually, then software RAID0, then hardware RAID0, then most recently with S3 backups on top.&lt;/p&gt;&lt;p&gt;Historically &amp;#8216;the cloud&amp;#8217; was a bit of an impenetrable conundrum. You knew it existed in some form, but didn&amp;#8217;t really understand what it meant or how its infrastructure was set up. Access to the AWS Cloud in the early days, as far as I understand, was largely command-line (CLI) based and required a lot of knowledge to get going on the platform. It required a lot of mental visualisation and I&amp;#8217;m sure the complexity would have been beyond me back then. Some services didn&amp;#8217;t exist, others were in their infancy. Everything was harder.&lt;/p&gt;&lt;p&gt;In that respect I almost don&amp;#8217;t mind being a bit late to this party. It&amp;#8217;s only in the last two or three years that it seems the platform has been opened up to the less-specialised user. Most CLI functions have been abstracted into a pretty, functional web console. Services interact with each other more fluidly. Access controls that govern permissions to every resource in a really granular way have been introduced. Monitoring, billing, automated resource scaling, load balancing and a whole host of other features are now a reality and can boast really solid stability.&lt;/p&gt;&lt;p&gt;Even then migration has not been a one-click process. CPanel do offer a VPS-optimized version of the Web Host Manager (WHM) and that&amp;#8217;s the one we&amp;#8217;re running. Its main boast is that it uses less memory than the regular version, apparently as a concession to the fact that a Virtual Machine is more likely to exist as a small slice of an existing server and won&amp;#8217;t have as many resources allocated to it. It looked to be the best fit.&lt;/p&gt;&lt;p&gt;Then we needed to find a compatible Amazon Machine Image (AMI) to install it. It seemed to be largely a toss-up between CentOS and RedHat Enterprise Linux. We&amp;#8217;d used CentOS 6 in the past with good results (and unlike RHEL it requires no paid-up subscription), so we fired it up and slowly started banging the tin into shape. Compared to other set-ups there is very little AWS-specific documentation on setting up a CPanel environment, so we were mostly sustained by a couple of good articles by &lt;a href=&#34;http://robjscott.com/how-to-set-up-cpanel-whm-on-amazon-web-services/&#34; rel=&#34;noopener&#34;&gt;Rob Scott&lt;/a&gt; and &lt;a href=&#34;http://www.contrid.co.za/2014/07/amazon-ec2-nameservers-with-whm/&#34; rel=&#34;noopener&#34;&gt;Antonie Potgieter&lt;/a&gt;. CPanel themselves &lt;a href=&#34;http://blog.cpanel.net/part-1-how-i-built-a-cpanel-hosting-environment-on-amazon-aws/&#34; rel=&#34;noopener&#34;&gt;wrote an article&lt;/a&gt; on how to set up the environment but this didn&amp;#8217;t quite cover enough and already the screenshots and references there are out of date. I will write a comprehensive overview of &amp;#8216;How to Set up CPanel on EC2&amp;#8217; in another article, but to conclude here I will talk about what made this transition so tentative for us that we waited almost a year after setting up AWS before we went live with our main server on the platform:&lt;/p&gt;&lt;p&gt;Fear. Non-specific, but mostly of the unknown. It&amp;#8217;s irrational, because when you&amp;#8217;re buying managed hardware from resellers you never actually get to see the physical box you&amp;#8217;re renting. It&amp;#8217;s no more tangible to you than an ephemeral VM is, and yet there&amp;#8217;s something oddly reassuring in knowing that your server is a physical brick of a thing loaded into a rack somewhere. If something goes wrong, an engineer that you can speak to on the phone can go up to it and plug in a monitor to see what&amp;#8217;s happening. It&amp;#8217;s not suddenly going to disappear without a trace.&lt;/p&gt;&lt;p&gt;Not so with the cloud. It&amp;#8217;s all a logical abstraction. You don&amp;#8217;t know, you&amp;#8217;re not allowed to know, precisely where the data centres are. You don&amp;#8217;t know how the internal configuration works. Infrastructure is suddenly just software configuration and we all know how easy it is to make a mistake. Click the wrong box during the set-up and you might have your root device deleted accidentally, or be able to terminate the server with all of your precious data because you didn&amp;#8217;t enable &lt;a href=&#34;http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html&#34; rel=&#34;noopener&#34;&gt;Termination Protection&lt;/a&gt;. If you&amp;#8217;re a little careless with your access keys and they become public, you&amp;#8217;ll find your account has been &lt;a href=&#34;http://www.devfactor.net/2014/12/30/2375-amazon-mistake/&#34; rel=&#34;noopener&#34;&gt;compromised to run expensive clusters farming bitcoins&lt;/a&gt; at your expense.&lt;/p&gt;&lt;p&gt;Terrifying if you don&amp;#8217;t know what you&amp;#8217;re doing. So you investigate, learn slowly, play on the &lt;a href=&#34;http://aws.amazon.com/free/&#34; rel=&#34;noopener&#34;&gt;Free Tier&lt;/a&gt;. Make things, break things. Migrate one small site to make sure it doesn&amp;#8217;t explode. Back it up, kill it, restore it, and be absolutely confident that this is really going to work.&lt;/p&gt;&lt;p&gt;And it does. For the first time I feel like we&amp;#8217;re our own hosting provider. I spec the server, I buy it by the hour, I configure and deploy it, and Amazon is merely the &amp;#8216;manufacturer&amp;#8217;. Except that everything happens in minutes and seconds instead of weeks and days. Hardware failure is handled as simply as just stopping and restarting the instance where it will redeploy on different hardware. If you&amp;#8217;ve architected for failure as you should, backups can be spun up in less than ten minutes. if I get nervous about spiralling running costs I can just flip the off switch and the charges stop, or the &lt;a href=&#34;https://aws.amazon.com/premiumsupport/trustedadvisor/&#34; rel=&#34;noopener&#34;&gt;Trusted Advisor&lt;/a&gt; can offer suggestions on how to run my configuration more efficiently.&lt;/p&gt;&lt;p&gt;It&amp;#8217;s telling that every company that I&amp;#8217;ve ever bought a physical server from are now pushing cloud-based offerings to their customers too. The time of procuring your own hardware is passing and being replaced by more dynamic, more durable, more robust solutions.&lt;/p&gt;&lt;p&gt;You&amp;#8217;d be forgiven for thinking this whole post was merely a sly advert for AWS, but I really am just a humble end user. Admittedly one that has been completely converted, and I haven&amp;#8217;t even enumerated the full list services that I now use, to say nothing of the others that I haven&amp;#8217;t even had time to investigate. This is a great time to make the transition, because while adoption has been growing at a huge rate, I think it&amp;#8217;s going to skyrocket to even greater heights in the next few years.&lt;/p&gt;&lt;p&gt;If you don&amp;#8217;t have a pilot for the journey, it&amp;#8217;s time to train one.&lt;/p&gt;</content:encoded>
  </item>
  <item>
    <title>Server-wide Referrer Spam Blocking for Cpanel WHM</title>
    <link>https://www.petewilcock.com/server-wide-referrer-spam-blocking-for-cpanel-whm/</link>
    <guid isPermaLink="true">https://www.petewilcock.com/server-wide-referrer-spam-blocking-for-cpanel-whm/</guid>
    <pubDate>2015-02-22</pubDate>
    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator>
    <category>cPanel WHM</category>
    <description>If like me you maintain a WordPress website, you might have recently noticed a number of referrals to your site coming from one of the following: buttons-for-website.com, buttons-for-your-website.com, best-seo-offer.com, or some other unknown, dodgy-sounding website that clearly isn’t linking to...</description>
    <content:encoded>&lt;p&gt;If like me you maintain a WordPress website, you might have recently noticed a number of referrals to your site coming from one of the following:&lt;/p&gt;&lt;p&gt;buttons-for-website.com,&lt;br&gt; buttons-for-your-website.com,&lt;br&gt; best-seo-offer.com,&lt;/p&gt;&lt;p&gt;or some other unknown, dodgy-sounding website that clearly isn&amp;#8217;t linking to you legitimately.&lt;/p&gt;&lt;p&gt;This is referral spam that seeks to achieve high Google PageRank by gaming the system to create the appearance of popularity. One major way to do that is to get a high number of external backlinks and referring domains. These little spambots will visit your site and attempt to spam your WordPress installation with comments if it can, as well as dropping the appearance of referring traffic into your analytics and logs. It&amp;#8217;s very annoying because it&amp;#8217;s not legitimate traffic and you&amp;#8217;ll need to know to exclude it.&lt;/p&gt;&lt;p&gt;It is possible to block these referrals on a per-site basis by adding the following to your site&amp;#8217;s .htaccess file:&lt;/p&gt;&lt;pre&gt;# Block Referer Spam
RewriteEngine On
RewriteCond %{HTTP_REFERER} buttons\-for\-website\.com
RewriteRule ^.* - [F,L]&lt;/pre&gt;&lt;p&gt;This is great, but what if you have a whole server of WordPress domains? Adding this directive manually to each one would be very tedious. Luckily this becomes easy in CPanel with a couple of configuration changes.&lt;/p&gt;&lt;p&gt;1) Follow this guide on &lt;a href=&#34;https://documentation.cpanel.net/display/EA/Custom+Templates#CustomTemplates-Customtemplatesthatwillapplytoallvirtualhosts&#34; rel=&#34;noopener&#34;&gt;creating a custom VirtualHost template within your CPanel installation&lt;/a&gt;. Once you have created both the vhost.default and ssl_vhost.default files, open them up and add the following lines to the VirtualHost directives:&lt;/p&gt;&lt;pre&gt;RewriteEngine On
RewriteOptions Inherit&lt;/pre&gt;&lt;p&gt;2) Go to your WHM in &amp;#8216;Apache Configuration-&amp;gt;Include Editor&amp;#8217; and add the blocking directive (# Block Referrer Spam referenced above) to the &amp;#8216;Pre-Virtual Host Include&amp;#8217; area for All versions.&lt;/p&gt;&lt;p&gt;So what we&amp;#8217;re doing here is telling the Apache config to inherit any Rewrite rules from the main server context for each virtual host by making a custom VirtualHost template to say that. Then we&amp;#8217;re specifying that rule in the main server context which will inherit into each hosted site.&lt;/p&gt;&lt;p&gt;In this way the entire server will have their sites tested for the referral block and apply it globally. If you&amp;#8217;re maintaining a client server this is the ideal way of taking care of this problem automatically. If you spot any more insidious referrals to your sites in future, just update the Pre-include config to check for the appropriate rewrite condition.&lt;/p&gt;&lt;p&gt;If you were curious, I checked and the &amp;#8216;Buttons for website&amp;#8217; site has some 800,000 external backlinks from over 10,000 domains &amp;#8211; that&amp;#8217;s a lot of effort invested in trying to bump up its rank. As of today, it has a &lt;strong&gt;Google PageRank of 0&lt;/strong&gt;. Spam shouldn&amp;#8217;t and seemingly doesn&amp;#8217;t pay!&lt;/p&gt;</content:encoded>
  </item>
  <item>
    <title>Amazon Web Services (AWS) now provides billing in local currency</title>
    <link>https://www.petewilcock.com/amazon-web-services-aws-now-provides-billing-in-local-currency/</link>
    <guid isPermaLink="true">https://www.petewilcock.com/amazon-web-services-aws-now-provides-billing-in-local-currency/</guid>
    <pubDate>2015-02-17</pubDate>
    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator>
    <category>Amazon Web Services</category>
    <description>Developers and businesses around the world will be breathing a huge sigh of relief today as Amazon Web Services finally announced the ability to have invoices generated and charged in one of 11 new local currencies. Since its launch in 2006, AWS has exclusively billed in US dollars worldwide,...</description>
    <content:encoded>&lt;p&gt;Developers and businesses around the world will be breathing a huge sigh of relief today as Amazon Web Services finally announced the ability to have invoices generated and charged in one of 11 new local currencies.&lt;/p&gt;&lt;p&gt;Since its launch in 2006, AWS has exclusively billed in US dollars worldwide, causing a currency-conversion and bank fee headache for all but U.S. customers. As a multi-billion dollar, multi-national operation, the introduction of this feature is long overdue and brings AWS into line with other providers such as Microsoft Azure in offering bills in the currency you&amp;#8217;re most familiar with.&lt;/p&gt;&lt;p&gt;The new list of supported currencies, when using an elligible Visa or MasterCard to pay your bill are:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Australian Dollars (AUD)&lt;/li&gt;&lt;li&gt;Swiss Francs (CHF)&lt;/li&gt;&lt;li&gt;Danish Kroner (DKK)&lt;/li&gt;&lt;li&gt;Euros (EUR)&lt;/li&gt;&lt;li&gt;British Pounds (GBP)&lt;/li&gt;&lt;li&gt;Hong Kong Dollars (HKD)&lt;/li&gt;&lt;li&gt;Japanese Yen (JPY)&lt;/li&gt;&lt;li&gt;Norwegian Kroner (NOK)&lt;/li&gt;&lt;li&gt;New Zealand Dollars (NZD)&lt;/li&gt;&lt;li&gt;Swedish Kronor (SEK)&lt;/li&gt;&lt;li&gt;South African Rand (ZAR)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;This new preference can be set in your AWS &amp;#8216;Billing and Cost Management&amp;#8217; account under &amp;#8216;Account settings&amp;#8217;. The changes take effect immediately and your estimated bill for the month is then presented to you in your local currency.&lt;/p&gt;&lt;p&gt;&lt;a href=&#34;https://www.petewilcock.com/wp-content/uploads/2015/02/aws-billing.png&#34;&gt;&lt;img src=&#34;https://www.petewilcock.com/wp-content/uploads/2015/02/aws-billing.png&#34; srcset=&#34;https://www.petewilcock.com/wp-content/uploads/2015/02/aws-billing.png 810w, https://www.petewilcock.com/wp-content/uploads/2015/02/aws-billing-300x144.png 300w, https://www.petewilcock.com/wp-content/uploads/2015/02/aws-billing-624x300.png 624w&#34; sizes=&#34;(max-width: 810px) 100vw, 810px&#34; alt=&#34;aws-billing&#34; width=&#34;810&#34; height=&#34;390&#34;&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The one important factor to note is that &lt;strong&gt;AWS pricing remains firmly in dollars&lt;/strong&gt;, and all prices presented to you on purchasing remain that way. Amazon appear to be offering an exchange rate that changes daily so all estimates are based on that, and will naturally be susceptible to currency fluctuations &amp;#8211; so CFO headaches aren&amp;#8217;t gone entirely! Presumably the final bill for the month will be based on the exchange rate for the given currency on that day, but when compared to the existing method &amp;#8211; getting hammered by your bank for currency conversion fees at terrible transfer rates &amp;#8211; this is substantially preferential and will result in lower overheads for all non-US AWS customers.&lt;/p&gt;</content:encoded>
  </item>
  <item>
    <title>Raspberry Pi 2 Model B with Distributed.net dnetc RC5-72 client</title>
    <link>https://www.petewilcock.com/raspberry-pi-2-model-b-with-distributed-net-dnetc-rc5-72-client/</link>
    <guid isPermaLink="true">https://www.petewilcock.com/raspberry-pi-2-model-b-with-distributed-net-dnetc-rc5-72-client/</guid>
    <pubDate>2015-02-10</pubDate>
    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator>
    <category>distributed.net</category>
    <category>Raspberry Pi</category>
    <description>A little while ago I wrote up a summary of the distributed.net RC5-72 project . One of my habits over the years has been to run the good old cow client on every new computer I’ve built just to see how the speed compares. So when I picked up a new Raspberry Pi 2 Model B this week, this habit held...</description>
    <content:encoded>&lt;p&gt;A little while ago I wrote up a summary of the &lt;a href=&#34;https://www.petewilcock.com/distributed-net-rc5-72-on-amazon-web-services-aws-ec2-cluster-a-modern-solution-to-an-old-problem/&#34;&gt;distributed.net RC5-72 project&lt;/a&gt;. One of my habits over the years has been to run the good old cow client on every new computer I&amp;#8217;ve built just to see how the speed compares.&lt;/p&gt;&lt;p&gt;So when I picked up a new Raspberry Pi 2 Model B this week, this habit held true. For this I installed the &lt;a href=&#34;http://www.distributed.net/Download_clients&#34; rel=&#34;noopener&#34;&gt;ARM/embi client v2.9110.519&lt;/a&gt; (sadly dated 2012 &amp;#8211; there have been very few client updates in the last few years), and it ran without any issues. By default it doesn&amp;#8217;t detect the Pi 2&amp;#8217;s quad core architecture, so requires manually setting the Performance options to use 4 cores.&lt;/p&gt;&lt;p&gt;It&amp;#8217;s not exactly speedy, but then this &lt;em&gt;is&lt;/em&gt; a computer that I can fit in my back pocket.&lt;/p&gt;&lt;h3&gt;Results&lt;/h3&gt;&lt;p&gt;Four simultaneous crunchers took 1 hour 3 minutes to complete 4 stat units, at a combined keyrate of &lt;strong&gt;4.5Mkeys&lt;/strong&gt;/sec. At that rate the Pi could crunch around 91 stat units per day. That means that running by itself, the Pi could complete the remaining work on the project in a mere &lt;strong&gt;32 million years&lt;/strong&gt;. I don&amp;#8217;t think the warranty lasts that long.&lt;/p&gt;&lt;p&gt;The CPU temperature held fairly steady at 54 Celsius, and I will also note that I didn&amp;#8217;t overclock the Pi so this was running at the default 900mhz.&lt;/p&gt;&lt;p&gt;While the Pi does boast a Broadcom GPU with 1GB RAM (shared with CPU), there are no compatible crunching clients for a GPU test, and I suspect the project is in such a lacklustre state now that I don&amp;#8217;t foresee any budding development on one soon. This was still a fun little test, and isn&amp;#8217;t that much slower than a decent home PC would have been 15 years ago.&lt;/p&gt;</content:encoded>
  </item>
  <item>
    <title>How to modify ‘Deletion on Termination’ flag for EBS volume on running EC2 instance.</title>
    <link>https://www.petewilcock.com/how-to-modify-deletion-on-termination-flag-for-ebs-volume-on-running-ec2-instance/</link>
    <guid isPermaLink="true">https://www.petewilcock.com/how-to-modify-deletion-on-termination-flag-for-ebs-volume-on-running-ec2-instance/</guid>
    <pubDate>2015-02-05</pubDate>
    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator>
    <category>Amazon Web Services</category>
    <description>Check and change an EBS volume’s DeleteOnTermination setting on a running EC2 instance, with a JSON mapping and a read-back check.</description>
    <content:encoded>&lt;p&gt;When launching an EC2 instance on Amazon Web Services, the EBS volume is set to &amp;#8216;Delete on Termination&amp;#8217; by default. Most of the time this is fine as you&amp;#8217;d often rather make a snapshot of your drive to enable you to boot up multiple copies of the same instance, or if you&amp;#8217;re a developer that&amp;#8217;s creating and terminating instances regularly it would be a nightmare to have all of these orphaned EBS volumes cluttering up your account.&lt;/p&gt;&lt;p&gt;But what do you do when you have a running instance where the EBS was set to Delete and you&amp;#8217;ve changed your mind and want to keep it? The AWS documentation is surprisingly vague about this, mostly talking about setting the flag on launch. So how do you do it for a running instance? And for that matter, how can you tell if you set an existing instance to Delete on Termination? It might have been a while and it&amp;#8217;s hard to remember if you ticked that checkbox.&lt;/p&gt;&lt;h2&gt;How to check the EBS &amp;#8216;Delete on Termination&amp;#8217; flag&lt;/h2&gt;&lt;p&gt;It&amp;#8217;s a little buried. Go to your EC2 management console and click on &amp;#8216;Instances&amp;#8217;. Click on the instance you&amp;#8217;re curious about, and then under the &amp;#8216;Description&amp;#8217; tab, scroll down to &amp;#8216;Block devices&amp;#8217;, and click on the appropriate EBS volume. This will pop up an attribute box which will state the Delete on Termination flag. This seems to be the only place in the whole AWS console to check this information!&lt;/p&gt;&lt;p&gt;&lt;a href=&#34;https://www.petewilcock.com/wp-content/uploads/2015/02/ebs-volume-status.jpg&#34;&gt;&lt;img src=&#34;https://www.petewilcock.com/wp-content/uploads/2015/02/ebs-volume-status.jpg&#34; srcset=&#34;https://www.petewilcock.com/wp-content/uploads/2015/02/ebs-volume-status.jpg 662w, https://www.petewilcock.com/wp-content/uploads/2015/02/ebs-volume-status-300x232.jpg 300w&#34; sizes=&#34;(max-width: 662px) 100vw, 662px&#34; alt=&#34;ebs-volume-status&#34; width=&#34;662&#34; height=&#34;513&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;How to modify the EBS &amp;#8216;Delete on Termination&amp;#8217; flag&lt;/h2&gt;&lt;p&gt;The only way to do this is by using the &lt;a href=&#34;http://aws.amazon.com/cli/&#34; rel=&#34;noopener&#34;&gt;AWS CLI&lt;/a&gt;, at the current time there&amp;#8217;s no way to do this using the web console.&lt;/p&gt;&lt;p&gt;You can do this in one of two ways, either by specifying a JSON attribute file with the modifications you want to apply to the instance, or by doing it in-line with escape characters.&lt;/p&gt;&lt;pre&gt;aws ec2 modify-instance-attribute --instance-id i-a3ef245 --block-device-mappings /path/to/file.json&lt;/pre&gt;&lt;p&gt;with a .json file in the a format such as:&lt;/p&gt;&lt;pre&gt;[
    {
    &#34;DeviceName&#34;: &#34;/dev/sda1&#34;,
    &#34;Ebs&#34;: {
      &#34;DeleteOnTermination&#34;: false
      }
    }
]&lt;/pre&gt;&lt;p&gt;Or without using a .json file inline like this:&lt;/p&gt;&lt;pre&gt;aws ec2 modify-instance-attribute --instance-id i-a3ef245 --block-device-mappings &#34;[{\&#34;DeviceName\&#34;: \&#34;/dev/sda\&#34;,\&#34;Ebs\&#34;:{\&#34;DeleteOnTermination\&#34;:false}}]&#34;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Note: &lt;/strong&gt;You will need to configure the AWS cli (command from terminal: &amp;#8216;aws configure&amp;#8217;) either with user credentials with a policy that grants permissions to the appropriate EC2 instance, or run the CLI on an instance which has EC2 Role permissions.&lt;/p&gt;&lt;p&gt;Now hopefully you&amp;#8217;ll be able to save that EBS volume after changing your mind about the termination flag!&lt;/p&gt;</content:encoded>
  </item>
  <item>
    <title>Distributed.net RC5-72 on Amazon Web Services (AWS) EC2 Cluster – A modern solution to an old problem</title>
    <link>https://www.petewilcock.com/distributed-net-rc5-72-on-amazon-web-services-aws-ec2-cluster-a-modern-solution-to-an-old-problem/</link>
    <guid isPermaLink="true">https://www.petewilcock.com/distributed-net-rc5-72-on-amazon-web-services-aws-ec2-cluster-a-modern-solution-to-an-old-problem/</guid>
    <pubDate>2014-11-16</pubDate>
    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pete</dc:creator>
    <category>Amazon Web Services</category>
    <category>distributed.net</category>
    <description>History Anyone kicking around the internet since the early days will have heard of distributed.net ‘s RC5-72 distributed computing project. Arising from RSA labs Secret-Key Challenge , the project sought to utilise distributed computing power to perform a brute force attack in an attempt to...</description>
    <content:encoded>&lt;h2&gt;History&lt;/h2&gt;&lt;p&gt;Anyone kicking around the internet since the early days will have heard of &lt;strong&gt;&lt;a href=&#34;http://www.distributed.net&#34; rel=&#34;noopener&#34;&gt;distributed.net&lt;/a&gt;&lt;/strong&gt;&amp;#8216;s RC5-72 distributed computing project. Arising from &lt;strong&gt;&lt;a href=&#34;http://en.wikipedia.org/wiki/RSA_Secret-Key_Challenge&#34; rel=&#34;noopener&#34;&gt;RSA labs Secret-Key Challenge&lt;/a&gt;&lt;/strong&gt;, the project sought to utilise distributed computing power to perform a brute force attack in an attempt to decrypt a series of secret messages encrypted using the RC5 block cipher. Sponsored by RSA Labs, a $10,000 reward was offered to the participant whose machine was responsible for finding the correct key for each of the challenges, starting at 56-bit encryption, and scaling up to 64, 72, 80, 88, 96, 104, 112, 120, and 128.&lt;/p&gt;&lt;p&gt;I started contributing to the 64-bit instance of the project (termed RC5-64) back in 2001, and with the combined computing power of around 300,000 participants, the key was cracked after almost 5 years of work in July 2002. This project required the testing of 68 billion key blocks (2^64 keys) and found the correct key after searching 82.7% of the total keyspace.&lt;/p&gt;&lt;p&gt;A new project to tackle the next message, encrypted with a 72-bit key, was started on December 2nd 2002. This project required the testing of 1.1 trillion key blocks (2 ^ 72 keys) &amp;#8211; 256 times larger than the original project that had taken 5 years to complete. After a few years it became apparent that this was going to take &amp;#8216;a very long time&amp;#8217;, and RSA Labs withdrew the challenges in May 2007, along with the $10,000 prizes. Shortly after this news, &lt;strong&gt;&lt;a href=&#34;http://blogs.distributed.net/2008/09/08/02/09/bovine/&#34; rel=&#34;noopener&#34;&gt;distributed.net announced that they would continue to run the project&lt;/a&gt;&lt;/strong&gt; and would fund a $4000 prize alternative.&lt;/p&gt;&lt;h2&gt;Today&lt;/h2&gt;&lt;p&gt;As of today the project has made it through &lt;strong&gt;3.378%&lt;/strong&gt; of the keyspace after &lt;strong&gt;12 years&lt;/strong&gt; of work. At the current rate the project anticipates hitting 100% in a mere &lt;strong&gt;219 years&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;You can imagine that so many years of effort has dulled the enthusiasm of its participants. The &lt;strong&gt;&lt;a href=&#34;http://stats.distributed.net/projects.php?project_id=8&#34; rel=&#34;noopener&#34;&gt;distributed.net statistics&lt;/a&gt;&lt;/strong&gt; report that there have been some &lt;strong&gt;94,000&lt;/strong&gt; unique participants to RC5-72 (significantly down on the 300,000 of the previous project), but that only &lt;strong&gt;1200&lt;/strong&gt; of them remain active. With the rise of other distributed computing projects in the early 2000s such as &lt;strong&gt;&lt;a href=&#34;http://en.wikipedia.org/wiki/SETI@home&#34; rel=&#34;noopener&#34;&gt;SETI@home&lt;/a&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;a href=&#34;http://en.wikipedia.org/wiki/Folding@home&#34; rel=&#34;noopener&#34;&gt;Folding@home&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href=&#34;http://en.wikipedia.org/wiki/List_of_distributed_computing_projects&#34; rel=&#34;noopener&#34;&gt;many others&lt;/a&gt;&lt;/strong&gt;, this humble project has been rather forgotten by the internet at large. The advent of Bitcoin and other e-currencies have led to people turning their spare processing power to more profitable ends.&lt;/p&gt;&lt;p&gt;And yet, the RC5-72 project&amp;#8217;s overall keyrate remains higher today than it ever has been in the past. The reason for this was the development and widespread use of powerful GPUs in home computers. I&amp;#8217;m the first to admit I don&amp;#8217;t really understand the finer points of how computer hardware works, but GPUs turned out to be roughly 1000 times faster than even the fastest commercial CPU at crunching through keys. Traditional CPU crunching makes up less than 10% of the total daily production, with the vast majority coming from the GPU ATI Stream technology (70%), with the rest coming from NVIDIA CUDA (5%) and the more recent OpenCL &amp;#8211; supported on both ATI and NVIDIA hardware (14%).&lt;/p&gt;&lt;p&gt;As much as I salute distributed.net for continuing to maintain the project and run the the supporting key servers to distribute the work and run the stats, I have to say I&amp;#8217;ve never seen any active effort to promote it. The website is rather dated and to my memory has the exact same design that it had in 2001 when I first started. There are no social media buttons, no methods of incentivisation, and even some of the more basic things like keyrate graphs have been broken for months (or years) and nobody has worried about fixing them.&lt;/p&gt;&lt;h2&gt;A possible solution&lt;/h2&gt;&lt;p&gt;I know that it must be difficult to commit any real effort to something that has been a back-burner operation for almost 10 years, but the completionist in me is desperate to somehow mobilise the modern massive internet to attack the project with gusto and get it to 100% in a month. I know that&amp;#8217;s a laughably ridiculous suggestion, because the scale of the work required is massive. If you had a reasonably powerful ATI graphics card that could churn through &lt;strong&gt;one billion keys per second&lt;/strong&gt;, you might be able to crunch around 19,000 work units per day if the GPU was dedicated to the task 24/7. At that rate you could expect to complete the project in around &lt;strong&gt;1.6 million years&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;So 1200 people aren&amp;#8217;t going to get this done, even though the top 100 of those can pump out almost 10 million work units a day.&lt;/p&gt;&lt;p&gt;The advent of &amp;#8216;the cloud&amp;#8217; has made potentially unlimited computing power available to anyone in the world &amp;#8211; at a cost. Amazon Web Services (AWS) have the largest compute infrastructure of any provider and I&amp;#8217;ve spent quite a while familiarising myself with the platform. It occurred to me that a key-crunching test of RC5-72 was in order.&lt;/p&gt;&lt;h2&gt;The Test&lt;/h2&gt;&lt;p&gt;For the basic test, I provisioned &lt;strong&gt;a &lt;a href=&#34;http://aws.amazon.com/ec2/instance-types/&#34; rel=&#34;noopener&#34;&gt;compute-heavy c3.8xlarge instance&lt;/a&gt;&lt;/strong&gt; running a traditional Linux x86 CPU client, and a &lt;strong&gt;&lt;a href=&#34;http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html&#34; rel=&#34;noopener&#34;&gt;GPU g2.2xlarge instance&lt;/a&gt;&lt;/strong&gt; running the CUDA 3.1 distributed.net client, and I latterly also tested the OpenCL client.&lt;/p&gt;&lt;p&gt;The keyrate and cost results were as follows:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Instance Type&lt;/th&gt;&lt;th&gt; dnetc Client&lt;/th&gt;&lt;th&gt; Keyrate (Mkeys/Sec)&lt;/th&gt;&lt;th&gt; EC2 Spot Price ($/hr)&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;c3.8xlarge&lt;/td&gt;&lt;td&gt;v2.9109.518&lt;/td&gt;&lt;td&gt; 180&lt;/td&gt;&lt;td&gt; $0.32&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;g2.2xlarge&lt;/td&gt;&lt;td&gt;v2.9109.518 (CUDA 3.1)&lt;/td&gt;&lt;td&gt; 423&lt;/td&gt;&lt;td&gt; $0.08&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;g2.2xlarge&lt;/td&gt;&lt;td&gt;v2.9109.520 (OpenCL)&lt;/td&gt;&lt;td&gt; 432&lt;/td&gt;&lt;td&gt; $0.08&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;The OpenCL client was the winner, offering 432 million keys/sec for 8 cents an hour. It should be noted that this falls far short of the &lt;strong&gt;&lt;a href=&#34;http://cgi.distributed.net/speed/query.php?cputype=all&amp;amp;amp;arch=4&amp;amp;amp;contest=rc572&amp;amp;amp;multi=3&#34; rel=&#34;noopener&#34;&gt;best possible recorded speed&lt;/a&gt;&lt;/strong&gt; from a GPU, where an ATI Radeon HD 7970 can do a stunning &lt;strong&gt;3.6 billion keys/sec&lt;/strong&gt; &amp;#8211; although this benchmark list is at least a year old so it&amp;#8217;s probable there exists cards out there that are even more powerful. Compared to that a mere 0.43 billion/sec is only 11% as powerful.&lt;/p&gt;&lt;p&gt;The potential advantage of the AWS cloud is seemingly not in its raw speed, but its scale. I can&amp;#8217;t run 10 graphics cards at home but I &lt;strong&gt;can&lt;/strong&gt; run 10 instances of the dnetc client. So that&amp;#8217;s what I did for around 36 hours. The cost of 10 instances for 1 day equated to $0.80 x 24 = &lt;strong&gt;$19.20&lt;/strong&gt;. Not bank-breaking but quite a lot to achieve a total speed of &lt;strong&gt;4.32 billion keys/sec&lt;/strong&gt;. That singular 24 hour effort put me at #26 in the top 100 rankings for the day, and the 87,000 work units completed bolstered my grand total to 1.4 million units over the 12 years I&amp;#8217;ve been working on the project. A fairly hefty chunk relative to my total effort, but still a tiny drop in an enormous ocean.&lt;/p&gt;&lt;h2&gt;Getting to 100%?&lt;/h2&gt;&lt;p&gt;After a few calculations, I estimated that I would require 346,000 nodes like this, running 24/7 for one year, to complete the project. Assuming I could maintain a spot price of 8 cents an hour, it would cost &amp;#8216;only&amp;#8217; $232 million to provision the cloud to complete this project. I think it&amp;#8217;s pretty unlikely I could crowd source this from the internet in order to complete an old cryptography project, but there are other, more simple solutions.&lt;/p&gt;&lt;p&gt;1) Better GPUs. AWS aren&amp;#8217;t the only cloud provider and one of the many others may provide GPU instances with better computational power &amp;#8211; but none of them offer AWS&amp;#8217; novel &amp;#8216;spot pricing&amp;#8217; model to get instances at rock-bottom prices, so this is unlikely to be cheaper.&lt;/p&gt;&lt;p&gt;2) Don&amp;#8217;t use the cloud at all. Somehow compel millions of people to start running the client on their high-end graphics cards at home and work too. Might happen&amp;#8230; but not without a concerted social media effort, refresh of the website, and some kind of modern fun &amp;#8216;game&amp;#8217; incentivisation thing. Doing it for the fun of cryptographic curiosity is unlikely to motivate too many casual users.&lt;/p&gt;&lt;p&gt;3) &lt;strong&gt;&lt;a href=&#34;http://cscvr.umassd.edu/&#34; rel=&#34;noopener&#34;&gt;More bespoke supercomputers like this one&lt;/a&gt;&lt;/strong&gt;. The Center for Scientific Computing and Visualization Research at the University of Massachusetts have built a bit of a Frankenstein super-computer from old Playstation and AMD Radeon graphics cards. It&amp;#8217;s seemingly used for other computational purposes, but the excess capacity is put into the RC5-72 project and recently has been churning out an eye-popping 1.2 million work units a day (more than 10% of the total work of the top 100) &amp;#8211; cool huh?&lt;/p&gt;&lt;p&gt;4) Maybe Amazon would like to take on the challenge directly to demonstrate the power of their cloud. They&amp;#8217;ve done things like this in the past (like creating the &lt;strong&gt;&lt;a href=&#34;http://www.top500.org/system/178321&#34; rel=&#34;noopener&#34;&gt;#72 supercomputer&lt;/a&gt;&lt;/strong&gt; in the world with 26,496 cores rated at 593 Tflops/sec) and would presumably do it for free as a bit of a boast, but then there would also be the fear that the other tenacious users on the project would feel a bit cheated by having a giant multinational come along and solve the problem without them. But it&amp;#8217;s also possible that the joy of having it complete would be worth the disappointment of having not achieved it personally.&lt;/p&gt;&lt;p&gt;This entire experiment and post was a bit of nostalgic indulgence for me. Rc5-72 has been a tempting Everest of distributed computing and back in the day I wanted to be part of the pioneering team that conquered it. Now there are only a few of us left, and we haven&amp;#8217;t even reached basecamp yet. At this point I&amp;#8217;d gladly hop on a helicopter to the summit except I don&amp;#8217;t know where to get one.&lt;/p&gt;</content:encoded>
  </item>
</channel>
</rss>