Coding Infinity https://codinginfinity.me At infinity, nothing is impossible - just like in code Zola en Thu, 21 Jan 2021 11:30:00 +0200 Making Atlantis multitenant Thu, 21 Jan 2021 11:30:00 +0200 https://codinginfinity.me/posts/making-atlantis-multitenant/ https://codinginfinity.me/posts/making-atlantis-multitenant/ <p>I love Infrastructure as Code. I popularized it in the company that I work for - all of our projects now <em>start</em> with the infrastructure codified. I’m also trying to move all of the company’s <em>shared</em> (e.g. self-hosted CI tools) infrastructure definitions to code. I’ve had my share of clicking on the web panels and writing CLI scripts to manage the cloud. I still think doing this manually is <em>much faster</em> for quick fixes or some temporary changes but to make it sustainable, maintainable and discoverable you have to make it declarative - so codify it, as everything else!</p> <p>My tool of choice for IaC is <a href="https://www.terraform.io/">Terraform</a>. There are other solutions available on the market (ARM, CloudFormation, <a href="https://www.pulumi.com/">Pulumi</a>, …) but that doesn’t really matter here now. The point is - as with everything - IaC is better when applied automatically. 🙂 And here comes Terraform Atlantis, a “pull request automation” (basically CI/CD 😉 ) for Terraform.</p> <p><a href="https://www.runatlantis.io/">Atlantis</a> is a great tool, really, but it is <em>quite</em> simple. It does one thing and does it well but it lacks “corporatey” things that I, unfortunately, need - multitenancy. But fear not! Atlantis can be scripted so we can easily add that ourselves on top of it. So welcome <a href="https://github.com/jakubfijalkowski/kvenv">kvenv</a>, a simple tool that allows you to juggle credentials in order to shield yourself from others (and probably yourself too 🙂).</p> Firestore is not your ordinary database, so don't treat it like one Tue, 26 May 2020 12:00:00 +0200 https://codinginfinity.me/posts/firestore-is-not-your-ordinary-database/ https://codinginfinity.me/posts/firestore-is-not-your-ordinary-database/ <p>Firestore, being part of Firebase suite and having its roots in Firebase Realtime Database, is another offering from Google (they acquired Firebase in 2014) that wants to ease app development. It is a document database, but this one prides itself in being for backend as well as mobile &amp; web development. Integration should be seamless, everything should work out of the box and all the problems with “ordinary” databases will be solved for you. :)</p> <p>This won’t be another post that glorifies Firestore. I worked with it for quite some time now. I’ve seen it being used in other projects as well. In all cases it was more of a burden than a relief, at least in the beginning. I <em>think</em> I know why, but let’s dig into it a little bit, shall we?</p> DevConf 2019 Fri, 11 Oct 2019 12:00:00 +0200 https://codinginfinity.me/posts/devconf-2019/ https://codinginfinity.me/posts/devconf-2019/ <p>It’s been more than two weeks since the <a href="https://devconf.pl/">DevConf 2019</a>. Last year’s edition was a blast (even though I haven’t written about it) and I couldn’t wait to attend it this year. This time I won’t make the mistake and will use the conference as a topic for my blog post (have I said that maybe this time I will blog regularly?). :)</p> <p>DevConf is a great conference - perfect organization, no main topic, no single language and the diverse speakerbase make the conference unique. Just like last year, I came back home pumped and ready to face new problems. Who needs anything else? ;)</p> <p>This post is also available on my <a href="https://medium.com/@leancode/cfe13b1f1906">company blog on Medium</a>.</p> Reverse-proxy yourself to the host Sun, 13 Jan 2019 21:30:00 +0100 https://codinginfinity.me/posts/reverse-proxy-yourself-to-the-host/ https://codinginfinity.me/posts/reverse-proxy-yourself-to-the-host/ <p>This is a follow-up post to the one <a href="https://www.codinginfinity.me/post/2019-01-04/reverse_proxy_yourself_to_localhost_with_ssltls">I’ve written last week</a>. I’ve showed there how to leverage Docker and <a href="https://letsencrypt.org">Let’s Encrypt</a> for easier HTTPS on localhost but that solution required developing your app inside a container. I personally prefer that option but sometimes the tooling is not so well suited for work inside container (e.g. webpack + Docker for Windows). For that we need to take a little different route.</p> Reverse-proxy yourself to localhost with SSL/TLS Fri, 04 Jan 2019 17:50:00 +0100 https://codinginfinity.me/posts/reverse-proxy-yourself-to-localhost-with-ssltls/ https://codinginfinity.me/posts/reverse-proxy-yourself-to-localhost-with-ssltls/ <p>Some time ago <a href="https://www.hanselman.com/blog/DevelopingLocallyWithASPNETCoreUnderHTTPSSSLAndSelfSignedCerts.aspx">Scott Hanselman</a> described how to setup self-signed certificates for <code>localhost</code> using <code>dotnet dev-certs</code>. Having SSL on <code>localhost</code> is, for me, a must-have since we all want to have our dev env resemble production as much as possible. The approach Scott showed is great but it might be a little bit hard to use on Linux. On Linux-based systems there are multiple libraries, multiple (probably embedded) stores and hundreds of options to configure all of this. I’ll show you an another approach that will allow to develop apps locally with full SSL/TLS and <em>nice</em> addresses.</p> FAKE your way to ASP.NET Core on Azure WebApps, part 3 - The Solution, Again Sat, 18 Mar 2017 17:00:00 +0200 https://codinginfinity.me/posts/fake-your-way-part3/ https://codinginfinity.me/posts/fake-your-way-part3/ <p>Deploying sites to Azure should be relatively easy. And it is, provided that you deploy from Visual Studio (and this is wrong on so many levels…). But if you want to automate things, well… You’re in a bad position.</p> <p>I’ve tried to develop a solution <a href="https://www.codinginfinity.me/post/2016-08-29/fake_your_way_part2" title="Fake your way to ASP.NET Core on Azure WebApps, part 2 - The Solution">last time</a>. It works, but not always. I’ve finally got around to improve it and force it to work more frequently, but this time I am not going to say that it will be flawless or will <strong>ever</strong> be.</p> FAKE your way to ASP.NET Core on Azure WebApps, part 2 - The Solution Mon, 29 Aug 2016 23:30:00 +0200 https://codinginfinity.me/posts/fake-your-way-part2/ https://codinginfinity.me/posts/fake-your-way-part2/ <p><a href="https://www.codinginfinity.me/post/2016-08-19/fake_your_way_part1" title="Fake your way to ASP.NET Core on Azure WebApps, part 1 - The Problem">Last time</a> I talked about an easy problem of deploying .NET Core programs to Azure WebApps (or, well, any other app that can run there). As it turned out, it isn’t that easy, but let’s face the truth - there are far more complicated things in IT and we shouldn’t spend too much time talking about simple deployments. So let’s get started!</p> FAKE your way to ASP.NET Core on Azure WebApps, part 1 - The Problem Fri, 19 Aug 2016 20:00:00 +0200 https://codinginfinity.me/posts/fake-your-way-part1/ https://codinginfinity.me/posts/fake-your-way-part1/ <p>A year has passed and times have changed, but my love for programming will always be the same… OK, enough. That opening didn’t quite work out, right? ;)</p> <p>Recently, I’ve been extensively working with .NET Core apps (YES! I can finally ditch Visual Studio!). I’m used to working with technologies that have unstable tooling (Hey! I’m talking to you, <a href="https://twitter.com/drunkvs">@drunkvs</a>!), so it was rather pleasant experience. However, there is one question that I couldn’t find an answer to - how to automatically deploy these things into the wild?</p> Custom SQL queries in Groundhog Mon, 17 Aug 2015 23:10:00 +0200 https://codinginfinity.me/posts/custom-sql-queries-in-groundhog/ https://codinginfinity.me/posts/custom-sql-queries-in-groundhog/ <p>Recently, I’ve been in a mood to play with ORMs in Haskell. The most recognizable one is <a href="https://www.stackage.org/package/persistent">Persistent</a>, developed as part of a <a href="http://www.yesodweb.com">Yesod</a> project. It is quite pleasant to work with, I must say, but some assumptions it makes are… not suitable for me. So I’ve looked for something different and I found out about <a href="https://hackage.haskell.org/package/groundhog">Groundhog</a>, yet another ORM in Haskell. Unfortunately, it is almost identical to Persistent, but maybe instead of searching for the perfect library, I will be able to adapt it to my needs?</p> hLibsass and hSass Sun, 12 Jul 2015 17:00:00 +0200 https://codinginfinity.me/posts/hlibsass-and-hsass/ https://codinginfinity.me/posts/hlibsass-and-hsass/ <p>I’ve started my journey with Haskell not so long ago, but because that was my third approach, I didn’t want to do only small projects, as it would surely not motivate me enough. I was looking for some kind of project that will not be too complicated and I will be able to make open source. That’s how the idea for a <a href="https://github.com/jakubfijalkowski/hlibsass">hLibsass</a> and a <a href="https://github.com/jakubfijalkowski/hsass">hSass</a> arose. My pull request to include them in Stackage has just been accepted, so I think it is high time to write about them. ;)</p> Localization of a WPF app - the simple approach Sun, 10 May 2015 22:40:00 +0200 https://codinginfinity.me/posts/localization-of-a-wpf-app-the-simple-approach/ https://codinginfinity.me/posts/localization-of-a-wpf-app-the-simple-approach/ <p>Localization is hard, WPF makes it even harder with the <a href="https://msdn.microsoft.com/en-us/library/ms746621.aspx">locbaml</a> approach. There are many other ways to solve this problem, some are basic, some are powerful, but I think that none is perfect. Here is my simple way of dealing with this.</p> Hakyll - automatic sitemap generation Sun, 26 Apr 2015 14:30:00 +0200 https://codinginfinity.me/posts/hakyll-automatic-sitemap-generation/ https://codinginfinity.me/posts/hakyll-automatic-sitemap-generation/ <p>Search engines like sitemaps. Hakyll doesn’t have this ability out of the box, but it is quite trivial to add. Here is <a href="https://github.com/jakubfijalkowski/codinginfinity/blob/cafb0a0254e2b6a488cc703f83a74846e3187e0b/src/Sitemap.hs">my approach</a>.</p> Haskell and external C++ library - the easy way Sat, 18 Apr 2015 23:01:00 +0200 https://codinginfinity.me/posts/haskell-and-cpp/ https://codinginfinity.me/posts/haskell-and-cpp/ <p>Combining Haskell and a well-known C library is easy. <code>apt-get/yum install</code>, link with it, create bindings and we’re done. Problems start to emerge when we don’t want to, or can’t, install the library globally. Things get even worse, when the library uses C++. I faced this problem when writing <a href="https://github.com/jakubfijalkowski/hlibsass" title="hlibsass">hlibsass</a> and I <em>think</em> that I’ve managed to solve it in a not-so-terrible way. </p> New blog - new journey Sat, 18 Apr 2015 23:00:00 +0200 https://codinginfinity.me/posts/new-blog-new-journey/ https://codinginfinity.me/posts/new-blog-new-journey/ <p>It was a matter of time when I will start my new blog. This time with new brand, completely different <a href="https://jaspervdj.be/hakyll">backend</a> and with different language. I hope I will persist a little bit longer than last time, but I make no promises here.</p>