Author Archives: pydevops

k8s service: how to create ELB in a private subnet

For a k8s service in a AWS private subnet. By default it won’t create ELB. In order to get k8s doing all the grunt work of ELB creation, register k8s worker instance with the ELB, add listener, tag it property. there is … Continue reading

Posted in k8s | Tagged | Leave a comment

linux file security bits for various use cases.

Posted in linux, Uncategorized | Tagged | Leave a comment

How to expose docker app on LAN

docker-machine create –driver virtualbox webexposed docker-machine stop webexposed VBoxManage modifyvm webexposed –natdnshostresolver1 on VBoxManage modifyvm webexposed –natpf1 ‘http,tcp,,8080,,80’ docker-machine start webexposed docker-machine create –driver virtualbox webexposed docker-compose up browser to http://lan_ip:8080/

Posted in Uncategorized | Leave a comment

VBoxManage & Docker

  Popular VBoxManage cmd VBoxManage list vms  (list vm’s name or uuid) VBoxManage list runningvms VBoxManage unregistervm 6621ebbe-0139-40a7-a496-37ac6bcba735 –delete VBoxManage controlvm <name or uuid> poweroff VBoxManage modifyvm “VM name” –natdnshostresolver1 on Vagrant vagrant package –base   (this creates … Continue reading

Posted in Uncategorized | Leave a comment

gpg cheatsheet

install pgpdump util for viewing the PGP keys. import PGP keys into a custom private key ring:  The public and private are both in private.pgp gpg –import –no-default-keyring –keyring /tmp/public –secret-keyring /tmp/private private.pgp list secret keys in a non … Continue reading

Posted in gpg | Leave a comment


Sensu uses the embedded ruby /etc/default/sensu EMBEDDED_RUBY=true /opt/sensu/embedded/bin/gem list /opt/sensu/embedded/bin/gem install sensu-plugin mailer.rb handler set up /etc/sensu/handlers/mailer.rb downloaded from sensu-community-plugin. /etc/sensu/conf.d/mailer.json for configuration of mailer.rb Use this handler “mailer” in a check such as /etc/sensu/conf.d/check_apache.json { “checks”: { “apache_check”: { … Continue reading

Posted in sensu | Tagged | Leave a comment

high performance python tips Quoted from  I/O bound problems can make good use of multi-threading (where the GIL is released during I/O) or asynchronous programming. CPU-bound problems can be addressed by better algorithms (nothing beats an algorithm with less computational complexity), using … Continue reading

Posted in python | Tagged | Leave a comment