a more Production friendly ELK stack with Docker

recently I spend a big chunk of my time in office doing DevOps related tasks. Elasticsearch is one of the technologies that we use a lot for both production and development.

ever since I had to deal with elasticsearch instances in the office I decided to move them to docker containers, that would make my life easier as we have multiple clusters running.

there are many ELK stack docker images out there, but I found elk-docker be the closest to what I’m looking for. The image documentation is pretty good to get you started but I decided to create a docker-compose file that makes more sense for a fast more production ready box.

Continue reading “a more Production friendly ELK stack with Docker”

Upgrade to latest nginx on CentOS 7

The nginx version that is shipped with CentOS epel repository is quite old.

To upgrade your nginx installation you need to create a repository and add nginx servers to it.

to do so create a file called nginx.repo on /etc/yum.repos.d/nginx.repo and place following content in it.

[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key

[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key

then simply stop nginx service and run the yum update command.

systemctl stop nginx
yum update nginx

this will be using the latest stable package. if you want to use the latest mainline release you need to tell yum to use that one instead by running:

sudo yum-config-manager --enable nginx-mainline

Racism in 21st Century: AXA Malaysia cancels my health insurance

I’ve been living in Malaysia for 10 years now. I’ve came here since I was a teenage, I’ve studied here and I am working here as an expatriate. I had cars here, rented properties and paid a significant amount of Tax during my stay.

2 years ago I found myself not being covered by any health insurance from the organisation that I work for. prior to that I have always been covered by insurance applied from the university that I study on. So I decided to buy myself a personal health insurance, that would be something that could be expected from people like me, after all I am sort of staying here permanently, its true that I am not holding a PR but being under a Employment Pass would suffice.

I called the usual insurance agent whom I’d always go to for renewing my car road-tax & insurance, he found me a plan from AXA Malaysia and I opt in for it.

Yesterday morning I received a phone call from the same guy, he told me that AXA contacted regarding them not being able to renew my health insurance because of sanctions against my country. hearing this was very disappointing to him as well as me, well I know there are sanctions placed against my birth country government by USA but I had no idea that in Malaysia it is going to this extent that they decide to attack an individual’s health plan.

I remember that there were times that I was not given proper financial & banking services here due to the sanctions, like last time when I was applying for a credit cards banks did not do good job about that, but knowing today it went to the next level up to simply denying a right which I willingly pay for it, a health insurance is pure Racism.

There seems to be a memo from BNM (Bank Negara Malaysia) regarding dealing with individuals whom are associated with the departments which are targeted by sanctions in my country, but the fact that banks & insurance companies are using it to attack individuals like me is outrageous.

The insurance agent tried to make some calls to other insurance companies looking for an alternative for me, but unfortunately the result was shockingly bad. he called me starting his sentence with “mahdi, can you change your nationality?”.

Thumbs Down to US, UN & whatever global organisations that are plotting these. I’d love the world to hear my complains loud that whatever these countries and bullies claim on human rights, sanctions not targeting normal people and etc is utter lies. looking at how these sanctions can impact quality of life for me who is thousands of kilometres away from Iran for more than 10 years, you can expect how bad the situation of medical supplies be for the people who are within the country.

Today racism is not about whats the color of your skin, it’s about where you coming from. it’s all about commercial politics. Today’s world is the world of bullying.

PS: I am very disappointed by Malaysian Government & Bank Negara’s shortcomings on handling such situations & not having a plan to stop organisations such as banks denying to give me the service I deserve or insurance companies basically telling me that I must go and Die in an indirect way.

I no longer maintain a PDF resume.

Working in IT means you are most likely to be exposed to new technologies, languages & frameworks. that can get annoying when you are about to submit your resume/cv to a new potential client/employer.

Every single time when I had to send the resume to them I’d found myself that the copy file was lacking some of the skills that I’d learned recently. That would lead into me looking around for the latest copy of my resume in cloud or somewhere, edit the file and export it as pdf.

The problem with that is that most of the times I’d just be lazy & once I sent the updated version I would simply leave it on my desktop or temporary workspace, This would create the problem of me having multiple versions of the same resume in different folders and yeah the headache begins.

So I decided to give this a change, I decided to dump all those doc, pdf files & go web. I made myself a tiny web page that reads my skills & information off a sqlite file, I can also edit and update that file at any time i’d want, and instead I can provide a link to the potential employer and client. You can have a look at what I came up with here, it’s also linked on header of this page.

There are few variants of the same resume, a web version (it is mobile friendly too) which is what I expect most to look at, then you’ll have the option to download a pdf generated version or view it in print-friendly mode. I’ve also created a json version, so in case my employers wanted to go creative or someone wanted to stalk my skills they can simply call my resume API.

The benefit to this would be me having less headache on finding the latest version of my resume, or simply add what I need to add the moment I want to send it out to clients. For them they can always download a PDF generated version, they can also know when was the last time I’ve updated it.

forgive yourself today

a while ago I found myself struggling with the idea of being perfect in life, or in another word being in a perfect life. Simply making sure things are moving right on the plan, to prevent anything bad from happening, and that was creating this feeling of anxiety in me that I’m not in control.

It started years ago with a traumatic incident, once I’ve gotten through it, I thought I am free & Its over. soon I found myself struggling with an strange fear, the fear of it happening to me again. in every step I take & every decision I make, I was afraid of something bad happening.

I was too consumed with the anxiety of being out of control that I experienced 1 or 2 panic attacks. The anxiety gets more intense on the same time of the year that I had that incident. Anniversary effect they call it, I know right.

I soon found out that this anxiety was getting stronger living among the outside world. It was not really interfering on how I could interact with the people I knew, but to see the nasty things people do to each other, whether its something that I witness with my own eye, or something that I watch in News or even a TV Show, or even hearing a Tragic story from someone in a group was making me feel deeply disturbed.

Continue reading “forgive yourself today”