Durbin – monitor Docker Containers remotely

You’ve installed Docker on your server and running some apps in containers. Awesome! 🙌 🎉
But wait..

  • How do you check which containers are running and which are stopped at this moment?
  • How do you check their logs when needed?
  • Can you stop/start them without logging into the remote server?

This is where you’ll require Durbin! It’s a lightweight PHP script, designed to provide a simple monitoring solution for Docker Containers running on a remote server.

Continue reading →

Laravel Gates – a graphical intro for beginners

Gates! The first impression it makes is “way to enter somewhere”. But, in reality, the primary responsibility of a gate is to prevent unwanted entry. Another perspective of thinking about gates is – different gates will take you to different places.

Laravel picked this word, “Gate” to name its basic authorization system. What a beautiful similarity between the purpose of an authorization system and the real life gates!

In this post, we are going to:

  • Take a simple application as an example scenario.
  • Identify the usages of authorization in this application.
  • And then, how we can solve it using Laravel Gates.
Continue reading →

Kohana 3.x Log Viewer module

Kohana Logs are a good way of debugging and monitoring application flow. It has various types of log writers for storing and showing logs. But the most commonly used one is the File Writer. One painful thing with this file logs is, downloading, reading and clearing when testing on a remote server.  To reduce this pain, I wrote a module to explore the log files on server with a beautiful interface. It may help many of you who are developing with Kohana.

You can get it from github –  https://github.com/ajaxray/Kohana-Log-Viewer

Kohana Log Viewer screenshot

Continue reading →

The first Kohana book : Kohana 3.0 Beginner’s Guide

Kohana 3.0 Beginner’s Guide Cover page
Kohana 3.0 Beginner’s Guide

Codeigniter was my first PHP framework. Though it works nicely for wide range of app types, slowly I felt uncomfortable in some points. For example, lack of OOP practices, untestable structure etc. (Sorry to say, unit-testing in codeigniter was a horror!) Later, among PHP frameworks, I worked a lot with Zend Framework and a little with Symfony . One day Emran Hasan shared IBuildings article about HMVC which presented Kohana as example HMVC framework. That was the starting, in a few days Kohana took the position of primary PHP framework for me. I built website, Enterprise application, Service layer for SOA and few more apps with Kohana comfortably.

But when framework newbies asks me with which one he should start, need to think twice before suggesting Kohana. The main reason is, it’s documentation was not as rich as Codeigniter or Zend Framework. And there was no book. BTW, Kohana unofficial wiki is a BIG try to help in this issue. Besides, recently Packt has published the first book on Kohana “Kohana 3.0 Beginner’s Guide“. Jason D. Straughan wrote this book for Kohana version 3.x. Few days ago, Snehman Kohli from Packtpub has contacted me and requested for reviewing this book. As a fan of Kohana, I’ve happily accepted. So, here is my view on this book.

Continue reading →

Setting up Database testing with Kohana UnitTest module

Kohana Unittest module has made testing in Kohana v3 easy and fun. Lysender wrote a cool, straight forward post about how to set it up and running. I’ll just talk here about how I have set up database testing with Kohana Unittest for my personal use. Not saying “How to set up”. Because it’s obviously not the best way to do this.

Kohana Unittest

The important thing I need to ensure for testing database is, It’s in a known state before running a test. And, changes on database made by one test will not impact on another test. So, I’ll have a separate database for testing. Which will be loaded with a predefined dataset before running each test and will be truncated after test is done. Also, I have to be careful about that, my models are executing quires on test database in testing environment. Here is how I’ve done it? –

Continue reading →