<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>The Ops Community ⚙️: Berislav Babic</title>
    <description>The latest articles on The Ops Community ⚙️ by Berislav Babic (@berislavbabic).</description>
    <link>https://community.ops.io/berislavbabic</link>
    <image>
      <url>https://community.ops.io/images/C88NWUxzhzaY7Ef_nKwyYNHKCmcpgvjy-xAmPpVUcgs/rs:fill:90:90/g:sm/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkub3BzLmlv/L3JlbW90ZWltYWdl/cy91cGxvYWRzL3Vz/ZXIvcHJvZmlsZV9p/bWFnZS8zOTMvZThj/ODJjMzAtOWI2ZC00/NzVkLWFkZmMtMzZk/MGY0YTAxNzBmLmpw/Zw</url>
      <title>The Ops Community ⚙️: Berislav Babic</title>
      <link>https://community.ops.io/berislavbabic</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://community.ops.io/feed/berislavbabic"/>
    <language>en</language>
    <item>
      <title>Migrating Route53 DNS records to Azure</title>
      <dc:creator>Berislav Babic</dc:creator>
      <pubDate>Wed, 29 Jun 2022 11:14:42 +0000</pubDate>
      <link>https://community.ops.io/berislavbabic/migrating-route53-dns-records-to-azure-5cm4</link>
      <guid>https://community.ops.io/berislavbabic/migrating-route53-dns-records-to-azure-5cm4</guid>
      <description>&lt;p&gt;Recently I've been notified that we need to move our operations away from AWS to Azure. I'll keep my feelings about that decision to myself for now, but one of the steps I found interesting (and never did before) was migrating the DNS provider from AWS Route 53 to Azure DNS Zone.&lt;/p&gt;

&lt;p&gt;There are steps we need to take before we export the AWS DNS records. Since AWS has a lot of built in services, there are DNS records that aren't proper DNS records. They works as ones, but they are &lt;em&gt;A&lt;/em&gt; type records, pointing to various AWS services. Those services can be load balancers, cloudfront distributions, S3 static websites and other services you aliased under your domain. &lt;/p&gt;

&lt;p&gt;Cleaning up these records is pretty easy. You have to edit the mappings to be readable by any other DNS service. In these cases you will have to create &lt;em&gt;CNAME&lt;/em&gt; records for those AWS aliases. ALB/ELB and CloudFront mappings stay the same but you have to change them from &lt;em&gt;A&lt;/em&gt; records to &lt;em&gt;CNAME&lt;/em&gt; and update the values. The mappings are in the table below:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;DNS entry before&lt;/th&gt;
&lt;th&gt;DNS entry after&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;subdomain.acme.inc&lt;/td&gt;
&lt;td&gt;subdomain.acme.inc.s3-website.eu-central-1.amazonaws.com&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Be sure to set the TTL (Time to live) on these entries to a value you feel comfortable (300 seconds should be okay for DNS records).&lt;/p&gt;

&lt;p&gt;After you cleaned up your Route53 from AWS specific aliases, you can export the bind file with this awesome &lt;a href="https://github.com/barnybug/cli53"&gt;cli53&lt;/a&gt; tool. &lt;/p&gt;

&lt;p&gt;After you have installed the tool and set the AWS credentials, you can run it with: &lt;code&gt;cli53 export acme.inc &amp;gt; acme.inc.txt&lt;/code&gt;. This will export all your domain's DNS records into a BIND file format, readable by other DNS services.&lt;/p&gt;

&lt;p&gt;Next thing we need to set up is the Azure CLI following the &lt;a href="https://docs.microsoft.com/en-gb/cli/azure/install-azure-cli?view=azure-cli-latest"&gt;installation instructions&lt;/a&gt; for your OS. After you have set it up and authenticated, you can create a new DNS zone using this CLI.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;az network dns zone import -g resourceGroup -n acme.inc -f acme.inc.txt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The whole procedure for creating a resource group and importing/verifying the DNS at Azure is described &lt;a href="https://docs.microsoft.com/en-us/azure/dns/dns-import-export"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After you import all your DNS records, you have to verify that they resolve to the correct place. You will need to fetch your domain's NS records with &lt;br&gt;
&lt;code&gt;az network dns record-set ns list -g resourceGroup -z acme.inc  --output json&lt;/code&gt;&lt;br&gt;
and take one of the &lt;code&gt;nsRecords &amp;gt; nsdname&lt;/code&gt; values to test using &lt;code&gt;nslookup&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$&amp;gt; nslookup www.acme.inc ns1-03.azure-dns.com

  Server: ns1-03.azure-dns.com
  Address:  40.90.4.1

  Name: www.acme.inc
  Addresses:  134.170.185.46
  134.170.188.221
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should test multiple entries to make sure they get resolved to the correct place.&lt;/p&gt;

&lt;p&gt;After you have verified the records resolve properly, you can update the DNS delegation in your domain registrar. Since you have the name servers you fetched in the previous step, you can use those in the specific domain registrar you are using. &lt;a href="https://www.domain.com/help/article/domain-management-how-to-update-nameservers"&gt;Here&lt;/a&gt; is an example of how it looks like on the domain.com registrar. After they have been propagated (give it 5-10 minutes), you can verify them in your DNS Zone page on Azure.&lt;/p&gt;

