Some Jenkins Groovy magic

Date April 19th, 2016 Author Vitaly Agapov

— How does it feel?
— Groovy

Ash vs Evil Dead

groovyjenkinsThis is a short post with some Groovy snippets which can be used in Jenkins to perform some fancy stuff. They are tested in the real life and have proven their worth. I believe this is not the final release of this article 'cuz I am going to update it with some new examples as soon as I prepare them.

Let's see them.

 

Читать далее »

Tags: ,
Категория: Linux | Нет комментариев »


How to migrate from YouTrack to Jira: easy and for free

Date April 19th, 2016 Author Vitaly Agapov

It occurs to me that our survival may depend upon our talking to one another.

Dan Simmons «Hyperion»

YTJiraIt's a kind of weird that there is no clear and tested procedure to migrate from Jetbrains YouTrack to Atlassian Jira. The recent one's documentation proposes us to export issues from YT to the CSV file and import it back to Jira. This could be the appropriate solution for those who doesn't need the comments, attachments, issue links and other useful things accumulated over many years of team work. But the real Jedis should follow their own path. So did I. I have made my own tool for migrating from YT to Jira and published in on GitHub. It is called Lumper and if you're here just for making the job done then follow the link, read the README and use it for a good purpose.

Читать далее »

Tags: ,
Категория: Perl | Нет комментариев »


Perl CGI: How to asynchronously upload multiple files

Date March 14th, 2016 Author Vitaly Agapov

If you pass by then just pass by.

Alexey Ivanov «Dormitory-on-Blood»

async

This is a quite frequently used control in the modern web UIs. The user just selects file or files as usual but then he has no need to submit the form and wait for the page to reload. The files are uploaded immediately by Ajax and the result can be seen immediately too.

jQuery makes this task trivial from the frontend point of view but the server side is not so clear. Especially if you use Perl. So I will try eliminate the lack of information with this small post.

Читать далее »

Tags: ,
Категория: Perl, Web-dev | 2 Комментариев »


Links between Oracle and PostgreSQL, or There and Back Again

Date September 24th, 2015 Author Vitaly Agapov

“I should like to know about risks, out-of-pocket expenses, time required and remuneration, and so forth” — by which he meant: “What am I going to get out of it? And am I going to come back alive?”

J.R.R.Tolkien «The Hobbit, or There and Back Again»

hobbit

Please don’t wait for any revelations from this article. This is just a compilation of some notes about configuring links between Oracle Database 11.2 and PostgreSQL 9.4. Everything written below is true for the case of Linux (RHEL/CentOS 7 to be exact) and I cannot guarantee its operability on other platforms or versions.

So let’s get to the point. In the first part of the article I will show how to configure the DB link from Oracle to PostgreSQL using ODBC driver and Oracle Heterogeneous Services (HS) agent. In the second part I will show how to access Oracle databases from PostgreSQL using foreign data wrapper (oracle_fdw).

Читать далее »

Tags: , ,
Категория: Linux, Oracle | 5 Комментариев »


Fcgiwrap, or How to run CGI-scripts without Apache and mod_cgi

Date August 25th, 2015 Author Vitaly Agapov

This buzz is not without the reason.

Soviet cartoon «Winnie the Pooh»

pooh-buzz

It’s definitely a bad idea to get Apache running only for executing some lightweight CGI-scripts. And it’s definitely a good idea to use Nginx where possible. But Nginx while being a perfect reverse proxy just cannot run GGI because of its event-based paradigm. This is the situation where the strengths become weaknesses. But we can still deal with this by virtue of some third-party tools like fastcgi wrappers. One of such tools is fcgiwrap server and in this post I’ll show how to build it and how to use it.

Читать далее »

Tags: , ,
Категория: Apache, Linux, Nginx | Нет комментариев »


How to stop worrying and make your own Perl FIX client

Date July 28th, 2015 Author Vitaly Agapov

You do the little job you're trained to do.
Pull a lever.
Push a button.
You don't understand any of it, and then you just die.

Chuck Palahniuk «Fight Club»

Keep-Calm-No-Quick-Fix-257x300

This story began with the situation when I needed to make my own FIX (Financial Information eXchange) client for some testing purposes. It was considered to be light and simple so Java/QuickFix and the similar implementaions were dismissed and I started to look for some other options. For some time I was considering Python QuickFix module but this module is just a wrapper for Python to use native C libraries so this option was dismissed too.

Then I looked through CPAN to find some Perl modules (I was always thinking that CPAN contains every module for Perl you can just imagine but this is not true of course) and still no luck. So I decided to create my own module and made it. 

