Ansible for Vscale

Today I would like to show you couple of useful scripts which let one manage vscale.io resources with Ansible.

Dynamic Inventory - this tool let you forget about definitive inventory files. You just use this script which act as some kind of Ansible-to-provider-API proxy. Each time you run ansible, script …

more ...

Regular expression for validating IP addresses

Let's say, we would like to determine if particular symbols are valid public IPv4 address.

# valid octet, 0-255
octet = '1?[0-9][0-9]?|2([0-4][0-9]|5[0-5])'

# 4 valid octets separated with dots
octet_with_dot = octet + '\.'

# IPv4-address
ip_regex = '^({a}){3}{b}$'.format(a=octet_with_dot, b=octet)

But does it belong to …

more ...

tail --follow in python

When writing a bot to detect CV visits and notify me via Telegram, I was implementing tail --follow in python to evade usage of system's tail utility.

Here is how this generator could be used as separate program:

#!/usr/bin/env python

import sys
import time

def tailf(fname):
    try …
more ...

Scale microservice with Docker Swarm

At first, this article is VERY similar to this one from Alex Ellis blog and differs only with some insignificant details. Feel free to follow the link and read original one.

Here I would:

  • Bring up Docker in swarm mode using single node
  • Deploy a simple service with replication factor …
more ...

The Hitchhiker’s Guide to Python

Книжка известная, называется, "The Hitchhiker’s Guide to Python", в нашем переводе "Автостопом по Python".

Как мне кажется, перевод названия удался не слишком хорошо, "автостопом по ..." перекликается с "галопом по Европам", хотя оригинальное название ближе по смыслу не к беглому осмотру, а к удобной подаче набора всех тех методик, решений …

more ...

Pomidorka

Tool to manage your time and assist in concentrating on single task during short sprints, called pomodoros in pomodoro technique.

[ GitHub ]

$ pomidorka start
New pomidorka!

$ pomidorka
Is running for 23 minutes.

$ pomidorka stop
Pomidorka done! It took 23 minutes.

$ pomidorka log
Started at       Duration
-------------------------
2017-10-08 11:20 + 17 min
           11 …
more ...

Perisher

Client-server application to monitor overall health of small debian-like hosts group.

[ GitHub ] [ latest *.deb ]

preview

Advantages/Disadvantages:

  • Designed to use without disturbing disks, usually client utilizes zero I/O operations during data collection. Most of the data gathered from RAM.
  • Server saves all the data in RAM too, so there's no …
more ...