===================
== Nathan's Blog ==
===================
infrequent posts about things I am working on

Kafkacat Amazon Workspace

amazon aws epel kafka linux workspace

Below are some notes on getting <a href="https://github.com/edenhill/kafkacat#build">kafkacat</a> installed on an Amazon workspace with admin access.

The commands listed on the GitHub page will not work without a little preparation. A Linux Amazon Workspace image is based on Amazon Linux. Attempts to use a package manager like yum go through a plugin, amzn_workspaces_filter_updates. This filter only has a handful of packages (30 at the time of this writing) that can be pulled. The first thing to do is add Extra Packages for Enterprise Linux, EPEL, to the instance’s package repository. Following the instructions on the Fedora FAQ run:

This will add the EPEL repository to Amazon Workspace which allows you to download standard Linux packages that you may miss in a stock Workspace installation. For example, if you want to connect to another machine through VPN, you can install vpnc with yum:

In order to get kafkacat installed, which enables the Amazon Workspace to connect to a kafka queue. A few changes to the steps outlined in the Confluent documentation will allow a user with elevated privileges to install the package. The first step is to add the Confluent package repository to your list of yum repos. This can be done by adding the repositories to the /etc/yum.repos.d/ directory in a file named confluent.repo.

Insert the following text into the file:

Then clear the yum caches:

The kafkacat library has a dependency that can be installed from the Confluent repo called librdkafka-devel. Install that dependency with yum and then you can build the kafkacat library from source.

To build kafkacat follow the instructions on the Github README section on building from source. Clone the repository to the desired location.

To verify the installation worked correctly, run:

If everything went smoothly, the program should be installed and available on your Linux based Amazon Workspace.