I will not dive into details. Please visit the corresponding GitHub or CPAN pages if you are interested. There you can find the description, synopsis and examples.

Читать далее »

Tags:
Категория: Perl | Нет комментариев »


Про Oracle, ASM, iSCSI и ядро 2.6.39-400

Date January 19th, 2015 Author Vitaly Agapov

Накормить дрянью так, чтобы все были в восторге – в этом кулинария схожа с политикой.

Святослав Логинов «Многорукий бог далайна»

oracle-bad Опять заметка про Oracle и опять в стиле "баги атакуют". Может, кому-нибудь пригодится. Итак, есть Oracle 11g, RAC (хоть это и не имеет значения) и группа дисков, получаемых по iSCSI и скормленных в ASM. Пока всё неплохо, но тут переходим к ключевому моменту: всё это работает на RHEL5 с UEK-ядром из ветки 2.6.39-400.

В какой-то момент становится понятно, что, если остановить iSCSI-таргет, с которого мы получаем диски, то, несмотря на normal redundancy и на наличие нескольких failgroups, инстанс ASM умирает, прихватывая с собой весь clusterware. Надёжность летит к чертям, кластер может упасть от любого чиха.

Читать далее »

Tags: ,
Категория: Linux, Oracle | Нет комментариев »


Oracle 12c и PRIF-15: invalid format for subnet

Date December 23rd, 2014 Author Vitaly Agapov

– Скажи мне, Шамон, тебя никогда не удивляло, что в мире столько зла?
– Нет. Если удивляться каждой несправедливости, придётся весь век ходить с разинутым ртом.

Святослав Логинов «Колодезь»

oracle-godzillaМежду блогами системных администраторов и блогами всяческих DBA я приметил одну забавную разницу. Системные администраторы чаще всего пишут статьи в стиле "вот такую крутую штуку я сделал", "вот такая крутая фича есть", "а ещё вот так вот можно круто и удобно сделать". DBA же (оракловые в основном, про других не скажу) чаще всего пишут про "вот такая проблема вылезла и так вот я её героически заборол", "наткнулся-де на такой вот баг" и всё в таком духе. Это не парадигма, но определённый перекос несомненно есть.

Так вот, что касается баз данных, то тут я не настоящий сварщик, но пишу-таки этот пост и он отлично укладывается в DBA-шаблон.  Есть такой вот баг…

Читать далее »

Tags:
Категория: Oracle | Нет комментариев »


Автоматическое выкачивание новых серий любимых сериалов

Date November 7th, 2014 Author Vitaly Agapov

Извините! Я почему вредный был? Потому что у меня велосипеда не было! А теперь я сразу добреть начну.

м/ф «Трое из Простоквашино»

bicycleНекоторое время назад на некоторых ресурсах (в основном на Хабре) на глаза несколько раз попадались посты о том, как организовать автоматическое скачивание новых серий, которые появляются на сериальных торрент-трекерах. В основном речь шла о ресурсе lostfilm.tv, и суть метода состояла в периодическом парсинге RSS-ленты, обнаружении ссылок на новые серии нужных сериалов, скачивание торрент-файлов и подкладывании их в некоторое место, откуда их может забрать в работу торрент-клиент.

Идея показалась мне интересной, а реализация – скучной, так что мысль о своём велосипеде в фоновом режиме жила в голове несколько месяцев, а недавно за пару дней реализовалась в рабочий вариант.

 

Читать далее »

Tags: ,
Категория: Linux, Perl | 2 Комментариев »


Расширение Linux Raid

Date October 31st, 2014 Author Vitaly Agapov

Счастье классиков в том, что они мертвы.
Наше и ваше счастье в том, что они мертвы.

Акутагава Рюноскэ «Слова пигмея»

raidНебольшая заметка про то, как увеличить размер программного RAID после, например, замены дисков на более ёмкие. Пусть мы заменили диски в linux raid:

mdadm –remove /dev/md0 /dev/sda1
mdadm –add /dev/md0 /dev/sdb1

Дождались полного ресинка:

watch -n 10 "cat /proc/mdstat | grep resync"
   [======>…………..] resync = 34.6% (1248559808/3599812864) finish=164.0min speed=238826K/sec

Cкорость ресинка при этом можно увеличить:

echo 50000 > /proc/sys/dev/raid/speed_limit_min
echo 300000 > /proc/sys/dev/raid/speed_limit_max

Читать далее »

Tags:
Категория: Linux | Нет комментариев »