<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Graham Wright on Medium]]></title>
        <description><![CDATA[Stories by Graham Wright on Medium]]></description>
        <link>https://medium.com/@gwright_60924?source=rss-b7638da5e163------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*a_2buNQ38o8VzlNUkCOliQ.jpeg</url>
            <title>Stories by Graham Wright on Medium</title>
            <link>https://medium.com/@gwright_60924?source=rss-b7638da5e163------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 20:32:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gwright_60924/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Getting started with Tasker — #ProductHack]]></title>
            <link>https://medium.com/@gwright_60924/getting-started-with-tasker-producthack-97520d2a73a3?source=rss-b7638da5e163------2</link>
            <guid isPermaLink="false">https://medium.com/p/97520d2a73a3</guid>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[tasker]]></category>
            <category><![CDATA[setup-guide]]></category>
            <category><![CDATA[hacks]]></category>
            <category><![CDATA[product]]></category>
            <dc:creator><![CDATA[Graham Wright]]></dc:creator>
            <pubDate>Mon, 08 Jun 2020 21:12:29 GMT</pubDate>
            <atom:updated>2020-06-28T14:34:32.958Z</atom:updated>
            <content:encoded><![CDATA[<h3>Getting started with Tasker — #ProductHack</h3><p>Ever wished your phone was that <em>bit</em> more intelligent, to do &lt;awesome thing&gt; whenever &lt;some other thing&gt; happens?</p><p>Well, Tasker may just become your new best friend!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*GHLW390dZLcyphOP" /></figure><h3>Table of Contents</h3><p><a href="#1799"><strong>Tasker</strong></a>: <a href="#1799">Introduction</a> | <a href="#e3ab">Download</a> | <a href="#36cb">Setup</a></p><p><a href="#47b4"><strong>Using Tasker</strong></a><strong>:</strong> <a href="#1540">‘Borrowing’ other people’s hard work</a>| <a href="#caaf">Importing Tasks shared on Taskernet</a>| <a href="#8d7a">Becoming a Tasker-Master</a></p><p><a href="#3a69"><strong>Tasker Plugins</strong></a><strong>:</strong></p><ul><li><a href="#f307">AutoApps</a>: <a href="#f307">Introduction</a> | <a href="#f307">Download</a></li><li><a href="#070f">AutoNotification</a>: Introduction | Download | Setup | Use within a Tasker script</li><li><a href="#bcc2">AutoTools</a>: Introduction | Download| Setup | Use within a Tasker script</li><li><a href="#f5ae">MailTask</a>: Introduction | Download| Setup</li></ul><p><a href="#0067"><strong>Summary</strong></a></p><h3>Tasker</h3><p>Tasker empowers people to automate actions, to turbo-boost your phone’s usability. Here are a <a href="https://www.freeappsforme.com/best-tasker-profiles-2020/">bunch of cool examples</a> people have come up with.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/0*lQXppKX1RfldwtZE.jpg" /><figcaption>Screenshot of the Tasker home screen</figcaption></figure><p>What’s more, Tasker also allows you to import pre-existing tasks, so if someone has already solved your problem, then you can benefit from their toil! (In the article below, I’ll provide links to some repositories of theses)</p><p>Since Tasker isn’t your typical app, it does require a bit of work to get started… below, I give an overview.</p><h4>Download</h4><p><a href="https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm&amp;hl=en">Download Tasker from the Google Play store</a>. Cost: €3.59</p><h4>Setup</h4><p>A <em>typical</em> mobile app is only useful when it’s in active use by the user. But Tasker is not <em>typical</em>! Once you’ve got your task working <em>just right</em>, the app is <em>never again</em> in active use — it does all the work without you lifting a finger!</p><p>Your Mobile Operating System is geared to optimise for <em>typical </em>apps, rather than apps that work in the background, so there are a few permissions you have to set get things running smoothly.</p><p><em>Nb. The following configurations should generally be applied to both Tasker, and any plugin apps (see later in the page). For simplicity, I would recommend downloading Tasker and any plugins you plan to use at once, and following the setup steps below for all of them simultaneously.</em></p><p><strong>Keep-Alive</strong></p><p>To stop your mobile operating system from over-zealously protecting its battery by killing your app, you should:</p><ul><li>Instruct the OS to apply <strong>no energy-saving policies</strong> to Tasker (also applies to any Battery saving apps you have)</li><li>Grant the App <strong>permission to Auto-Start</strong> (so you don’t have to do this when you turn your device off and on, or if it accidentally gets killed)</li></ul><p><strong>Draw Overlay</strong></p><p>Tasker also needs permission to display things on screen when it’s not in focus</p><ul><li>Grant the permission <strong>Display Pop-Up</strong> Window, and <strong>Display pop-up window while running in the background</strong></li></ul><p>If you do not activate this setting, you may see pop-ups of the following nature:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*0p5jNvgXrdCY1jwY4mBvMg.png" /></figure><p>The precise way you will change these settings varies from device to device. For my phone these permissions are all found in:</p><p><em>Settings &gt; Apps &gt; Manage Apps &gt; Tasker &gt; Other Permissions</em></p><p>The following links may help you work out how to do this for your device:</p><ul><li><a href="https://dontkillmyapp.com/?app=Tasker">Don’t kill my app</a></li><li><a href="https://tasker.joaoapps.com/userguide/en/faqs/faq-problem.html#00">Tasker FAQ</a></li></ul><h3>Using Tasker</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*tE0N3JuXkCXmeMqp" /><figcaption>Tasker’s School yearbook photo</figcaption></figure><p>While the potential of Tasker is practically unlimited, it’s fair to say it isn’t the <em>prettiest</em> of apps or most intuitive of experiences…</p><p>Thankfully, there are ways of getting started with Tasker without a degree in Quantum Computing…</p><h4>‘Borrowing’ other people’s hard work 🙊</h4><p>Tasker projects can be shared by their writers as a free download so that others can benefit from their toil! You will find plenty of online resources where people share their work:</p><ul><li>Blogs: <a href="https://freeappsforme.com/best-tasker-profiles-2020/">eg1</a>, <a href="https://www.updateland.com/tasker-profiles/">eg2</a>, <a href="https://techigem.com/best-tasker-profiles/">eg3</a></li><li>Reddit: <a href="https://www.reddit.com/r/tasker/">r/tasker</a>, <a href="https://www.reddit.com/r/taskernet/">r/taskernet</a>, <a href="https://www.reddit.com/r/TaskerFiles/">r/TaskerFiles</a></li></ul><p>And here are some of my projects:</p><ul><li><a href="https://medium.com/@gwright_60924/how-i-extended-the-battery-life-of-my-bluetooth-sleep-headphones-by-1000-producthack-e1a22d5770f2">How I extended the battery life of my Bluetooth sleep headphones by 1000%! — #ProductHack</a></li><li><a href="https://medium.com/@gwright_60924/how-i-send-pay-wall-articles-from-my-phone-to-kindle-in-one-click-producthack-5ebb70932b1b">How I send pay-wall articles from my Phone to Kindle in one click! — #ProductHack</a></li></ul><h4>Importing Tasks shared on Taskernet</h4><p>Taskernet is a free online tool for sharing Tasker projects. Assuming you have undertaken the pre-requisites:</p><ul><li>installed and configured a Tasker</li><li>identified a project you would like to import</li><li>downloaded and setup any Tasker plugins the project requires</li><li>obtained the Taskernet link for a project (which looks like <em>https://taskernet.com/shares/?user=AS35…</em>)</li></ul><p>You are ready to import:</p><ol><li>On your device on which Tasker is installed, open the Taskernet link — you will be greeted with the Task Data “Import Screen”.</li><li>To continue, press the green “Import” button — This will open the Tasker app and provide you with the Import Confirmation dialogue.</li><li>Proceed with the Import process.</li><li>Click “OK” and the Profile/Task/Project will be imported into Tasker —</li><li>Accept the offer to enable the Profiles.</li></ol><p><em>nb. Further details about the Taskernet import process </em><a href="https://tasker.joaoapps.com/userguide/en/sharecreation.html"><em>here</em></a><em> or </em><a href="https://tasker.joaoapps.com/taskernet.html"><em>here</em></a><em>.</em></p><h4>Becoming a Tasker-Master</h4><p>For those without a technical background (or extreme patience) learning to use it is sometimes not straightforward! There is however a massive and supportive community behind the app with loads of resources online to help you get what you need out of it. This <a href="https://www.youtube.com/playlist?list=PLjV3HijScGMynGvjJrvNNd5Q9pPy255dL">tutorial playlist</a> is a good place to start.</p><h3>Tasker Plugins</h3><p>Tasker by itself is already super powerful, but lots of extensions have emerged to endow it with even greater superpowers and help users solve even bigger automation problems.</p><h4>AutoApps</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/0*cX2nxFEVjHljD4rZ" /></figure><p>AutoApps is not a Tasker plugin per se itself, but rather a catalogue of plugins (all built by the <a href="https://joaoapps.com/">guy who developed Tasker</a>). It contains 17 different plugins at the time of writing (plus a further 11 in test releases), each with a nominal fee.</p><p>My projects use a few of the AutoApps plugins suite, which I will describe below.</p><p>Before I do, it is necessary to know that AutoApps is itself an app, and this is used to control access to the plugins. Therefore you should start with this.</p><p><a href="https://play.google.com/store/apps/details?id=com.joaomgcd.autoappshub&amp;hl=en">Download AutoApps From the Google Play Store</a>: Cost: FREE</p><p>Most of the plugins in the AutoApps suite have a small cost but are also available on a trial. I would advise against using the trial version and jump straight for paying the nominal fee since the trials come with restrictions which make their use in real tasks difficult or impossible.</p><h4>AutoNotification</h4><p><strong>Introduction</strong></p><p><a href="https://joaoapps.com/autonotification/">AutoNotification</a> allows me to intercept notifications (even ones hidden to you) generated by other Apps, and use them to trigger some other process. For example:</p><ul><li>in the <a href="https://medium.com/@gwright_60924/how-i-extended-the-battery-life-of-my-bluetooth-sleep-headphones-by-1000-producthack-e1a22d5770f2">Bluetooth Audio device Battery Saver (BABS) project</a>, AutoNotification allows me to detect when audio has stopped playing, based on the internal notifications generated by all media capable apps.</li><li>in the <a href="https://medium.com/@gwright_60924/how-i-send-pay-wall-articles-from-my-phone-to-kindle-in-one-click-producthack-5ebb70932b1b">Forward Download to Ebook Reader (FEDR) project</a>, AutoNotifcation allows me to detect that my Web Browser has completed a download.</li></ul><p><strong>Download</strong></p><p>Download AutoNotifcation either via your AutoApps app, or go directly to <a href="https://play.google.com/store/apps/details?id=com.joaomgcd.autonotification&amp;hl=en">the Google Play Store</a>. Cost: €2.99</p><p>After opening the AutoTools app, it will ask for permission to access files. This permission is not required for either my BABS or FEDR projects, but whether you allow or deny it, it can always be granted or revoked later.</p><p>The initial downloaded version is a free trial, but the limitations the trial brings just don’t cut it for actual use. Go ahead and click on ‘Get Full Version’ and follow the prompt to the ‘AutoApps’ app to complete the purchase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*To-x9Le7gFQ0EEMc7wro6A.png" /></figure><p><strong>Setup</strong></p><p>PHONE OS: Like Tasker, its plugins must also be given certain permissions in your Mobile’s operating system. I recommend doing this at the same time for Tasker and all the plugins you will use (see Tasker permission setup video above).</p><p>APP: There is one (harmless, but annoying) aspect of the app you’ll probably want to switch off. Within the AutoNotifications app:</p><p>Quick Setting Tiles<em> &gt; </em>Hide all</p><p>Otherwise, there are no further required configurations to make within the App itself.</p><p><strong>Use within a Tasker script</strong></p><p>To start using AutoNotifications notification intercept function within your own Tasker job:</p><ul><li>In Tasker, on the ‘Profiles’ tab</li><li>Click the ‘+’ icon (bottom right) to add a new profile.</li><li>Give the profile a name and select the ‘tick’</li><li>Select Event &gt; Plugin &gt; AutoNotification &gt; Intercept</li></ul><p>The ‘Configuration’ on the next page will depend on the thing you want to achieve. Go ahead and follow the tutorial for either of my projects to see AutoTools in action.</p><ul><li><a href="https://medium.com/@gwright_60924/how-i-extended-the-battery-life-of-my-bluetooth-sleep-headphones-by-1000-producthack-e1a22d5770f2">Bluetooth Audio device Battery Saver (BABS)</a></li><li><a href="https://medium.com/@gwright_60924/how-i-send-pay-wall-articles-from-my-phone-to-kindle-in-one-click-producthack-5ebb70932b1b">Forward Download to Ebook Reader (FEDR)</a></li></ul><p>Alternatively, see more tutorial materials for how to put AutoNotification into action <a href="https://joaoapps.com/autonotification/">here</a>.</p><h4>AutoTools</h4><p><strong>Introduction</strong></p><p><a href="https://joaoapps.com/autotools/">AutoTools</a> (part of the AutoApps Tasker plugins suite developed by the guy behind Tasker) allows me to do some of the fiddlier, more technical things that Tasker alone struggles to. For example:</p><ul><li>in the <a href="https://medium.com/@gwright_60924/how-i-extended-the-battery-life-of-my-bluetooth-sleep-headphones-by-1000-producthack-e1a22d5770f2">Bluetooth Audio device Battery Saver (BABS) project</a>, AutoTools allows me to easily check if the specific Audio device I am interested in is connected and get its technical address. It also allows me to run a small piece of Java code to ask the phone if music is still not playing.</li><li>in the <a href="https://medium.com/@gwright_60924/how-i-send-pay-wall-articles-from-my-phone-to-kindle-in-one-click-producthack-5ebb70932b1b">Forward Download to Ebook Reader (FEDR) project</a>, AutoTools allows me to run a small piece of Javascript to format a file path into the URI encoded format the MailTask app requires.</li></ul><p><strong>Install</strong></p><p>Download AutoTools either via your AutoApps app, or go directly to <a href="https://play.google.com/store/apps/details?id=com.joaomgcd.autotools&amp;hl=en">the Google Play Store</a>. Cost: €2.99</p><p>After opening the AutoTools app, it will ask for permission to access certain things. None of these is required in either my BABS or FEDR projects, but whether you allow or deny them, they can always be granted or revoked later.</p><p>The initial downloaded version is a free trial, but the limitations the trial brings just don’t cut it for actual use. Go ahead and click on ‘Get Full Version’ and follow the prompt to the ‘AutoApps’ app to complete the purchase.</p><p><strong>Setup</strong></p><p>PHONE OS: Like Tasker itself, to guarantee smooth running, Tasker’s plugins should also be given certain additional operating system permissions (see the subsection of the Tasker chapter and associated video above). I recommend performing these steps at the same time for Tasker and all the plugins you will use.</p><p>APP: Otherwise there are no further required configurations to make within the App itself.</p><p><strong>Use within a Tasker script</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*R2-qIMydQP4_Rxf2.jpg" /><figcaption>AutoTools IRL</figcaption></figure><p>AutoTools is like the Swiss Army knife of Tasker, there are far too many things possible to be able to make a sensible demo here.</p><p>Go ahead and follow the tutorial for either of my projects to see AutoTools in action.</p><ul><li><a href="https://medium.com/@gwright_60924/how-i-extended-the-battery-life-of-my-bluetooth-sleep-headphones-by-1000-producthack-e1a22d5770f2">Bluetooth Audio device Battery Saver (BABS)</a></li><li><a href="https://medium.com/@gwright_60924/how-i-send-pay-wall-articles-from-my-phone-to-kindle-in-one-click-producthack-5ebb70932b1b">Forward Download to Ebook Reader (FEDR)</a></li></ul><p>You can see more about the possibilities enabled by AutoTools <a href="https://joaoapps.com/autotools/">here</a>.</p><h4>MailTask</h4><p><strong>Introduction</strong></p><p>MailTask allows me to automatically send an email from my email account with an attachment. For example:</p><ul><li>in the <a href="https://medium.com/@gwright_60924/how-i-send-pay-wall-articles-from-my-phone-to-kindle-in-one-click-producthack-5ebb70932b1b">Forward Download to Ebook Reader (FDER) project</a>, MailTask allows me to send a .mobi file automatically to my Kindle’s email address, so that it can be read there.</li></ul><p><strong>Download</strong></p><p><a href="https://play.google.com/store/apps/details?id=com.balda.mailtask&amp;hl=en">Download MailTask from the Google Play Store</a>. Cost: €1.99</p><p><strong>Setup</strong></p><p>PHONE OS: Like Tasker, its plugins should also be given certain permissions in your Mobile’s operating system. I recommend doing this at the same time for Tasker and all the plugins you will use (see Tasker permission setup video above).</p><p>BASE APP: For MailTask to be able to send emails from your email account, you need to grant it access to your account. This is easiest when you have a Gmail email account.</p><p>When the send email task in your app is executed for the first time, your Google account should automatically generate an authorization notification and ask you for permission to proceed.</p><p>The following video contains some relevant information if you get stuck.</p><h3>Summary</h3><p>Tasker and its plugins offer an extremely powerful tool to solve phone usability problems. There’s a definite learning curve, but plenty of materials to plain ‘<em>borrow</em>’ and many tutorials to learn from.</p><p>Go ahead and follow the tutorial for either of my projects to see AutoTools in action.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97520d2a73a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I extended the battery life of my Bluetooth headphones by >1000%! — #ProductHack]]></title>
            <link>https://medium.com/@gwright_60924/how-i-extended-the-battery-life-of-my-bluetooth-sleep-headphones-by-1000-producthack-e1a22d5770f2?source=rss-b7638da5e163------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1a22d5770f2</guid>
            <category><![CDATA[hacks]]></category>
            <category><![CDATA[bluetooth]]></category>
            <category><![CDATA[tasker]]></category>
            <category><![CDATA[product]]></category>
            <category><![CDATA[battery-life]]></category>
            <dc:creator><![CDATA[Graham Wright]]></dc:creator>
            <pubDate>Mon, 08 Jun 2020 21:11:56 GMT</pubDate>
            <atom:updated>2020-06-28T15:05:01.561Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I extended the battery life of my Bluetooth headphones by &gt;1000%! — #ProductHack</h3><p>I devised a #ProductHack to extend the battery life of the Bluetooth headphones by &gt;1000%!</p><p><em>This works for headphones which stay connected even when audio isn’t playing but turn themselves off when not connected to anything. If yours do this, read on to find out how to take advantage and save your battery!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*Jt3a5LteZzMDFFgv.jpg" /></figure><h3>Table of Contents</h3><ul><li><a href="#8120"><strong>Introduction</strong></a>: | <a href="#d33e">Motivation</a> | <a href="#8d6b">Solution Summary</a> | <a href="#c692">Comparison with other options</a></li><li><a href="#ee06"><strong>Getting Setup</strong></a><strong>:</strong>| <a href="#8251">Pre-requisites</a> | <a href="#ef84">Tested on</a> | <a href="#8e81">Installations</a> | <a href="#2e10">Script Download and Import</a></li><li><a href="#705a"><strong>Using the Project</strong></a><strong>: </strong>|<strong> </strong><a href="#f80f">Personalising the Script</a> | <a href="#f9eb">Running the Script</a></li><li><a href="#ae57"><strong>Final Note</strong></a><strong>:</strong> | <a href="#fc9c">More</a></li></ul><h3>Introduction</h3><p>In this post, I share the motivation for my project and give a step by step guide so you can set it up too.</p><ul><li><em>Complexity</em>: Medium</li><li><em>Setup Time</em>: ~50 minutes</li></ul><p><em>Or if you’re already a Tasker whizz (or have already followed </em><a href="https://medium.com/@gwright_60924/getting-started-with-tasker-producthack-97520d2a73a3"><em>Getting started with Tasker</em></a><em>), you’ll need just ~20 minutes &amp; feel free to skip the rest of the Introduction!</em></p><h4>Motivation</h4><p>I like to listen to podcasts when I fall asleep (in fact, I struggle to sleep without it!) and I use a pair of extra comfortable sleeping Bluetooth headphones for this. By the time my podcast has finished, the dulcet tones of a scientist or historian, have usually done their job.</p><p>In the morning I take and turn the headphones off and place them on my bedside table. But when I resume my routine the next night, there’s a problem: the battery is completely flat from spending the whole night <em>on </em>without actually playing anything! Yes, I can charge it, but 1- its a pain in the ass and 2- I forget, OK?!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fvideoseries%3Flist%3DPL-jv5xSjs1Vn5KRQxqFoQAKmlOunp6jbj%26start%3D0&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DJGDePHleLnI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FJGDePHleLnI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/41aece5c681f423ab92f5b347e803160/href">https://medium.com/media/41aece5c681f423ab92f5b347e803160/href</a></iframe><p>Enter Tasker!</p><h4>Solution Summary</h4><p>I built a script to recognise when Audio has permanently stopped playing and automatically disconnect my headphones. Once disconnected, the headphones soon workout they’re not needed and turn themselves off. Instead of 8 hours, the headphones have been on for 40 minutes, and they last 12 nights, instead of 1!!! (I think even I can manage to charge them once a fortnight… ;-) )</p><h4>Comparison with other options</h4><p>There are apps such as <a href="https://play.google.com/store/apps/details?id=com.smholsen.sleeptimerallmedia">SleepTimer</a> and <a href="https://play.google.com/store/apps/details?id=it.mf.android.autobluetooth">AutoBluetooth</a> or an <a href="https://ifttt.com/applets/325199p">IfThisThenThat</a> applet which could be used to somewhat similar effect. However all of these options:</p><ul><li>either require the user to specify and stick to rules based on time.;</li><li>/ or require the user to actively activate a timer each time; and</li></ul><p>On top of that, they:</p><ul><li>apply irrespective of whether you’re still listening to a podcast; and</li><li>turn off Bluetooth as a whole (removing your connection to any other devices, such as your smartwatch, and requiring you to turn it back on at some other point)</li></ul><p>By contrast, after initial setup, the solution I share offers a zero-intrusion User Experience (UX):</p><ul><li>works automatically, anytime, anywhere based solely on whether you are still listening to audio or not</li><li>only disconnects the specified device and leaves Bluetooth on or others connected</li></ul><h3>Getting Setup</h3><h4><strong>Pre-requisites</strong></h4><p>You’ll want the following equipment to get started</p><ul><li>Android Phone</li><li>Bluetooth Audio Device</li></ul><h4><strong>Tested On</strong></h4><p>The setup I have tested with is:</p><ul><li>Xiaomi Mi 9T Pro</li><li>Android 10</li><li><a href="https://www.sleepphones.com/shopify-collections/sleepphones%C2%AE">AcousticSheep Headphones</a></li><li>Media apps such as <a href="https://play.google.com/store/apps/details?id=com.bambuna.podcastaddict&amp;hl=en">PodcastAddict</a></li></ul><p>There’s no reason why other combinations wouldn’t work either.</p><h4><strong>Installations</strong></h4><p>You’ll need to install <strong>and configure</strong> the following Android Apps</p><ul><li>Tasker</li><li>AutoApps: AutoTools</li><li>AutoApps: AutoNotification</li></ul><p><em>nb. There are some not so obvious configurations required — see my </em><a href="https://medium.com/@gwright_60924/getting-started-with-tasker-producthack-97520d2a73a3"><em>introductory guide</em></a><em> for how to do this.</em></p><h4><strong>Script download and import</strong></h4><p>The project is made freely available for download on a site called Taskernet, used by Tasker writers to freely share their projects:</p><ol><li>On your device on which Tasker is installed, open the <a href="https://taskernet.com/shares/?user=AS35m8lPKOZ8aobolC3v3rIvz8ukQQzEEEwlWvqzHcDiVvfvhvVgmg2uNFzAyQWkICc%3D&amp;id=Project%3ABluetooth+Audio+device+Battery+Saver">Share Link For the ‘Bluetooth Audio Device Battery Saver’ Project</a> — you will be greeted with the Task Data “Import Screen”.</li><li>To continue, press the green “Import” button — This will open the Tasker app and provide you with the Import Confirmation dialogue.</li><li>Proceed with the Import process.</li><li>Click “OK” and the Profile/Task/Project will be imported into Tasker —</li><li>Accept the offer to enable the Profiles.</li></ol><p><em>nb. Before attempting to run the Tasker project, follow the steps in the ‘Personalising the Script’ section below. Further details about the Taskernet import process </em><a href="https://tasker.joaoapps.com/userguide/en/sharecreation.html"><em>here</em></a><em> or </em><a href="https://tasker.joaoapps.com/taskernet.html"><em>here</em></a><em>.</em></p><h3>Using the project</h3><h4>Personalising the Script</h4><p><strong>Configuring Variables</strong></p><p>The script relies on configurable values, some of which it is required for you to specify e.g. the name of the audio device you want to disconnect. Use the instructions listed in ‘SETTING ANY VARIABLE’ (below) to amend those you need to change.</p><p><em>REQUIRED PERSONALISATION</em></p><p>%BABS_Device_Name The name of your Bluetooth Audio Device (as it appears in your mobile’s Bluetooth list). Only the specified device will be checked for and no others. If your device connects to multiple devices of the same name, any of them will be matched.</p><p>The following video shows how to locate the name of your Bluetooth Audio devices, and configure them.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FC_OkSoEw-rg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DC_OkSoEw-rg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FC_OkSoEw-rg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/884370fa641acb48a26d1fe3429aacb8/href">https://medium.com/media/884370fa641acb48a26d1fe3429aacb8/href</a></iframe><p><em>OPTIONAL PERSONALISATION</em></p><p>%BABS_Reconfirm_Buffer_Seconds The number of seconds to wait after an initial indication that audio is not playing when the specified device is also connected, before rechecking a final time. After rechecking, if audio is again not playing, the specified connected device is disconnected. You might want to tweak this value depending on your typical behaviour e.g. in between tracks. 35 seconds is given as the default.</p><p><em>ADVANCED</em></p><p>%BABS_LOG If set to true, the variable %BABS_LOG_Last_Audio_Check and %BABS_LOG_Last_Disconnect will be set to the last date and time each time the relevant steps are executed. This assists in debugging to check that the Tasker script is working correctly, even after your phone is locked, or in the morning after you’ve fallen asleep!</p><p><em>SETTING ANY VARIABLE</em></p><p>All the variables used in the script are listed in the Project’s Task screen under the Task BABS Initialize Variables. This section describes how to amend them.</p><ul><li><strong>Within the BABS project, navigate to the ‘Task’ tab (top menu bar), locate and open the </strong><strong>BABS Initialize Variables Task</strong></li><li>Locate and open the ‘Variable Set:’ task for the variable you are interested in.</li><li>In the ‘To’ section, replace the present value with the value you would like to set.</li><li>Press the 🔙 back button (top left) to exit the ‘Variable Set:’ step.</li><li><strong>Press the ▶️ play button (bottom left) to process the changes.</strong></li></ul><p>IMPORTANT: Even if there are no settings you want to change, please follow at least the first and last steps once to initialise the variables used in the project.</p><p><strong>Configuring Notifications</strong></p><p>By default, the profile is programmed to detect media changes only from Media playing apps. If you would like to be even <em>more</em> specific so that it only applies to particular apps (such as your Podcast app) you can do so.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fvideoseries%3Flist%3DPL-jv5xSjs1VlDlucFOiSiR2o3h_r9V8g9%26start%3D0&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DelzbyJ7vG6k&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FelzbyJ7vG6k%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c119544900013c12dd81791915e1fd5f/href">https://medium.com/media/c119544900013c12dd81791915e1fd5f/href</a></iframe><h4>Running the Script</h4><p>With everything configured correctly, the following describes the outcome you should be able to observe.</p><p><strong>Given</strong></p><ul><li>your named Bluetooth headphones are connected; and</li><li>audio is playing from one of your media apps</li></ul><p><strong>When</strong></p><ul><li>audio stops to play and stays not playing for your specified buffer time</li></ul><p><strong>Then</strong></p><ul><li>your Bluetooth headphones will be automatically disconnected; and</li><li>your Bluetooth headphones will remain on (and depending how they operate, turn themselves off after a while)</li><li>your phone’s Bluetooth service will remain on</li></ul><p>The script should not impact Bluetooth devices other than the one you name.</p><h3>Final Note</h3><p>I hope this project helps you extend the battery life of your Bluetooth headphones, or better still, inspires you to tackle your own phone usability project! Enjoy!</p><h4>More</h4><p>Check out another of my product hacks: <a href="https://medium.com/@gwright_60924/how-i-send-pay-wall-articles-from-my-phone-to-kindle-in-one-click-producthack-5ebb70932b1b">How I send pay-wall articles from my Phone to Kindle in one click! — #ProductHack</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1a22d5770f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I send pay-wall articles from my Phone to Kindle in one click! — #ProductHack]]></title>
            <link>https://medium.com/@gwright_60924/how-i-send-pay-wall-articles-from-my-phone-to-kindle-in-one-click-producthack-5ebb70932b1b?source=rss-b7638da5e163------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ebb70932b1b</guid>
            <category><![CDATA[kindle]]></category>
            <category><![CDATA[ebooks-online]]></category>
            <category><![CDATA[hacks]]></category>
            <category><![CDATA[product]]></category>
            <category><![CDATA[tasker]]></category>
            <dc:creator><![CDATA[Graham Wright]]></dc:creator>
            <pubDate>Mon, 08 Jun 2020 21:11:25 GMT</pubDate>
            <atom:updated>2020-07-04T16:08:10.310Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I send pay-wall articles from my Phone to Kindle in one click! — #ProductHack</h3><p>Ebook readers are not just for books, but massively improve the reading experience for articles too. One thing they do still suck at though is selecting content to read, where mobile phones excel.</p><p>I found myself frustrated by not being able to send articles from log-in websites from my mobile to my Kindle…</p><p>So I built a neat little solution so that I can turn these articles into Ebooks and send them to my Kindle in one-click!</p><h3>Table of Contents</h3><ul><li><a href="#c087"><strong>Introduction</strong></a>: |<strong> </strong><a href="#41b9">Solution summary</a> | <a href="#451d">Comparison with other options</a></li><li><a href="#d58c"><strong>Getting Setup</strong></a>: | <a href="#0424">Part 1: The beginning and the end</a>| <a href="#20d8">Part 2: The magic in the middle</a></li><li><a href="#7501"><strong>More</strong></a></li></ul><h3>Introduction</h3><p>In this post, I share the motivation for my project and give an overview of the solution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*Hlge2ZOAIzZVqaDK.jpg" /></figure><h4>Solution Summary</h4><p>I designed a Tasker script which conjoins an Ebook generating web-tool (dotepub), with Amazon’s send to Kindle email service to automatically send paywall articles, in Ebook format (because a PDF just doesn’t cut it) from my mobile browser to my Kindle at the click of a button.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fvideoseries%3Flist%3DPL-jv5xSjs1Vk8h5jGeL2DSpkhcyBgcNcU&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dr2qHhYUUaSY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fr2qHhYUUaSY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/07767fb49a52dc7da1211cb8090d6531/href">https://medium.com/media/07767fb49a52dc7da1211cb8090d6531/href</a></iframe><h4>Comparison with other options</h4><p>There are already plenty of apps that allow you to transfer content at the click of a button (the official <a href="https://play.google.com/store/apps/details?id=com.amazon.kindle&amp;hl=en">Amazon Kindle app</a>, <a href="https://play.google.com/store/apps/details?id=com.luciosoft.sendtokindle&amp;hl=en">Send To Kindle</a>, <a href="https://play.google.com/store/apps/details?id=org.fivefilters.kindleit&amp;hl=en">Push to Kindle</a>), and these work great with the open access websites like the BBC.</p><p>But why can’t I get it to work with articles from my local library, or my favourite paid for publications like The Economist, Time magazine, the Telegraph…?</p><p>The difference is that these articles are restricted or behind a <strong>paywall </strong>— you are required to log in to view the content. The apps mentioned all work by being passed the web address of the article and retrieving it <em>itself</em>. Because the app’s connection to the website doesn’t know to use your login details, the website treats the app like a non-paying customer and access to the article is <em>DE-NIED</em>.</p><p>Enter Dotepub and Tasker.</p><h3>Getting Setup</h3><p>I have split the guide into the following structure:</p><h4>Part 1) The beginning and end</h4><ul><li>i) generating Ebook compatible files from articles</li><li>ii) sending content to your Ebook via Email</li></ul><p><em>Estimated Setup Time</em>: 10 mins / <em>Complexity</em>: Easy</p><p><a href="https://medium.com/@gwright_60924/pay-wall-content-from-phone-to-kindle-runbook-part-1-producthack-6b3553b93134">GO TO: Runbook Part 1</a></p><h4>Part 2) The magic in the middle</h4><ul><li>i) automatically detecting an Ebook file download</li><li>ii) automatically sending an Email with the Ebook download attached</li></ul><p><em>Estimated Setup Time</em>: 50 minutes / <em>Complexity</em>: Medium</p><p><a href="https://medium.com/@gwright_60924/pay-wall-content-from-phone-to-kindle-runbook-part-2-producthack-759ccb5ca773">GO TO: Runbook Part 2</a></p><h3>More</h3><p>Check out another of my product hacks: <a href="https://medium.com/@gwright_60924/how-i-extended-the-battery-life-of-my-bluetooth-sleep-headphones-by-1000-producthack-e1a22d5770f2">How I extended the battery life of my Bluetooth sleep headphones by 1000%! — #ProductHack</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ebb70932b1b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pay-wall content from Phone to Kindle: Runbook Part 1 — #ProductHack]]></title>
            <link>https://medium.com/@gwright_60924/pay-wall-content-from-phone-to-kindle-runbook-part-1-producthack-6b3553b93134?source=rss-b7638da5e163------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b3553b93134</guid>
            <category><![CDATA[hacks]]></category>
            <category><![CDATA[kindle]]></category>
            <category><![CDATA[product]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[tasker]]></category>
            <dc:creator><![CDATA[Graham Wright]]></dc:creator>
            <pubDate>Mon, 08 Jun 2020 21:10:57 GMT</pubDate>
            <atom:updated>2020-06-28T14:50:29.981Z</atom:updated>
            <content:encoded><![CDATA[<h3>Pay-wall content from Phone to Kindle: Runbook Part 1 — #ProductHack</h3><p>In <a href="https://medium.com/@gwright_60924/how-i-send-pay-wall-articles-from-my-phone-to-kindle-in-one-click-producthack-5ebb70932b1b">How I send pay-wall articles from my Phone to Kindle in one click! — #ProductHack</a> we outlined the motivation and the high-level solution for this runbook.</p><p>This article focuses on the 1st of 2 runbook parts for you to achieve this product hack.</p><p><em>Estimated Setup Time</em>: 15 mins / <em>Complexity</em>: Easy</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*rUnbA_CWwm-te6iC.jpg" /></figure><h3>Table of Contents</h3><p><a href="#021d">1-i) Generating Ebook compatible files from articles in a mobile web browser:</a></p><ul><li><a href="#135a">DotEpub</a></li><li><a href="#7477">On Firefox</a> [easiest]</li><li><a href="#b407">On Chrome</a> (and other browsers) [slightly tougher]</li></ul><p><a href="#2ca4">1-ii) Sending an Ebook to your Kindle via email</a></p><p><a href="#d393">Summary after Part 1</a></p><h3>1-i) Generating Ebook compatible files from articles in a mobile web browser</h3><h4>DotEpub</h4><p><a href="https://dotepub.com/"><em>Dotepub</em></a> is an online tool to convert any webpage into an e-book, in either <em>.epub</em> or <em>.mobi</em> format.</p><p>Most apps generating Ebooks from web pages do so by passing the page’s address to another app which retrieves the page itself. Whilst this works for public access web pages, it fails for any content which is behind a secure login (such as paid for News sites like The Economist, The Telegraph, Time magazine etc.). By contrast, Dotepub works even in this case, as it works directly from the content already loaded in your web browser.</p><p>Easy to use Dotepub plugins are available for all major <em>desktop</em> web browsers, but it’s not the same story for all <em>mobile</em> web browsers.</p><p>The path forward will depend on which browser you like to use. Here I have covered 2 of the most popular browsers:</p><h4>On Firefox [easiest]</h4><p>Firefox Mobile <em>does</em> offer an easy-to-use plugin. 🎉</p><p><strong>Install</strong></p><p>Download the DotEpub Firefox add on from the <a href="https://addons.mozilla.org/en-US/android/addon/dotepub/">Firefox Mobile add-on marketplace</a>.</p><p><strong>Configure</strong></p><ul><li>1. In Firefox open the dotEPUB Add on configuration page [Three Dots in the top right &gt; select ‘Add Ons’ &gt; select ‘dotEPUB’]</li><li>2. Configure ‘Immersive mode’ as desired (I prefer it on)</li><li>3. Configure ebook format as required (For Kindle, that’s MOBI)</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fvideoseries%3Flist%3DPL-jv5xSjs1Vk8h5jGeL2DSpkhcyBgcNcU%26start%3D0&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DrTZ1B4a_n38&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FrTZ1B4a_n38%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c249fe8f69d2c8afedee195093a4a844/href">https://medium.com/media/c249fe8f69d2c8afedee195093a4a844/href</a></iframe><p><strong>Now Use</strong></p><ul><li>1. Navigate to a webpage you would like to convert to an Ebook</li><li>2. Open the Firefox menu (the 3 dots in the top right)</li><li>3. Select ‘dotEPUB’</li></ul><p>Your Ebook will be generated and downloaded to your downloads folder, courtesy of dotepub!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fvideoseries%3Flist%3DPL-jv5xSjs1Vk8h5jGeL2DSpkhcyBgcNcU&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DXd2QrgamSOs&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FXd2QrgamSOs%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d884ea17daf582c652043e2528812592/href">https://medium.com/media/d884ea17daf582c652043e2528812592/href</a></iframe><h4>On Chrome (and other browsers) [slightly tougher]</h4><p><strong>Configure</strong></p><p>In the device and browser you will use;</p><ul><li>1. Navigate to <a href="https://dotepub.com/?show=manual&amp;lang=en#manual">https://dotepub.com/</a></li><li>2. Configure the ebook format as required (For Kindle, that’s MOBI)</li><li>3. Configure ‘Immersive mode’ as desired (I prefer it on)</li></ul><p>That’s it! (no save button or anything, don’t worry, you’re not crazy)</p><p><strong>Install</strong></p><p>The following steps all work for Google Chrome.</p><ul><li>1. Go to <a href="https://dotepub.com/?show=manual&amp;lang=en#manual">https://dotepub.com/</a></li><li>2. Copy the text from the box with the heading <em>‘Copy and paste this code int a new bookmark’</em></li></ul><p><em>Note: I recommend fetching this text directly from the above link since it is likely updated from time to time. Failing that, I have pasted the content from the time of writing below</em></p><pre>javascript:(function(){try{var%20d=document,w=window;if(!d.body||d.body.innerHTML==’’)throw(0);var%20s=d.createElement(‘link’),h=d.getElementsByTagName(‘head’)[0],i=d.createElement(‘div’),j=d.createElement(‘script’);s.rel=’stylesheet’;s.href=’//dotepub.com/s/dotEPUB-favlet.css’;s.type=’text/css’;s.media=’screen’;h.appendChild(s);i.setAttribute(‘id’,’dotepub’);i.innerHTML=’&lt;div%20id=%22status%22&gt;&lt;p&gt;Conversion%20in%20progress…&lt;/p&gt;&lt;/div&gt;’;d.body.appendChild(i);j.type=’text/javascript’;j.charset=’utf-8&#39;;j.src=’//dotepub.com/j/dotepub.js?v=1.2&amp;s=0&amp;t=epub&amp;g=en’;h.appendChild(j);}catch(e){w.alert(‘The%20page%20has%20no%20content%20or%20it%20is%20not%20fully%20loaded.%20Please,%20wait%20till%20the%20page%20is%20loaded.’);}})();</pre><ul><li>2. In your browser, create any new bookmark e.g. by bookmarking the current page<br><em>(Chrome: 3 dots in top right &gt; star icon)</em></li><li>3. Open the bookmark’s edit dialogue<br><em>(Chrome: 3 dots in top right &gt; Bookmarks &gt; Locate the created bookmark &gt; 3 dots on the right &gt; Edit)</em></li><li>4. Rename the bookmark something clear and short. E.g. MOBI</li><li>5. Copy the code from your clipboard into the URL box</li><li>6. Leave the bookmark editor.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fh6HrxqGMw6o%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dh6HrxqGMw6o&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fh6HrxqGMw6o%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e66684f0b1210e0baaa6ad717fdd5ed8/href">https://medium.com/media/e66684f0b1210e0baaa6ad717fdd5ed8/href</a></iframe><p><strong>Now Use</strong></p><ul><li>1. Navigate to a page you would like to convert to an Ebook</li><li>2. Click on the web address bar in the browser and delete the content</li><li>3. Start typing the name of your memorable bookmark to see it come up</li><li>4. Select the bookmark.</li></ul><p>Your Ebook will be generated and downloaded to your downloads folder, courtesy of dotepub!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FZ2fPYCAf5oQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DZ2fPYCAf5oQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FZ2fPYCAf5oQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/0db1842874cfd58139d2c7a9aff5893c/href">https://medium.com/media/0db1842874cfd58139d2c7a9aff5893c/href</a></iframe><p><em>Note: If you are not a Firefox user, but find the above too tricky, you might consider downloading Firefox and using it whenever you’re on the lookout for Ebook content</em></p><h3>1-ii) Sending an Ebook to your Kindle via email</h3><p>Kindle Devices have email addresses, and it is possible to send reading material (in certain supported formats) to the device as an attachment via email. It is necessary to:</p><ul><li>add your email address as an authenticated sender of content to your device. → <a href="https://www.amazon.com/gp/sendtokindle/email">Instructions</a> to achieve this procedure are provided by <a href="https://www.amazon.com/gp/sendtokindle/email">Amazon</a>.</li><li>identify the email address of your device</li><li>send an email from your email account with an Ebook attached.</li></ul><p>After sending an attachment, the next time you turn your Kindle device on with an internet connection, the content will automatically download to the device.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F4Qb62j1LcZ0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D4Qb62j1LcZ0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F4Qb62j1LcZ0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8157b1e8ee244b8cbe48e90f5fa4832a/href">https://medium.com/media/8157b1e8ee244b8cbe48e90f5fa4832a/href</a></iframe><h3>Summary after Part 1</h3><p>You might have noticed that with the Part 1-i) and Part 1-ii) it is already possible to achieve the majority of what you need… After finding an article you’d like to read, use DotEpub to generate an Ebook download, then sending an email to your Kindle device with the file attached. Voilà!</p><p>But do we want to do that manual emailing step in between? If you’re reading several articles per day, wouldn’t it be cool if we could do this step automatically?</p><p>Solving for this is the goal of <a href="https://medium.com/@gwright_60924/pay-wall-content-from-phone-to-kindle-runbook-part-2-producthack-759ccb5ca773">Pay-wall content from Phone to Kindle: Runbook Part 2 — #ProductHack</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b3553b93134" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pay-wall content from Phone to Kindle: Runbook Part 2 — #ProductHack]]></title>
            <link>https://medium.com/@gwright_60924/pay-wall-content-from-phone-to-kindle-runbook-part-2-producthack-759ccb5ca773?source=rss-b7638da5e163------2</link>
            <guid isPermaLink="false">https://medium.com/p/759ccb5ca773</guid>
            <category><![CDATA[product]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[tasker]]></category>
            <category><![CDATA[hacks]]></category>
            <category><![CDATA[kindle]]></category>
            <dc:creator><![CDATA[Graham Wright]]></dc:creator>
            <pubDate>Mon, 08 Jun 2020 21:10:08 GMT</pubDate>
            <atom:updated>2020-06-28T14:53:22.712Z</atom:updated>
            <content:encoded><![CDATA[<h3>Pay-wall content from Phone to Kindle: Runbook Part 2 — #ProductHack</h3><p>In <a href="https://medium.com/@gwright_60924/how-i-send-pay-wall-articles-from-my-phone-to-kindle-in-one-click-producthack-5ebb70932b1b">How I send pay-wall articles from my Phone to Kindle in one click! — #ProductHack</a> we outlined the motivation and the high-level solution for this runbook, and in <a href="https://medium.com/@gwright_60924/pay-wall-content-from-phone-to-kindle-runbook-part-1-producthack-6b3553b93134">Pay-wall content from Phone to Kindle: Runbook Part 1 — #ProductHack</a> we detailed how to generate and how to send an ebook for your Kindle.</p><p>This article focuses on the automatic identification and transfer of a downloaded Ebook to your Kindle.</p><ul><li><em>Complexity</em>: Medium</li><li><em>Setup Time</em>: ~ 60 minutes</li></ul><p><em>Or if you’re already a Tasker whizz (or have already followed </em><a href="https://medium.com/@gwright_60924/getting-started-with-tasker-producthack-97520d2a73a3"><em>Getting started with Tasker</em></a><em>), you’ll need just ~30 minutes.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/0*OGpJvsnA9VcpNQFE.jpg" /></figure><h3>Table of Contents</h3><ul><li><a href="#eea6"><strong>Getting Setup</strong></a>: <a href="#6f0a">Tested on</a> | <a href="#4100">Installations</a> | <a href="#03a5">Script download &amp; import</a></li><li><a href="#cc27"><strong>Using the Project</strong></a>: | <a href="#1830">Personalising the Script</a> | <a href="#e3a6">Running the Script</a></li><li><a href="#f954"><strong>Final Note</strong></a>: | <a href="#5094">More</a></li></ul><h3>Getting Started</h3><h4><strong>Tested on</strong></h4><p>The setup I have tested with is:</p><ul><li>Xiaomi Mi 9T Pro</li><li>Android 10</li><li>Gmail Email account</li><li>Chrome and Firefox Web Browser</li></ul><p>There’s no reason why other combinations wouldn’t work either.</p><h4><strong>Installations</strong></h4><p>You’ll need to install and configure the following Android Apps</p><ul><li>Tasker</li><li>AutoApps: AutoTools</li><li>AutoApps: AutoNotification</li><li>MailTask</li></ul><p><em>WARNING: The proper installation and configuration of these apps is not like most other apps. </em><strong><em>Please make sure to see my </em></strong><a href="https://medium.com/@gwright_60924/getting-started-with-tasker-producthack-97520d2a73a3"><strong><em>introductory guide</em></strong></a><strong><em> for how to do this.</em></strong></p><h4><strong>Script download and import</strong></h4><p>The project is made freely available for download on a site called Taskernet, used by Tasker writers to freely share their projects:</p><ol><li>On your device on which Tasker is installed, open the <a href="https://taskernet.com/shares/?user=AS35m8lPKOZ8aobolC3v3rIvz8ukQQzEEEwlWvqzHcDiVvfvhvVgmg2uNFzAyQWkICc%3D&amp;id=Project%3AForward+Download+To+Ebook+Reader">Share Link for the ‘Forward Downloaded Ebook to Reader’ Project </a>— you will be greeted with the Task Data “Import Screen”.</li><li>To continue, press the green “Import” button — This will open the Tasker app and provide you with the Import Confirmation dialogue.</li><li>Proceed with the Import process.</li><li>Click “OK” and the Profile/Task/Project will be imported into Tasker —</li><li>Accept the offer to enable the Profiles.</li></ol><p><em>nb. Before attempting to run the Tasker project, follow the steps in the ‘Personalising the Script’ section below</em></p><p><em>nb. Further details about the Taskernet import process </em><a href="https://tasker.joaoapps.com/userguide/en/sharecreation.html"><em>here</em></a><em> or </em><a href="https://tasker.joaoapps.com/taskernet.html"><em>here</em></a><em>.</em></p><h3>Using the Project</h3><h4>Personalising the Script</h4><p>The script relies on configurable values, some of which it is required for you to specify e.g. the email address of your Kindle device.</p><p>All the variables used in the script are listed in the Project’s Task screen under the Task FDER Initialize Variables.</p><p>This section describes how to amend them.</p><ul><li>Within the relevant Tasker project (bottom menu bar), navigate to the ‘Task’ tab (top menu bar), locate and open the FDER Initialize Variables Task</li><li>Locate and open the ‘Variable Set:’ task for the variable you are interested in.</li><li>In the ‘To’ section, replace the present value with the value you would like to set.</li><li>Press the 🔙 back button (top left) to exit the ‘Variable Set:’ step.</li><li>Press the ▶️ play button (bottom left) to process the changes.</li></ul><p><em>REQUIRE PERSONALISATION</em></p><p>%FDER_To_Email The email address of your Ebook reader. See <a href="https://medium.com/@gwright_60924/pay-wall-content-from-phone-to-kindle-runbook-part-1-producthack-6b3553b93134">Runbook Part 1</a></p><p>%FDER_From_Email The address of the email account from which you wish to send content (i.e. your email address)</p><p><em>MAY REQUIRE PERSONALISATION</em></p><p>%FDER_Download_Folder_Default The path to your download folder. I suspect this is always simply ‘Download’ but possibly depends on your device.</p><p>%FDER_Attachment_Prefix A prefix required by the Mail Task plugin to locate files for inclusion in emails as attachments. This may depend on your device. Hopefully, the default value works without issue, if not, I have prepared the following guide and video.</p><ul><li>Go to the Create a new MailTask Send Email action step and open its configuration.</li><li>In the attachment section, open the file browser</li><li>Make sure that in the left-hand menu your phone’s storage itself is selected, and not any of the shortcuts above it</li><li>Navigate to your download folder</li><li>Select any file from your download folder</li><li>In the resulting text, select and copy the text from the beginning up until (and stopping before) the %3A character.</li><li>Use the steps in ‘Setting a Variable’ for %FDER_Attachment_Prefix to set this value.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FbTy0yj3UOuI%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DbTy0yj3UOuI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FbTy0yj3UOuI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/09b6be79490fa61e1dd8717f5bd4464d/href">https://medium.com/media/09b6be79490fa61e1dd8717f5bd4464d/href</a></iframe><p><em>OPTIONAL PERSONALISATION</em></p><p>%FDER_Archive_Sub_Dir If specified, processed files will be moved to a subfolder of the name given after they are sent. The value given should be relative to the specified default or override download directory (i.e. a subfolder of). If not specified, no archiving of downloaded files will happen; they remain in the Downloads folder.</p><p>%FDER_INFORM If set to true, notifications will be shown on screen when an Ebook file download is detected, when it has been sent via email.</p><p><em>ADVANCED</em></p><p>%FDER_File_Match_Regex The file name pattern (in Regex format) for matching criteria to select which downloads should be forwarded to the Ebook Reader. The default is .*\.[Mm][Oo][Bb][Ii]$ to match <em>.mobi</em> files. .*\.[Ee][Pp][Uu][Bb]$ would match <em>.epub </em>files</p><p>%FDER_Firefox_Download_Notification_Title Detecting download notifications for Firefox proved flakey. I had to use the <em>title</em> of the Download notification for reliable results, which is language-dependent. The profile will match notifications from Firefox whose title contains the value specified here. This can be changed if your Firefox download notifications (e.g. ‘Download complete’) are in a different language. Default value: ‘Download’</p><p>%FDER_LOG If set to true, the variable %FDER_LOG_Last_Attempt will be set to the last attachment path used on each execution. Used to assist advanced users when debugging things which aren’t working.</p><h4>Running the Script</h4><p>With everything configured correctly, the following describes the outcome you should be able to observe.</p><p><strong>When</strong></p><ul><li>an Ebook is downloaded from your web browser to your download folder</li></ul><p><strong>Then</strong></p><ul><li>an Email is sent to your Kindle email address with your Ebook attached</li></ul><h3>Final Note</h3><p>I hope this project helps you maximise your reading experience, or better still inspires you to tackle your phone usability project! Enjoy!</p><h4>More</h4><p>Check out another of my product hacks: <a href="https://medium.com/@gwright_60924/how-i-extended-the-battery-life-of-my-bluetooth-sleep-headphones-by-1000-producthack-e1a22d5770f2">How I extended the battery life of my Bluetooth sleep headphones by 1000%! — #ProductHack</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=759ccb5ca773" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Cloud, Anything-as-a-Service (XaaS) and Infrastructure as Code (IaC)]]></title>
            <link>https://medium.com/@gwright_60924/the-cloud-anything-as-a-service-xaas-and-infrastructure-as-code-iac-9870edc18e90?source=rss-b7638da5e163------2</link>
            <guid isPermaLink="false">https://medium.com/p/9870edc18e90</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[iaas]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <category><![CDATA[saas]]></category>
            <dc:creator><![CDATA[Graham Wright]]></dc:creator>
            <pubDate>Fri, 13 Jul 2018 12:03:28 GMT</pubDate>
            <atom:updated>2018-07-13T12:03:28.669Z</atom:updated>
            <content:encoded><![CDATA[<p><em>[Article 6 of 6 in series </em><a href="https://medium.com/@gwright_60924/software-delivery-for-beginners-series-intro-751b90fbe078"><em>Software Delivery, DevOps and CICD for the uninitiated</em></a><em>]</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*F2AZBtiext0RSfIl.jpg" /><figcaption>Credit: <a href="https://www.agileit.com/news/cloud-computing-challenges/">Cloud computing challenges</a></figcaption></figure><p>In this article, we will cover:</p><ul><li>the various types of cloud service (Software, Platform, Infrastructure)</li><li>why their use can accelerate product delivery by shedding extraneous burdens.</li><li>Automating cloud based Infrastructure with Infrastructure-as-Code to offer speed and provide environmental consistency.</li></ul><h3>Introduction</h3><p>Delivering and providing software requires all sorts of technological components. So far in these series we have discussed many of the CICD tools needed <em>(Source Code Repository, Binary Repository, Automated Test Execution Engines, Code Quality Inspection, Configuration Manager)</em>, but there’s also the components that make up your application itself <em>(e.g. servers for Database, Web, Application, Authentication, Notification, etc.)</em> as well as for protecting it <em>(e.g. Firewall)</em>, monitoring it <em>(e.g. Alerts, SLA Dashboard)</em> and planning/managing it <em>(e.g. Bug tracking, Customer Service) </em>etc.</p><p>All this technology requires:</p><ul><li>physical hardware; infrastructure such as servers, networks and storage.</li><li>human resource; high skills and lots of time</li></ul><p>Sourcing and managing both of these yourself gives great control, but can require high levels of upfront, and ongoing investment, as well as being slow; both during initial setup, and subsequently when wanting to react in the face of changing circumstances. What happens when you need to scale up operations in response to surges in demand, support a new geography, support a new target environment because of a new operating system release, or create new test environments to facilitate specific testing e.g. performance or resilience?</p><p>Thankfully, there’s an alternative.</p><h3>Cloud Services</h3><p>The term ‘the cloud’ is often misunderstood as being a synonym for the internet itself. More precisely, ‘the cloud’ refers to the provision of <em>services</em> <em>over the internet</em>, as opposed to services which are provided locally or on-site within an enterprise. Recurring features of this type of model is that the consumer:</p><ul><li>needn’t worry about the physical hardware supporting that service</li><li>needn’t worry about setup or maintenance of that service</li><li>can get going at the drop of a hat</li><li>can scale up or down quickly or even automatically based on peaks/troughs in demand</li><li>can benefit from near constant availability</li><li>can avoid network latency thanks to multi-region support</li></ul><p>The catch, is that the consumer pays for how much they use the service (measured in terms relevant to that service e.g. per database operation, per user, per api call etc.). At first glance such prices can seem expensive, but when compared to the costs of recruiting, training and managing skilled employees, to investing in hardware that needs and to the business drawbacks in terms of speed, the proposition becomes more interesting.</p><p>Cloud services can be particularly compelling to startups who might not have the bank balance for high sunk costs, and might not yet have high volumes. Many cloud service providers also offer a free tier for those just getting started, which can be compelling for hobbyists. The main benefits, speed and simplicity, should be a priority for hobbyists, startups and large scale enterprises alike, and as such we should look for opportunities to make use of these kinds of services for our software project or organisation. It is possible to compose major parts of your overall technology needs from Cloud Service components— so what’s on offer?</p><p>‘XaaS’ is a shorthand notation for ‘Anything-as-a-Service’; referring to a model whereby any kind of service is provided over the internet. Conceptually, there are three main groups to consider, providing increasing levels of abstraction from the underlying complexities:</p><ul><li><em>Infrastructure as a Service (IaaS)</em> — virtualized computing resources and infrastructure components managed over a web interface</li><li><em>Platform as a Service (PaaS) </em>— a set of tools and hardware aimed at supporting software development and hosting managed and used over a web interface</li><li><em>Software as a Service (SaaS) </em>— ready-to-use software components used over a web interface</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Lw6zCa6-SrcpExjLivIeg.jpeg" /><figcaption>Credit: <a href="https://www.bmc.com/blogs/saas-vs-paas-vs-iaas-whats-the-difference-and-how-to-choose/">SaaS vs PaaS vs IaaS — what’s the difference and how to choose</a></figcaption></figure><h3>Examples</h3><p>In the remainder of this article I will list various examples of cloud services, as a sort of shopping list: the more of our needs that we can push to the cloud, the lower our setup and maintenance burden!</p><h4>Source Code Repository</h4><p>Your source code is hosted in the cloud, and retrieved or changed via a git client over the internet. The provider gives a web interface to view and manage projects, permissions and changes.</p><p><strong>Examples: </strong>GitHub, GitLab, BitBucket</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*QFzAWmok6wzxQ6087aP3iQ.png" /></figure><h4>Entire CICD Pipeline</h4><p>The CICD process flow we established in <a href="https://medium.com/@gwright_60924/continuous-integration-ci-e81032bb8502"><em>Continuous Integration (CI)</em></a>, <a href="https://medium.com/@gwright_60924/continuous-delivery-cd-2200a5ab945b"><em>Continuous Delivery (CD)</em></a> and <a href="https://medium.com/@gwright_60924/containers-enhancing-cicd-and-operations-321bb2049148"><em>Containers: Enhancing CICD and Operations</em></a><em> </em>empowers organisations to deliver high quality changes to their application quickly. But since it is constructed from various tools, integrating them to work together is not necessarily straightforward.</p><p>By contrast, many cloud service providers offer significant parts of an equivalent CICD pipeline, if not the whole thing, all-under-one-roof. Their unified solutions avoid much complex setup.</p><p><strong>Examples:</strong> Atlassian Bitbucket+Bamboo, AWS CodeCommit+Code Deploy+CodePipeline+EC2 Container Service, GitLab CI</p><h4>Error Tracking</h4><p>By embedding a library into your application, errors are reported to a centralised server, where they can be inspected, aggregated, and manged over a web interface. Information can be reported by and to the application’s users, to help assist investigations and keep customers happy.</p><p><strong>Example:</strong> Sentry</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*TOzGSQ-OJ80Th9_hx6EaXA.png" /></figure><h4>Database-as-a-Service</h4><p>Provides users with access to a database without the need for setting up physical hardware, installing software and configuring for performance, reducing the burden on Database Administrators (DBAs).</p><p><strong>Examples</strong>:</p><ul><li>(Relational): AWS RDS, MS Azure SQL Database</li><li>(No-SQL): AWS DynamoDB, Azure Document DB</li></ul><h4>QA as a Service</h4><p>Rainforest aims to provide ‘Quality Assurance as a Service’. Unlike oothe examples on this page, this service includes humans.</p><p>Clients of rainforest place their application in a Rainforest virtual environment, and express, in natural langauge, the tests they wish to be carried out. Rainforest agents log in and carry out the required tests. The clients can see the results of the test in real time, and agents can provide screenshots. Rainforest manage the resourcing for the testing.</p><p>This service allows organisations to undertake high volumes of testing in short periods of time, facilitating CICD and business agility.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*Q5IsqMc5G7wIKTE_BXvzvA.png" /></figure><h4><strong>Project management</strong></h4><p><strong>Examples: </strong>JIRA Software, Trello</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*LGC6pTEIY1qi2LOv_2MlfQ.png" /></figure><h4>Messaging</h4><p><strong>Examples: </strong>Slack, Skype</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/221/1*anLEDAJ_NCxiNHc0fjeEQg.png" /></figure><h4>Platform-as-a-Service (PaaS)</h4><p>For our purposes, we will assume that we will support our application by managing the key parts of its underlying infrastructure ourselves. As such I won’t attempt to describe the subtleties of Platform as a Service, but intrigued readers can look to the following examples:</p><p><strong>Examples:</strong> Google App Engine, AWS Elastic Beanstalk, Microsoft Azure, Heroku, Cloud Foundry and Engine Yard</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/175/1*NDAl7K1-RFjXLg-_xTUQcw.png" /></figure><h4>Infrastructure-as-a-Service (IaaS)</h4><p>So far on this journey to uncover and define the tools and processes we’ll employ to deliver our software application, we’ve described the need for various environments (e.g. Develop, Build, QA, PreProd and Prod) in which to run our application, the need for redundant copies to facilitate disaster recovery and zero-downtime releases as well as a host of CICD tools to help us create it. Assuming we choose not to go with a Platform-as-a-Service (PaaS) solution, where it is all supplied to and managed for us, we have ourselves quite an infrastructure problem.</p><p>Running any infrastructure such as servers, networks and storage ultimately requires physical hardware somewhere. Traditionally an organisation needs to purchase or rent the hardware, hosted in a data centre. These well trodden paths have either high setup or high ongoing costs (or both) and neither are supportive of business agility. Instead, we turn to the cloud, where all the benefits of cloud servicing discussed previously, be it speed, upfront cost, availability or simplicity, apply just as well.</p><p><strong>Examples: </strong>Amazon Web Services (AWS), Google Cloud, Microsoft Azure Cloud Services</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*Yu1yFvz7uut8ChT8mprCeQ.png" /></figure><h3>Infrastructure as Code (IaC)</h3><p>Even with the extra help the IaaS provider tools offer, managing infrastructure by hand would be to <em>treat the infrastructure like pets: </em>each has a special name (‘mr-jenkins’), is lovingly hand-raised, trained and cared for so that when it gets sick, it is individually nursed back to health. With all the cats (infrastructure components) we have, we’ll need a lot of cat ladies (a.k.a System Administrators!)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/188/0*B918oUD1YIP7DDY2.png" /></figure><p>What if instead we were to treat our infrastructure components like <em>livestock</em>? Livestock are identical, have homogeneous names (‘jenkins-34’, ‘jenkins-35’,…) and when one gets sick, we… get a new one (meet ‘jenkins-36’!). All we need is an astute farmer…</p><h4>J. Infrastructure Provisioner</h4><p><strong>What does it do?: </strong><em>Infrastructure as Code</em> (IaC) is the practice of describing infrastructure requirements in imperative code form, which can then be interpreted by specific tools to automatically create, or update the desired infrastructure.</p><blockquote>NB. If IaC sounds familiar, it might be because the Configuration Management tool we adopted to deploy application builds to our environments as part of our <a href="https://medium.com/@gwright_60924/continuous-delivery-cd-2200a5ab945b">Continuous Delivery (CD)</a> process is a prime example of Infrastructure as Code in action. In fact, we can make use of Configuration Management scripts to configure <em>all </em>kinds of servers that make up all the environments we need, not just those which directly run our applications. But Configuration Management scripts only manage servers which already <em>exist</em>…</blockquote><p>Infrastructure Priovisioners interpret coded requirements to put in place servers from base images, and ensures the presence of storage, networking, DNS entries etc. This:</p><ul><li>Reduces repeat setups to seconds not hours or days, meaning individual developers or teams can at the drop of a hat create a new test environment instantly, conduct their explorations or testing, and tear it down then they’re done.</li><li>Provides consistency so that the environments all behave the same, reducing time lost investigating divergent behaviour due to invisible environmental differences</li><li>Gives documentation for free (the code itself serves also to document the current state of the server) and auditability of infrastructure changes.</li></ul><p><strong>Examples: </strong>Terraform, AWS CloudFormation, Azure Resource Manager, Google Cloud Deployment Manager</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/226/1*B_mWlAQAU8rEtCD4GR6Ijw.png" /></figure><h3>Summary</h3><p>In this article we explored:</p><ul><li>The meaning and types of cloud service model (Software, Platform and Infrastructure as-a-Service)</li><li>How pushing service needs to the cloud can reduce an organisation’s setup and maintenance effort and costs, to allow a businesses to focus on product development</li><li>Other benefits of cloud services, including scale, speed and availability</li><li>Examples of some cloud services</li><li>How Infrastructure as Code (IaC) can supplement Infrastructure provided as-a-Service (IaaS) to offer speed and consistency.</li></ul><h4>Other Links</h4><ul><li><a href="https://www.bmc.com/blogs/saas-vs-paas-vs-iaas-whats-the-difference-and-how-to-choose/">SaaS vs PaaS vs IaaS: What’s The Difference and How To Choose</a></li><li><a href="https://www.expeditedssl.com/aws-in-plain-english">AWS in plain English</a> / <a href="https://www.expeditedssl.com/azure-in-plain-english">Microsoft Azure in plain English</a></li><li><a href="https://siliconangle.com/blog/2015/09/25/rainforest-qa-changes-devops-testing-by-crowdsourcing-humans/">Rainforest QA changes DevOps testing by crowdsourcing humans</a></li><li><a href="https://www.stratoscale.com/blog/dbaas/dbaas-end-dba/">Is DBaaS the End of the DBA?</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9870edc18e90" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Containers: Enhancing CICD and Operations]]></title>
            <link>https://medium.com/@gwright_60924/containers-enhancing-cicd-and-operations-321bb2049148?source=rss-b7638da5e163------2</link>
            <guid isPermaLink="false">https://medium.com/p/321bb2049148</guid>
            <category><![CDATA[cicd]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[orchestration]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Graham Wright]]></dc:creator>
            <pubDate>Fri, 13 Jul 2018 12:00:22 GMT</pubDate>
            <atom:updated>2018-07-13T12:03:59.692Z</atom:updated>
            <content:encoded><![CDATA[<p><em>[Article 5 of 6 in series </em><a href="https://medium.com/@gwright_60924/software-delivery-for-beginners-series-intro-751b90fbe078"><em>Software Delivery, DevOps and CICD for the uninitiated</em></a><em>]</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*6szq2vhjVKNgAgr-yTI1kA.jpeg" /><figcaption>Credit: <a href="http://www.monitis.com/blog/top-5-benefits-of-containerization/">Top 5 benefits of containerisation</a></figcaption></figure><p>In this article, we will cover:</p><ul><li>Containerisation and Container Orchestration Technology</li><li>CICD of Containerised applications</li><li>The key benefits of developing Containerised applications</li></ul><h3>Introduction</h3><p>In the previous 2 articles, we described a ‘Continuous Integration’ process which results in a new build version of the software application, and a ‘Continuous Delivery’ process which deploys and runs it.</p><p>Despite the efforts of the application developer, its behaviour after deployment depends on that environment.</p><p>The Configuration management scripts controlling the target environment are often written and maintained by a different person or team (the system administrators) to the application developers, which can lead to gaps.</p><p>Whether because of the above or for other reasons, the local machines on which developers write the application code is often inconsistent with the deployment environment.</p><blockquote>“That’s odd, cos’ it worked on my machine…” — said every developer ever.</blockquote><p>Is there something we can do to avoid this? What if the developer also controlled the environment?</p><h3>(From Virtualisation to) Containerisation</h3><p>Adoption of Virtual Machines (VMs) 10–15 years ago, brought organisations new levels of agility and scalability. It allowed multiple independent (virtual) servers to be cheaply created and destroyed as needed on a single bare-metal (‘real’) server, each running their own operating system and providing isolated environments in which to run applications.</p><p>A big problem with VMs though is <em>bloat</em>. Each VM:</p><ul><li>consists of not just an application but a whole operating system, so they can be dozens of gigabytes large</li><li>consumes a significant and <em>fixed </em>portion of its host’s resources (e.g. memory, processing power) requiring powerful bare-metal, even if all these resources aren’t fully utilised.</li></ul><p>However, there is an alternative technology in the ascendancy right now which provides the same benefits described above as VMs without these drawbacks. Introducing our newest team member:</p><h4>I. Containerisation Technology</h4><p><strong>What does it do?: </strong>‘Containerisation’ technology allows us to designate multiple <em>slices </em>of a single ‘container-host’ operating system as independent ‘containers’, with each functioning like isolated servers in their own right. Because there is just a single operating system (rather than one per VM) we are significantly less wasteful in terms of storage, memory and processing resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BEiGsYXG6LdGDPLv_ovGwg.png" /><figcaption>The difference between Virtualisation (left) and Containerisation (right) technology. Credit: <a href="http://www.serverspace.co.uk/blog/containerisation-vs-virtualisation-whats-the-difference">http://www.serverspace.co.uk</a>/</figcaption></figure><p><strong>Examples: </strong>Docker</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*biC5mecK2gXEt073RHe2EA.png" /></figure><p>Docker (a particular containerisation technology) provides a language (a ‘Dockerfile’) for defining what a container should do and how. If a Dockerfile is written to run a particular software application, then it will also include all the environment variables, file permissions, libraries and port forwarding rules etc. that it needs. However the container’s responsibility is blinkered — it is concerned only with itself and not wider System Administration needs — therefore it can be written by the developers of the software application themselves. The resulting Dockerfile is ‘built’ to create a ‘container image’ which is <em>ready-to-run </em>on a container host (i.e. a machine running Docker). The same container will be run on both the developer’s machines and in all test and production environments.</p><p>We can convert all our developer stations, test and production environments to be container hosts by installing Docker, and we can ask our developers to extend the scope of their work to develop not only the application, but a container in which it will run. The Continuous Integration process now culminates in a built <em>container image</em> in our binary repository, and the Continuous Delivery process will deploy and run it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RYfx6SRHuXgaVCCvLjj7kQ.png" /></figure><h4>Why develop Containerised Applications?</h4><ol><li>Behavioural consistency</li></ol><p>In including much if not all of the environmental elements needed and pushing the responsibility for this into the same team that writes the application, the container is far more likely to behave identically between developer machine and production environment. (To resume the trout analogy from <a href="https://medium.com/@gwright_60924/software-delivery-101-environments-and-applications-8fff2c4e2524"><em>Software Delivery 101 (Environments and Applications)</em></a>, if the developer packages both the trout and the river together, then we always have a happy swimming fish!) Ultimately this saves time that might have been lost investigating and resolving environmental issues.</p><p>2. Simplified, consistent deployment process</p><p>Instead of each application having it’s own deployment process, no matter what the application, the deployment process becomes not much more complex than ‘run this container’.</p><p>Equally it is no longer necessary to waste time setting up new Virtual Machines when you want to add a new, independent application, or indeed decommissioning when you want to stop.</p><p>3. Resource utilisation</p><p>The same amount of hardware can safely support the running of more applications. Whereas multiple bulky Virtual Machines may have been required previously to run applications independently, one operating system can run multiple containers with entire isolation between them.</p><p>Containerisation is an excellent enabler for the best practice in software architecture of breaking down your overall application into individual components with their own specified function. This might be having the application in one container and its database in another, or a more rigorous micro-service architecture in which multiple loosely coupled independent services that communicate through defined APIs comprise the application. Such architectures make it easy to update, replace or scale components independently. As such an organisation fully utilising the benefits of containerisation is likely to have dozens, or even thousands of containers running simultaneously. Each of these require deployment, connection to the outside world, load balancing etc. To avoid doing this all by hand, we have a tool to help us.</p><h4>J. Container Orchestration tool</h4><p><strong>What does it do? </strong>Principally, Container orchestration tools are automatation and management tools for containerised applications on a group (cluster) of container host servers, enhancing:</p><ul><li>Deployment:<br>zero downtime deployments, automatic rollbacks, support for canary deployments in which a new release can be run in production in parallel with the previous version for testing; before being scaled up while the previous version is scaled down.</li><li>Scaling:<br>automatically add or remove containers based on CPU utilisation or other metrics, to cope with peaks and troughs in demand/l</li><li>Availability:<br>Health checks of containers, automatic replacement of containers if they crash and load balancing across healthy containers to cope with outages or peaks in traffic</li></ul><p>Container orchestration tools will also assist in the management of the containerised application, including:</p><ul><li>networking/DNS</li><li>storage system orchestration</li><li>resource monitoring, logging and alerting</li><li>configuration management and secure storage of sensitive values like passwords or ssh keys.</li></ul><p><strong>Example:</strong> Kubernetes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/1*r5pCgI6cmS0EpRQTsmbPYg.png" /></figure><h3>Summary</h3><p>In this article we:</p><ul><li>described containerisation and orchestration technology and supporting tools, giving OpenSource examples; and</li><li>described how we can release self-run software applications as container images</li><li>discussed the operational benefits this can bring, including consistent behavior, simplified processes, enhanced resource utilisation, scalability and availability</li></ul><h3>Next Article in the Series</h3><blockquote><a href="https://medium.com/@gwright_60924/the-cloud-anything-as-a-service-xaas-and-infrastructure-as-code-iac-9870edc18e90"><em>The Cloud, Anything-as-a-Service (XaaS) and Infrastructure as Code (IaC)</em></a></blockquote><h4>Other links:</h4><ul><li><a href="http://www.devopsschool.com/slides/docker/docker-web-development/index.html#/3">Docker web development</a></li><li><a href="https://blog.kumina.nl/2017/04/the-benefits-of-containers-and-container-technology/">Top 7 benefits of using containers</a></li><li><a href="https://blog.kumina.nl/2018/04/the-benefits-and-business-value-of-kubernetes/">The benefits and business value of Kubernetes</a></li><li><a href="http://www.monitis.com/blog/top-5-benefits-of-containerization/">Top 5 benefits of containerisation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=321bb2049148" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Continuous Delivery (CD)]]></title>
            <link>https://medium.com/@gwright_60924/continuous-delivery-cd-2200a5ab945b?source=rss-b7638da5e163------2</link>
            <guid isPermaLink="false">https://medium.com/p/2200a5ab945b</guid>
            <category><![CDATA[cicd]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[continuous-delivery]]></category>
            <dc:creator><![CDATA[Graham Wright]]></dc:creator>
            <pubDate>Fri, 13 Jul 2018 11:48:53 GMT</pubDate>
            <atom:updated>2018-07-13T12:01:06.318Z</atom:updated>
            <content:encoded><![CDATA[<p><em>[Article 4 of 6 in series </em><a href="https://medium.com/@gwright_60924/software-delivery-for-beginners-series-intro-751b90fbe078"><em>Software Delivery, DevOps and CICD for the uninitiated</em></a><em>]</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*poKRGr8RLgawhzV-uq0qjQ.png" /><figcaption>Continuous Delivery (yellow). Credit: <a href="https://www.zaizi.com/devops">Devops</a></figcaption></figure><p>In this article, we will cover:</p><ul><li>typical steps involved in software delivery</li><li>the need for multiple phases and delivery environments</li><li>a high level software architecture and process flow that achieves ‘Continuous Delivery’.</li><li>strategies for avoiding and recovering from disrupted service during releases</li></ul><p>For a reminder of what we mean by ‘Delivering’ software, including the distinction between ‘Customer-run’ and ‘Self-run’ applications, visit: <a href="https://medium.com/@gwright_60924/software-delivery-101-environments-and-applications-8fff2c4e2524"><em>Software Delivery 101 (Environments and Applications)</em></a><em>.</em></p><h3>How do we deliver?</h3><p>Customer run applications for which the target audience is not necessarily technical (e.g. a social media app) usually have a neatly packaged installation process (or ‘wizard’, think <em>‘Download, Open, Accept Terms, Accept Permissions, Install, Launch’).</em></p><p>Such users might be surprised to learn that for other applications which either have more technical audiences (e.g. a database server), or are self-run applications with an installation process that will never be exposed publicly, the procedure is very often far less polished. A typical installation process will likely involve:</p><ul><li>copying or unzipping files to certain directories</li><li>editing configuration text files</li><li>adding hostnames and ip addresses to firewall configurations</li><li>stopping and starting services</li><li>setting operating system environment variables</li><li>creating operating system or admin users</li><li>setting directory permissions</li><li>generating security keys (e.g. SSH, PGP)</li><li>installing libraries</li><li>… etc.</li></ul><blockquote>For example, I won’t be volunteering to install this application: <a href="https://groups.google.com/forum/#!msg/turtl/q3kAYnAcH0s/AHhKABu2BQAJ">https://groups.google.com/forum/#!msg/turtl/q3kAYnAcH0s/AHhKABu2BQAJ</a>)</blockquote><p>The result is that delivery requires users with a high degree of skill, and takes a long time. Although one upside is that users are given more control, there is a high degree of risk: one mis-followed step or one slight deviation in the host environment from the expectation is likely to result in failure. Add to that the need to repeat these steps across multiple environments every time we have a new version… we’re in for a nightmare.</p><blockquote>“Many releases were a “scary” experience because the release process wasn’t often practiced and there were many error-prone manual activities. Priority 1 incidents caused by manual-cofiguration mistakes weren’t uncommon. In addition, the release activities weren’t efficient. Just setting up the testing environment could take up to three weeks.”</blockquote><blockquote>Credit: <a href="https://www.infoq.com/articles/cd-benefits-challenges">Continuous Delivery: Huge Benefits, but Challenges Too</a></blockquote><p>Assuming we’re delivering a product that either <em>is </em>itself, or <em>comprises </em>a self-run application, we’re going to need a hero of a tool to help us…</p><h4>G. Configuration Manager</h4><p><strong>What does it do?: </strong>Allows the automation of operating system operations via runnable code.</p><p><em>Imperative </em>programming is when you say how to get what you want. I.e. ‘do x, then do y’). By contrast, <em>Declarative </em>programming is when you say what you want. I.e. the code asserts a desired final state (make this be x, then make this be y) and leaves how to get there up to the software. With Declarative code, the programmer doesn’t need to worry about the initial state, and can often use the same code in different types of operating systems (e.g. Windows vs Linux), making it hyper-flexible.</p><p>Configuration Management tools tend be Declarative, allowing programmers to write instructions in the following vein:</p><ul><li>ensure certain files are unzipped and present in particular directories</li><li>ensure text files contain certain content</li><li>ensure certain hostnames and ip addresses are present in firewall configurations</li><li>ensure certain services are running</li><li>ensure environment variables are set to particular values</li><li>ensure certain operating system users exist</li><li>ensure a directory’s permissions are set</li><li>ensure certain security keys are present</li><li>ensure libraries are installed</li></ul><p>Ensuring server configuration is always codified as a desired state and checking this code into a source code respository means that:</p><ul><li>you always have a description of a server’s (intended) present state and changes are controlled and auditable.</li><li>configuration scripts can be run over and again on different serves and always result in a predictable end result.</li></ul><p><strong>Examples: </strong>Puppet, Ansible, Chef</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/175/1*XhaVDRVZP94qZpsWv4ZkRg.png" /></figure><p>As a decent Configuration Manager will support integrations with the key Binary Repository Managers (e.g. Artifactory), they can be used to retrieve an application and its dependencies and deploy it to a target environment. Since the result is consistent every time it runs, we can help ensure that the deployed application behaves in the same way every time.</p><p>Our Automation Server (e.g. Jenkins) also supports inclusion of the running of a configuration script within a job. This job could be kicked off by manual instruction, but the most powerful use is to add a step to the job we defined in our Continuous Integration process so that new releases which pass our tests are automatically deployed to an environment of our choice. When Continuous Integration (CI) is combined with Continuous Delivery (CD) like this, the resulting process is nicknamed ‘CICD’.</p><h3>To where do we deliver?</h3><p>As part of the <a href="https://medium.com/@gwright_60924/continuous-integration-ci-e81032bb8502"><em>Continuous Integration (CI)</em></a> process we defined, our application has already successfully passed unit testing, integration testing and code quality checks, so we can be fairly confident about the quality of the application we’ve produced. Unfortunately ‘quite confident’ isn’t good enough; we need to be as close to certain as possible. The potential consequences if not could be dire (security breaches, data losses, … Armageddon):</p><blockquote><a href="http://mentalfloss.com/article/85782/9-major-computer-bugs-wreaked-havoc">9 Major Computer Bugs That Wreaked Havoc</a></blockquote><blockquote><a href="https://www.zdnet.com/article/ios-11-0-1-update-causes-havoc-for-some-iphone-and-ipad-users/">iOS 11.0.1 update causes havoc for some iPhone and iPad users</a></blockquote><p>We need to undertake further testing of our application in one or more test environments before we can consider delivering <em>to production.</em></p><p>To keep things simple, we will assume that we have a single type of target production environment, but we will adopt the two-phase test environment approach as described in <a href="https://medium.com/@gwright_60924/software-delivery-101-environments-and-applications-8fff2c4e2524"><em>Software Delivery 101 (Environments and Applications)</em></a>:</p><ol><li>QA (or ‘Test’), followed by;</li><li>Pre-Production (or ‘UAT’, ‘Staging’)</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LchlgAvCMSOkY6eXi-xfBA.png" /></figure><p>Importantly:</p><ul><li>To be meaningful, our test environments should be configured identically (or as closely as possible) to the target production environment. Using the same Configuration management script across the lot will help ensure this.</li><li>For applications with multiple non-identical target production environments (for example, customer-run applications, like mobile apps which should support multiple versions of the Android operating system) then there should be test environments for each target production environment.</li></ul><h3>What additional tests do we run, when and how?</h3><p>As a reminder of some of the takeaways from our previous article on <a href="https://medium.com/@gwright_60924/continuous-integration-ci-e81032bb8502"><em>Continuous Integration (CI)</em></a>:</p><ul><li><em>There are many different types of software testing, and they are not all mutually exclusive with one another (see diagram below)</em></li><li><em>The testing needed will depend on the software project</em></li><li><em>Unit and Integration testing should be conducted in the Integration environment as part of the Continuous Integration process</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*NwKa8oG79o2QlM1o.png" /><figcaption>Credit: <a href="http://www.althority.com/testing_types/">Testing Types</a></figcaption></figure><h4>Automated testing in QA and the next steps</h4><p>The natural progression to our existing tests is to undertake <em>System testing — </em>which looks at the system’s behaviour with respect to its business requirements and does so from an outsiders perspective, without caring about the inner workings of the underlying architecture or logic, making it a form of ‘black-box’ testing.</p><p>Nb.;</p><ul><li>Some systems should interact with multiple possible ‘clients’ e.g. web applications might support the various common web browsers (Firefox, Chrome, Microsoft Edge, …) and including different versions. Testing should be replicated across all such uses.</li><li>A similar but sometimes more appropriate form of testing to <em>System </em>is <em>End to End</em> <em>testing</em>, which focuses on the user (which could be a person or a machine) and their journey. As such the test’s perspective covers the various systems which work together to produce the end effect.</li></ul><p>We discussed previously that:</p><ul><li><em>Quick feedback loops from tests mean the value of changes can be realised sooner and allow businesses to respond more quickly to changing landscapes and opportunities</em></li><li><em>Tests that can be written as code can be run automatically using test execution engines to maximise feedback quality and speed</em></li></ul><p>So let’s do that!</p><h4>D. Automated Test Execution Engine(s) for System Tests and other forms of testing</h4><p><strong>What does it do?: </strong>Sets up and executes automated tests against a software application, assessing and reporting on their results against expected behaviour. Automated tests provide feedback to developers within minutes, to accelerate delivery cycles and realise returns on investment sooner.</p><p>In contrast to lower lever tests such as Unit and Integration testing conducted during <a href="https://medium.com/@gwright_60924/continuous-integration-ci-e81032bb8502"><em>Continuous Integration (CI)</em></a>, many later stage tests treat the application as a <em>black box </em>and depend less on the language the software was written in and more on whatever interface it exposes (e.g. a Graphical User Interface or a set of RESTful Web Services). The key driver is instead the <em>type </em>of test being run, meaning a combination of test tools might be required.</p><p><strong>Examples: </strong>Cucumber, Selinium, Apache JMeter</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/1*oQd4R3dH9L1R3tvpg_axJw.png" /></figure><p>Our System or End to End tests are run on our QA environment. If any automated tests expose an unexpected result, then a notification should inform the development team who should make it a high priority task to address the issue so that continuous <em>releasability </em>(a key goal of CICD) can be restored.</p><p>Barring a good reason not to (see ‘Release planning’ below), releases which pass our automated tests in QA should be automatically promoted to the Pre-Production environment. Versions which reach this stage can rightfully be considered <em>HOT-STUFF, </em>and all triggered by a single commit from a developer!</p><p>The Pre-Production environment, as the name suggests, is the last stop before Production, and therefore the last chance to perform any other types of pre-release testing that may be desired. As well as re-running the Integration and System tests to ensure behaviour consistency between environments. there may be tests which were not possible in prior steps due to intentional / understood environmental differences (e.g. access to expensive Production-like hardware for performance testing, or access to a third party system not available elsewhere) which should be tested. As always, this should be with as much automation as possible, though manual testing is by no means a thing of the past: some types of test are impossible to put into code, such as showcases to stakeholders or usability studies — others might just be very difficult to codify!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YT2MA26BDSkMEkuH.png" /><figcaption>Credit: <a href="https://continuousdelivery.com/foundations/test-automation/">Continuous Testing</a></figcaption></figure><p>As discussed in <a href="https://medium.com/@gwright_60924/an-introduction-to-devops-17ec373238f6"><em>An introduction to DevOps</em></a> a key part of CICD is putting the processes and infrastructure in place to ensure deployments minimise or eradicate downtime (e.g. by using a blue/green deployment process) release issues are identified quickly, and remedies to release issues can be rolled out just as speedily.</p><h4>Eliminating manual steps and the strive for CICD perfection</h4><p>Many organisations find themselves not quite able to relinquish control and continue to kick off deployments to production manually. The overall CICD pipeline in such a situation might look like the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/0*3a3KYmi9ISHPAeYW.png" /><figcaption>Credit: <a href="https://www.infoq.com/articles/cd-benefits-challenges">Continuous Delivery: Huge Benefits, but Challenges Too</a></figcaption></figure><p>Delivering applications into Production frequently, automatically safely is however the holy grail of CICD that relatively few manage to obtain. The automation of all steps, especially testing, is key to success:</p><blockquote>“Without a doubt, automated test are the most important part of any CI/CD pipeline. Let me repeat that since it’s so important: without proper automated tests that run fast, have good coverage, and no erroneous results, there can be no successful CI/CD pipeline. It’s that simple.”<br>Credit: <a href="https://blogs.oracle.com/ravello/continuous-integration-deployment-test-automation">Test automation and Continuous Integration &amp; Deployment (CI-CD)</a></blockquote><blockquote>“ While [manual testing] does serve a distinct purpose and will always be needed for specific types of testing, such as exploratory testing, it can hinder an iterative delivery process. Time is of the essence in a continuous environment and manual testing can be painfully sluggish. The slower the feedback loops, the longer it will take to make adjustments and release software. Automation accelerates the build and deploy cycle by checking code and running tests continuously and providing feedback within minutes. This is why as much of the process as possible should be automated”<br>Credit: <a href="https://smartbear.com/learn/automated-testing/the-continuous-development-pipeline/">The key to an effective CI/CD pipeline: Automated Testing</a></blockquote><h3>The benefits of Continuous Delivery</h3><p>We can now sit back in our chairs and marvel at all the benefits our continuous delivery processes can bring to our team:</p><ul><li><em>Accelerated time to market and better targeted products</em><br>Compared to release cycles that last months, in which features completed early on sit there dormant until release day, in CICD these features are released as soon as they are complete, delivering value instantly and receiving feedback, enabling the organisation to better tailor subsequent developments.</li><li><em>Improved quality, release reliability and customer satisfaction</em><br>Instead of the usual saga (dread, manual procedures, mystery priority 1 bugs and all nighters), releases are so common and so smooth they’re barely noticed. Everything is thoroughly tested, using consistent binaries and environments, and deployment is automated.</li><li><em>Improved productivity/efficiency</em><br>Because developers, testers and ops aren’t spending all their time setting up environments, deploying and finding, reporting and fixing bugs, they can all focus on delivering more value to the organisation.</li></ul><h3>Summary</h3><p>In this article we explored how we can assure the quality of and accelerate the delivery of our software releases:</p><ul><li>covering 2 types of tool, providing Open Source examples for each:<br><em>G. Configuration Management<br>D (reloaded!): Test Execution Engine(s) for System Tests</em></li><li>describing how how these tools can be added to our technical architecture and be strung together in a CICD process flow</li><li>discussing techniques for minimising downtime and recovering from issues quickly</li><li>highlighting invaluable rewards such as business agility and risk mitigation</li></ul><h3>Next Article in the Series</h3><blockquote><a href="https://medium.com/@gwright_60924/containers-enhancing-cicd-and-operations-321bb2049148"><em>Containers: Enhancing CICD and Operations</em></a></blockquote><h4>Other links:</h4><ul><li><a href="https://www.infoq.com/articles/cd-benefits-challenges">Continuous Delivery: Huge Benefits, but Challenges Too</a></li><li><a href="https://www.atlassian.com/continuous-delivery/business-value">Business value of continuous delivery</a></li><li><a href="http://www.althority.com/testing_types/">Testing Types</a></li><li><a href="https://blogs.oracle.com/ravello/continuous-integration-deployment-test-automation">Test automation and Continuous Integration &amp; Deployment (CI-CD)</a></li><li><a href="https://smartbear.com/learn/automated-testing/software-testing-methodologies/">Software Testing Methodologies</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2200a5ab945b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Continuous Integration (CI)]]></title>
            <link>https://medium.com/@gwright_60924/continuous-integration-ci-e81032bb8502?source=rss-b7638da5e163------2</link>
            <guid isPermaLink="false">https://medium.com/p/e81032bb8502</guid>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[cicd]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[architecture]]></category>
            <dc:creator><![CDATA[Graham Wright]]></dc:creator>
            <pubDate>Thu, 05 Jul 2018 21:52:33 GMT</pubDate>
            <atom:updated>2018-07-13T11:51:11.218Z</atom:updated>
            <content:encoded><![CDATA[<p><em>[Article 3 of 6 in series </em><a href="https://medium.com/@gwright_60924/software-delivery-for-beginners-series-intro-751b90fbe078"><em>Software Delivery, DevOps and CICD for the uninitiated</em></a><em>]</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*LpURoEXXglmcvDFgGDsiiQ.png" /><figcaption>Continuous Integration (yellow). Credit: <a href="https://www.zaizi.com/devops">Devops</a></figcaption></figure><p>In this article, we will cover:</p><ul><li>the key steps involved in creating quality software</li><li>the practices and <em>types </em>of tools that are used to accelerate these steps, focusing on their <em>roles </em>rather than specific brands <em>(think ‘Source Code Repository’ over ‘GitHub’, ‘Automation Server’ over ‘Jenkins’), </em>leaving me to select which tool suits me.</li><li>a high level software architecture and process flow that achieves ‘Continuous Integration’.</li></ul><h3>Introduction</h3><p>A key component of the DevOps movement has been the emergence of a software delivery paradigm by the name of ‘CICD’; standing for:</p><ul><li>Continuous Integration (CI)</li><li>Continuous Delivery (CD)</li></ul><p>Saving ‘CD’ for a following article, let’s look once more to <a href="https://aws.amazon.com/devops/what-is-devops/">Amazon</a> for their definition of Continuous Integration:</p><blockquote>Continuous integration is a software development practice where developers regularly merge their code changes into a central repository, after which automated builds and tests are run. The key goals of continuous integration are to find and address bugs quicker, improve software quality, and reduce the time it takes to validate and release new software updates.</blockquote><p>Ok, so it’s a start, but unfortunately we are again left wondering what this actually means in practice. Further internet searches were just as disappointing, throwing up only a combination of other vague descriptions or boasting, and very low-level instructions aimed at developers, ops and software architects on how to install and configure specific tools which were <em>apparently </em>relevant.</p><p>But none of these tackle the crux of the matter: what would a Continuous Integration process look like if I were to introduce it to my organisation or personal project?</p><h3>Continuous Integration</h3><p>Whether its a website, a mobile app, or a batch file processor, all software applications are built from many (perhaps millions of) lines of code strictly organised into functions and modules performing specific tasks and working together precisely to achieve the desired end result. One single awry character could cause the whole application to fail.</p><p>Every time a new feature needs to be added, or a reported bug fixed, the software’s underlying code needs to be changed and there is a risk of breaking the application. As such, when making changes software engineers take great care to always leave a version of the application that is known to be working, and do their development on an isolated copy (a ‘branch’) of the code, only merging them back in to the core (‘trunk’) version once they have proven their change to be successful on their own machine and it does not break anything that was previously working. The essence of ‘<em>Continuous Integration</em>’ (i.e. the ‘Integration’ part) refers to precisely this practice of merging changes to leave the product in a working state; but there’s a lot more to it then that!</p><p>The first practice of Continuous Integration is purely process-based; nothing to do with tools: branches should be as small as possible and merged back into the main code as frequently as possible. In this way it is easy to identify the causes of issues found and rollbacks are small.</p><p>Even in the scenario of a single small project on a single computer on a single site, managing branching and merging without assistance would be horrendous. Now add in multiple developers, multiple computers and sites, simultaneous changes etc. and its easy to see how quickly this becomes simply impossible. Introducing our first team member:</p><h4>A. Source Code Management Tool</h4><p><strong>What does it do?:</strong></p><ul><li>stores source code</li><li>allows developers access to copy the current version to their own computers (incl. permission management, remote access across different offices)</li><li>allows developers to create ‘branches’ of the code, where they can work on changes without affecting the core version</li><li>gives tools for colleagues to review a developers changes in a branch and to comment on or approve them</li><li>allows changes to be merged back in to the original code, including tools for identifying and resolving conflicts where two simultaneous changes have made differing change to the same code</li><li>tracks all changes made to the codebase</li></ul><p><strong>Examples:</strong> SVN, Git</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/359/1*mnHW5j_LIW7jtMFzH55tsg.png" /></figure><p>Nb. Git is arguably the leading SCM tool around, but its power is not unlocked without remote (typically web-based) Git repositories, e.g. GitHub, GitLab</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*QFzAWmok6wzxQ6087aP3iQ.png" /></figure><p>The changes developers ‘commit’ need to then get ‘built’. As described in <a href="https://medium.com/@gwright_60924/software-delivery-101-environments-and-applications-8fff2c4e2524"><em>Software Delivery 101 (Environments and Applications)</em></a>, this should take place on our Build server, which is common to all the developers in our project.</p><p>Building a software application from it’s source code could involve a user following a long list of manual steps (‘download X, put X in directory Y, run Z,… etc.). But since we’re interested in maintaining consistency and saving time, so perhaps we could do this automatically?</p><p>Introducing our next team member:</p><h4>B. Build Tool</h4><p><strong>What does it do?: </strong>Orchestrates the build process for your application, whether this involves compilation, pulling of dependent binary files, packaging etc.</p><p><strong>Examples:</strong> Gradle, Maven, Ant<br>The precise build tool for your application will depend heavily on the type of application you are building.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/190/1*MlF5-egwE4EkDvOFuINb8Q.png" /></figure><p>Whatever your software application is, it is highly likely to depend on other files which is not source code you are developing. For example, it could be:</p><ul><li>Third party software libraries (Software 101: don’t re-invent the wheel! if someone’s already written something doing what you need, re-use it!)</li><li>Other ‘binary files’ e.g. the image of your company logo for the loading screen of your mobile app.</li></ul><p>When the software is being built, it is necessary for the developer to make sure that the right version of the right file is named the right way and placed in the precise location, else the software will not run. Managing these dependencies can be a major headache for a development team, who want to focus on the code they are writing. How do we remove that headache? You guessed it! There’s a tool to help:</p><h4>C. Binary Repository Manager</h4><p><strong>What does it do?: </strong>Manages files (e.g. libraries, images, code builds, etc.) in a defined directory structure so that they are centrally available to build and deployment tools. The build tools can then be configured to look for dependencies in a consistent place.</p><p>Also serves as the host for built application versions: more on this later.</p><p><strong>Examples:</strong> J-Frog Artifactory, Nexus</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*CtvSdHO9j7SgLOSmW4nohA.png" /></figure><p>So now our developers are not only assisted in writing their code, but they can also build their application at the click of a button, including automatic management of their dependencies. But the journey doesn’t stop there: next they need to assure themselves that the software they have written and built both runs and does what it’s supposed to do. They need to <em>test </em>the software.</p><p>The types of test needed for each software project will vary from case to case. We will revisit testing in the next article (see foot of page), but for now we will focus our attentions on the following types of test, which are an essential part of any software project:</p><h4>Unit tests</h4><p>The smallest testable aspect of a software project’s code are the basic modules/code files out of which it is comprised. Unit tests ensure each of these are working as expected when in isolation of each other.</p><p>Unit tests run directly against individual units of code without the need for a wider environment. Any external resources to which the classes and functions normally require (e.g. a database, a task queue etc.) are instead “mocked” or “stubbed” with fake versions. As such:</p><ul><li>A failing test always indicates that the code in that unit is not doing what it should.</li><li>Succeeding test sets do little to confirm that the application as a whole performs as expected.</li></ul><p>Unit tests can be run with minimal setup, cheaply and quickly, providing almost instant feedback.</p><h4>Integration tests</h4><p>Make sure that components/modules of code that comprise an application work properly with one another. The next level up from unit tests.<br>Integration tests depend on an <em>environment </em>of interconnected software and services which should be as reflective as possible of the environment in which the application under development will eventually be deployed. For example, if an application uses a database to read and write data, the integration environment should have that same database with some sane test data available. As such:</p><ul><li>A failing integration test could either be down to code, or down to environmental issues.</li><li>Successful integration test sets gives confidence to the business that the overall application behaves as it should.</li></ul><p>Unlike unit tests, integration tests are more ‘expensive’. They may require complex setup in order to create the right environment, and can take many hours to run since the tests flow through the entire application.</p><blockquote>NB. There is a myriad of terms you might encounter describing different types or levels of software testing and it can be confusing telling the difference. The key is that any two testing terms are not necessarily mutually exclusive (e.g. whilst ‘Functional Testing’ and ‘Non-Functional Testing’ tackle entirely different types of test, ‘Smoke Testing’ may <em>include </em>both ‘Functional’ tests and ‘Non Functional’ tests.). The following diagram helps by excellently organising contrasting test types into groups (read their definitions <a href="http://www.althority.com/testing_types/">here</a>).</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*NwKa8oG79o2QlM1o.png" /><figcaption>Credit: <a href="http://www.althority.com/testing_types/">Testing Types</a></figcaption></figure><p>Any and all types of test can be conducted by hand, by diligently following a test script. The problem with manual testing is that it is resource heavy, painfully slow, and also prone to error or omission. This means we tie up skilled people for long periods of time and have slow (and inaccurate) feedback loops. A developer might wait days or weeks to learn that they need to make a tweak, meaning if the developer’s time is an investment, then the return on investment (the business value in making and realising the change) is delayed. We need to speed things up:</p><h4>D. Automated Test Execution Engine(s) for Unit and Integration Tests</h4><p><strong>What does it do?: </strong>Sets up and executes automated tests against a software application, assessing and reporting on their results against expected behaviour. Automated tests provide feedback to developers within minutes, to accelerate delivery cycles and realise returns on investment sooner.</p><p>In contrast to higher level testing types (see <a href="https://medium.com/@gwright_60924/continuous-delivery-cd-2200a5ab945b">Continuous Delivery</a>), Unit testing and Integration testing are very dependent on the language the application is written it, so there is usually one or more tools to choose from based on your programming language (some languages even have built in support for this type of testing).</p><p><strong>Examples:</strong> JUnit, PyUnit, Karma</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*xWNoj7QZ0DjpD8FXijJIuA.png" /></figure><p>Tests of any nature are established by defining test scenarios, providing test inputs and expected outcomes. It is important that the whole development team are involved creating and maintaining automated tests, not just specialist QA engineers.</p><p>In fact, the best-practice of <em>Test Driven Development (TDD) </em>puts the writing of unit tests as not only an integral part of the development process, but the first step, before any code changes are made. Applications built to be <em>testable</em> are more successful. Similarly, <em>Behaviour Driven Design (BDD) </em>advocates that requirements are expressed in terms of the tests that should be expected to pass afterwards, in the form ‘Given x is true, When y happens, Then z is the outcome’. This not only makes writing the automated tests easier afterwards, but also removes ambiguity from the requirements for developers.</p><h4>When should Unit and Integration tests be run?</h4><p>Because we can’t afford for developers to sit around and wait for an integration test set to complete with each change they make, we differentiate when these tests are run:</p><p>Unit tests should be run:</p><ul><li>by developers regularly during their development process</li><li>by developers immediately before a code commit</li><li>as part of the build process for every build, being upon, or soon after every commit.</li></ul><p>Integration tests should be run:</p><ul><li>by developers before a major commit involving many components or side effects</li><li>as part of a periodic ‘integration’ build e.g. every 24 hours.</li><li>as part of builds that will be released</li></ul><blockquote>Nb. It is not just the new tests or those which have been updated as part of a code change which are run — it is the entire set of tests. This is to ensure that no ‘regression’ (i.e. unintentional degradations to existing functionality) has been introduced. Developing automated tests is essential in any modern-day software project because it is the only realistic way to check and recheck your development. Some outsiders to the development process may not appreciate that writing and maintaining automated tests can take as must time and resource on an ongoing basis as actually developing the software, if not more!</blockquote><p>A key goal of Continuous Integration is to maintain constant releasability of the product. This means that test results should be taken seriously — investigation and resolution of any failures should be a top priority for the development team.</p><p>So with that, our developers are now able to make changes to the code easily, build their new version of the application, and have it automatically tested, giving them peace of mind that they have met the requirements and haven’t broken anything! We have one more trick up our sleeve: it’s the developer’s equivalent of that handy ‘Grammar checker’ you run the night before handing in your 200 page dissertation…</p><h4>E. Code Quality Manager</h4><p><strong>What does it do?: </strong>Assesses code for resource leaks, null pointer references, security vulnerabilities, adherence to organisational coding standards and test coverage.</p><p><strong>Examples: </strong>SonarQube</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/1*eYl2MWnZ9Uw7OvzM7v0LAA.png" /></figure><p>Nb. A common metric for software applications is ‘code-coverage’, meaning the percentage of lines of an application’s source code that are reached by at least one unit test. Code Quality Management tools can even be configured to fail builds that do not have sufficiently high code coverage!</p><p>At this point, our developer has a whole host of tools to help them consistently build high quality software. But wait, there’s even more they can squeeze out of the their existing tool set. Once the tools described are used to verify that a software build meets the quality expected, the build can be stored as a new version of the application within the Binary Repository Tool. It will reside there so that application testers, end users, or (next-article-spoiler-alert!) any deployment processes can obtain it…</p><p>So we’ve now met almost all the players in the team; all except one — the head honcho, without which our Continuous Integration dream falls apart. Introducing, <em>El Capitán…</em></p><h4>F. Automation Server</h4><p>(also known as a <em>Continuous Integration Server or Build Server</em>)</p><p><strong>What does it do?: </strong>Provides the framework to trigger and orchestrate the tools which build, test and inspect committed code, report on the results and store output.</p><p><strong>Examples: </strong>Jenkins, Hudson</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*aR8c3eZxujJIPdNqPudBEw.png" /></figure><p>Jobs in the Automation Server can be kicked off in the following ways:</p><ul><li>Notification received from an external system. E.g. Automation servers support integrations with Source Code repositories so that they can be notified of any changes to the code.</li><li>Scheduled (e.g. every 15 minutes, or daily)</li><li>Manual launch by a user</li></ul><p>The Automation Server’s home is the build environment.</p><p>If the Automation Server is the Conductor of the orchestra that is made up of all the other tools we have discussed, what does this Orchestra’s symphony sound like when we pull it all together?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lWkJ0zOSWAhpE141p7VY3w.png" /></figure><p>For the Main Build (indicated as A in the above diagram)</p><p>1i. A developer commits an application code change to the Source Code Management repository</p><p>1ii. The SCM tool is configured so that the commit results in a notification being sent to the Automation Server in the Build environment. The notification causes the Automation Server to:</p><p>2. Download (‘pull’) the complete Application from the Source Code Management tool into the Build environment, and:</p><p>3. ...kicks off the build of the application including…</p><p>4. … pulling all dependencies from the Binary Repository; and…</p><p>5. … runs all the Unit Tests against the application’s individual components; and…</p><p>6. …assesses the Code’s Quality against established quality gates: and…</p><p>7. If any of the steps 3 through 7 are unsuccessful or unsatisfactory, an notification is sent to a developer mailing group so that they can inspect and address the reason for the failure. Fixing failed tests should be more important than any other activity so as to ensure that the application is always left in a releasable state.<br>Assuming though that all steps are successful, the built application is uploaded (‘pushed’) to the binary repository as the latest ‘main build’ version (with an incremented version number) of the software application.</p><p>8. The Automation Server presents the precise results of the latest build, and the history of all recent builds in a reporting screen.</p><p>On a nightly basis, a scheduled QA build (indicated as B in the above diagram) executes following a similar process. Failures are again reported so that they can be fixed, but if everything runs successfully, the build is pushed to the binary repository as the latest ‘integration build’ which can be deployed to subsequent environments in a Continuous Delivery process.</p><h3>Summary</h3><p>In this article we explored how we can accelerate the creation of quality software by:</p><ul><li>covering 6 types of tool, providing Open Source examples for each:<br>A. Source Code Management Tool<br>B. Build Tool<br>C. Binary Repository Manager<br>D. Test Execution Engine(s) for Unit Testing and Integration Testing<br>E. Code Quality Manager<br>F. Automation Server</li><li>describing in a high level software architecture how these tools can be strung together via to create a Continuous Integration process flow</li></ul><h3>Next Article in the Series</h3><blockquote><a href="https://medium.com/@gwright_60924/continuous-delivery-cd-2200a5ab945b"><em>Continuous Delivery (CD)</em></a></blockquote><h4>Other Links</h4><ul><li><a href="http://www.althority.com/testing_types/">Testing Types</a></li><li><a href="https://zeroturnaround.com/rebellabs/the-correct-way-to-use-integration-tests-in-your-build-process/">The correct way to use integration tests in your build process</a></li><li><a href="https://jenkins.io/blog/2017/04/18/continuousdelivery-devops-sonarqube/">Delivery Pipelines, with Jenkins 2, SonarQube, and Artifactory</a></li><li><a href="https://blogs.oracle.com/ravello/continuous-integration-deployment-test-automation">Test automation and Continuous Integration &amp; Deployment (CI-CD)</a></li><li><a href="https://dltj.org/article/software-development-practice/">Traditional Development/Integration/Staging/Production Practice for Software Development</a></li><li><a href="http://rogerdudler.github.io/git-guide/">Using the Git client</a></li><li><a href="https://about.gitlab.com/2014/09/29/gitlab-flow/">Understand Git branching strategies</a></li><li><a href="https://www.invensis.net/blog/it/best-automated-unit-testing-tools-features/">Best automated unit testing told and their features</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e81032bb8502" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Introduction to DevOps]]></title>
            <link>https://medium.com/@gwright_60924/an-introduction-to-devops-17ec373238f6?source=rss-b7638da5e163------2</link>
            <guid isPermaLink="false">https://medium.com/p/17ec373238f6</guid>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Graham Wright]]></dc:creator>
            <pubDate>Tue, 03 Jul 2018 22:47:18 GMT</pubDate>
            <atom:updated>2018-07-08T18:01:27.525Z</atom:updated>
            <content:encoded><![CDATA[<p><em>[Article 2 of 6 in series </em><a href="https://medium.com/@gwright_60924/software-delivery-for-beginners-series-intro-751b90fbe078"><em>Software Delivery, DevOps and CICD for the uninitiated</em></a><em>]</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*sJoASSIuc890ZyYx5ro_kA.png" /><figcaption>The DevOps workflow. Credit: <a href="https://www.zaizi.com/devops">Devops</a></figcaption></figure><p>In this article, we will cover:</p><ul><li>The meaning of the term DevOps</li><li>The motivations for the DevOps movement</li><li>Some established solutions proposed by the DevOps movement</li></ul><h3>Introduction</h3><p>In order to appreciate the tools and processes we will adopt in the software delivery pipeline we’ll define in subsequent articles, it’s first important to be conscious of some of the common pitfalls that we want to avoid.</p><p>You may have heard the term ‘DevOps’ which is a movement that has emerged to solve many such issues, but what does it mean?</p><blockquote>“DevOps is the combination of cultural philosophies, practices, and tools that increases an organization’s ability to deliver applications and services at high velocity.”</blockquote><blockquote>Credit: <a href="https://aws.amazon.com/devops/what-is-devops/">Amazon</a></blockquote><p>Disappointing, right? The goal of this article is to instead focus on some of the key issues which motivated the ‘DevOps’ movement and some established solutions it offers for overcoming these.</p><h3>Why DevOps?</h3><p>The DevOps movement has emerged as a set of solutions to a set of recurring problems which limit all manners of organisations’ abilities to deliver and to grow, characterised by the fact that they are attributed principally to the organisations’ Development and Operations departments having isolated approaches. Understanding DevOps really involves understanding these common problems and recognising solutions to them.</p><p>The complete list of problems is truly as long and as messy as a piece of tatty old string. Below I’ve highlighted just a few and their associated solutions:</p><h4>A. Early/Continuous Involvement of Ops in Dev, and Dev in Ops</h4><p>In many organisations, the delivery cycle goes a little like this:</p><ul><li>Sales team promise too much too soon</li><li>Development team are forced to build frantically to meet the project’s functional requirements in time</li><li>Operations team receive a half-finished product that they have had no input on, with no documentation</li></ul><p>As a result, the product is highly likely to:</p><ul><li>require significant time investments e.g. to deploy, to test, to run, to fix and to support</li><li>not meet performance criteria e.g. response time, expected volume etc.</li></ul><p>A DevOps approach breaks down this barrier by advocating a delivery framework which:</p><ul><li>composes delivery teams out of both development and operations focused staff and tackle both at the same time, rather than having separate departments/phases</li><li>breaks larger changes into smaller ones which are released more frequently, with less risk</li><li>considers functional increments ‘done’ only once all the enhancements necessary to support that change operationally, as well as all tests and supporting documentation are also completed</li></ul><p>For more information, see:</p><ul><li><a href="https://www.atlassian.com/agile/devops">Agile</a> — a project delivery framework (often contrasted with ‘Waterfall’)</li><li><a href="http://www.scrumguides.org/">Scrum</a> — an Agile-compliant Software Development methodology</li></ul><h4>B. Early and Constant Issue Identification and Resolution</h4><p>In many organisations, most issues are only identified when they are reported by customers or users:</p><ul><li>the testing undertaken during the development and release process is deficient: code bugs evade capture and make it through to production</li><li>the monitoring and alerts on the production is barely existent, meaning operational issues go unnoticed</li></ul><p>On top of this, once an issue is identified:</p><ul><li>the tools available to investigators make it difficult to detect the issue or reproduce the scenario.</li><li>the processes facilitating issue prioritisation, cause identification, fix implementation and customer communication is opaque and disjointed</li></ul><p>The likelihood of issues, the sluggish speed of fixing them and the lack of information available for developers and for users creates frustration for end users and puts pressure on delivery teams.</p><p>In an alternative setup:</p><ul><li>testing is automated, thorough and constantly repeated during the development/release processes and on an ongoing basis</li><li>monitoring tools automatically detect key events, and assess performance against the organisation’s Service Line Agreements (SLAs) and Key Performance Indicators (KPIs). The system’s current state/performance, as well as any issues are accessible in user friendly dashboard and communications go out to them whenever services are unavailable.</li><li>the right tools are in place for the team to quickly setup a test environment, replicate the issue or run preemptive scenarios, identify problems and investigate potential solutions.</li></ul><p>When issues do occur, customers appreciate the transparency and honesty, engendering loyalty, whilst support teams are empowered to</p><h4>C. Minimising downtime</h4><p>‘Downtime’ is the period of time for which a service is unavailable. Organisations aim to eradicate or minimise their downtime.</p><p>Downtime caused by bugs, system crashes or network faults are unpredictable but operations departments guard against it by adding ‘redundancy’ to their solution i.e. exact backup ‘copies’ of the whole system which are always ready to take over should something go wrong.</p><p>Another potential source of downtime is releases: most upgrades follow the basic pattern of shut down-replace-restart and the system is unavailable throughout this time. The tried and trusted ‘blue/green deployment’ remedy applied by operations teams invokes redundancy similarly.</p><p>The organisation runs two identical copies (‘blue’ and ‘green’) of the system with all activity directed to just one (e.g. to ‘blue’) and the other dormant (‘green’). The upgrade is carried out and then tested out on the ‘green’ system, while ‘blue’ continues running the previous version and handling all traffic. When the deployment is complete and verified, the organisation switches its routing of traffic (this could be immediate, or gradual) so that eventually ‘green’ is handling all traffic and ‘blue’ is now dormant. Once ‘green’ has proved to be stable for a period of time, ‘blue’ is finally upgraded to be ready for the next version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/0*Iy_Zh42IoUFrInTz.png" /><figcaption>Credit: <a href="https://www.blazemeter.com/blog/five-blue-green-deployment-best-practices-for-a-smooth-release">5 Blue-Green Deployment Best Practices for a Smooth Release</a></figcaption></figure><p>The quest for ‘zero downtime’ is most pertinent to production environments, where end users would otherwise be affected, but it can apply also to test environments where it can be important to avoid disruption to test activities.</p><p>Unfortunately, releases don’t always go to plan, and sometimes an issue with a release emerges after it has been rolled out (often because it’s only then when the application is exposed to the widest number of environments and scenarios). When this happens, the organisation’s return on investment for the release is at steak, as well as their reputation.</p><p>Organisations want to restore normal service as quickly as possible, and can go in two directions:</p><ul><li>‘roll back’<br>i.e. divert traffic back to the ‘blue’ server if it is still running the previous version, or else redeploy the last stable version</li><li>‘roll forward’<br>i.e. issue a ‘hotfix’ or ‘patch’, or quickly prepare a new release which fixes the issue</li></ul><p>A roll forward can allows the release’s new features to be realised, but must be safe and effective, as a rash change could make the situation worse. Needless to say, this level of heightened, time critical analysis and decision making requires well drilled processes that facilitate close cooperation from Operations and Development.</p><p>Issue resolution would also be helped out by the following process…</p><h4>D. Automatic, Continuous Delivery</h4><p>There are many reasons why it is necessary to (re)deploy software e.g.:</p><ul><li>new feature added</li><li>issue identified and resolved</li><li>hardware upgrade or migration required</li><li>adding resource for expanding demand, geographies or for redundancy and backup</li></ul><p>Many organisations deploy and test their infrastructure and software manually: with individuals following instruction manuals involving hundreds of steps. This:</p><ul><li>takes <strong>a lot of</strong> time from skilled <strong>resource</strong></li><li>is error prone or open to interpretation and therefore <strong>high risk</strong></li></ul><p>Such organisations are unlikely to release updates more than a handful of times a year. The lack of speed renders them unable to react quickly to changing business opportunities or threats.</p><p>If on the other hand, deployment of infrastructure and applications is automated, as well as the testing thereafter, organisations can release hyper frequently. Business agility yields results: Facebook attributed their success so heavily to their ability to move quickly that their company motto was once “Move fast and break things”. (Sensibly, they’ve since addressed the risk aspect too and changed their motto to the somewhat less punchy “Move fast with stable infrastructure”.)</p><p>The tools and processes involved in supporting this Continuous Delivery will be the focus of the next few articles in the series.</p><h3>Summary</h3><p>In this article we have covered the meaning of DevOps, the motivation for it and some key processes that can be implemented. The common theme permeating through these solutions is the bringing together of the traditionally separate worlds of Development and Operations.</p><p>By giving Development teams the skills, tools and mandates to bring Operational thinking into their work, and by investing in the automation of traditionally Operations processes, organisations can cease diverting endless amounts of resource into keeping the lights on and instead keep teams focused on initiatives that will facilitate strategic growth.</p><h3>Next Article in the Series</h3><blockquote><a href="https://medium.com/@gwright_60924/continuous-integration-ci-e81032bb8502"><em>Continuous Integration (CI)</em></a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17ec373238f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>