cover.jpeg

A Quick Update

This year, I really wanted to work on my output, and I think I’m doing pretty well. Here are some things that I’ve been publishing: Regular monthly blog posts on yakushima.blog A few posts this year on the Geolonia blog for work However, updates on this personal blog has been not so great – the previous post is the “2023 review” post, after all. I’ve been updating this blog from 2012, when we officially incorporated Flagship.

Read more

Shipping Events from Fluentd to Elasticsearch

We use fluentd to process and route log events from our various applications. It’s simple, safe, and flexible. With at-least-once delivery by default, log events are buffered at every step before they’re sent off to the various storage backends. However, there are some caveats with using Elasticsearch as a backend. Currently, our setup looks something like this: The general flow of data is from the application, to the fluentd aggregators, then to the backends – mainly Elasticsearch and S3.

Read more

IAM Policy for KMS-Encrypted Remote Terraform State in S3

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:PutObject", "s3:DeleteObject" ], "Resource": [ "arn:aws:s3:::<bucket name>/*", "arn:aws:s3:::<bucket name>" ] }, { "Effect": "Allow", "Action": [ "kms:Encrypt", "kms:Decrypt", "kms:GenerateDataKey" ], "Resource": [ "<arn of KMS key>" ] } ] } Don’t forget to update the KMS Key Policy, too. I spent a bit of time trying to figure out why it wasn’t working, until CloudTrail helpfully told me that the kms:GenerateDataKey permission was also required.

Read more

Authenticating Linux logins via LDAP (Samba / Active Directory)

I’ve been working on infrastructure of a fleet of a few dozen Amazon EC2 instances for the past week, and with a rapidly-growing team, we decided it was appropriate to make a central authentication / authorization service. So, that meant setting up some sort of LDAP server. I was a bit intimidated at first (the most I’ve done is seen people manage and complain about Active Directory), but I finally got it set up.

Read more

Upgrading PostgreSQL on Ubuntu

I recently started using Ubuntu Linux on my main development machine. That means that my PostgreSQL database is running under Ubuntu, as well. I’ve written guides to upgrading PostgreSQL using Homebrew in the past, but the upgrade process under Ubuntu was much smoother. These steps are assuming that you use Ubuntu 16.04 LTS, and PostgreSQL 9.6 is already installed via apt. Stop the postgresql service. $ sudo service postgresql stop Move the newly-created PostgreSQL 9.

Read more

macOS Sierra

Here are the headline features of Sierra, and my thoughts about them. Siri Don’t use it on the phone, won’t use it on the Mac. It would be nice if I could use it by typing, though. Universal Clipboard This seems like a massive security risk. It works via iCloud, so if someone (like my daughter) is using my iPad, then it will sync the clipboard to that, too. How do I turn it off?

Read more

cover.png

Convox

I stumbled upon Convox a couple weeks ago, and found it pretty interesting. It’s led by a few people formerly from Heroku, and it certainly feels like it. A simple command-line interface to manage your applications on AWS, with almost no AWS-specific configuration required. An example of how simple it is to deploy a new application: $ cd ~/my-new-application $ convox apps create $ convox apps info Name my-new-application Status creating Release (none) Processes (none) Endpoints $ convox deploy Deploying my-new-application Creating tarball.

Read more

A month with Linux on the Desktop

It’s been a bit over a month since I installed Linux as my main desktop OS on a PC I built to replace OS X on a (cylinder) Mac Pro. I installed Ubuntu MATE 16.04. Here are my general thoughts: Linux has come a far way in 6 years (last time I used it full-time on the desktop). There are Linux versions of popular software that is vital to my workflows – Firefox, Chrome, Dropbox, Slack, Sublime Text, etc.

Read more

Elixir anonymous function shorthand

Elixir’s Getting Started guides go over the &Module.function/arity and &(...) anonymous function shorthand, but there are a couple neat tricks that are not immediately apparent about this shorthand. For example, you can do something like &"...". iex> hello_fun = &"Hello, #{&1}" iex> hello_fun.("Keita") "Hello, Keita" Let’s have some more fun. iex> fun = &~r/hello #{&1}/ iex> fun.("world") ~r/hello world/ iex> fun = &~w(hello #{&1}) iex> fun.("world") ["hello", "world"] iex> fun.("world moon mars") ["hello", "world", "moon", "mars"] iex> fun = &if(&1, do: "ok", else: "not ok") iex> fun.

Read more

Elixir: A year (and a few months) in

In the beginning of 2015, I wrote a blog post about how my then-current programming language of choice (Ruby) was showing itself to not be as future-proof as I would have liked it to be. A lot has changed since then, but a lot has remained the same. First: I have started a few open-source Elixir projects: Exfile -- a file upload handling, persistence, and processing library. Extracted from an image upload service I’m working on (also in Elixir).

Read more

tokyo.ex #1

I attended my first Elixir-related meetup yesterday, tokyo.ex #1. (If the slides don’t work here, I have also uploaded them to YouTube.) In my 5-minute lightning talk, I talked about the basics of using Exfile. Exfile is a file upload persistence and processing library for Elixir with integrations for Ecto and Phoenix.