<?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 Antonio Robson de Paula on Medium]]></title>
        <description><![CDATA[Stories by Antonio Robson de Paula on Medium]]></description>
        <link>https://medium.com/@robson.depaula?source=rss-64988fbedcdc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*SFdbs8SBxBFT8GxdWHcDCw.png</url>
            <title>Stories by Antonio Robson de Paula on Medium</title>
            <link>https://medium.com/@robson.depaula?source=rss-64988fbedcdc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 11:17:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@robson.depaula/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[An overview of common update strategies]]></title>
            <link>https://medium.com/swlh/an-overview-of-common-update-strategies-c75e4aab9d13?source=rss-64988fbedcdc------2</link>
            <guid isPermaLink="false">https://medium.com/p/c75e4aab9d13</guid>
            <dc:creator><![CDATA[Antonio Robson de Paula]]></dc:creator>
            <pubDate>Thu, 20 Aug 2020 19:49:59 GMT</pubDate>
            <atom:updated>2020-09-30T18:40:56.003Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*813yrES9mYivTG5f" /><figcaption>Photo by <a href="https://unsplash.com/@rayhennessy?utm_source=medium&amp;utm_medium=referral">Ray Hennessy</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>After launching your cloud-based application and celebrating a thriving user base the day will come for it to be updated, either because of an issue that needs to be fixed or new features that needs to be introduced. Such updates need to delivered with minimal risk and zero downtime. This can be achieved by correctly applying deployment strategies.</p><h3>Common strategies</h3><p>Two of the most common deployment strategies that are capable of minimizing the risks and achieving zero downtime are the <em>Blue-Green Deployment</em> and the <em>Canary Releasing</em>. They differ on:</p><ul><li>how to measure if the update is good or if a rollback is needed;</li><li>the amount of duplicated infrastructure required;</li><li>when the new application version is exposed to real traffic.</li></ul><p>This article focuses on illustrating these strategies which require a deeper dive on the Continuous Delivery realm. You may find this <a href="https://martinfowler.com/books/continuousDelivery.html">page</a> a good starting point.</p><h3>Deployments illustrated</h3><p>Let us define who are the actors used in this illustration:</p><ul><li><strong>Router</strong>: an infrastructure entity capable of routing the <strong>User’s</strong> request to a particular version of the app.</li><li><strong>User</strong>: the application users.</li><li><strong>Quality Assurance</strong>: person responsible to verify if the <strong>NewApp</strong> is good to be published.</li><li><strong>App</strong>: the application version currently published.</li><li><strong>NewApp</strong>: the updated version of the application.</li></ul><p>On the <em>Blue-Green Deployment</em> the infrastructure is duplicated and the <strong>NewApp</strong> version installed on it. The <strong>Router</strong> is prepared to make the switch but waits until the <strong>Quality Assurance</strong> finishes evaluating if the <strong>NewApp</strong> is stable enough.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*mob09KxsEcYa7R9P4IMA_g.png" /><figcaption>Blue-Green Deployment: duplicated infrastructure and new application version under test without real traffic</figcaption></figure><p>When this approval is received the switch is made and <strong>Users</strong> start accessing the new version of the app, the infrastructure with the previous version is kept in Standby. The <strong>Quality Assurance</strong> enters now the monitoring state to double check that the <strong>NewApp</strong> is performing well with real traffic. If the <strong>NewApp</strong> is declared good to go the previous version of the infrastructure can now be shutdown to save expenses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*HT-n2hukqVncF0oppRf-8Q.png" /><figcaption>Blue-Green Deployment: traffic switched to the new version. Monitoring real traffic before shutting down the previous infrastructure.</figcaption></figure><p>In case the <strong>Quality Assurance</strong> declares the <strong>NewApp</strong> not good, the switch is reverted and rework can begin to fix what prevented the new version to be kept public.</p><p>On the other hand, <em>Canary Releasing</em> uses a small fraction of the infrastructure that is reserved to receive the <strong>NewApp</strong> version and the <strong>Router</strong> configured to expose a small group of <strong>Users</strong> to the new version. The <strong>Quality Assurance</strong> is then the <strong>Users</strong> themselves, and carefully monitoring against a baseline is performed to verify if all is well or if the new version must be rolled back to the previous one and be reworked.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*S2oCCjx3SN2zNlyy5WdNKA.png" /><figcaption>Canary Releasing: small fraction of the infrastructure receives the new version and monitoring with real traffic begins.</figcaption></figure><p>Once the monitoring made by the <strong>Quality Assurance</strong> finishes evaluating the <strong>NewApp </strong>to be stable enough with real users, the remaining infrastructure is updated to receive the new version.</p><h3>Choosing a color</h3><p>Should you go for the blue-green or the yellow (color of the canary)? Well the answer is not simple. It requires not only a technical argument but also if the costs of the infrastructure can be afforded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*-yRw0vU9fG-u_NEmB6rFcQ.png" /><figcaption>In case your infra complexity is high, early testing might be useless. Prefer Canary Releasing in this scenario.</figcaption></figure><p>While the <em>Canary Releasing</em> may appear superior to <em>Blue-Green Deployment</em>, since it uses fewer resources and validates the new version with real traffic, when a database schema migration is on the works that alone can favor the latter. On the other hand, if your application has a highly complex architecture and a serious amount of traffic the validation in the <em>Blue-Green Deployment</em> is not going to be sufficient to provide the confidence of a stable release.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*tJICplCpQ6vbwKG58tNucg.png" /><figcaption>If your application has insufficient traffic it might take very long to properly validate a Canary Releasing.</figcaption></figure><p>The nature of the update, how much traffic your application receives and the level of architectural complexity all comes into balance to decide which deployment strategy to apply.</p><p>I hope this article enticed your curiosity on the subject to further explore the intersection of development and operations called Continuous Integration and Continuous Delivery (or as often employed <em>CI/CD</em>).</p><h4>Post scriptum</h4><p>Some may be curious about why one of the deployment strategies is called <em>Canary Releasing</em>. Turns out it is a story of past animal sentinels that can be read <a href="https://en.wikipedia.org/wiki/Sentinel_species">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c75e4aab9d13" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/an-overview-of-common-update-strategies-c75e4aab9d13">An overview of common update strategies</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Effectively Handling Multiple Git Accounts on a Single Machine]]></title>
            <link>https://medium.com/swlh/effectively-handling-multiple-git-accounts-on-a-single-machine-8e4ddf878c59?source=rss-64988fbedcdc------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e4ddf878c59</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Antonio Robson de Paula]]></dc:creator>
            <pubDate>Mon, 03 Aug 2020 15:03:38 GMT</pubDate>
            <atom:updated>2020-10-12T20:04:31.188Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0Fv0KBSaYAgi70x7" /><figcaption>Photo by <a href="https://unsplash.com/@chuttersnap?utm_source=medium&amp;utm_medium=referral">chuttersnap</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>If you also need to juggle between work accounts and your own personal Git you might get yourself dealing with customizing Git configuration for each individual repository.</p><p>In this article, I am going to share a directory structure suggestion that combined with conditional include will help you achieve a more efficient way that works on any Unix-like (Mac, Linux etc.) machine.</p><p>For the remainder of this article we are going to suppose you have two work accounts and a single personal account.</p><h3>Keys, keys and more keys</h3><p>Using SSH keys allows you to avoid typing username and password for Git operations greatly speeding things up.</p><p>In order to create one key for each of the accounts you are going to use the <em>ssh-keygen</em> command, make sure that when asked for a passphrase you leave it blank (just press <strong>Enter</strong> twice):</p><pre>$ cd ~/.ssh<br>$ ssh-keygen -t rsa -C &quot;remi.byers@protonmail.com&quot; -f &quot;personal&quot;<br>$ ssh-keygen -t rsa -C &quot;remi.b@work1.io&quot; -f &quot;work1&quot;<br>$ ssh-keygen -t rsa -C &quot;r.byers@work2.com&quot; -f &quot;work2&quot;</pre><blockquote>The username is intended to be <a href="https://www.name-generator.org.uk/quick/">fictional</a>.</blockquote><p>Once finished the result will be three pairs of keys (public and private) for each account, like so:</p><pre>$ ls -la ~/.ssh<br>total 64<br>drwx------  10 remb  staff   320 Jul 30 11:02 .<br>drwxr-xr-x+ 31 remb  staff   992 Aug  5 16:01 ..<br>-rw-------   1 remb  staff   434 Jul 23 08:51 config<br>-rw-------   1 remb  staff  2602 Jul 22 13:43 personal<br>-rw-r--r--   1 remb  staff   567 Jul 22 13:43 personal.pub<br>-rw-------   1 remb  staff  2610 Jul 23 08:43 work1<br>-rw-r--r--   1 remb  staff   574 Jul 23 08:43 work1.pub<br>-rw-------   1 remb  staff  2610 Jul 22 13:44 work2<br>-rw-r--r--   1 remb  staff   574 Jul 22 13:44 work2.pub<br>-rw-r--r--   1 remb  staff  1718 Jul 31 15:20 known_hosts</pre><p>The contents of each public key (the files ending with .pub) needs to be added on the corresponding Git account.</p><p>Copy the content of the personal account:</p><pre>$ pbcopy &lt; ~/.ssh/personal.pub</pre><p>Having logged to Git using your personal account, navigate to the appropriate section: <strong>Git</strong> → <strong>Settings</strong> → <strong>SSH and GPG Keys</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JNYtOZJcx1rng0hBfnPPvA.png" /></figure><p>Once you reach this page, click on <strong>New SSH key</strong> and paste the contents of your personal account public key on the <strong>Key</strong> field and also choose a proper <strong>Title</strong> (usually your computer name or description).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jG1Y5_7VjLeVEz1DRIzaJw.png" /></figure><p>Repeat these steps for each of the work accounts you have.</p><p>Once done it is a good idea to benefit from the lack of adding a passphrase to each of the keys and let them be loaded when necessary.</p><p>Open the <em>SSH</em> configuration file:</p><pre>$ nano ~/.ssh/config</pre><p>And add each key as a corresponding <em>IdentityFile</em>, like so:</p><pre># Personal account<br>Host github.com<br>    HostName github.com<br>    User git<br>    IdentityFile ~/.ssh/personal</pre><pre># Work1 account<br>Host github.com-work1<br>    HostName github.com<br>    User git<br>    IdentityFile ~/.ssh/work1</pre><pre># Work2 account<br>Host github.com-work2<br>    HostName github.com<br>    User git<br>    IdentityFile ~/.ssh/work2</pre><p>Great, now you no longer need to enter a username and password each time you issue a Git command.</p><p>On the next part of this article we are going to explore how to customize configurations for each of the accounts.</p><h3>The directory structure</h3><p>To accomodate both work accounts and the personal account, your directory structure would look like this:</p><pre>.<br>└── ~/<br>    └── Developer/<br>        ├── work1/<br>        ├── work2/<br>        └── personal/</pre><p>The idea here is that all repositories related to the <em>work1</em> account are going to reside under <strong>~/Developer/work1/</strong>. The same occurring for <em>work2</em> repositories and your <em>personal</em> account repos.</p><p>You can always get creative and arrange in other ways so that the structure accommodates your workflow and number of accounts. The important thing is that you reflect it on the configuration files as shown in the next section.</p><h3>Configure Git</h3><p>Start by modifying the global Git configuration file, like so:</p><pre>$ nano ~/.gitconfig</pre><p>Add the conditional include sections so you end up with a content like the one below:</p><pre>[user]<br>    name = Remi Byers<br>    email = remi.byers@protonmail.com</pre><pre>[includeIf &quot;gitdir:~/Developer/work1/&quot;]<br>    path = ~/Developer/work1/.gitconfig</pre><pre>[includeIf &quot;gitdir:~/Developer/work2/&quot;]<br>    path = ~/Developer/work2/.gitconfig</pre><p>This global configuration is making the personal account default, this is the reason why you don’t see a <em>.gitconfig</em> override for the personal folder.</p><p>Now add the first work specific configuration file:</p><pre>$ nano ~/Developer/work1/.gitconfig</pre><p>And specify each property you want to be different from your global Git configuration. The example below only replaces the commit email address:</p><pre>[user]<br>    email = remi.b@work1.io</pre><p>Do the same for your second work specific configuration file:</p><pre>$ nano ~/Developer/work2/.gitconfig</pre><p>Configure the properties that need to be different:</p><pre>[user]<br>    email = r.byers@work2.com</pre><p>And you are done preparing your multiple Git account folder and configuration structure. In case you need to adjust other parameters you can <a href="https://git-scm.com/docs/git-config">check</a>.</p><h3>Be more seamless</h3><p>With SSH keys, directory structure and configuration files you can switch seamlessly from work related and personal repositories without the need of making adjusts after each git clone avoiding falling in traps like pushing code with your work email to your personal repos 🙃.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e4ddf878c59" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/effectively-handling-multiple-git-accounts-on-a-single-machine-8e4ddf878c59">Effectively Handling Multiple Git Accounts on a Single Machine</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>