&lt;p&gt;Resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/barnybug/cli53"&gt;CLI53 tool&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/dns/dns-import-export"&gt;Azure DNS import/export&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/dns/dns-delegate-domain-azure-dns"&gt;Delegate domain to Azure DNS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>azure</category>
      <category>devops</category>
      <category>tutorials</category>
    </item>
    <item>
      <title>The stack you use to build your next app is irrelevant</title>
      <dc:creator>Berislav Babic</dc:creator>
      <pubDate>Wed, 29 Jun 2022 09:11:14 +0000</pubDate>
      <link>https://community.ops.io/berislavbabic/the-stack-you-use-to-build-your-next-app-is-irrelevant-4abm</link>
      <guid>https://community.ops.io/berislavbabic/the-stack-you-use-to-build-your-next-app-is-irrelevant-4abm</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;How to choose the best &lt;em&gt;stack&lt;/em&gt; for your app&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Rash words to begin the article, but if you think about it, it's hard to deny the fact that it doesn't matter what tech we use to build the app. What matters more is solving the needs of your customers and getting paid for it enough that you can sustain the costs of your app. &lt;/p&gt;

&lt;p&gt;I understand that its hard to choose the correct one today. There are a lot of established frameworks and out of the box solutions alongside the new and flashy frameworks and no-code approaches. All will work similar (or won't) depending on what you decide to build with it. You can spin off a very profitable web app with Airtable and automation apps. If you want to build a more complex web app like I usually do, you will start looking at frameworks to help you on your way.&lt;/p&gt;

&lt;p&gt;Most frameworks are very similar because they all &lt;em&gt;borrow&lt;/em&gt; ideas and technology from each other. The difference lies in their underlying programming language they and what the majority of the community is using them for. I'm going to focus on basic and semi complex CRUD apps here, which have been my bread and butter for the better part of the past 2 decades. As I go further, I want to &lt;em&gt;dumb down&lt;/em&gt; the development stack as much as possible. I'm not perfect here, my friends and ex coworkers will say that I &lt;em&gt;left&lt;/em&gt; some wild heritage behind me, but I guess it's what growth looks like. Experimenting with different thing and figuring out what works &lt;em&gt;for you&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The main mistake we make is trying to replicate what FAANG is doing. Regardless whether it's in development, operations and sometimes even sales and marketing. Let me be completely honest, it makes no sense comparing ourselves with those companies. I know everyone can dream, but it's best to leave that &lt;em&gt;unicorn&lt;/em&gt; dream behind us and do the best we can do serve our customers. The quicker we realise that, quicker we can start implementing stuff that solves real problems.&lt;/p&gt;

&lt;p&gt;Our customers don't care much whether we use React or Vue.js for our frontend. You can even write an app using Backbone.js (Those who remember this one shoot me an email) and be super successful with it. What you should focus is to reduce the complexity as much as possible so you will achieve the following goals:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Hiring is much easier if you hire for one thing. It's hard to find someone who is an expert in both Rails and Ember.js or Django and Vue.js, or Laravel and React. And if we add some esoteric database + ORM to the picture, you introduce too much complexity in your stack. Everyone already has to know about HTML/CSS and at least basic JavaScript to do web applications.&lt;/li&gt;
&lt;li&gt;Less complexity means you can deliver features faster with less bugs. Okay, the amount of bugs is dependent on your engineering and testing capabilities, but if less things can go wrong it will reduce the possibility of bugs.&lt;/li&gt;
&lt;li&gt;Every framework has its own deployment guidelines and best practices. If you mix up a couple of them in your stack, you have to figure out your own deployment strategy instead of serving your customers' needs.&lt;/li&gt;
&lt;li&gt;Testing one tightly coupled and integrated &lt;em&gt;thing&lt;/em&gt; is much easier than testing 3 loosely coupled things. &lt;/li&gt;
&lt;li&gt;Server rendered apps can be just as fast and even faster than single page apps. They can also be easier to secure. Did I already mention that you can develop them faster?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The last point is what I'm aiming at here. Server rendered apps are enough for most of the stuff we are building now. You don't need micro services or single page applications because you can always live without the additional complexity. You want the "boring stack" - something proven, battle tested and known to work. You want Wordpress, Laravel, Django and my favourite, Rails. There might be a JS solution available for you in the likes of Next.js if you prefer JS as your language of choice. &lt;/p&gt;

&lt;p&gt;Now I'm not against experimenting with new and flashy technologies, or using them when they become necessary. What I'm advocating here is being prudent with the choice of technology you build your app with. Scala was once a very popular language, so was Clojure and now I don't even hear them mentioned. While Python, PHP and Ruby are still alive and doing very well. Not on the top of the lists, but not forgotten like those other "killer languages". I like Clojure because of its &lt;em&gt;lispiness&lt;/em&gt;, and I'm sad I never got to use it on a project. &lt;/p&gt;

&lt;p&gt;Languages and frameworks come and go, but the good ones stick. If you are a Microsoft fan, Asp.Net MVC is a good choice, or Spring MVC in Java, whichever makes you happy. If you don't over-engineer it when you start, it's gonna be easier down the line. &lt;/p&gt;

&lt;p&gt;If you ever upgraded one of your frameworks to a new major version, you know how hard it can get. Do you want to stick your team (or yourself in the start) with having to manage 2 or more frameworks. Think how hard it will be to upgrade 2 or 3 of them (sometimes at the same time). Just keeping on top of security advisories can be overwhelming. &lt;/p&gt;

&lt;p&gt;Let's end this one remembering the spirit of KISS and YAGNI, and using those as a guideline in choosing our stack.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>webdev</category>
      <category>architecture</category>
    </item>
  </channel>
</rss>
