Category Archives: Administration

Docker and Kubernetes basics for developers

Docker Docker containers are much more lightweight compared to classic VMs as they leverage host OS instead of starting their own OS. Containers are using 2 features of Linux-based OS: Namespaces and Cgroups (Control Groups). Namespace Lets you allocate resources in an isolated environment (like a sandbox). On a container start, docker daemon generates a …

Read more

How to install Outline VPN on a random VPS server

In Ountline Manager, when you add a new server, select an option called «Set up Outline everywhere».

How to reinstall MacOS on M1 MacBook wiping previous admin

I’ve run into an issue when I gave my older MacBook with M1 chip to my wife. Even after reinstalling MacOS with a proper user for her and restoring from Time Machine, her admin account was not really the admin of that laptop. She was unable to create new users (MacOs failed to set a …

Read more

DataDog: use events in dashboards

Using events as datasource is pretty straightforward, and described here — https://docs.datadoghq.com/events/. To use it as a graph overlay (for instance, to show app deployments), you can edit your graph, Event Overlays, and add something like below:

Fixing docker does not want to update images

If you run docker pull, and you see an error like failed to register layer: Error processing tar file(exit status 2): fatal error: runtime: out of memory, there could be 2 reasons. Obvious one — not enough disk space for docker. You can fix it with

WARNING: It will remove your unused resources like …

Read more

How to add and increase swap on CentOS

Adding a swap file without reboot If you are having a dedicated server somewhere with not that much memory, you could decide to add a swap without rebooting your server. To do so, you need to follow the routine:

Increasing a swap size If something goes wrong with your system, and you see that …

Read more

How to install multiple versions of go on mac m1

For instance, I want to try a new beta, go1.18beta2 (I check if it’s available on the download page). And I already have a regular go1.17, that I want to use as a default one. To do so, I need to do this:

Then I can check if it’s okay — go1.18beta2 version #go …

Read more

Create SQS queues on localstack container start

Put this file to your filesystem as ←anyname.sh→:

For instance, ./localstack_bootstrap/sqs_bootstrap.sh. Don’t forget to run chmod +x ./localstack_bootstrap/sqs_bootstrap.sh. Add this line to your docker-compose.yml: — ./localstack_bootstrap:/docker-entrypoint-initaws.d/. So it could look like this:

Then your queues can be reached by URLs http://localhost:4566/000000000000/queue1 and http://localhost:4566/000000000000/queue2. Further reading: https://docs.aws.amazon.com/cli/latest/reference/sqs/create-queue.html https://joerg-pfruender.github.io/software/docker/microservices/testing/2020/01/25/Localstack_in_Docker.html

Parental control for Linux Mint

Time limiter with UI — Timekpr (https://www.linuxuprising.com/2019/11/timekpr-next-is-linux-parental-control.html) Domain blocker — Mintnanny (https://www.reallinuxuser.com/how-to-setup-parental-control-in-linux-mint/), too simple.

Shell: repeat a task multiple time

All shells (bash/zsh):

will run curl every 3 seconds until you break it. zsh specific:

will repeat it 5 times without any delay