• ## Setup Jenkins for Go Project

Jenkins is a powerful automation tool, it provides hundreds of plugins to support building, deploying and automating any project. So does for Go! I would like to follow an example of creating a task for CoreDNS to illustrate what should be paid attention to. This is a basic tutorial for beginners that starts from setting up a new Jenkins service from scratch.

...more
• ## Push Based Monitoring Service with Prometheus

Prometheus natively supports pull model, but there’s a long discussion for Prometheus between pull and push, e.g. Pull doesn’t scale - or does it?. In this post it gives detailed pros and cons. Considering that we prefer not to expose an extra HTTP endpoint for each worker node, we would like to take some walk around to implement a push based monitoring with node_exporter, pushgateway and prometheus.

...more
• ## Systemd Kill Mode

I used to create a shell script to start a service if I have to pass arguments to the binary, since it does not support command line arguments in the field ExecStart in service file.

I worked well except that when I tried to restart a web server with systemctl restart XXX.service, it failed to listen on the port as the port was being used by another process. That was wired because that port was used by the web server right before I restarted the service. I checked the port state by using netstat -nalp, found that it was actually being listened by the web server. I did run restart and I was pretty sure the service is down because its status is inactive.

...more
• ## 思考

讲几则小事，都发生在最近。

...more
• ## 面试感想

今天一口气面了六轮，早上九点到下午四点，中间休息一小时，最大的感受是，面试别人要比自己参加面试要累多了。六位选手各有特长，五名研究生，一名本科生，一个人曾经参加过ACM拿过奖牌，两位研究生做人工智能并发了顶会，本科生参加超算的比赛在美国刷新了全球记录，一位信安的学弟做渗透。总的来说，看完简历的时候压力山大。

...more
• ## Mustang or Camaro

最近迷上了两辆Pony Car，一辆是Mustang 2011 V6 Premium，一辆是Camaro zl1 2013，同为北美喝油怪兽，车身线条和发动机的声浪都让人无法抗拒。

...more
One advantage of systemd.timer over cron job is, you can easily get detailed execution log from journalctl -u. Here is a demo of creating a simple task that runs periodically.