[Sonarqube] Install Sonarqube on Kubernetes and integrate with GitHub Action.
1) Installing Sonarqube on Kubernetes To install the chart: Helm values: Nếu bạn cần tạo ingress cho Sonarqube. 2) Integrate GitHub Action with Sonarqube. 2.1) Create a Token on Sonarqube 2.2) Create a project on Sonarqube. 2.3) Set up GitHub Action. Nếu bạn chưa quen với github action thì có thể tham khảo:https://nimtechnology.com/2022/12/21/github-action-lets-use-github-action-to-build-and-push-the-docker-image-to-the-docker-hub/ tiếp đến…
Read More “[Sonarqube] Install Sonarqube on Kubernetes and integrate with GitHub Action.” »
[Golang] Create multiple CRON functions by looping through a list
Gần dây mình có tình viết 1 scheduler bằng Golang.và mình định sử dụng gopkg.in/robfig/cron.v3 khi đó thì bạn sẽ thấy là dụ sài vòng for nhưng kết quả điều giống nhau. Nhưng mình mong muốn là như thế này: Vậy fix sao: https://stackoverflow.com/questions/57095167/how-do-i-create-multiple-cron-function-by-looping-through-a-list Problem in your code is equivalent to the one described here:…
Read More “[Golang] Create multiple CRON functions by looping through a list” »
[AWS] Setup Schedule Action for Auto Scaling Group – Saving Cost is based on ASG
Khi các bạn sử dụng Auto Scaling của AWS thì bạn sẽ thấy có 1 cái tiện là hệ thống của bạn sẽ tự động tăng giảm số node để Nhưng với các môi trường dev và staging nếu developer đi ngủ và bạn cũng muốn cluster k8s của bạn đi ngủ thì làm như…
Read More “[AWS] Setup Schedule Action for Auto Scaling Group – Saving Cost is based on ASG” »
[Goland/Echo Framework/For loop] Return the results twice when using the echo framework and for loop on Goland
Lâu lâu coding lại golang thì gặp lỗi này. Mình chạy golang trên Goland. Mình sử dụng vòng for trong echo framework.thì kết quả trả về lúc nào cũng bị double. Run with elevated privileges. Bạn có thể lấy key Goland ở đây:https://3.jetbra.in/(Nếu bạn giàu thì mua key đi nè)
[Smartctl] Instruction check the health disk of Raspberry.
https://gist.github.com/meinside/0538087cc60a2f0654bb for testing external HDD with smartctl, install smartmontools $ sudo apt-get install smartmontools start test, $ sudo smartctl -t short -d sat /dev/sda $ sudo smartctl -t long -d sat /dev/sda -T permissive then it will say so wait for it… After its completion, $ sudo smartctl -l selftest -d sat /dev/sda -T permissive…
Read More “[Smartctl] Instruction check the health disk of Raspberry.” »
[kubectl/Argocd] How to create a kubectl config file for serviceaccount or from the cluster secret of Argocd
Bài này mình sẽ note 1 số thứ kiên quan đến việc tạo kube configuration từ 1 service account đã tồn tạibạn có thể lấy nó từ k8s hay argocd. Create a kubectl config file for serviceaccount Bạn có thể tham khảo link bên dưới: https://stackoverflow.com/questions/47770676/how-to-create-a-kubectl-config-file-for-serviceaccount Create a kubectl config file from the cluster secret…
[Helm/Github] Create a public Helm chart repository with GitHub Pages
Đầu tiền bạn cần tạo 1 repo: Thực hiện các lệnh bên dưới: I’d like to avoid bot crawling on my repository, so I add the following robots.txt file: Tạo helm chart: Sau đó bạn chỉnh sửa template và recheck template Khi template đã ngon thì thực hiện tạo package
[AWS] How to increase the disk size of a Windows EC2 machine?
Mình đã copy từ link này:https://taswar.zeytinsoft.com/how-to-increase-the-disk-size-of-a-windows-ec2-machine/ I needed to increase my disk size of my Windows 2016 server on AWS EC2. I though I will share this just in case it can help you or myself in the future on How to increase the disk size of a Windows EC2 machine?. First thing first you need to increase…
Read More “[AWS] How to increase the disk size of a Windows EC2 machine?” »
[Redis] ElastiCache-Redis Cross-Region Replication|Global DataStore
1) Introduce global datastore grading to Elasticache(Redis) Chúng ta có thể sử dụng Global Datastore cho Redis Feature. Để dễ hiều về Global Datastore bạn sẽ cần nhớ câu: Write Local Read Global==> Bạn write redis primary và bạn có thể đọc data đó ở bất kỳ redis secondary trên các region khác. Dưới dây…
Read More “[Redis] ElastiCache-Redis Cross-Region Replication|Global DataStore” »