Category Archives: Administration

Setup local Athens for proper go mod

There is a project called Athens for proxying all your go mod downloads. How to use it locally. 1. Create the following files and directories: a. /Users/d.bolgov/.ssh-athens/storage — empty directory to cache go modules b. /Users/d.bolgov/.ssh-athens/.netrc — if you prefer using .netrc

c. /Users/d.bolgov/.ssh-athens/gitconfig/.gitconfig — if you want to substitue some urls. I personally …

Read more

Port forwarding with kubectl

If you want some kubernetes pod to forward all the traffic to you local machine, you can do this: 1. get pod id with

2. forward exact port from it to you localhost with

And you can request you localhost to reach pod on selected port.

Checking restart problems with mysql on centos

You probable installed MySQL with a help of article like this — https://phoenixnap.com/kb/how-to-install-mysql-on-centos-7 So your mysql is controlled by systemctl. Check current status — sudo systemctl status mysqld. Start service — sudo systemctl start mysqld Logs for systemctl are here — sudo journalctl -xe Logs for mysql can be found here — /var/log/mysqld.log. Configs are …

Read more

Letsencrypt — easy way

Now you can install certbot-nginx and it will do everything for you.

And then

If it does not work, try this sudo certbot -d example.com -d www.example.com and then select nginx in a prompt. https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-centos-7

Install postgresql 11 on CentOs7

Just what to do, no discussion.

How to split disk pool on synology nas

I have a Synology NAS DS 218+. When I bought it, I decided to make a RAID1 pool from two disks. But after time passed, I realized that I don’t have enough space to store all files. And I decided to make two separate disks instead of one RAID1. RAID0 is worse for me comparing …

Read more

Linux. History of system usage

There is a way to monitor your system usage and log to a file easily — with atop command. On my Ubuntu it can be installed with

It can be started as a top command — it’s output almost the same. But the most interesting feature is that it starts a daemon that logs …

Read more

Kubernetes’ cronjobs

That’s what it is — https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/ Get all cronjobs in env:

Get info on exact cronjob:

Get pods with this cronjob:

Get logs of cronjob

you can add -f for live updating logs and -p for watching logs of previous pod.

Crontab time format

That’s about it: min hour day/month month day/week Execution time 30 0 1 1,6,12 * — 00:30 Hrs  on 1st of Jan, June & Dec. 0 20 * 10 1-5 –8.00 PM every weekday (Mon-Fri) only in Oct. 0 0 1,10,15 * * — midnight on 1st ,10th & 15th of month 5,10 0 10 …

Read more

docker-compose example for ceph, kafka, postgres cluster

That is how it can be done: