Notes from learning to build stuff.

in-depth articles on cloud-native tech and daily software engineering

Posts

  1. How to minify and bundle assets using Hugo

    Hugo Pipes arrived - asset post-processing is now built directly into Hugo. Check out how I made use of CSS minification and bundling to render AMP pages better

  2. Shell: replacing a variable by the contents of a file GIST

    How to create a poor man's templating engine using AWK

  3. Developing eBPF code with autocompletion support

    There's no need to lose the great features of a well set up Vim configuration when coding eBPF code.

  4. Blocking ingress traffic to Docker swarm worker machines

    Once a Docker Swarm Mode cluster is formed, all nodes participate in the routing mesh and accept ingress traffic. Check out how to block that feature.

  5. How to set up a Private Docker Registry using AWS S3 GIST

    Go through the process of creating a Terraform configuration for deploying a Docker registry to an instance making use of IAM roles.

  6. Retrieving Docker Registry metrics using Prometheus GIST

    Docker registry used not to have a Prometheus exporter by default. Check out how to make use of it in the development branch.

  7. Navigating the Linux Kernel source tree with YouCompleteMe GIST

    Check out how to configure YouCompleteMe to have auto completion and source code navigation capabilities for the Linux source code.

  8. A minimal TCP Client in C GIST

    Go through the steps and syscalls involved in creating a TCP client using C.

  9. Using network namespaces and a virtual switch to isolate servers

    Yet another blog post on how to create a virtual network that connects network namespaces using a brdige, veth pairs and iptables.

  10. Adding privileged containers to Docker Swarm mode

    Privileged services are not something you can have with a regular Docker Swarm cluster. Check out how to have privileged containers using Docker Swarm Mode

  11. Compiling and running your own forked Docker release

    Installing docker has never been easier - add the apt repository and install it. What about running your own fork of it?

  12. Shell: how to add a prefix to the output of multiple commands GIST

    Executing multiple shell commands in continuous integration might become hard to read. Check out how to prefix command executions using bash.

  13. Using HAProxy maps with Access control lists (acl) GIST

    HAProxy frontends can have their logic simplified by using maps. Check out how to tie maps with ACLs to improve routing.

  14. Making HAProxy responds 200 OK to health checks GIST

    Sometimes you need HAProxy to have a special frontend to return 200 OK when a request is made for health-checking purposes. Check out three ways of doing it.

  15. Blocking EC2 Metadata service from Docker containers in AWS

    Check out how to make sure Docker containers running in AWS are unnable to access the EC2 metadata service.

  16. Running Docker with a forked RunC

    Check oout how the docker daemon interacts with containerd and how we can leverage that to modify runc and set some defaults

  17. Implementing a TCP server in C

    Writing a TCP server in C can teach many things. Check out how to implement a TCP server and understand some of the syscalls involved in the process.

  18. Using C to inspect Linux syscalls GIST

    A deep dive into how to make use of ptrace to inspect syscalls made by a tracee while they occur.

  19. How to set up AWS EFS across multiple availability zones using Terraform GIST

    Having an AWS EFS file system over multiple availability zones using Terraform is not complicated. Check out one way of doing it.

  20. A practical look at basic AWS Networking with Terraform

    A conventional AWS Networking Tutorial out there using Terraform doesn't go around the concepts of AWS Networking. Check out how to provision an AWS VPC with multiple subnets and configure security groups using Terraform.

  21. How to collect Docker Daemon Metrics GIST

    Docker ships with native Prometheus integration - the docker daemon can generate metrics about it and let you scrape that. Check out how to gather Docker daemon metrics in Linux and MacOS.

  22. Using find to search for Golang directories GIST

    The find UNIX utility is great for searching for directories, but vendoring might get in the way. Check out how to use find excluding the golang vendor directory

  23. Nginx HTTP2 Server Push

    NGINX just added server push to mainline. Checkout a NGINX HTTP2 server push example using the latest code from source integrating with an HTTP1 Golang web server.

  24. An Example of Go RPC Client and Server GIST

    Having jump straight to gRPC, I got surprised by how easy is to set up Go RPC using net/rpc package. Check out a simple example exploring this package.

  25. The first limit you'll hit on AWS EFS: Locks

    AWS imposes various quotas on the usage of its distributed filesystem. Check out how to go over them by running MYSQL on EFS and then developing a stress test.

  26. Initializing Grafana with preconfigured dashboards

    Grafana v5 is coming with two great features: dashboard and data source provisioning. Checkout how to initialize a dashboard without touching the UI using this new release

  27. Simulating AWS tags in local Prometheus

    Going through Prometheus relabelling to emulate an AWS environment locally with Vagrant

  28. What happens when a pipeline is created in Concourse CI?

    A dive into how the fly command set-pipelines triggers a pipeline registration in concourse ATC

  29. How to build and run Concourse CI locally

    Get Concourse CI built from source - the first step to contributing to the project.

  30. Creating a simple extension to block websites

    Seeing yourself procrastinating in HackerNews? Create an extension that blocks it. All in less than 20 lines of code.

  31. Replacing HAProxy ACLs by HAProxy Maps GIST

    HAProxy maps can reduce the complexity of haproxy configurations by allowing you to define map lookup logic. Check out how to remove ACLs in favor of maps.

  32. How to publish a blog using AWS

    AWS can guarantee amazing speeds for serving a blog - it supports HTTP2, IPv6, caching and has free TLS certificates. Check out how I do it for this blog.

  33. Configuring HAProxy with HTTP2 support

    HTTP2 support recently landed in HAProxy 1.8. Check out how to configure HTTP/2 support for HAProxy.

  34. Sending files via gRPC

    gRPC shines when it comes to sending a bunch of messages here and there. What about file uploads? Is gRPC a good fit for file transfer? Check out how to send files with gRPC and see if that makes sense.

  35. Should you buffer your writes?

    It's common practice to have a buffer between the network and your application. Today I tried to measure how different buffer sizes changes the total time to transfer 1GB of data.

  36. Writing DNS messages from scratch using Go

    How to write a DNS message from zero and send it via UDP to a server.

  37. Can we manage multiple GitHub repositories in a better way?

    Wondering how a project manager might look at GitHub triggered some questioning. How could someone extract more meaningful data from it?

  38. Creating a hello-world API using Swagger and Go

    Swagger allows us to separate api definition from implementation. This guide goes through the process of creating a minimal API using go-swagger and Golang.

  39. A minimal Docker Ansible role

    How to create a minimal Ansible role that provisions a Linux machine to have Docker installed - from role conception to testing it using Vagrant.

  40. Incremental backups using GNU Tar and S3

    How to take snapshots of a directory and send to them as backups to S3 using Linux tools

  41. Updating the Docker version in Travis-CI

    Docker is not always up to date in Travis' builds. Check out how to update the version of Docker in Travis-CI.

  42. Forcing (from inside) the redirection of all outputs of a bash script to a file GIST

    Using exec to redirect force redirection from within a bash script.

  43. Inspecting Docker images without pulling them

    How to inspect a docker image from dockerhub without pulling it

  44. Getting TLS certificates with Letsencrypt and HAProxy

    A guide on building and configuring HAProxy from scratch to achieve HTTPS with Letsencrypt certificates

  45. Pushing Docker images right from Travis-CI

    How to automate the process of building an image and pushing it to DockerHub using Travis-CI

  46. Changing the name of an index in Elasticsearch

    Elasticsearch indices can be renamed with two different approaches - Reindex API and Aliases. Checkout out how to rename an Elasticsearch Index using these approaches.

  47. Executing multiple commands in SSH session against multiple machines

    It might happen that you need to execute multiple commands against a set of machines via SSH. Check out how to do it programmatically.

  48. Concurrently running container-based and VM tests in Travis-CI

    Running container and virtual machines side by side in Travis is possible. Check out how to do it

  49. Why my Ubuntu container doesn't execute profile scripts?

    Making use of the login flag to make sure bash executes profile.d scripts.

  50. A Dockerfile tailored for Golang applications

    Leveraging multi-stage builds to create tiny Golang Docker images

  51. LVM on loopback devices

    An actionable guide on how to use LVM without formatting physical disks and just using loopback devices

  52. Minimal Golang Makefile

    Having build many Golang projects I came with a minimalist makefile that might work for you.

  53. How to install HAProxy with Lua support on MacOS

    Setting up HAProxy on Mac is not complicated. Check out how to build it from source and run it locally.

  54. HAProxy Docker Container Logs GIST

    HAProxy doesn't naturally log to standard out - you need to pick rsyslog and make it do so. Check out how to have HAProxy logs going to stdout using Docker containers.

  55. Augmenting Linux Swap Space

    How to extend Swap space on Linux after you already set it