Posts

Microk8s cluster on a homelab (Proxmox) local network with a Fritzbox and Metallb

Homelab/server with Proxmox connected to my Fritzbox 7590 (XS4ALL NL) configured on home network 192.168.178.0/24  Inside Proxmox I have 3 vms (ubuntu server 20.04 LTS) that I named k8s-{1,2,3} During setup of the Ubuntu server vms I selected install openSSH and microk8s In the fritzbox I selected the option to give proxmox host and k8s-1,2,3 always the same IP After boot of servers: On k8s-1 I did sudo microk8s add-node and ran the output on k8s-2, then I repeated that for k8s-3. I enabled addons on k8s-1:  sudo microk8s enable dns metallb It will ask for an IP range, I opted for 192.168.100.0/24 Then in the Fritzbox, I went to network, network settings, more network settings, static routing tables I added the route 192.168.100.0, 255.255.255.0, 192.168.178.x (ip of k8s-1), active, and I saved it. Now I could test the Metallb: wget https://raw.githubusercontent.com/charmed-kubernetes/metallb-operator/master/docs/example-microbot-lb.yaml kubectl apply -f example-microbot-lb.y...

Free hosted 'CI as Code' services for private repos for hobby (focus on Scala/SBT)

When I was in university Jenkins ( Hudson ) was the thing for automated testing. Another famous one is Bamboo . Lately I'm convinced that these (self-hosted) tools are a 'bad thing'. You configure them compeletely via an UI outside your repo. I'm proponent of the CI definition as code you check into your repository. That way every commit and every branch can build according to the right CI definition. Other pro's: it's versioned and backed up, repeatable, and changes are tracable. Not all my hobby projects make the daylight, and also because I'm Dutch, I was looking into CI services that offer a free tier and allow you to build private repos  and support Scala (and SBT ) . And it should work with all major Git hosting providers: Github , GitLab and BitBucket . I had a preference for a CI provider that also supports using custom Docker images and also allows using attached services, for example a database, to run the tests, without the need ...

ABN Amro bank statement export to .OFX

I recently started to use YNAB 4 (You Need A Budget) software to manage/monitor my spendings. You can find it here  (referral + $6 discount alert). Great and easy to use software to budget your expenses. But for Dutch users I found a big disadvantage: you cannot import files from ABN Amro. YNAB only imports .OFX (Money) or .QFX (Quicken) and to some extend (they say they do not prefer it) .QIV or .CSV files. On the other end, ABN Amro only exports PDF, Excel (.xls), MT904 (.STA), TXT (.TAB, tab delimited) and CAMT. 053 formats. To get your transactions into YNAB, you need to download a MT904 converter. You can find it here:  http://sourceforge.net/projects/mtconverter/  You need to have Java installed for it to work ( www.java.com ). To use the converter, I created a batch file with the following lines: for /r %%i in (in\*.sta) do ( echo %%~ni java -jar mtconverter-0.01.jar "%%i" out\%%~ni.ofx del %%i ) Save it as convert.bat in the same directory...

Using Flying Saucer and iText in Java to convert XHTML to PDF

The situation Where I work, we were generating reports in XHTML, for printing. The styling should be easily configurable. The problem with this approach is the cross-browser look of your report. IE and Chrome print two completely different reports, so to speak. To prevent the difference between browsers, and to re-use the existing report generation, I decided I needed to render the print at the serverside. So I had html, and I wanted it to look the same on every computer. Pdf is a good medium for this purpose, so I needed a html to pdf library, for our Java system. I first tried iText by itself, but this did not apply the css. Browsing the web a bit further I found the combo Flying Saucer and iText , and this was a winning combination for us. Flying Saucer is a Java library that renders XHTML/XML + CSS to screen/image/PDF. For PDF there is a dependency on iText, a library to create pdf files. The code In this blogpost I provide some codesnippets, not a full working example....