2019 Jan 07 By itops_admin 0 comment

I am quite a documents aficionado, I take care to make sure any of my projects are well documented and easy to be used in the future, for others and me too – we all forget what we did a year ago especially the small details – that is why I feel the most important part of a project is the documentations. My favorite document style right now is MarkDown, why is that? well: MarkDown is text base meant it can be read (info only) by anyone anywhere without the need for a specific software (although missing a lot of…

2018 Aug 04 By itops_admin 0 comment

Following the last post “Python textwrap – Fix Your Multiline Strings Indentations” – where we learned how to fix the indentation caused by the python indentation standards. In this post I want to show you how to create a wrap to your text that support multiline and smart indent. This might sound old to you but the original terminal (standard) was and still is 80 characters width. Long ago when I’ve started working on CLI applications and scripts my boss asked me to see the “usage/help” of one of them, then he looked at me and said – This is…

2018 Aug 04 By itops_admin 1 comment

I’ve been writing a lot in python the last couple of months and most of my code is for a CLI oriented environment (Mostly Linux/Unix shell). One of the most important things when you create CLI is the help and usage string – Mostly because other people will try to use it – But lets face it, that script you’ve written a month ago? You’ve probably completely forgotten how it works. So writing help or usage usually means that you work with an external file or multiline string. Now with a file there is no problem but a multiline is…

2018 Aug 04 By itops_admin 0 comment

In my years in IT I’ve handled a lot of storage (proprietary and open source solutions). But one of the main issues that I had (beside design of large storage and backup) is the rouge user/script/program – sometime one of them will act up and fill the storage with large amount of files or one massive file (for example a big log file). From time to time someone comes to me and say “Well my script isn’t working” – one of the first things I do is running “quota -u <USERNAME>” and 90% of the time We both see that…

2018 Aug 04 By itops_admin 0 comment

Although large amount of alternative web servers a lot of the web services out there still use Apache httpd software. I will not go into why choose Apache httpd and how, but I like to share a  small issue I had with configuration check of my service. As IT personnel who worked in a production environment I’ve learned the best practice of any configuration change is check your configuration before reloading/restarting the service. Now Apache httpd configuration check is easy: # apachectrl configtest —- or —- # apachectrl -t Now – What about when you have multiple apache httpd instances…

2018 Aug 04 By itops_admin 0 comment

LDAP is a wonderful way to handle all your company employees users. I’ve been using it for a long time and just like the easy way to handle it and how users can be authenticated via the LDAP directory all threw our intranet sites (Ticket manager, Wiki, Tools and more). A month ago I had a new project – simple and easy to create some directories for group of users and give some full permissions and some only read permissions. Due to the nature of linux that was quite easy – Just create a new group (or several) to encapsulate…

2018 Aug 04 By itops_admin 0 comment

Few years ago after several critical storage catastrophes (that fortunately ended with no data lost) I’ve decides to move my most important files to the cloud (mainly my and my family photos) After checking several cloud storage providers I’ve decided on Google (back then I think drive was non existent or at beta) to backup all my pictures to Picasa. The plan was very good: Legacy Plan 80G for 20$ a year – for something with the features of the drive and more this price is very good. After Google Drive was working on my desktop I’ve deserted Picasa as…

2018 Aug 04 By itops_admin 0 comment

A week ago one of my old colleagues ask some help with an error he has on one of his servers, I was happy to oblige. He had several servers all working exactly the same, same hardware, same OS and same configuration (apart from IP’s). One of his server crashed and after the reboot one of his batch scripts stopped working specifically on this server. The script tried to determind if a specific volume (for example: /mnt/volA) exist and have enougth free space, This he did by invoking the “df” command and the “quota” command (Or their equivalent in the…

2018 Aug 04 By itops_admin 0 comment

Few weeks ago I started up a project migrating a development mysql to the production environment. Doing this change included a lot of tests and updates I wanted to do for a long time. The short story is that I migrated user defined mysql data (permissions and triggers was vetted before) to Master Slave on docker images and a different user with the entire environment configured via Ansible (yes yes I went overboard with the design – but hey, now I have all the templates I need and every docker and mysql needs and documentation and all orchestrated by ansible)…