MyTechnicalThoughts on Slack!

Hello there! I’ve got some good news!

I’ve created a Slack Help Channel that complements this blog, you can get help here.

Posted in Help | Tagged , , , , , | Leave a comment

Build large environments in no time on Ubuntu using conjure-up

Whether you need to build a Kubernets cluster, an openstack instance, a hadoop cluster…etc, Canonical has developed a tool called conjure-up. This tool can build these whole environments for the purpose of development and testing, or small environments in a few minutes.

To install it on Ubuntu Xenial:

sudo snap install conjure-up --classic

To start the interactive deployment CLI, just run


or specify the exact software that you need to deploy (called spells in its terminology):

conjure-up kubernetes

That’s it, Enjoy!


Posted in Linux, Uncategorized | Tagged , , , , , , , | Leave a comment

What to do if docker on Ubuntu doesn’t recognize addition of a user to its group when using PBIS with AD

You add a user to group docker so that you can run docker commands without having to be root or a sudoer.

On an Ubuntu 16.04 server which authenticates against AD using PBIS, I added users to group docker, but wasn’t getting recognized at all and had to use sudo, which defeats the purpose.

All I did was the following:

  1. Edit /etc/group
  2. go to the bottom of the file where you will find the docker group
  3. change the name of the AD group from lower case to upper case characters and save, e.g.:
    docker:x:999:hobba\socrat to docker:x:999:HOBBA\socrat
  4. Enjoy!
Posted in Linux, Uncategorized | Tagged , , , , , | Leave a comment

Install docker on multiple Ubuntu Xenial hosts with Ansible

Ansible is an amazing piece of configuration management software. Among its amazing features is that it’s totally agentless and the only 2 packages that it needs on any host are python and an SSH server.

Today we will create a playbook that will do the following:

  1. Add the stable docker repository to the software sources
  2. Add the gpg key
  3. install docker-ce package

It’s assumed that you have already added all required hosts to /etc/ansible/hosts and I’m naming this group “swarm”

- hosts: swarm
  remote_user: qcri\aamr
  gather_facts: no

 - name: add docker repo
     repo="deb xenial stable"
 - name: install repo gpg key
 - name: refresh cache and install docker-ce


Sources: Ansible Documentation

Posted in Ansible, Linux, Uncategorized | Tagged , , , , , , , | Leave a comment

How to clear your bash history

For old commands, just edit .bash_history and delete whatever you want from inside.

For commands in the current session, just run this command before you exit:


The $HISTFILE environment variable is the one which holds your commands and will flush to the file once you exit the session.


Posted in Linux, Uncategorized | Tagged , , , | Leave a comment

Create Amazing QR Codes with QRCode Monkey

And it’s FREE! I wouldn’t have written a blog entry for something except if it was such an amazing one:

Posted in Uncategorized | Tagged , , | Leave a comment

Fix Slow SFTP/SCP File Upload Rate and Stalling caused by TCP SACK

In brief, sometimes a conflict occurs between some firewalls and the TCP SACK. In my case, the upload was severely affected and reached upload speeds of a few kilobytes over a LAN!

The following command disables TCP SACK and fixes the slow upload on all Ethernet cards:

sudo sysctl -w net.ipv4.tcp_sack=0

To make it permanent, edit /etc/sysctl.conf and add this line

net.ipv4.tcp_sack = 0

Then run:

Posted in Linux, Uncategorized | Tagged , , , , , , , , | Leave a comment