Custom registries in JSPM from CI

Hacking my way to a working CI build with JSPM and custom registries

vados

3 minute read

I recently ran into a bit of trouble using JSPM from the Gitlab CI build for one of my projects – in particular, I’ve started separating my shared frontend UI code (projects like vue-component-library, a small collection of homegrown, badly designed UI components), and reusing across projects. One of the big issues I ran into was trying to run jspm build on projects that used some of the shared libraries, that were hosted on Gitlab and not Github.

Haskell build issues on Arch Linux (tinfo6)

Some notes on issues I was having building haskell projects on Arch Linux

vados

1 minute read

Over the last month or two, I’ve had some unexpected/weird problems building my Haskell projects on Linux – all of a sudden the project would fail to compile fairly innocuous requirements (that had up until that time compiled just fine) and I was very confused. It turns out a change to how the ` Thanks to some users on Github (mkoloberdin offered the workaround and pera noted the commit that likely caused the issue), figured out a fix that seems more permanent.

Adding a very naive in-memory cache to my Haskell web app

How I added very naive in-memory caching to my haskell webapp

vados

28 minute read

tl;dr - I added some caching to an app I’m writing in Haskell using Servant. The implementation is pretty naive, but I’ve seen some speedups (as one would expect from skipping a database access), and am glad I was able to build such a simple solution in a language as expressive as haskell. Skip to the end TLDR section to see all the code laid out! FAIR WARNING - this will is NOT an interesting article about caching algorithms or a quirk in GHC or optimization strategies.

Continuous Integration To Continous Delivery Haskell Project With Gitlab

Adding Continuous Delivery (CD) to my Gitlab-powered CI setup for my job board Haskell-powered web application

vados

26 minute read

tl/dr; I added continuous delivery to my Haskell project (after working through adding CI). The setup is somewhat convoluted, but that’s more due to personal organizational preference. This posts rambles A LOT so feel forward to skip to the end, and check out the config files that made it happen. Here lie my notes from taking my infrastructure for a Haskell-powered application I’ve been working on from Continous Integration (CI) all the way to Continous Delivery (CD).

Zero To Continuous Integrated Testing A Haskell Project With Gitlab

Get up to speed with CI by standing on the shoulders of giants.

vados

12 minute read

tl;dr I set up CI on my haskell project, it’s pretty easy if you keep calm and use Gitlab’s CI settings. I hit a few bumps in the road along the way, but you can skip to the end for the completed .gitlab-ci.yml Proselytizing for CI/CD While I don’t think many people need an explanation as to why CI is a good idea, here’s why I’m going for it. As far as I see it, good software engineering as it relates to operations is like a ladder, and here is a non-exhaustive list of rungs, with sophistication/goodness of engineering increasing as I go along:

Switch From ployst/docker-letsencrypt to Jetstack's kube-lego

Switching from ployst/docker-letsencrypt to jetstack/kube-lego for auto-generated SSL certs with Kubernetes.

vados

7 minute read

tl;dr - I switched from ployst/docker-letsencrypt which I considered less complicated than jetstack/kube-lego initially. Turns out jetstack/kube-lego is pretty simple and just works which is amazing, props to the team over at jetstack and as always the kubernetes team, for making this more intelligent automation possible. You could honestly just read the jetstack/kube-lego guide, it’s real good. If you wanna see my path through it, keep reading. Up until now I’ve been using ployst/docker-letsencrypt, and it’s been working fine, however I’ve longed for a solution that didn’t require me to manually kubectl exec scripts, and kube-lego is that tool.

Adding Sqlite Powered Fts Search To A Servant Powered Haskell App

Adding light and easy Full Text Search with SQLite3 to my servant-powered web app

vados

17 minute read

tl;dr - You may not need a big robust beautifully crafted DB like Postgres every time you build an app. Sometimes SQlite is probably enough. SQLite even provides Full Text Search addons in the way of FTS3/4 and FTS5, so that’s cool too – skim through the article for code snippets on the why/how I’m using SQLite + FTS3/4. If you’re unfamiliar with SQLite, it’s a pretty awesome light-weight SQL-compliant RDBMS.

Update JSPM (SystemJS) + JSDOM + Vue testing integration

More changes & improvements to my JSPM (SYSTEMJS) + JSDOM + Vue testing strategy

vados

5 minute read

tl;dr - JSDOM has updated so my testing code that uses it has updated as well, ignore the editorial and look at the code. A while ago, I wrote a bit about some code I often use for integration testing on the front end. Since “integration” can mean a lot of things, to clarify, I am referring to making sure components render the right HTML under certain states (not loading a full page, not testing the render function).

Moving From Server Side Sessions To Client Side Session Tokens with Servant

Documenting my move from Network.Wai.Session to Web.ClientSession

vados

12 minute read

tl;dr - I moved from server-side stored sessions provided by Network.Wai.Session to client-side signed+encrypted session tokens provided by Wai.ClientSession for my Servant-powered webapp, it’s pretty easy, skim through to see the setup code, /login and /logout code that was required. UPDATE After posting to r/haskell, user u/cocreature pointed out the existence of the servant-auth package – it looks like an awesome solution so also make sure to give that a try before rolling your own.

SSH tunneling using an intermediary computer

SSH tunnel sandiwch? The proxy computer is the lunch meat.

vados

8 minute read

tl;dr - I had to SSH tunnel with a proxy computer in the middle due to some weird ISP restrictions/regular OpenVPN not working properly for me. Basically the setup is to SSH tunnel from one machine to another, and run another tunnel on the proxy computer. I used this surprisingly low latency setup to run a SOCKS5 proxy that did the job. “Remote Port Forwarding” is what I was doing, and a super awesome blog post helped show me the way.