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

<channel>
	<title>extricate.org</title>
	<atom:link href="http://extricate.org/feed/" rel="self" type="application/rss+xml" />
	<link>https://extricate.org</link>
	<description>extricate.org</description>
	<lastBuildDate>Mon, 12 Feb 2024 18:22:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
<site xmlns="com-wordpress:feed-additions:1">155375188</site>	<item>
		<title>Recreating the noisome darkness of Cave</title>
		<link>https://extricate.org/recreating-the-noisome-darkness-of-cave/</link>
					<comments>https://extricate.org/recreating-the-noisome-darkness-of-cave/#respond</comments>
		
		<dc:creator><![CDATA[Tristan Greaves]]></dc:creator>
		<pubDate>Sat, 06 Mar 2021 09:00:00 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://extricate.org/?p=1662</guid>

					<description><![CDATA[I first encountered Cave at the age of 9 or 10, when visiting my brother&#8217;s school as part of their yearly Open Days. The computer lab was proudly running an array of BBC Micro computers, linked together on an Econet network. I was already heavily into computers (and games!) at this point, but this was [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">I first encountered Cave at the age of 9 or 10, when visiting my brother&#8217;s school as part of their yearly Open Days. The computer lab was proudly running an array of <a href="https://en.wikipedia.org/wiki/BBC_Micro">BBC Micro</a> computers, linked together on an <a href="https://en.wikipedia.org/wiki/Econet">Econet network</a>. I was already heavily into computers (and games!) at this point, but this was the first time I saw a <a href="https://en.wikipedia.org/wiki/MUD">MUD</a> in action. </p>



<p class="wp-block-paragraph">Cave was released back in 1985 by XOB Software. Other things that happened in 1985: The UK got its first cellular phone network, DNS was launched and Richard Stallman published the GNU Manifesto. </p>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" fetchpriority="high" decoding="async" width="450" height="321" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/bbc-micro.jpg?resize=450%2C321&#038;ssl=1" alt="" class="wp-image-1668" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/bbc-micro.jpg?w=450&amp;ssl=1 450w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/bbc-micro.jpg?resize=300%2C214&amp;ssl=1 300w" sizes="(max-width: 450px) 100vw, 450px" /></figure>



<p class="wp-block-paragraph">I ended up going to the same school, and thus got to spend several years with those cutting-edge BBC Micros. As time moved on, they were replaced with <a href="https://en.wikipedia.org/wiki/Acorn_Archimedes">Archimedes</a> machines, and then I went on to other adventures. I never had a BBC of my own, instead taking the <a href="https://en.wikipedia.org/wiki/Commodore_64">Commodore 64</a> route! (I was annoyed at the time but now concede that my parents very much made the correct choice!) </p>



<p class="wp-block-paragraph">But&#8230; I always did miss Cave. It was beautiful in its simplicity. And so, in recent times, I decided to recreate it. </p>



<div class="wp-block-uagb-advanced-heading uagb-block-34b0c42a"><h5 class="uagb-heading-text">Getting to the Source </h5></div>



<p class="wp-block-paragraph">The first thing I needed was the original source code. I knew that Cave was mostly written in BASIC but I didn&#8217;t have my own copy (although I did once print out the entire thing on a dot-matrix printer!) </p>



<p class="wp-block-paragraph">Thankfully, some perusing of the <a href="https://stardot.org.uk/">Stardot forum</a>] turned up an original disc image which meant I could get to work. A handy little tool called <a href="http://www.cowsarenotpurple.co.uk/beeb-image.html">Beeb Image</a> let me access the numerous files directly on my own system. </p>



<p class="wp-block-paragraph">The original tokenised BASIC files were converted to be human readable using this handy script: [<a href="https://github.com/tgreaves/cave-bbc-econet/blob/master/scripts/BBCBasicToText.py">BBCBasicToText.py</a>].The resulting repository can be found here: <a href="https://github.com/tgreaves/cave-bbc-econet](https://github.com/tgreaves/cave-bbc-econet">https://github.com/tgreaves/cave-bbc-econet](https://github.com/tgreaves/cave-bbc-econet</a>. </p>



<div class="wp-block-uagb-advanced-heading uagb-block-f31534a9"><h5 class="uagb-heading-text">Modern Tech Choice </h5></div>



<p class="wp-block-paragraph">There are a whole range of modern MUD engines that can be heavily customised. Which one to use for this project? In the end, I went with <a href="https://ranviermud.com/">Ranvier</a>: </p>



<p class="wp-block-paragraph">Ranvier is a MUD game engine whose goal is to be a simple but powerful way to build whatever MUD you want with special care given to extensibility. The core code strives to be completely unopinionated toward any specific style of game while using the bundle system to build the game you want without having to dig through the engine&#8217;s code. </p>



<p class="wp-block-paragraph">Perfect! </p>



<p class="wp-block-paragraph">By going through the original BASIC code, I could then implement equivalent functionality within the Ranvier system. </p>



<div class="wp-block-uagb-advanced-heading uagb-block-9eb04190"><h5 class="uagb-heading-text">Decoding The Maze </h5></div>



<p class="wp-block-paragraph">The original Cave used one file per &#8216;room&#8217;. This didn&#8217;t scale well on BBC Econet networks that used floppy disk based filestores. Imagine 15+ players all moving around, and all that contention on one poor floppy disk! Things got a lot better at school when the system was upgraded to one with a hard disk. </p>



<p class="wp-block-paragraph">These files needed converting to a format that worked with Ranvier. I&#8217;ll take any excuse to write a new Python script, so did so! <a href="https://github.com/tgreaves/cave-bbc-econet/blob/master/scripts/convert_rooms_to_ranvier.py">convert_rooms_to_ranvier.py</a> t was born.</p>



<div class="wp-block-uagb-advanced-heading uagb-block-e035d58d"><h5 class="uagb-heading-text">Now YOU can explore!</h5></div>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" decoding="async" width="687" height="441" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/cave-screenshot.jpg?resize=687%2C441&#038;ssl=1" alt="" class="wp-image-1653" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/cave-screenshot.jpg?w=687&amp;ssl=1 687w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/cave-screenshot.jpg?resize=300%2C193&amp;ssl=1 300w" sizes="(max-width: 687px) 100vw, 687px" /></figure>



<p class="wp-block-paragraph">Now it&#8217;s your turn to explore!  <a href="https://github.com/tgreaves/ranviermud-cave">The source code is on GitHub</a>, and it includes instructions on how to play the game. </p>



<p class="wp-block-paragraph">You can also use your favourite client to connect directly! `cave.extricate.org:4000` is the address. </p>



<p class="wp-block-paragraph">An example of a client that you can use is [Mudlet](https://www.mudlet.org/). </p>



<p class="wp-block-paragraph">It&#8217;s not a game that has aged well compared to modern multi-player experiences. But I am happy to have done my part in preserving part of the historical record. What made this game fun was playing it with those 15 or so other people all in the same room &#8212; it&#8217;s all about that experience! </p>



<p class="wp-block-paragraph">I hope you find some enjoyment with it too!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://extricate.org/recreating-the-noisome-darkness-of-cave/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1662</post-id>	</item>
		<item>
		<title>AWS and OPNsense: Site-to-site IPsec VPN setup</title>
		<link>https://extricate.org/aws-and-opnsense-site-to-site-ipsec-vpn-setup/</link>
					<comments>https://extricate.org/aws-and-opnsense-site-to-site-ipsec-vpn-setup/#respond</comments>
		
		<dc:creator><![CDATA[Tristan Greaves]]></dc:creator>
		<pubDate>Sat, 23 May 2020 15:14:00 +0000</pubDate>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[Home Lab]]></category>
		<category><![CDATA[Networking]]></category>
		<guid isPermaLink="false">https://extricate.org/?p=1694</guid>

					<description><![CDATA[There will always be circumstances where you will want to run a site-to-site VPN setup with AWS. You may have private resources (not Internet facing) within AWS that you need to access in a secure manner from an on-prem or home network.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">There will always be circumstances where you will want to run a site-to-site VPN setup with <a href="https://aws.amazon.com/">AWS</a>. You may have private resources (not Internet facing) within AWS that you need to access in a secure manner from an on-prem or home network.</p>



<p class="wp-block-paragraph">In this example, I walk through setting up an IPsec site-to-site VPN where the two sides are as follows:</p>



<ol class="wp-block-list">
<li><strong>AWS</strong> – A private <a href="https://aws.amazon.com/vpc/">VPC</a>, containing one <a href="https://aws.amazon.com/ec2/">EC2</a> server (to allow me to test everything is working!)</li>



<li><strong>Home network</strong> – With an <a href="https://opnsense.org/">OPNsense</a> firewall sitting in front of it.</li>
</ol>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>Warning: There are AWS charges for running VPNs as described in this article.</strong> Please refer to <a href="https://aws.amazon.com/vpn/pricing/">https://aws.amazon.com/vpn/pricing/</a> for the specifics.</p>
</blockquote>



<h2 class="wp-block-heading">AWS: Spinning up the VPC</h2>



<figure class="wp-block-image aligncenter size-large is-resized"><img data-recalc-dims="1" decoding="async" width="1024" height="683" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/spinning.jpg?resize=1024%2C683&#038;ssl=1" alt="" class="wp-image-1695" style="aspect-ratio:1;object-fit:cover;width:400px" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/spinning-scaled.jpg?resize=1024%2C683&amp;ssl=1 1024w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/spinning-scaled.jpg?resize=300%2C200&amp;ssl=1 300w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/spinning-scaled.jpg?resize=768%2C512&amp;ssl=1 768w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/spinning-scaled.jpg?resize=1536%2C1024&amp;ssl=1 1536w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/spinning-scaled.jpg?resize=2048%2C1365&amp;ssl=1 2048w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/spinning-scaled.jpg?w=2400&amp;ssl=1 2400w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">I am going to let AWS do some of the heavy lifting for us here, as there is a handy Wizard for this scenario.</p>



<p class="wp-block-paragraph">The Wizard handles the following:</p>



<ol class="wp-block-list">
<li>Creation of a private VPC (<strong>not</strong> addressable from the Internet)</li>



<li>IPsec VPN configuration (including Customer Gateway, Virtual Private Gateway and Site-to-Site VPN)</li>
</ol>



<p class="wp-block-paragraph">As the above hints, there are several different components involved in bringing up the IPsec VPN on the AWS side. The <a href="https://docs.aws.amazon.com/vpn/latest/s2svpn/SetUpVPNConnections.html">Getting Started</a> documentation is very good at explaining how these slot together, should you wish to get this going on an <strong>existing</strong> VPC.</p>



<p class="wp-block-paragraph">From the VPC section of the EC2 console, I hit the <strong>Launch VPC Wizard</strong> button, which takes me here:</p>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="640" height="292" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/select-a-vpc-configuration.png?resize=640%2C292&#038;ssl=1" alt="" class="wp-image-1696" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/select-a-vpc-configuration.png?w=640&amp;ssl=1 640w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/select-a-vpc-configuration.png?resize=300%2C137&amp;ssl=1 300w" sizes="(max-width: 640px) 100vw, 640px" /></figure>



<p class="wp-block-paragraph">I am selecting the <strong>VPC with a Private Subnet Only and Hardware VPN Access</strong>, as that is exactly what I want!</p>



<p class="wp-block-paragraph">Now, I can configure the details of the VPC:</p>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="640" height="520" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/vpc-details-step-two.png?resize=640%2C520&#038;ssl=1" alt="" class="wp-image-1697" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/vpc-details-step-two.png?w=640&amp;ssl=1 640w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/vpc-details-step-two.png?resize=300%2C244&amp;ssl=1 300w" sizes="(max-width: 640px) 100vw, 640px" /></figure>



<p class="wp-block-paragraph">I go with the defaults, as I’m happy with the 10.0.0.0/16 range (My home network is on 192.168.1.0/24 so no clash). I use the very imaginative name of ‘Test’.</p>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="640" height="233" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/vpc-details-step-three.png?resize=640%2C233&#038;ssl=1" alt="" class="wp-image-1698" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/vpc-details-step-three.png?w=640&amp;ssl=1 640w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/vpc-details-step-three.png?resize=300%2C109&amp;ssl=1 300w" sizes="(max-width: 640px) 100vw, 640px" /></figure>



<p class="wp-block-paragraph">I then need to tell the Wizard where it can find my home network. <strong>Note that AWS does not initiate the VPN</strong> – I will handle that later when configuring OPNsense.</p>



<p class="wp-block-paragraph">‘Customer Gateway IP’ is the public-facing IP address of my network (but replaced here for example purposes). I am using Static routing, so need to tell the Wizard what that looks like – a pretty standard <strong>192.168.1.0/24</strong> which will be the case for a lot of home networks.</p>



<p class="wp-block-paragraph">Clicking <strong>Create VPC</strong> will build it all out. This will take a few minutes.</p>



<h2 class="wp-block-heading">Spinning up a test instance</h2>



<p class="wp-block-paragraph">Once this is done, I spin up a test instance. I won’t go through all the steps here, as I assume that if you are at the point of setting up a VPN like this, you are already familiar with spinning up instances within AWS.</p>



<p class="wp-block-paragraph">The key point is that I ensure the instance is created <strong>within my new private VPC</strong>:</p>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="678" height="239" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/instance-step-three.png?resize=678%2C239&#038;ssl=1" alt="" class="wp-image-1699" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/instance-step-three.png?w=678&amp;ssl=1 678w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/instance-step-three.png?resize=300%2C106&amp;ssl=1 300w" sizes="(max-width: 678px) 100vw, 678px" /></figure>



<p class="wp-block-paragraph">Once the Instance is up, I can verify this:</p>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="377" height="121" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/instance-state.png?resize=377%2C121&#038;ssl=1" alt="" class="wp-image-1700" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/instance-state.png?w=377&amp;ssl=1 377w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/instance-state.png?resize=300%2C96&amp;ssl=1 300w" sizes="(max-width: 377px) 100vw, 377px" /></figure>



<p class="wp-block-paragraph">Perfect.</p>



<p class="wp-block-paragraph">I now need to download the details that I need in order to configure OPNsense on my home network.</p>



<p class="wp-block-paragraph">I go to <em>VPC -&gt; Site-to-site VPN connections</em> and select my VPN. There is a handy <strong>Download Configuration</strong> button.</p>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="482" height="104" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/download-configuration.png?resize=482%2C104&#038;ssl=1" alt="" class="wp-image-1701" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/download-configuration.png?w=482&amp;ssl=1 482w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/download-configuration.png?resize=300%2C65&amp;ssl=1 300w" sizes="(max-width: 482px) 100vw, 482px" /></figure>



<p class="wp-block-paragraph">I hit that, and select <strong>pfSense</strong> (the product that OPNsense was forked from – the details within are compatible).</p>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="576" height="312" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/download-configuration-2.png?resize=576%2C312&#038;ssl=1" alt="" class="wp-image-1702" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/download-configuration-2.png?w=576&amp;ssl=1 576w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/download-configuration-2.png?resize=300%2C163&amp;ssl=1 300w" sizes="(max-width: 576px) 100vw, 576px" /></figure>



<p class="wp-block-paragraph">With the file in hand, that completes the work required within AWS. Now to the home network!</p>



<h2 class="wp-block-heading">OPNsense: Firewall</h2>



<figure class="wp-block-image"></figure>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="640" height="378" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/no-place-like-home.jpg?resize=640%2C378&#038;ssl=1" alt="" class="wp-image-1703" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/no-place-like-home.jpg?w=640&amp;ssl=1 640w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/no-place-like-home.jpg?resize=300%2C177&amp;ssl=1 300w" sizes="(max-width: 640px) 100vw, 640px" /></figure>



<p class="wp-block-paragraph">There are a few different things to do here. This section is based on the <a href="https://docs.opnsense.org/manual/how-tos/ipsec-s2s.html">official OPNsense documentation</a>.</p>



<h3 class="wp-block-heading">Let IPsec traffic into the network</h3>



<p class="wp-block-paragraph">By default, all incoming WAN traffic is blocked. There are several rules that need setting up to allow:</p>



<ul class="wp-block-list">
<li>IPSec ESP</li>



<li>IPSec ISAKMP</li>



<li>IPSec NAT-T</li>
</ul>



<p class="wp-block-paragraph">This is done within <strong>Firewall -&gt; Rules -&gt; WAN</strong>.</p>



<p class="wp-block-paragraph">Here’s a snippet where I am setting up the first of these:</p>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="735" height="718" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/firewall-rules-1.png?resize=735%2C718&#038;ssl=1" alt="" class="wp-image-1704" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/firewall-rules-1.png?w=735&amp;ssl=1 735w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/firewall-rules-1.png?resize=300%2C293&amp;ssl=1 300w" sizes="(max-width: 735px) 100vw, 735px" /></figure>



<p class="wp-block-paragraph">Once all three are in place, the summary screen will look like this:</p>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="768" height="65" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/firewall-rules-2.png?resize=768%2C65&#038;ssl=1" alt="" class="wp-image-1705" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/firewall-rules-2.png?w=768&amp;ssl=1 768w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/firewall-rules-2.png?resize=300%2C25&amp;ssl=1 300w" sizes="(max-width: 768px) 100vw, 768px" /></figure>



<p class="wp-block-paragraph">OK, great! Now I need to set up the IPsec connection itself.</p>



<h3 class="wp-block-heading">OPNsense: VPN setup</h3>



<p class="wp-block-paragraph">I navigate to VPN -&gt; IPsec -&gt; Tunnel settings, and hit the (+) symbol to add <em>Phase 1</em>.</p>



<p class="wp-block-paragraph">I now adjust all the settings to match those provided within the downloaded AWS configuration file.</p>



<p class="wp-block-paragraph">There are quite a few parameters, so I take my time to get it right! (This includes <strong>unchecking some of the pre-checked boxes</strong>).</p>



<p class="wp-block-paragraph">Once saved, I’m not done! I need to do <em>Phase 2</em>, which is done by hitting the (+) <strong>next to the Phase 1 entry</strong>:</p>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="768" height="210" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/opnsense-vpn-rules-1.png?resize=768%2C210&#038;ssl=1" alt="" class="wp-image-1706" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/opnsense-vpn-rules-1.png?w=768&amp;ssl=1 768w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/opnsense-vpn-rules-1.png?resize=300%2C82&amp;ssl=1 300w" sizes="(max-width: 768px) 100vw, 768px" /></figure>



<p class="wp-block-paragraph">Again, I consult the downloaded file from AWS to get the settings right.</p>



<p class="wp-block-paragraph">Once done, it all looks like this:</p>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="768" height="348" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/opnsense-vpn-rules-2.png?resize=768%2C348&#038;ssl=1" alt="" class="wp-image-1707" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/opnsense-vpn-rules-2.png?w=768&amp;ssl=1 768w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/opnsense-vpn-rules-2.png?resize=300%2C136&amp;ssl=1 300w" sizes="(max-width: 768px) 100vw, 768px" /></figure>



<p class="wp-block-paragraph">Note that I have now ensured that <strong>Enable IPsec</strong> is clicked before Saving everything.</p>



<p class="wp-block-paragraph">Now, the moment of truth! Over to <em>VPN -&gt; IPsec -&gt; Status overview</em>:</p>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="768" height="151" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/opnsense-vpn-rules-3.png?resize=768%2C151&#038;ssl=1" alt="" class="wp-image-1708" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/opnsense-vpn-rules-3.png?w=768&amp;ssl=1 768w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/opnsense-vpn-rules-3.png?resize=300%2C59&amp;ssl=1 300w" sizes="(max-width: 768px) 100vw, 768px" /></figure>



<p class="wp-block-paragraph">Nothing yet… as the VPN does not come up by default (the little arrow on the right is still amber). I click on it, then wait and hit the little ‘i’ symbol to expand all the information.</p>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="768" height="248" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/opnsense-vpn-rules-4.png?resize=768%2C248&#038;ssl=1" alt="" class="wp-image-1709" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/opnsense-vpn-rules-4.png?w=768&amp;ssl=1 768w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/opnsense-vpn-rules-4.png?resize=300%2C97&amp;ssl=1 300w" sizes="(max-width: 768px) 100vw, 768px" /></figure>



<p class="wp-block-paragraph">This is good news! The VPN is up.</p>



<h3 class="wp-block-heading">Final Firewall Bits</h3>



<p class="wp-block-paragraph">There is one more thing to do, however. I need a firewall rule to allow traffic through to the LAN network too.</p>



<p class="wp-block-paragraph">Over to <em>Firewall -&gt; Rules -&gt;IPsec</em> to add this rule in. Once done, it shows in the Summary as follows:</p>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="768" height="120" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/opnsense-vpn-rules-5.png?resize=768%2C120&#038;ssl=1" alt="" class="wp-image-1710" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/opnsense-vpn-rules-5.png?w=768&amp;ssl=1 768w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/opnsense-vpn-rules-5.png?resize=300%2C47&amp;ssl=1 300w" sizes="(max-width: 768px) 100vw, 768px" /></figure>



<h2 class="wp-block-heading">Job done!</h2>



<figure class="wp-block-image aligncenter size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="1024" height="538" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/you-did-it.jpg?resize=1024%2C538&#038;ssl=1" alt="" class="wp-image-1711" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/you-did-it.jpg?resize=1024%2C538&amp;ssl=1 1024w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/you-did-it.jpg?resize=300%2C158&amp;ssl=1 300w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/you-did-it.jpg?resize=768%2C403&amp;ssl=1 768w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/you-did-it.jpg?w=1200&amp;ssl=1 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">At this point, it’s possible to reach the private EC2 instances from my home network, by addressing them using their <strong>10.0.0.0/16</strong> addresses. I test this by running a <strong>ssh</strong> connection from a machine on my home network.</p>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="461" height="95" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/ssh-test.png?resize=461%2C95&#038;ssl=1" alt="" class="wp-image-1712" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/ssh-test.png?w=461&amp;ssl=1 461w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/ssh-test.png?resize=300%2C62&amp;ssl=1 300w" sizes="(max-width: 461px) 100vw, 461px" /></figure>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph">Some closing points:</p>



<ol class="wp-block-list">
<li>
<p>You get <strong>2 tunnels</strong> when setting this up with AWS to ensure redundancy. This guide only sets one up on the home side of the network. As an exercise for the reader, you can set up the second! (The details are in the downloaded Connection details file, as with the first one).</p>
</li>



<li>The method described here uses a <strong>Shared secret</strong> approach. This could be strengthened by using Certificates. <a href="https://aws.amazon.com/premiumsupport/knowledge-center/vpn-certificate-based-site-to-site/">Here is some AWS documentation</a> to get started with implementing that.</li>
</ol>
]]></content:encoded>
					
					<wfw:commentRss>https://extricate.org/aws-and-opnsense-site-to-site-ipsec-vpn-setup/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1694</post-id>	</item>
		<item>
		<title>Benchmarking the new Arm-powered M6g instances from AWS</title>
		<link>https://extricate.org/benchmarking-the-new-arm-powered-m6g-instances-from-aws/</link>
					<comments>https://extricate.org/benchmarking-the-new-arm-powered-m6g-instances-from-aws/#respond</comments>
		
		<dc:creator><![CDATA[Tristan Greaves]]></dc:creator>
		<pubDate>Wed, 13 May 2020 13:32:00 +0000</pubDate>
				<category><![CDATA[AWS]]></category>
		<guid isPermaLink="false">https://extricate.org/?p=1714</guid>

					<description><![CDATA[AWS announced the latest M6g instances in December 2019. These feature Arm-powered Graviton2 processors, as well as fully encrypted DDR4 memory. Arm processors are everywhere in terms of mobile devices, and my favourite Raspberry Pi computers, but have not traditionally been featured within the cloud. This is changing.

With M6g now Generally Available, I decided to take a closer look for myself. How easy would it b]]></description>
										<content:encoded><![CDATA[
<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>Note: Although I work for AWS, these are my own personal findings and thoughts. Please do not consider them as official benchmarks in any way!</strong></p>
</blockquote>



<p class="wp-block-paragraph"><a href="https://aws.amazon.com/">AWS</a> announced the <a href="https://aws.amazon.com/about-aws/whats-new/2019/12/announcing-new-amazon-ec2-m6g-c6g-and-r6g-instances-powered-by-next-generation-arm-based-aws-graviton2-processors/">latest M6g instances</a> in December 2019. These feature Arm-powered Graviton2 processors, as well as fully encrypted DDR4 memory. Arm processors are everywhere in terms of mobile devices, and my favourite <a href="https://www.raspberrypi.org/">Raspberry Pi</a> computers, but have not traditionally been featured within the cloud. This is changing.</p>



<p class="wp-block-paragraph">Arm-powered processors are not new to AWS: The first iteration (a1) was <a href="https://aws.amazon.com/blogs/aws/new-ec2-instances-a1-powered-by-arm-based-aws-graviton-processors/">announced in November 2018</a>.</p>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="400" height="300" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/arm-neoverse-chip.jpg?resize=400%2C300&#038;ssl=1" alt="" class="wp-image-1715" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/arm-neoverse-chip.jpg?w=400&amp;ssl=1 400w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/arm-neoverse-chip.jpg?resize=300%2C225&amp;ssl=1 300w" sizes="(max-width: 400px) 100vw, 400px" /></figure>



<p class="wp-block-paragraph">Why would you care? In short, the announcements claim that you will see similar (or better!) performance to comparable Intel hardware, for a <strong>lower cost</strong>. What’s the catch? <strong>Your workloads have to be compatible with an Arm architecture</strong>. Chances are, if you are running standard Linux workloads on a popular distribution (e.g. <a href="https://aws.amazon.com/amazon-linux-ami/">Amazon Linux</a> or <a href="https://ubuntu.com/">Ubuntu</a>), these are going to be a real option for you.</p>



<p class="wp-block-paragraph">With <a href="https://aws.amazon.com/blogs/aws/new-m6g-ec2-instances-powered-by-arm-based-aws-graviton2/">M6g now Generally Available</a>, I decided to take a closer look for myself. How easy would it be to get going? What peformance would I find?</p>



<h2 class="wp-block-heading">Getting up and running</h2>



<p class="wp-block-paragraph">For a head-to-head comparison, I decided to go with the following instances:</p>



<ul class="wp-block-list">
<li><strong>m5.xlarge</strong> (Intel 4 VPUs, 16 gig RAM, $0.214 per hour On Demand)</li>



<li><strong>m6g.xlarge</strong> (Graviton2 4 VPUs, 16 gig RAM, $0.172 per hour On Demand)</li>
</ul>



<p class="wp-block-paragraph">The above prices were correct at the time of writing for the eu-west-1 (Ireland) region. At launch, the m6g instances are also available in US East (N. Virginia),&nbsp;US East (Ohio),&nbsp;US West (Oregon),&nbsp;Europe (Frankfurt), and&nbsp;Asia Pacific (Tokyo).</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">This article assumes that you are already familiar with spinning up Linux instances within AWS, including ssh access once they are available. If you need it, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html">here&#8217;s the official Getting Started Guide</a>.</p>



<p class="wp-block-paragraph">Secondly, <strong>these instances are not Free Tier eligible!</strong> You will be incurring costs by spinning them up. Please remember to <strong>tidy up after yourself</strong> afterwards!</p>
</blockquote>



<p class="wp-block-paragraph">You know you are in the right place when, after electing to launch a new instance from the EC2 console, you see this:</p>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="768" height="99" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/ec2-choose-x86-or-arm.png?resize=768%2C99&#038;ssl=1" alt="" class="wp-image-1716" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/ec2-choose-x86-or-arm.png?w=768&amp;ssl=1 768w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/ec2-choose-x86-or-arm.png?resize=300%2C39&amp;ssl=1 300w" sizes="(max-width: 768px) 100vw, 768px" /></figure>



<p class="wp-block-paragraph">Yes, the choice of either x86 or Arm architectures!</p>



<p class="wp-block-paragraph">For this exercise, I went with Ubuntu Server 18.04 LTS. As some of the benchmarks are storage heavy, I changed the root EBS volumes to be <strong>30 gigabytes</strong> in size, but still the default <strong>gp2</strong> SSD storage.</p>



<p class="wp-block-paragraph">I was then able to ssh in to start the benchmarking. The process for each instance was <strong>identical</strong>. Ubuntu looks and operates just the same, whether you are using the x86 or Arm editions. In fact, I would check <strong>/proc/cpuinfo</strong> every so often as a sanity check to ensure I was logged into the right machine at times (!)</p>



<h2 class="wp-block-heading">1. Linux kernel compilation</h2>



<p class="wp-block-paragraph">Ah, that old favourite! Let’s grab the latest <a href="https://kernel.org/">Linux kernel</a> and see how each machine does at compiling it!</p>



<p class="wp-block-paragraph">Here are the commands to invoke:</p>



<pre class="wp-block-code has-ast-global-color-2-color has-black-background-color has-text-color has-background has-link-color wp-elements-ca01b71e8a48323350844282c17c4d30"><code>sudo apt update

sudo apt-get install -y git build-essential kernel-package fakeroot 
libncurses5-dev libssl-dev ccache bison flex

wget https://git.kernel.org/torvalds/t/linux-5.7-rc5.tar.gz
tar xf linux-5.7-rc5.tar.gz
cd linux-5.7-rc5
make menuconfig
time make -j 4</code></pre>



<p class="wp-block-paragraph">Some notes on the above:</p>



<ol class="wp-block-list">
<li>After running <strong>make menuconfig</strong>, simply Exit and save the default settings.</li>



<li>We use <strong>-j 4</strong> for the make process to use all 4 available CPU cores for the building process.</li>
</ol>



<p class="wp-block-paragraph">The results?</p>



<figure class="wp-block-table"><table><thead><tr><th>Instance</th><th>Time</th></tr></thead><tbody><tr><td>m5.xlarge</td><td>33 minutes, 43 seconds (2023 seconds)</td></tr><tr><td>m6g.xlarge</td><td>34 minutes, 29 seconds (2069 seconds)</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">In this test, the Arm system was <strong>2.25% slower</strong>. That’s pretty close. Especially when you consider it is <strong>21.7% cheaper</strong> in On Demand costs!</p>



<p class="wp-block-paragraph">There’s a slight caveat with this test: The exact files compiled could vary between x86 and Arm architectures. It’s not exactly scientific. So let’s move on to some more…. traditional…. benchmarking.</p>



<h2 class="wp-block-heading">2. MariaDB performance</h2>



<p class="wp-block-paragraph">For benchmarking exercise number 2, it was the turn of <a href="https://mariadb.org/">MariaDB</a>. As a quick reminder:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">MariaDB Server is one of the most popular open source relational databases. It’s made by the original developers of MySQL and guaranteed to stay open source. It is part of most cloud offerings and the default in most Linux distributions.</p>
</blockquote>



<p class="wp-block-paragraph">{{&lt; figure src=&#8221;mariadb-logo.png&#8221; &gt;}}</p>



<p class="wp-block-paragraph">Here, I combine installing MariaDB as well as <a href="http://manpages.ubuntu.com/manpages/trusty/man1/sysbench.1.html">sysbench</a> in order to load test it. A read / write test is performed. Here we go!</p>



<pre class="wp-block-code has-ast-global-color-2-color has-black-background-color has-text-color has-background has-link-color wp-elements-a7b0af32b545e1936cb38d650515a8ac"><code>sudo apt-get install -y sysbench mariadb-server
sudo mysql -u root -e 'create database sbtest'

sudo sysbench /usr/share/sysbench/oltp_read_write.lua --db-driver=mysql --threads=4 --mysql-host=localhost --mysql-user=root --mysql-port=3306 --tables=5 --table-size=10000000 prepare

sudo sysbench /usr/share/sysbench/oltp_read_write.lua --db-driver=mysql --threads=16 --events=0 --time=300 --mysql-host=localhost --mysql-user=root --tables=5 --delete_inserts=10 --index_updates=10 --non_index_updates=10 --table-size=10000000 --db-ps-mode=disable --report-interval=1 run&lt;/code&gt;&lt;/pre&gt;</code></pre>



<p class="wp-block-paragraph">Some caveats here:</p>



<ol class="wp-block-list">
<li>This is the test that is very hungry on disk space. Most of the 30 gigabyte storage will be utilised.</li>



<li>You will notice I don’t secure the MySQL instance, with the commands running as <strong>root</strong>. This is not Best Practice for general systems. However, in this case the instances are disposable, and they are being destroyed after the testing process.</li>
</ol>



<p class="wp-block-paragraph">The results?</p>



<p class="wp-block-paragraph"><strong>m5.xlarge:</strong></p>



<pre class="wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-0967ca85bf3482858168885c49212bda"><code>SQL statistics:
    queries performed:
        read:                            436520
        write:                           1247200
        other:                           62360
        total:                           1746080
    transactions:                        31180  (103.91 per sec.)
    queries:                             1746080 (5819.10 per sec.)
    ignored errors:                      0      (0.00 per sec.)
    reconnects:                          0      (0.00 per sec.)

General statistics:
    total time:                          300.0588s
    total number of events:              31180

Latency (ms):
         min:                                  6.92
         avg:                                153.96
         max:                                975.64
         95th percentile:                    314.45
         sum:                            4800464.88

Threads fairness:
    events (avg/stddev):           1948.7500/19.35
    execution time (avg/stddev):   300.0291/0.02&lt;/code&gt;&lt;/pre&gt;</code></pre>



<p class="wp-block-paragraph"><strong>m6g.xlarge:</strong></p>



<pre class="wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-2a100b32deae02c20247994cf63e1c93"><code>SQL statistics:
    queries performed:
        read:                            451836
        write:                           1290960
        other:                           64548
        total:                           1807344
    transactions:                        32274  (107.56 per sec.)
    queries:                             1807344 (6023.09 per sec.)
    ignored errors:                      0      (0.00 per sec.)
    reconnects:                          0      (0.00 per sec.)

General statistics:
    total time:                          300.0680s
    total number of events:              32274

Latency (ms):
         min:                                  5.66
         avg:                                148.74
         max:                                833.04
         95th percentile:                    303.33
         sum:                            4800535.10

Threads fairness:
    events (avg/stddev):           2017.1250/22.81
    execution time (avg/stddev):   300.0334/0.02&lt;/code&gt;&lt;/pre&gt;</code></pre>



<p class="wp-block-paragraph">If we pull out the key performance metrics:</p>



<p class="wp-block-paragraph">| Instance | Metric | Result |<br>| m5.xlarge | Transactions | 103.91 / second |<br>| | Queries | 5819.10 / second |<br>| m6g.xlarge | Transactions | 107.56 / second |<br>| | Queries | 6023.09 / second |</p>



<p class="wp-block-paragraph">Here, the Arm-powered m6g instance was <strong>3.45% faster</strong> for both Transactions and Queries. Decent! And, again, still <strong>21.7% cheaper!</strong></p>



<h2 class="wp-block-heading">3. Redis performance</h2>



<p class="wp-block-paragraph">Finally, it was the turn of <a href="https://redis.io/">Redis</a>.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes with radius queries and streams.</p>
</blockquote>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="200" height="200" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/redis-logo.png?resize=200%2C200&#038;ssl=1" alt="" class="wp-image-1717" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/redis-logo.png?w=200&amp;ssl=1 200w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/redis-logo.png?resize=150%2C150&amp;ssl=1 150w" sizes="(max-width: 200px) 100vw, 200px" /></figure>



<p class="wp-block-paragraph">I was particularly interested in this one: It’s in-memory. Would there be a performance impact with the full encryption of RAM involved with the Graviton2 processors?</p>



<p class="wp-block-paragraph">This one is nice and easy to do:</p>



<pre class="wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-f166e145de41c3b13a228d06da28afa1"><code>sudo apt-get install -y redis-server
redis-benchmark -q</code></pre>



<p class="wp-block-paragraph">The results:</p>



<p class="wp-block-paragraph"><strong>m5.xlarge:</strong></p>



<pre class="wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-7bebbe37b8db5888e1c51ec12a277add"><code>PING_INLINE: 100000.00 requests per second
PING_BULK: 97370.98 requests per second
SET: 101522.84 requests per second
GET: 100908.17 requests per second
INCR: 101729.40 requests per second
LPUSH: 92678.41 requests per second
RPUSH: 101112.23 requests per second
LPOP: 94517.96 requests per second
RPOP: 92421.44 requests per second
SADD: 101010.10 requests per second
HSET: 95419.85 requests per second
SPOP: 84530.86 requests per second
LPUSH (needed to benchmark LRANGE): 85910.65 requests per second
LRANGE_100 (first 100 elements): 54614.96 requests per second
LRANGE_300 (first 300 elements): 23929.17 requests per second
LRANGE_500 (first 450 elements): 16672.22 requests per second
LRANGE_600 (first 600 elements): 11687.71 requests per second
MSET (10 keys): 99206.34 requests per second</code></pre>



<p class="wp-block-paragraph"><strong>m6g.xlarge:</strong></p>



<pre class="wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-908acd535b24487a4c7efb1b2228647e"><code>PING_INLINE: 135135.14 requests per second
PING_BULK: 127388.53 requests per second
SET: 135318.00 requests per second
GET: 132100.39 requests per second
INCR: 136798.91 requests per second
LPUSH: 142653.36 requests per second
RPUSH: 136239.78 requests per second
LPOP: 141442.72 requests per second
RPOP: 136612.02 requests per second
SADD: 134228.19 requests per second
HSET: 142247.52 requests per second
SPOP: 132802.12 requests per second
LPUSH (needed to benchmark LRANGE): 141043.72 requests per second
LRANGE_100 (first 100 elements): 64850.84 requests per second
LRANGE_300 (first 300 elements): 21734.41 requests per second
LRANGE_500 (first 450 elements): 14100.39 requests per second
LRANGE_600 (first 600 elements): 10858.94 requests per second
MSET (10 keys): 107991.36 requests per second</code></pre>



<p class="wp-block-paragraph">There are a lot of stats here, so just pulling out a few:</p>



<p class="wp-block-paragraph">| Instance | Metric | Result |<br>| m5.xlarge | SET | 101,522 / second |<br>| | GET | 100,908 / second |<br>| m6g.xlarge | SET | 135,318 / second |<br>| | GET | 132,100 / second |</p>



<p class="wp-block-paragraph">A big difference here! The Arm-equipped ms6.xlarge is <strong>26.7 – 28.5% faster</strong> on these metrics. In fact, it’s faster on <strong>all</strong> of them, except the latter two <strong>LRANGE</strong> tests. That could be worth looking deeper into.</p>



<h2 class="wp-block-heading">Conclusion</h2>



<p class="wp-block-paragraph">From these tests, my conclusion is that the m6g.xlarge is punching very well in terms of performance, in comparison to the m5.xlarge. It was ever-so-slightly slower on the Linux kernel compilation, ever-so-slightly faster on the MariaDB tests, and <strong>notably faster</strong> on the Redis tests.</p>



<p class="wp-block-paragraph">Then we factor in the price. The m6g.xlarge It’s <strong>21.7% cheaper</strong> in terms of On Demand pricing!</p>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="640" height="480" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/save-money-coins-jar.jpg?resize=640%2C480&#038;ssl=1" alt="" class="wp-image-1718" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/save-money-coins-jar.jpg?w=640&amp;ssl=1 640w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/save-money-coins-jar.jpg?resize=300%2C225&amp;ssl=1 300w" sizes="(max-width: 640px) 100vw, 640px" /></figure>



<p class="wp-block-paragraph"><strong>I would definitely be looking to move any appropriate Linux workloads to the Graviton2 setup</strong>. The price / performance ratio is stellar here. I can see these processors becoming increasingly popular as ‘word gets out’ on just how good the ratio is!</p>



<p class="wp-block-paragraph">I hope you have found this journey into some very simple benchmarks useful. I’d be very interested to hear on any workloads you are considering moving to Graviton – perhaps you’ve already moved them!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://extricate.org/benchmarking-the-new-arm-powered-m6g-instances-from-aws/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1714</post-id>	</item>
		<item>
		<title>Home Firewall: PC Engines APU2 E2 pfSense and OPNsense build, courtesy of LinITX</title>
		<link>https://extricate.org/home-firewall-pc-engines-apu2-e2-pfsense-and-opnsense-build-courtesy-of-linitx/</link>
					<comments>https://extricate.org/home-firewall-pc-engines-apu2-e2-pfsense-and-opnsense-build-courtesy-of-linitx/#respond</comments>
		
		<dc:creator><![CDATA[Tristan Greaves]]></dc:creator>
		<pubDate>Sun, 10 May 2020 12:33:00 +0000</pubDate>
				<category><![CDATA[Home Lab]]></category>
		<category><![CDATA[Networking]]></category>
		<guid isPermaLink="false">https://extricate.org/?p=1687</guid>

					<description><![CDATA[Enter the PC Engines APU boards. These are system boards designed for this sort of thing, complete with multiple Ethernet ports, decent amounts of RAM (2 gig upwards) and AMD G Series processors. They can boot from an SD card or added m-Sata SSD storage]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">I’ve recently been doing some more tinkering with the excellent <a href="https://www.raspberrypi.org/">Raspberry Pi</a> devices, including setting up a home <a href="https://pi-hole.net/">Pi-hole</a> to assist with sending web adverts into a black hole.</p>



<p class="wp-block-paragraph">This got me thinking about implementing a decent home network firewall solution, above and beyond the default one you get when running your average broadband router.</p>



<p class="wp-block-paragraph">Security aside, I’m also a big fan of stats and pretty graphs, and these are quite simply hard to come by with some of the basic consumer broadband router solutions.</p>



<p class="wp-block-paragraph">While the Raspberry Pi, <a href="https://www.raspberrypi.org/products/raspberry-pi-4-model-b/">especially in its 4th incarnation</a>, has a decent amount of power behind it, it’s not <strong>quite</strong> in the ballpark to be running <a href="https://www.pfsense.org/">pfSense</a>. Mainly as it only has one Ethernet port out of the box, and while there are methods to extend this, I wanted a piece of hardware that had what I needed ‘out of the box’ but was still minimalistic in nature.</p>



<p class="wp-block-paragraph">Enter the <a href="https://www.pcengines.ch/apu.htm">PC Engines APU boards</a>. These are system boards designed for this sort of thing, complete with multiple Ethernet ports, decent amounts of RAM (2 gig upwards) and <a href="https://www.amd.com/en/products/embedded-g-series">AMD G Series</a> processors. They can boot from an SD card or added m-Sata SSD storage.</p>



<div class="wp-block-uagb-image aligncenter uagb-block-f613ad84 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-center"><figure class="wp-block-uagb-image__figure"><img data-recalc-dims="1" loading="lazy" decoding="async" srcset="http://extricate.org/wp-content/uploads/2024/02/apu2c2_1.jpg ,http://extricate.org/wp-content/uploads/2024/02/apu2c2_1.jpg 780w, http://extricate.org/wp-content/uploads/2024/02/apu2c2_1.jpg 360w" sizes="auto, (max-width: 480px) 150px" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/apu2c2_1.jpg?resize=768%2C576" alt="" class="uag-image-1688" width="768" height="576" title="" loading="lazy"/></figure></div>



<h2 class="wp-block-heading">Getting on board</h2>



<p class="wp-block-paragraph">Instead of putting all the bits together myself, I purchased a pre-built system from <a href="https://linitx.com/">LinITX</a>. The spec was as follows:</p>



<ul class="wp-block-list">
<li>APU2 E2 board (2 gig RAM, 3 Ethernet ports)</li>



<li>16 gig M-Sata SSD</li>



<li>Case</li>



<li>Power supply (12V)</li>



<li>pfSense pre-installed on the SSD.</li>
</ul>



<p class="wp-block-paragraph"><a href="https://linitx.com//product/pc-engines-alix-and-apu-(3lan+usb)-enclosure-black/15317">Direct link on LinITX’s site.</a></p>



<p class="wp-block-paragraph">My reasoning on going with this spec:</p>



<ul class="wp-block-list">
<li><strong>2 gig RAM</strong> is easily enough to run a consumer firewall for a typical home family network. (The system is running at around 430 Mb in use most of the time).</li>



<li><strong>SSD storage rather than SD card</strong>. This is for resilience. SD cards are just not that great when it comes to computer usage. I had two die within a week which left a bit of a sour taste in the mouth.</li>
</ul>



<p class="wp-block-paragraph">The kit arrived next day, which was wonderful service.</p>



<div class="wp-block-uagb-image aligncenter uagb-block-4070138c wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-center"><figure class="wp-block-uagb-image__figure"><img data-recalc-dims="1" loading="lazy" decoding="async" srcset="http://extricate.org/wp-content/uploads/2024/02/apu2_casing.jpg ,http://extricate.org/wp-content/uploads/2024/02/apu2_casing.jpg 780w, http://extricate.org/wp-content/uploads/2024/02/apu2_casing.jpg 360w" sizes="auto, (max-width: 480px) 150px" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/apu2_casing.jpg?resize=350%2C212" alt="" class="uag-image-1689" width="350" height="212" title="" loading="lazy"/></figure></div>



<p class="wp-block-paragraph">In terms of size, you are looking at something twice the width of a typical Raspberry Pi case. As the board pictures show, there are no cooling fans, so it is rigged for silent running.</p>



<p class="wp-block-paragraph">One slight annoyance is that there is no power switch – as soon as the power cable is plugged in, the thing will start booting!</p>



<h2 class="wp-block-heading">Getting Flashy</h2>



<p class="wp-block-paragraph">The system booted up into pfSense with no issues. The Dashboard showed that the APU board was running a very old <a href="https://www.coreboot.org/">coreboot</a> (BIOS). In fact, 4.0.7 was so old it didn’t even appear as a Legacy version on the <a href="https://pcengines.github.io/">PC Engines coreboot web pages</a>.</p>



<p class="wp-block-paragraph">In general the rule is not to update your BIOS unless there is an actual reason to, due to the potential risk of bricking the device. For the APU boards, however, there were various fixes since 4.0.7 that seemed pretty relevant — especially if you wanted to perform a re-install of anything <a href="https://github.com/pcengines/apu2-documentation/blob/master/docs/pfSense-install-guide.md">without messing around with kernel and boot parameters</a>.</p>



<p class="wp-block-paragraph">But how? I didn’t at this point have a null-modem cable to control things when booting from a USB stick to perform the flashing procedure.</p>



<p class="wp-block-paragraph">I then realised that, duh, pfSense is running on FreeBSD which is more than capable of running <a href="https://flashrom.org/Flashrom">flashrom</a> directly.</p>



<p class="wp-block-paragraph">Which version? 4.11.0.6 is the latest at the time of writing. Is it safe? Well, if in doubt, ask Twitter…</p>



<p class="wp-block-paragraph">I followed ‘Method 1’ <a href="https://teklager.se/en/knowledge-base/apu-bios-upgrade/">as documented here</a>. No scary messages appeared in the process, and I was met with:</p>



<pre class="wp-block-code has-ast-global-color-5-color has-text-color has-link-color wp-elements-5811e058e8d3094ad861571a30fd07f4"><code>Verifying flash... VERIFIED.</code></pre>



<p class="wp-block-paragraph">One reboot later, and pfSense remained happy, and reported the new version of the BIOS was there.</p>



<h2 class="wp-block-heading">Switching to OPNsense</h2>



<div class="wp-block-uagb-image aligncenter uagb-block-f90cf80b wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-center"><figure class="wp-block-uagb-image__figure"><img data-recalc-dims="1" loading="lazy" decoding="async" srcset="http://extricate.org/wp-content/uploads/2024/02/opnsense-logo.png ,http://extricate.org/wp-content/uploads/2024/02/opnsense-logo.png 780w, http://extricate.org/wp-content/uploads/2024/02/opnsense-logo.png 360w" sizes="auto, (max-width: 480px) 150px" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/opnsense-logo.png?resize=300%2C250" alt="" class="uag-image-1690" width="300" height="250" title="" loading="lazy"/></figure></div>



<p class="wp-block-paragraph">pfSense was working well. PPPoE worked first time with my broadband setup (<a href="https://extricate.org/2020/05/08/enabling-pppoe-with-plusnet-with-a-modem-from-2011/">once I had an appropriate modem</a>) along with all the other home networking bits that you would expect.</p>



<p class="wp-block-paragraph">However, mainly for political reasons, I wanted to switch to <a href="https://opnsense.org/">OPNsense</a>. Some of the actions taken by those involved with pfSense over the years had been, to be blunt, <a href="https://opnsense.org/opnsense-com/">pretty unprofessional</a> and the community element of OPNsense felt a lot better to me.</p>



<p class="wp-block-paragraph">As mentioned earlier, I didn’t have a null modem cable, which is needed to access the APU boards over the serial cable: There is NO monitor output!</p>



<p class="wp-block-paragraph">I sourced a <a href="https://www.startech.com/uk/">StarTech</a> USB null modem cable from Amazon: <a href="https://www.amazon.co.uk/gp/product/B008634VJY">https://www.amazon.co.uk/gp/product/B008634VJY</a></p>



<p class="wp-block-paragraph">The drivers were provided on CD but were thankfully also easily found via the StarTech web site. The cable worked first time, once hooked up to a laptop running Windows 10 and <a href="https://mobaxterm.mobatek.net/">MobaXTerm</a>. The serial port settings are <a href="https://www.pcengines.ch/ht_com.htm">provided by PC Engines</a>.</p>



<p class="wp-block-paragraph">This allowed the quick installation of OPNsense. Configurations between the two products are not directly compatible, but re-creating my pretty simple setup really didn’t take very long. As with pfSense, the basics such as PPPoE worked straight out of the box.</p>



<h2 class="wp-block-heading">Performance</h2>



<p class="wp-block-paragraph">I did a quick speed test via <a href="https://www.speedtest.net/">https://www.speedtest.net/</a> – this actually provided my fastest download speed yet! That’s not scientific at all as there are so many variables with these sorts of things, but at least it shows no reduction, right?</p>



<div class="wp-block-uagb-image aligncenter uagb-block-807846fe wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-center"><figure class="wp-block-uagb-image__figure"><img data-recalc-dims="1" loading="lazy" decoding="async" srcset="http://extricate.org/wp-content/uploads/2024/02/opnsense-speedtest.png ,http://extricate.org/wp-content/uploads/2024/02/opnsense-speedtest.png 780w, http://extricate.org/wp-content/uploads/2024/02/opnsense-speedtest.png 360w" sizes="auto, (max-width: 480px) 150px" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/opnsense-speedtest.png?resize=768%2C189" alt="" class="uag-image-1691" width="768" height="189" title="" loading="lazy"/></figure></div>



<p class="wp-block-paragraph">The box is running happily at about <strong>22%</strong> RAM utilisation, so plenty left for additional bells and whistles.</p>



<p class="wp-block-paragraph">The CPU is up and down, due to Netflow logs being enabled, but peaks at <strong>25%</strong> when data analysis is going on.</p>



<h2 class="wp-block-heading">Verdict</h2>



<p class="wp-block-paragraph">I’m happy!</p>



<p class="wp-block-paragraph">This is one of those ‘does what it says on the tin’ products. LinITX provide a good package deal (even if the BIOS was very old, but easily rectified), and delivered very quickly too.</p>



<p class="wp-block-paragraph">The hardware has proven rock solid so far: Despite flashing, re-installing etc, there have not been any surprises at any point.</p>



<p class="wp-block-paragraph">Based on my limited use so far, both pfSense and OPNsense run well on the hardware. You would be happy no matter what your choice of flavour. Note that you can install other things too… <a href="https://clinta.github.io/bionic-on-apu2/">here’s an Ubuntu example</a>.</p>



<p class="wp-block-paragraph">If you are looking to have a home firewall box, this is definitely a good way of doing it. I’d be interested to hear if you are doing it in any other way though!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://extricate.org/home-firewall-pc-engines-apu2-e2-pfsense-and-opnsense-build-courtesy-of-linitx/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1687</post-id>	</item>
		<item>
		<title>Enabling PPPoE with Plusnet &#8211; with a modem from 2011</title>
		<link>https://extricate.org/enabling-pppoe-with-plusnet-with-a-modem-from-2011/</link>
					<comments>https://extricate.org/enabling-pppoe-with-plusnet-with-a-modem-from-2011/#respond</comments>
		
		<dc:creator><![CDATA[Tristan Greaves]]></dc:creator>
		<pubDate>Fri, 08 May 2020 19:42:00 +0000</pubDate>
				<category><![CDATA[Home Lab]]></category>
		<category><![CDATA[Networking]]></category>
		<guid isPermaLink="false">https://extricate.org/?p=1680</guid>

					<description><![CDATA[You would hope that the shiny (Sagecom manufactured) Hub One from plusnet would support my desired bridging mode.... but no. It doesn't. Could it be achieved with alternative firmware? Yes, but... There's no way of flashing the firmware on these without getting your soldering iron out, and I didn't fancy that.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">I’ve been looking to implement a more sophisticated firewall solution at home for a while now. The likes of <a href="https://www.pfsense.org/">pfSense</a> and <a href="https://opnsense.org/">OPNsense</a> can happily authenticate with PPPoE via a suitable broadband modem, which takes care of your WAN interface cleanly.</p>



<p class="wp-block-paragraph">If your modem <strong>can’t</strong> do this, then essentially you have to do it via IP bridging instead, and end up with a horrible <a href="https://kb.netgear.com/30186/What-is-Double-NAT">‘double NAT’</a> situation. I really wanted to avoid that.</p>



<p class="wp-block-paragraph">You would hope that the shiny (Sagecom manufactured) Hub One from plusnet would support my desired bridging mode…. but no. It doesn’t. Could it be achieved with alternative firmware? Yes, but… There’s no way of flashing the firmware on these without <a href="https://community.plus.net/t5/Tech-Help-Software-Hardware-etc/Running-OpenWRT-on-the-Plusnet-Hub-One-amp-BT-Home-Hub-5a/td-p/1302968">getting your soldering iron out</a>, and I didn’t fancy that.</p>



<div class="wp-block-uagb-image aligncenter uagb-block-5d68a581 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-center"><figure class="wp-block-uagb-image__figure"><img data-recalc-dims="1" loading="lazy" decoding="async" srcset="http://extricate.org/wp-content/uploads/2024/02/hub-one.jpeg ,http://extricate.org/wp-content/uploads/2024/02/hub-one.jpeg 780w, http://extricate.org/wp-content/uploads/2024/02/hub-one.jpeg 360w" sizes="auto, (max-width: 480px) 150px" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/hub-one.jpeg?resize=640%2C360" alt="" class="uag-image-1681" width="640" height="360" title="" loading="lazy"/></figure></div>



<h2 class="wp-block-heading">Let’s go back to 2011…</h2>



<p class="wp-block-paragraph">Thankfully, modems exist that <strong>do</strong> support bridging mode. Some research revealed that a particularly well-regarded one is the <a href="https://support.aa.net.uk/Router_-_EchoLife_HG612">Huawei EchoLife HG612</a>. It dates back to 2011 and was the originally provided modem for the first fibre broadband installs in the UK.</p>



<p class="wp-block-paragraph">When initially provided, they were very much locked down with no access to configure it. Custom firmware has since arisen which completely unlocks the GUI. Great news.</p>



<p class="wp-block-paragraph">I picked one up from <a href="https://www.ebay.co.uk/">eBay</a>: Go for one of the ‘3B’ models if you can as these solve a previous overheating (!) issue. They seem plentiful on there. Surprisingly, the one that arrived seemed brand new, so was either unused or had been very well looked after!</p>



<div class="wp-block-uagb-image aligncenter uagb-block-c285d638 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-center"><figure class="wp-block-uagb-image__figure"><img data-recalc-dims="1" loading="lazy" decoding="async" srcset="http://extricate.org/wp-content/uploads/2024/02/modem.jpg ,http://extricate.org/wp-content/uploads/2024/02/modem.jpg 780w, http://extricate.org/wp-content/uploads/2024/02/modem.jpg 360w" sizes="auto, (max-width: 480px) 150px" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/modem.jpg?resize=768%2C576" alt="" class="uag-image-1682" width="768" height="576" title="" loading="lazy"/></figure></div>



<p class="wp-block-paragraph">It arrived unlocked. This meant some work was needed.</p>



<h2 class="wp-block-heading">Flash Attack!</h2>



<p class="wp-block-paragraph">Thankfully, the flashing procedure is straightforward. Power on the router while holding down the RESET switch, then connect up to a laptop via Ethernet. Upload new firmware and you are done.</p>



<p class="wp-block-paragraph"><a href="https://support.aa.net.uk/Router_-_EchoLife_HG612">The whole process is explained here</a>.</p>



<p class="wp-block-paragraph">This was successful. I obviously held my breath for the correct amount of time…</p>



<h2 class="wp-block-heading">One step at a time…</h2>



<p class="wp-block-paragraph">My first test was to use this modem as a ‘drop-in’ replacement for my original Hub One router. This meant a few changes via the GUI:</p>



<ol class="wp-block-list">
<li><strong>Change the LAN IP address:</strong> It defaults to 192.168.1.1, whereas the Hub One uses 192.168.1.254. I did not want to adjust the Gateway on my home network until I was sure the HG612 actually worked properly! (Note: DHCP is handled elsewhere in this scenario).</li>



<li><strong>Switch to Router mode:</strong> The HG612 comes with bridging selected by default. So it was a simple case of switching to ROUTER mode, and entering my Plusnet credentials. No other changes were needed.</li>
</ol>



<p class="wp-block-paragraph">With this done, the HG612 successfully negotiated everything and my network was working.</p>



<h2 class="wp-block-heading">The Final Bridge</h2>



<p class="wp-block-paragraph">After an appropriate amount of soak testing (the line remained rock solid), it was time to go ‘full-on bridge’.</p>



<div class="wp-block-uagb-image aligncenter uagb-block-4928d7bd wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-center"><figure class="wp-block-uagb-image__figure"><img data-recalc-dims="1" loading="lazy" decoding="async" srcset="http://extricate.org/wp-content/uploads/2024/02/final-bridge.jpg ,http://extricate.org/wp-content/uploads/2024/02/final-bridge.jpg 780w, http://extricate.org/wp-content/uploads/2024/02/final-bridge.jpg 360w" sizes="auto, (max-width: 480px) 150px" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/final-bridge.jpg?resize=570%2C672" alt="" class="uag-image-1683" width="570" height="672" title="" loading="lazy"/></figure></div>



<p class="wp-block-paragraph">Thankfully, this was again straightforward:</p>



<ol class="wp-block-list">
<li><strong>Switch the HG612 to PPPoE Bridged mode:</strong> This was as simple as changing the mode to ‘PPPoE Bridge’ in the GUI. I set <strong>Port binding</strong> to LAN1 <strong>only</strong> – this meant that LAN2 would remain free as a way to access the GUI should I need it.</li>



<li><strong>Configure firewall with my Plusnet credentials</strong>. Straightforward and no fiddling with any other parameters (e.g. MTU) required.</li>
</ol>



<p class="wp-block-paragraph">It worked first time and, touch wood, I have not observed any drop-outs to date.</p>



<h2 class="wp-block-heading">Final thoughts…</h2>



<p class="wp-block-paragraph">It’s frustrating that there seems to be a trend of ISP-provided routers locking out this sort of functionality: Plusnet are not alone in this. Getting better functionality from a device from <strong>9 years ago</strong> is not how these things should be.</p>



<p class="wp-block-paragraph">Technology should always be an enabler <strong>to make things easier</strong>. Not making PPPoE available (even in Advanced Settings) just made things that bit harder.</p>



<p class="wp-block-paragraph">Now get off my lawn.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://extricate.org/enabling-pppoe-with-plusnet-with-a-modem-from-2011/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1680</post-id>	</item>
		<item>
		<title>AWS Savings Plans: Thoughts from the Enterprise</title>
		<link>https://extricate.org/aws-savings-plans-thoughts-from-the-enterprise/</link>
					<comments>https://extricate.org/aws-savings-plans-thoughts-from-the-enterprise/#respond</comments>
		
		<dc:creator><![CDATA[Tristan Greaves]]></dc:creator>
		<pubDate>Thu, 12 Dec 2019 12:33:00 +0000</pubDate>
				<category><![CDATA[AWS]]></category>
		<guid isPermaLink="false">https://extricate.org/?p=1720</guid>

					<description><![CDATA[AWS Savings Plans were launched just over a month ago now. They are essentially being pitched as "Reservations, but easier". In both cases, pre-pay for your compute capacity and unlock discounts for doing so. Here, I present my thoughts on this, coming from an Enterprise AWS background]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><a href="https://aws.amazon.com/savingsplans/">AWS Savings Plans</a> were launched just over a month ago now. They are essentially being pitched as “<a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-reservations.html">Reservations</a>, but easier”. In both cases, pre-pay for your compute capacity and unlock discounts for doing so. Here, I present my thoughts on this, coming from an Enterprise AWS background.</p>



<h2 class="wp-block-heading">What Enterprise background is that exactly?</h2>



<p class="wp-block-paragraph">I work for <a href="https://www.stepstone.com/">StepStone</a>. AWS is our cloud provider of choice. We have approaching 100 accounts and an expenditure level within AWS that you would expect given our <strong>€3,000+</strong> million revenues (2018).</p>



<p class="wp-block-paragraph">StepStone have many different brands, and multiple architectures powering those brands within the technological estate. This is historically due to acquisitions. There is always ongoing consolidation work, such as shared services for different brands to use, but this adds to the complexity that we are dealing with.</p>



<p class="wp-block-paragraph">One of the linchpins of <a href="https://www.linkedin.com/in/tristangreaves/">my role</a> is Cost Optimisation, and working with the teams across the Group to do this right. Hey, this is <a href="https://d1.awsstatic.com/whitepapers/architecture/AWS-Cost-Optimization-Pillar.pdf">one of the pillars</a> of the AWS <a href="https://aws.amazon.com/architecture/well-architected/">Well-Architected Framework</a> after all.</p>



<h2 class="wp-block-heading">Life Before Savings Plans</h2>



<p class="wp-block-paragraph">As is typical within Enterprises in AWS, a large portion of our spend is in EC2. That has mostly originated from numerous ‘lift and shift’ migrations.</p>



<p class="wp-block-paragraph"><strong>We introduced targets for reservations across the group.</strong> This is really simple:</p>



<ul class="wp-block-list">
<li>The minimum target is <strong>60%</strong> of savings being realised. I.e. 100% would be “All of my EC2 capacity is reserved”. Note: As this is talking about Savings that means Production servers (typically more powerful and therefore expensive) have greater weight than Development servers.</li>



<li><strong><em>“What about Spot?”</em></strong> — That’s OK, as they aren’t included in the calculations, so go for it.</li>



<li><strong><em>“What if I can’t reserve because….”</em></strong> – Yep, there are always valid reasons for this. One would be building something new and the capacities aren’t known yet. Another would be a site which is known to be sun-setting within a few months, and the old reservations have just expired.</li>
</ul>



<p class="wp-block-paragraph">This approach has worked really well for us. We’ve been regularly exceeding this target. In fact, hitting <strong>80%+</strong> is typical.</p>



<p class="wp-block-paragraph">This relies on the individual Account Owners, and their teams, really focusing on which reservations should be made, and using the tools available to do so. <a href="https://www.cloudhealthtech.com/en-uk">CloudHealth</a> has historically helped a lot with this, and <a href="https://aws.amazon.com/aws-cost-management/aws-cost-explorer/">Cost Explorer</a> has got better at it too.</p>



<p class="wp-block-paragraph">But it’s not perfect….</p>



<h2 class="wp-block-heading">When Reservations Attack</h2>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="250" height="300" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/when-things-attack.jpg?resize=250%2C300&#038;ssl=1" alt="" class="wp-image-1721"/></figure>



<p class="wp-block-paragraph"><strong>The whole reservation system can cause pain.</strong></p>



<p class="wp-block-paragraph">Firstly, there is naturally a degree of manual work in implementation. The various recommendation engines make this a lot easier now, but there still has to be a manual analysis on what the future brings. What’s the future of the architecture? Is it being migrated very soon? Exactly what type of reservation should you be going for?</p>



<p class="wp-block-paragraph">Okay, some amount of work like that is a given, to be fair, as reserving capacity is all about pre-planning.</p>



<p class="wp-block-paragraph">The main issue is when <strong>things go wrong</strong> and you are having to work with Amazon to get things swapped around.</p>



<p class="wp-block-paragraph">This is typically when we have needed <strong>Reservations refunded</strong> due to situations changing. Now, I’m not talking about where we have changed our mind — I wouldn’t expect a refund in that instance. We’ve had situations where we have made purchasing decisions based on <strong>advice from Amazon that was later shown to be wrong</strong>. The good news is that we got refunds, <strong>but</strong> it was a long and torturous process, involving far too many approval layers on the ‘other side’. So much so, in fact, that I’m wondering whether the money we got back even paid for the salaries of everyone that was involved. Frustrating.</p>



<p class="wp-block-paragraph">We’ve historically been told that this is due to the EC2 capacity team relying on Reservations to accurately plan capacity. I’m now a little bit dubious on that, purely as Savings plans <strong>do not have to specify instance types any more</strong> – purely an expenditure level.</p>



<h2 class="wp-block-heading">Are Reservations going to go?</h2>



<p class="wp-block-paragraph">Amazon are making it clear that they don’t really want customers using Reservations any more (from the <a href="https://aws.amazon.com/savingsplans/faq/">FAQ</a>):</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>Can I continue to purchase EC2 RIs?</strong></p>



<p class="wp-block-paragraph">Yes. You can continue purchasing RIs to maintain compatibility with your existing cost management processes, and your RIs will work along-side Savings Plans to reduce your overall bill. However as your RIs expire we encourage you to sign up for Savings Plans as they offer the same savings as RIs, but with additional flexibility.</p>
</blockquote>



<p class="wp-block-paragraph">Remember: Not only are Savings plans more straightforward for the customer, they are going to cause less drama for Amazon themselves. No longer will they have to field reservation refund requests.</p>



<p class="wp-block-paragraph">I can imagine Amazon will make Reservations <strong>no longer available to purchase</strong> within a few years, and push Savings Plans very strongly before that via Account Managers and TAMs as they detect renewal windows coming up.</p>



<h2 class="wp-block-heading">What are we going to do?</h2>



<figure class="wp-block-image aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="550" height="334" src="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/crossroads.jpg?resize=550%2C334&#038;ssl=1" alt="" class="wp-image-1722" srcset="https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/crossroads.jpg?w=550&amp;ssl=1 550w, https://i0.wp.com/extricate.org/wp-content/uploads/2024/02/crossroads.jpg?resize=300%2C182&amp;ssl=1 300w" sizes="(max-width: 550px) 100vw, 550px" /></figure>



<p class="wp-block-paragraph">This is a great question. <strong>As of right now, we haven’t purchased any Savings Plans.</strong></p>



<p class="wp-block-paragraph">The reason for this is that, at an <strong>Account</strong> level, those teams can be very precise in their reservation strategy and therefore unlock the <strong>best discounts</strong>.</p>



<p class="wp-block-paragraph">Executing a Savings Plan purchase at our <strong>payer account</strong> level (where we really have a great view of total spend) means being a bit more generic, and going in at the top level, rather than Instance types. There’s a balancing act here, as we would probably get <strong>better coverage</strong> but the <strong>discount level</strong> might end up being <strong>lower</strong>. Oh, and throw into the mix the fact that the <strong>human cost</strong> of analysing everything would be reduced too.</p>



<p class="wp-block-paragraph">Also, if we purchase at the payer account level, we need to look at how we cross-charge our various entities their share of the upfront payment. Yes, we cross-charge our AWS bill. We’re not alone in our segment for doing this, that’s for sure.</p>



<p class="wp-block-paragraph">In short, we need to do <strong>some more analysis</strong> and then take a consistent way forward, to avoid any confusion given the number of people that we have working on cost optimisation within the business.</p>



<h2 class="wp-block-heading">What are YOU going to do?</h2>



<p class="wp-block-paragraph">Please let me know! I’d welcome your thoughts on Savings Plans and the changes that you have made, or are going to make, as a result of their introduction!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://extricate.org/aws-savings-plans-thoughts-from-the-enterprise/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1720</post-id>	</item>
	</channel>
</rss>
