Skull Island: A CLI and SDK for Kong

I’ve been working on an open-source project for managing the Kong API Gateway, both as an SDK and as a CLI tool using a straightforward, YAML-based templated configuration. The project is called Skull Island and is available on RubyGems via skull_island, on DockerHub via jgnagy/skull_island, and of course on GitHub as jgnagy/skull_island.

Continue reading Skull Island: A CLI and SDK for Kong

Redirecting Domains on a Traefik Ingress

I recently posted about my experience with k3s and how I’m now using it to run my blog. I also mentioned my blog’s new domain and how I’m keeping the old name working. That involved changing the Ingress resource for my blog, so I’ll show how I updated it to accept the old domains and automatically redirect to my preferred domain without needing to make WordPress itself do any redirecting.

Continue reading Redirecting Domains on a Traefik Ingress

Updating GoDaddy DNS Entries with Ruby

I bought a new (arguably better) domain for my blog now! If you’re reading this, you’ve probably noticed, but it is therubyist.org, because I’m a fan of Ruby. The old name won’t be going anywhere, at least for the time being. Given the purchase of this new domain, I have several domains I need to maintain. Since I run this blog (and a few other services) from my home server which has a dynamic IP, setting up the domain apex (i.e., “naked domain”) is tricky. I’ve been using a dynamic DNS service called duckdns.org which gets the job done for subdomains since I can just CNAME to my personal DuckDNS subdomain, but it doesn’t solve this apex problem.

I decided that I was tired of doing this manually and that I would try to write a script. It would be appropriate, given my blog’s new domain name, to write it in Ruby. I did a quick DuckDuckGo search and noticed that someone wrote a GoDaddy SDK for Ruby. Yes, I use GoDaddy for my DNS… not necessarily endorsing them, but they seem to work well for my needs, especially now that I’ve discovered that they offer RESTful APIs.

Continue reading Updating GoDaddy DNS Entries with Ruby

Blogging on Kubernetes

It has been a while since I last posted, but between college, work, and kids, I’ve been pretty busy. That said, I recently attended KubeCon 2019 and saw a lot of interesting presentations. As a fan of Rancher, I gravitated toward a lot of their talks. One that really caught my attention was Darren Shepherd’s talk on k3s. I really liked what I saw; it made setting up Kubernetes really easy, lightened the dependency load for small clusters, but still is very much the right amount of “batteries included” like most things made by Rancher.

I decided to move my home server (which runs, among other things, this blog) to k3s. Here, I’ll walk through how I did it — at least specifically for running a WordPress blog — just to demonstrate how easy it is. Fair warning though, there is a lot of YAML ahead!

Continue reading Blogging on Kubernetes

Read-only Docker Containers

There are lots of good reasons for and articles recommending running Docker containers read-only, but what I have a difficult time finding are descriptions of how to do this for many popular images. Some software needs to write to a few important and predictable locations. It surprises me how often image providers neglect to offer instructions or details required to run their image this way.

Even setting aside read-only containers, counting on writing to the writable layer just feels wrong. Per the documentation, for the writable layer, both read and write speeds are lower because of the copy-on-write/overlay process through the storage driver. In my experience, docker diff output means I haven’t taken the time to configure my volume declarations, either through tmpfs mounts, volumes, or bind mounts.

Continue reading Read-only Docker Containers

Race, Ethnicity, and the Future of Identity

I’m taking a course to satisfy my cultural diversity requirement that has inspired me and caused me to think about identity in a way I haven’t before. Kudos to the instructor and the university as this happens far less than I’d like in most of my courses. I thought it would be nice to share some of my thoughts on a few of the topics I’ve encountered so far (paraphrased), with the hopes that it’ll inspire some conversations.

Continue reading Race, Ethnicity, and the Future of Identity

A Personal Analysis of Modern Utilitarian Ethics

Recently, I wrote an essay (and a related discussion post) in support of a kind of Utilitarianism I find interesting, including contrasting it with other common ethical frameworks. The flavor of Utilitarian ethics I supported is largely based on my interpretation of The Moral Landscape by Sam Harris. Ethics has been the subject of intense study for thousands of years, so truly novel approaches to it are rare. For this reason, very little of what I’ve written about it is original. At best, I’ve shared how I have internalized and summarized the views of people much smarter and articulate than I am, then took that interpretation and compared it to my understanding of other ethical theories. While I provided my view on these other theories, I’m certain that I have not done them justice and I would love to hear more about where I am misunderstanding them. That said, this is the blending of an informal essay with an even less formal discussion post, both related to the course reading, but I hope it will still amount to an enjoyable read.

