Category: Opensource

  • Kubernetes Tips: ConfigMap

    This is how to update a config map with 1 line: kubectl create configmap foo –from-file foo.properties -o yaml –dry-run | kubectl replace -f – I found it here: https://stackoverflow.com/questions/38216278/update-k8s-configmap-or-secret-without-deleting-the-existing-one And this is how to mount a config map created from a file as file(not super intuitive but a config map can only be mounted as…

  • Mining With Solar Power

    Here’s a Python script I wrote to check today’s sun rise/set times given a coordinate: https://github.com/raynix/solar-hours/blob/master/solar_hours.py It uses api.sunrise-sunset.org free API to get local sun rise/set time of today. It also takes time zone into consideration as the API only returns times in UTC time zone. It also cache the API result for a day so I’m…

  • Play a bit Kubernetes with Minikube

    I’ve just played a bit Kubernetes on my Arch Linux laptop, with Minikube. It’s easier than I thought. Since I’ve already installed VirtualBox from the start, I can use minikube right after I installed it with curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/ The command I used to start…

  • Mining ZCash on Ubuntu Linux

    I didn’t quite believe that mining crypto currencies is viable as an individual, until I saw the news that AMD graphics cards were sold out because they’re good at mining Ethereum. To be convinced I tried to order AMD RX 570 from some online vendors, and they all cancelled my orders and refunded me shortly.…

  • Linux and Wake on LAN

    The Internet servers are usually on 24×7, probably that’s why I never had the need to use the Wake on LAN feature on a computer. I’ve just built a home server running Ubuntu Linux, using consumer grade PC parts. To avoid a big surge on my next electricity bill, I plan to only turn on…

  • Install Fluentd with Ansible

    Fluentd has become the popular open source log aggregration framework for a while. I’ll try to give it a spin with Ansible. There are quite some existing Ansible playbooks to install Fluentd out there, but I would like to do it from scratch just to understand how it works. From the installation guide page, I…

  • Saving Images in Chrome with Selenium

    Here’s how to save images in Chrome browser using Selenium. The API has element.screenshot_as_png() method but apparently it’s not implemented at the moment. With some minor changes to this answer I can save a image via the browser: 🙂

  • Change Ganeti's Network Configuration

    “Ganeti is a cluster virtual server management software tool built on top of existing virtualization technologies such as Xen or KVM and other open source software. ” This is how I changed the secondary network configuration using Ganeti command line tools. 1, First, say I need to change the network from 10.0.0.0/24 to 10.1.0.0/16, I…