<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sig-I/O (Posts about migration)</title><link>https://sig-io.nl/</link><description></description><atom:link href="https://sig-io.nl/categories/migration.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2024 &lt;a href="mailto:mark@sig-io.nl"&gt;Mark Janssen&lt;/a&gt; </copyright><lastBuildDate>Sun, 21 Jul 2024 15:45:30 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>LUA-DNS migration</title><link>https://sig-io.nl/posts/migrating-to-luadns/</link><dc:creator>Mark Janssen</dc:creator><description>&lt;p&gt;At Sig-I/O we have (mostly) been using OpenProvider for DNS registrations and hosting over
the last few years. This has mostly been fine, but OpenProvider has been having some
issues every now and then, and is changing things, but not allways for the better.&lt;/p&gt;
&lt;p&gt;After a period of stagnation, they now seem to be developing new features again, but none
of those appeal much, while important bugs and wishlist items remain unfixed.&lt;/p&gt;
&lt;p&gt;We've been looking at alternatives for at least the DNS hosting parts for a while, and
even started looking into setting up our own anycast network of DNS servers, but concluded
that his was too much effort (and money) for what we needed, so the search for a good
matching DNS provider was continued.&lt;/p&gt;
&lt;p&gt;After looking at various options, and trying out some of them with test-domains, we were
most charmed with LuaDNS.net, which is a small Romenian company with a nice working
anycast DNS system and an interesting method for pushing DNS updates.&lt;/p&gt;
&lt;p&gt;LuaDNS has a webinterface for inspecting the zones and records that are served by their
servers, but this interface doesn't allow updates. For updating DNS records there are 2
possible options:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Using a REST api&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using GIT and a notify-hook&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;section id="using-the-rest-api"&gt;
&lt;h2&gt;Using the REST api&lt;/h2&gt;
&lt;p&gt;We use the REST-api for updating temporary records, like the 'acme-challenge' records
needed for ACME validation by Lets-Encrypt, ZeroSSL or BuyPass. This is done using the
dns_lua hook in acme.sh&lt;/p&gt;
&lt;/section&gt;
&lt;section id="using-git-and-notify-hooks"&gt;
&lt;h2&gt;Using GIT and notify-hooks&lt;/h2&gt;
&lt;p&gt;The primary method to add zones and records to LuaDNS is by creating a lua-script or
bind-formatted file in a git repository. This has the added benefit of having an
archive of all previous DNS records. In our case, we host the git repository ourselved on
a Gitea instance.&lt;/p&gt;
&lt;p&gt;Every time a git commit is pushed to this Git repository, gitea sends a webhook to the
LuaDNS api server, which then clones the git repository, parses the lua-scripts and/or
bind zone files, and updates its zone files. A log of this parsing it then sent via e-mail
to the admin account.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="dnssec"&gt;
&lt;h2&gt;DNSSec&lt;/h2&gt;
&lt;p&gt;LuaDNS supports DNSSec, which we had enabled at OpenProvider as well, so for the migration
to LuaDNS we temporarily disabled this (to ease migration). Sadly, LuaDNS doesn't allow
configuring (or querying) the DNSSec keys from the API at this point, but when we asked
about this, we got a quick reply that this would be added in the coming weeks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 2022/07/12&lt;/strong&gt;: I just got an e-mail from LuaDNS that this feature has been added,
so there is an API endpoint for DNSSec now.&lt;/p&gt;
&lt;p&gt;This however meant that configuring the DNSSec keys was still somewhat of a manual
excersize at this time. We manually enabled DNSSec on all LuaDNS hosted zones and
copy/pasted the public-keys to a textfile. We then used the OpenProvider API to
reconfigure all our zones to be hosted by LuaDNS and configured the DNSSec keys at the
same time.&lt;/p&gt;
&lt;p&gt;This mostly worked, though some domains gave some issues, so these were then updated by
hand.&lt;/p&gt;
&lt;p&gt;Updating the zones in Openprovider can be done with this api-call:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code bash"&gt;&lt;a id="rest_code_41cfb1d06a9c481985fc8744565879df-1" name="rest_code_41cfb1d06a9c481985fc8744565879df-1" href="https://sig-io.nl/posts/migrating-to-luadns/#rest_code_41cfb1d06a9c481985fc8744565879df-1"&gt;&lt;/a&gt;curl&lt;span class="w"&gt; &lt;/span&gt;-X&lt;span class="w"&gt; &lt;/span&gt;PUT&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;a id="rest_code_41cfb1d06a9c481985fc8744565879df-2" name="rest_code_41cfb1d06a9c481985fc8744565879df-2" href="https://sig-io.nl/posts/migrating-to-luadns/#rest_code_41cfb1d06a9c481985fc8744565879df-2"&gt;&lt;/a&gt;&lt;span class="w"&gt;  &lt;/span&gt;https://api.openprovider.eu/v1beta/domains/&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ID&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;a id="rest_code_41cfb1d06a9c481985fc8744565879df-3" name="rest_code_41cfb1d06a9c481985fc8744565879df-3" href="https://sig-io.nl/posts/migrating-to-luadns/#rest_code_41cfb1d06a9c481985fc8744565879df-3"&gt;&lt;/a&gt;&lt;span class="w"&gt;  &lt;/span&gt;-H&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Accept: */*"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;a id="rest_code_41cfb1d06a9c481985fc8744565879df-4" name="rest_code_41cfb1d06a9c481985fc8744565879df-4" href="https://sig-io.nl/posts/migrating-to-luadns/#rest_code_41cfb1d06a9c481985fc8744565879df-4"&gt;&lt;/a&gt;&lt;span class="w"&gt;  &lt;/span&gt;-H&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Authorization: Bearer &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;OPENPROVIDER_API_BEARER&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;a id="rest_code_41cfb1d06a9c481985fc8744565879df-5" name="rest_code_41cfb1d06a9c481985fc8744565879df-5" href="https://sig-io.nl/posts/migrating-to-luadns/#rest_code_41cfb1d06a9c481985fc8744565879df-5"&gt;&lt;/a&gt;&lt;span class="w"&gt;  &lt;/span&gt;-d&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"{ \"ns_group\": \"luadns\", \"dnssec_keys\": [ { \"alg\": 13, \"flags\": 257, \"protocol\": 3, \"pub_key\": \"&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;DNSSEC&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;\", \"readonly\": 1 } ] }"&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Where {ID} is the ID of the zone at OpenProvider (which we gathered in a previous script),
and {DNSSEC} is the DNSSec key from LuaDNS, which we manually gathered.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="post-migration-checks"&gt;
&lt;h2&gt;Post Migration Checks&lt;/h2&gt;
&lt;p&gt;After migration we received an e-mail from dnssec-tools, complaining about missing records
we had earlier, so we re-created some tlsa-records and did some more checks while we were
at it.&lt;/p&gt;
&lt;p&gt;Some handy tools to check your various settings and configurations:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://stats.dnssec-tools.org/explore/"&gt;https://stats.dnssec-tools.org/explore/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://dane.sys4.de/smtp/"&gt;https://dane.sys4.de/smtp/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://www.dmarcanalyzer.com/dkim/dkim-checker/"&gt;https://www.dmarcanalyzer.com/dkim/dkim-checker/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://mxtoolbox.com/dmarc.aspx"&gt;https://mxtoolbox.com/dmarc.aspx&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;</description><category>dns</category><category>luadns</category><category>migration</category><category>services</category><category>tooling</category><category>tools</category><guid>https://sig-io.nl/posts/migrating-to-luadns/</guid><pubDate>Sun, 10 Jul 2022 15:50:17 GMT</pubDate></item><item><title>Migrated website to a static site powered by Nikola</title><link>https://sig-io.nl/posts/migrated-website-to-a-static-site-powered-by-nikola/</link><dc:creator>Mark Janssen</dc:creator><description>&lt;p&gt;As you might have noticed if you visited my site before, the entire look and feel has been changed. The site is now powered by the &lt;a class="reference external" href="https://getnikola.com"&gt;Nikola&lt;/a&gt; static-site-generator. The most-recent articles have been migated over, the older articles from the previous website will be restored when they are still relevant.&lt;/p&gt;
&lt;p&gt;I had been thinking about using a Static-Site-Generator before, but wordpress was working quite well for me. Recently however I managed to lose my wordpress database, and this privided me with a good opportunity to re-do the site using Nikola.&lt;/p&gt;
&lt;p&gt;I'm still getting the hang of writing reStucturedText, and still need to update some pages, but at least the website is back from the abyss. Most articles have been restored from the &lt;a class="reference external" href="https://web.archive.org"&gt;WayBack&lt;/a&gt;-Machine operated by &lt;a class="reference external" href="https://www.archive.org"&gt;Archive.org&lt;/a&gt;.&lt;/p&gt;
&lt;section id="using-nikola"&gt;
&lt;h2&gt;Using Nikola&lt;/h2&gt;
&lt;p&gt;In case you are interested in using a static-site generator, this is my workflow:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Stream some nice relaxing music&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="youtube-video"&gt;
&lt;iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/Sh0djQG5eEI?rel=0&amp;amp;wmode=transparent" frameborder="0" allow="encrypted-media" allowfullscreen&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Install python3, setup a virtualenv for Nikola&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pip install "Nikola[Extras]"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;nikola init mywebsite&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Version the newly created site in git&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make some changes to the config-file&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose and download a theme&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Write some posts and pages (nikola new_post -e)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Git add all your changes, push to a remote server&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Nikola build&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rsync the output directory to a webserver&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;</description><category>migration</category><category>nikola</category><category>site</category><category>static</category><guid>https://sig-io.nl/posts/migrated-website-to-a-static-site-powered-by-nikola/</guid><pubDate>Thu, 14 Jun 2018 19:17:20 GMT</pubDate></item></channel></rss>