[Tip] Cloning a host machine via Rancher

If you have setup Rancher correctly and you have a machine running, you can clone it using the following option

Actually its not cloning by the exact name of cloning, but the thing is that it will use the same API token ( or any credentials ) you have used to create that Host, so for example am using DO, so it just going to use the same API token that I used before to create this host but you will got to the same UI that you have used to create the host like this one

Filed under: docker, Linux, Other

What I have learned about Docker in the past few days

In the past few days, I was only reading about Docker, trying to understand it more and more, see how can I use it and how can I implement it in my workflow, and yet still need a lot to learn.

In my learning journey I depends on reading articles (a lot of articles), checking Docker documentation, watching online courses or even youtube videos, and trust me not all of them is worth the time I spend because either they are old or does not cover the situation am trying to achieve in my head. And am not saying they are bad, but everyone knows that Docker release cycle is fast, and with each new version they introduce a big breaking features which will not work with the older versions, so if you dont follow up fast you will lose the track and thats also apply to any article you read, if its talking about version 1.11 mean while you are working with 1.12, you may get lucky and you find the solution for the issue you are facing.

Now enough with this long talk, which is debatable by the way, lets focus about what I have learned in the past few days and how I got what I want fast.

Basically I wanted to have a small API + Database images, based on Docker like this

Continue reading

Filed under: docker, Linux, MySQL, nodejs, Other

How to remotely debug your nodejs app using PHPStorm

There are many ways to do that, but the simplest one is to do a small tunnel to your vagrant so you can connect to it as if you are connecting to local host.

so am going to use a script I found in gist ( and yes am lazy to write it every time), so all you have to do is download it and use it as the replacement to your vagrant ssh command .

Thanks to the author.

Continue reading

Filed under: Code

Configure your MySQL/Mariadb server to accept local connections

So lets say that you have created a Database server, and you wanted to accept only connections from other servers using the internal/private IP, to be honest I found that the easy way is to do that via iptables, am not going to talk about how to save your iptables as I will assume that you know how to do so, if you dont search using google.com

Lets assume that your private ip is 10.2.10.2 and your public ip is 192.168.2.10 so now you will have to execute the following commands :

Continue reading

Filed under: Linux, MySQL