WSGI mod, Python, Django, Celery and a nice fella virtualenv

Here I’ll show how to use Python (3.8.0 in the current example, but legit for latest 3.+ versions, not for os.name == ‘NT’) and virtualenv to setup WGSI enabled website on Django (or any) with implemented Celery + Flower + RabbitMQ. This example is my own path used for automated test framework: Octopus (not available now, but have dev branch opened: Lobster) Here only configurations and setup for Python 3.8.0, virtualenv, WSGI, Django, Celery (worker and beat services), Flower and that’s it. Later I’ll show Django + Celery configuration when they run together (sort of). You may want to install Python at first: Read When your modern and fancy python is installed, we’ll make a virtual environment for our website.Short Read more…

Django, Apache2, Sublime Text 3 build system and developing process.

At first be sure that you are using this path to run pure apache: http://www.trianglesis.org.ua/django-python-3-4-wamp-apache-2-4-23-pycharm This topic for those who wants to develop ON THE FLY with python and django and do not want to manually restart dev server each time when code changes AND you don’t like built in python web-server and want to run your dev site as it should run on apache. Sublime Text 3 I use it for fast code changing and writting because PyCharm can’t work fine with multiline carrets, for example. Also PyCharm is too heavy when you want just copy&paste some features and see how it work on web. So my PyCharm will be used for debug purposes. I hope you know what isShort Read more…

Oh my gosh BACULA config

Recently finished bacula config and run first one successfully! I’m really do not understand now, why does this tool have a complicated system with batch of daemons and modules. For my opinion, backup tool just should know from where to wherever make a backup and how often. But for further usage and remember this config, I’ll add it here.   Is is just a reminder, not a how-to, just want to not forget this. Job configs is not so complicate, intuitively understandable. Director bacula-dir.conf Concole bconsole.conf Storage basula-sd.conf File Daemon Client bacula-fd.conf       Read more…

Install Bacula on debian systems

Failed to load the database DBI driver SQLite at ./bacula-backup-lib.pl line 45 Based on: https://nklug.org.ua/node/23 http://www.microhowto.info/howto/connect_to_a_sqlite_database_using_perl_dbi.html https://ru.wikibooks.org/wiki/Bacula/Быстрый_старт http://help.ubuntu.ru/wiki/руководство_по_ubuntu_server/резервное_копирование/bacula https://www.digitalocean.com/community/tutorials/how-to-install-bacula-server-on-ubuntu-14-04 The main problem was: Failed to load the database DBI driver SQLite at ./bacula-backup-lib.pl line 45 this ultra fast fix can help: apt-get install libdbd-sqlite3-perl You can install any needed module based on SQL you use: MySQL, PostrgeSQL etc. Read more…

Всегда делайте БЕКАПЫ! ВСЕГДА! ДЕЛАЙТЕ! БЕКАПЫ!

Сука, истина в последней инстанции! Только что полтора часа провозился с MySql после Power Failure –  слетела база юзеров, чинил, флашил – нихуя не помогало, ровным счетом нихуяшечки! Спасибо, блять, дебиану с его ебаной старой как мир Mysql 5.5… Так вот, я вдруг вспомнил, что делал когда-то бекапы по расписанию, и О БОЖЕ ЧТО ЭТО!!!!Адин-адин111 Полный бекап базочки даже с таблицей юзеров, гугель 30 сек, первая команда рестора – ЗАРАБОТАЛО! Сученька, спасибочки тебе, прошлый я, что поставил бекапы делаться еженедельно, каждый понедельник. Изменил расписание на ежедневно в полночь! Мало бекапов не бывает! Делайте бекапы! Read more…

From vmdk to vhd

StarWind V2V Image Converter VMware vCenter Converter Standalone Client Very useful: http://rmlinar.net/blog/2014/07/29/convert-single-vmdk-to-vhdx-with-microsoft-virtual-machine-converter-2-0-mvmc/ Read more…

How to install Oracle WebLogic Server

All from: http://robinbuitenhuis.blogspot.nl/2014/08/how-to-install-oracle-weblogic-server.html   How to install Oracle WebLogic Server I am using Oracle VirtualBox with the Oracle Technology Network Developer Day – Hands-on Database Application Development lab. I am going to use Weblogic Server and Oracle REST Data Services (formerly known as: APEX listener). In this article I will describe the WebLogic installation. First I download WLS on my Windows 7 host from: http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html Choose: Generic (881 MB) I place the downloaded file in the folder: D:\Oracle\WebLogicServer since the directory D:\Oracle is shared with the virtual machine. Start the installation: cd /media/sf_Oracle/WebLogicServer java -jar fmw_12.1.3.0.0_wls.jar Launcher log file is /tmp/OraInstall2014-08-19_10-29-24PM/launcher2014-08-19_10-29-24PM.log. Extracting files………………… The OpenJDK JVM is not supported on this platform. Ok, I will try again but this time IShort Read more…

python script as centos service

Task completed! I made a vkontakte Bot which delete all comments are not from group members! But I do not want to run it by cron, because it will SPAM all my system with cron emails. But I found resolution: make a worker.py allow worker to run delete scripts on time periods add worker as centos service have fun! Maybe later I’ll add more code, but now just for example I’ll show only worker and bash script: #!/usr/local/bin/python3 # coding=utf-8 from time import strftime, sleep import schedule from vk_del_comments import * from vk_del_comments_older import * import os pid = os.getpid() op = open(“/var/us.pid”,”w”) op.write(“%s” % pid) op.close() token = ” tk_owner_id = “-000000000” tk_group_id = “000000000” tk_domain = “group_domain” curr_date =Short Read more…

Centos 7 extend volume

One more guide which help me to save nerves. https://www.rootusers.com/how-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk/ Part from it: Increasing the logical volume We use the pvcreate command which creates a physical volume for later use by the logical volume manager (LVM). In this case the physical volume will be our new /dev/sda3 partition. root@Mega:~# pvcreate /dev/sda3 Device /dev/sda3 not found (or ignored by filtering). In order to get around this you can either reboot, or use partprobe/partx as previously mentioned to avoid a reboot, as in this instance the disk does not appear to be there correctly despite showing in “fdisk -l”. After a reboot or partprobe/partx use the same command which will succeed. root@Mega:~# pvcreate /dev/sda3 Physical volume “/dev/sda3” successfully created Next we needShort Read more…

How to convert an OVA virtual machine to VHD

This is “How to convert an OVA virtual machine to VHD” guide link My approve for this guide, it’s worked: How to convert an OVA virtual machine to VHD     Read more…