公司最近有個deployment,要run個SQL patch。係QA 同staging 都冇事,點知一去production run左30mins 都未行完,terminated & rollback. 原來係其中一個update statement 行subquery,where id = (select …) mysql 會run select on each row 🙁 DataSet 一大,慢到嘔。 CREATE TABLE alarm_backup SELECT * FROM alarm; UPDATE alarm a SET a.status = ‘active’ , ……. WHERE a.id = ( SELECT al.id FROM alarm_backup ab JOIN device d ON ab.device_id = …
funny, you can get a free tee shirt when you make 5 pull request in Oct 1-31. This is the 5th year but I only knew it now 😛 check out the details in https://hacktoberfest.digitalocean.com/
24 hours 快閃到sydney 訓一晚. 原本打算早點出門, 行過Sydney University 參觀吓先到會場, 可惜落雨都係uber. Keynote 比較大路,冇乜特別,都係話google 投資左好多錢咁啦。GCP 起步遲過AWS, 不過我覺得kubernetes 先係王道,比起vendor lock in AWS 好. 其次我覺得AWS product啲名好麻煩好難記 😅 1st: CI/CD pipelines in the cloud 由source code repo, build & test, artifact management, deliver. 以前係svn + maven + jenkins,而家係github/gitlab + Cloud Build + Container Registey + Spinnaker. 2nd: Kubernetes & Istio: The Efficient …
舊年係GCP用”WordPress Certified by Bitnami”,原來佢地個個Base Image 係Debian 8. 上兩個月收到通知要更新,今個weekend趁住有時間順便一次過upgrade。今次會試下”Nginx WordPress with NGINX and SSL Certified by Bitnami“,睇下用Nginx會唔會快過Apache。 1. New VM 首先登入GCP,左上角Menu > MarketPlace,然後搜尋 WordPress,再揀Nginx WordPress with NGINX and SSL Certified by Bitnami,按Launch on Compute Engine button。 因為Free Tier 嘅關係,記住要揀係美國嘅region,同 f1-micro instance. Disk size 30GB 以下就得, 我自己用15GB. info: https://cloud.google.com/compute/pricing#freeusage 2. Backup 等緊個VM create嘅時候,可以就係用緊嘅WordPress 做 Backup。Install “All-in-One WP Migration” plugin, …
I was lucky that able to get 1 month free subscriptions on Qwiklabs and finished some of their quest. Good way to get your hand dirty and know how to use these tools. Sadly that promotion ended 31th July. Kubernets is really changing the way of software deployments. Docker was starting to popular 4-5 years …
This blog haven’t update for a loooog looooooong time, last article is published at mid October last year. Revisit here, partly because LikeCoin starts a campaign for Mining beta 2, which distributes 30,000 LIKE every day. Mining Beta 1 requires medium, despite I join the subscriptions recently (profile: @hang321), last few weeks I was occupied …
Infamous Seagate Barracuda 3TB hard disk suddenly dead. Due to physical/raw disk mapping, DSM on ESXi cannot do S.M.A.R.T. test and ESXi does not alert as well…. Anyway, this time forget about ESXi, just install DSM 6.1. Planning to use docker for other applications in future. For information to install, follow 2 links below https://xpenology.com/forum/topic/7973-tutorial-installmigrate-dsm-52-to-61x-juns-loader/ …
more complicated than I thought, VMware Workstation patch and difficult to create ISO image. 1. macOS High Sierra 10.13 Beta 3 If you don’t have mac, you need to spend some time to find the source. check out https://betas.cmacapps.com/ to find a suitable one. Unzip the dmg file by 7zip, InstallESD.img & BaseSystem.dmg located in “macOS …
MySQL PAM Config set up database table and column name for username and password # vim /etc/pam.d/nginx auth required pam_mysql.so user=USERNAME_HERE \ passwd=PASSWORD_HERE \ host=HOSTNAME_HERE \ db=DATABASE_HERE \ table=TABLE_OR_VIEW_NAME_HERE \ usercolumn=USERNAME_COLUMN \ passwdcolumn=PASSWORD_COLUMN \ crypt=0 sqllog=0 # repeat …. with config above account required pam_mysql.so user=USERNAME_HERE \ …….. crypt=0 sqllog=0 # alternatively, to external config file …
Recently I was assigned to a task about adding a file upload feature to a existing nginx server on CentOS. Nginx was chosen years ago because it simply handles some static files only. If the file upload was a requirement, using apache is simpler as computation power isn’t a constraint in our case. Background CentOS 7 …