Continue reading A Personal Analysis of Modern Utilitarian Ethics

Encryption Redux

In yet another exciting move for my blog, I’ve switched SSL providers from my previous provider to Let’s Encrypt. I’ve done so using a set of Docker containers, which also helped me move this WordPress blog to Docker as well. Now my blog is faster, encrypted for free, and easier to backup and maintain. I’ll probably post a brief article soon about how I set this up in more detail (including some docker-compose.yml snippets) soon.

Distributing CLI Tools via Docker

Throughout my career, I’ve seen a couple recurring patterns related to the tools I write: I write a lot of small CLI tools and I like to share them with my coworkers (and whenever possible, the rest of the world).

This has led to several iterations of solving the problem How do I make this tool easy to run? since I don’t want to burden people with understanding the intricacies of all my tools’ dependencies. These tend to be Ruby, some number of gems, and possibly some other common unix utilities. The solutions I’ve come up with have included a lengthy README with detailed instructions, Bundler with Rake tasks to do all the heavy lifting for non-Ruby things, fpm, and even “curl bash piping” (yes, I’m horrible).

Recently I decided to use Docker to solve this problem, since I’m using it so much anyway. Using Docker has some huge benefits for sharing applications of all types: the dependencies list gets whittled down to just Docker, things work on more platforms, testing gets simpler, and it is the new hotness which makes people say “whoa” and that’s fun. That said, the downsides can be frustrating: working with files on your machine gets messy, more typing with the extra Docker-related preamble, things are less straightforward and clear, simple mistakes can lead to lots of images and containers to clean up, and the executable gets significantly larger (since the Docker image is a whole, albeit lightweight, OS userland to run the app). After weighing these pros and cons, I’ve found that telling a coworker to docker pull registry.url/my/app and run it with --help is so much more convenient than the alternatives.

Continue reading Distributing CLI Tools via Docker

An Open Letter to President-Elect Trump

Dear Mr. Trump,

Let me start out this letter by admitting a few things. First, it would be a tremendous understatement to claim that I am not your strongest supporter. While I have disagreed with much of what you have said and what you and your soon-to-be Vice President claim to stand for, I still feel this letter needs to be written with sincerity and tact. That said, the second thing I will admit is that I am under no illusion that you will ever read this letter, or even be aware of its existence. I am not an important political figure, an aristocrat, rich, or famous; I am simply a concerned citizen and a member of the human race. I also understand if, from your point of view, my pleas seem unnecessary or even insulting, but please let me assure you that this is not my intention. I may be left-leaning, but this letter comes from the heart and out of a concern for my fellow man, not based on any political alignment.

This letter is not intended as a plea for you to reverse your stance on anything, or to retract anything you have said. Continue to stand by what you believe in, though I certainly hope in the future you are open to critically analyzing those beliefs and reevaluating your stances. That said, what I am asking you to do here is understand that there is a very large population in your country that are scared for their future, partly because there is also a disturbingly large population of people that firmly believe your election provides a license for racism, homophobia, sexism, and other forms of hatred. My hope is that you recognize this, and that while you may feel it is not necessary to acknowledge this hatred for what it is, I implore you to consider the impact such animosity will have both on our own people and on the world’s perception of our nation.

Please consider making an unambiguous statement about something I hope you feel is obvious, but I can assure you is not for many people: that hatred, abuse, and violence inspired by racism, sexism, sexual preference, religion, or country of origin will be no more tolerated or acceptable during your presidency than it has in previous presidencies. Assure the American people — and the rest of the world — that the rule of law, the rights and safety of our citizens, and the freedom to prosper for all kinds of people, are paramount and will continue to be upheld at least as well during your time in office as they have in the past.

Such a simple proclamation will go a very long way in unifying our country, curbing hatred, and showing the world the kind of leader you intend to be.

Sincerely,

Jonathan Gnagy