Author: admin

  • Manage AWS EBS Snapshot Life Cycle with Lambda

    The timing is not so great. The AWS Data Lifecycle Manager has been announced but I can’t wait for its release. So I decided to use AWS Lambda to do some snapshot lifecycle management. First a role for Lambda having full access to snapshots can be created via the console. To create snapshot with Python…

  • Building Dynamic CI Pipeline with BuildKite

    I was inspired by this BuildKite pipeline sample given by the support team: So in the above case, if the first 2 commands succeed, pipeline.deploy.yml will be loaded into the main CI pipeline. This implementation is just brilliant. I’m not sure if jenkinsfile can do dynamic pipeline like this, but at least jenkinsfile won’t look…

  • Playing with Kubernetes Ingress Controller

    It’s very very easy to use Kubernetes(K8s) to provision an external service with AWS ELB, there’s one catch though(at least for now in 2018). AWS ELB is usually used with an auto scaling group and a launch configuration. However with K8s, EC2 instances won’t get spun directly, only pods will, which is call Horizontal Scaling.…

  • Profiling Tomcat Remotely with Java Mission Control

    I was interested to see why a tomcat app runs very slow. In the tooling stage, I picked Java Mission Control(jmc) because it’s a built-in of Oracle Java 8. To enable jmc and its flight recorder, I added the following Java switches to tomcat’s setenv.h file: Having restarted tomcat, double check if the port is…

  • Don’t Need Ngrok When I Have SSH

    I was trying to create a Slack app. In order to let Slack send REST requests to my dev environment, eg. http://localhost:9000, I searched a bit and saw ngrok. Ngrok is very handy for this kind of setup: Slack -> xyz.ngrok.io -> localhost However I just don’t want to install anything so I turned to…

  • Kubernetes Log Aggregation with Filebeat and Logstash

    Following last blog, Filebeat is very easy to setup however it doesn’t do log pattern matching, guess I’ll need Logstash after all. First is to install Logstash of course. To tell Filebeat to feed to Logstash instead of Elasticsearch is straightforward, here’s some configuration snippets: Filebeat K8s configMap: — apiVersion: v1 kind: ConfigMap metadata: name:…

  • Kubernetes Cluster Log Aggregation with Filebeat

    Finally the Kubernetes cluster I was working on went live, and I didn’t provide a log aggregation solution yet. I had a look at dynaTrace, which is a paid SaaS. However it requires to install some agent in every container. It’s fun when there’s only several to play with but I wouldn’t rebuild dozens of…

  • Time Machine for Arch Linux

    I’ve been using Arch Linux for some years, and it’s still my favorite Linux distribution. The feature that distinguished Arch from others is its rolling release which means there’s no such a thing called version in Arch. Using latest packages in Arch is the norm. However living on the edge means it’s not quite safe.…