MySQL in Docker without losing data after rebuild

When it comes down to running database services or anything that has states in it with docker containers, the first question is often “how about my data” after the container is destroyed or rebuilt? The simple answer is you can use Docker Data Volumes. After reading a few articles as well as trying it out […]

Read More »

Run Docker and Docker Compose in a Vagrant box

Created https://github.com/richardhe-awin/vagrant-docker recently which provisions a Vagrant VM (Ubuntu trusty) with everything necessary installed to run docker & docker compose. The main reason I created this is because it gives you an isolated environment to run things without going through the hassle of installing docker & docker compose which can be quite annoying if you are […]

Read More »

How to: Install a Virtual Apache Hadoop Cluster with Vagrant and Cloudera Manager on a Mac

Feel free to skip some of the steps if you already have certain packages installed Get Cask brew install caskroom/cask/brew-cask Get Vagrant & Vagrant plugins brew cask install virtualbox brew cask install vagrant brew cask install vagrant-manager vagrant plugin install vagrant–hostmanager Install Hadoop git clone [email protected]:richardhe-awin/vagrant-hadoop-cluster.git cd vagrant-hadoop-cluster vagrant up Configure Cloudera Manager (mostly referenced from http://blog.cloudera.com/blog/2014/06/how-to-install-a-virtual-apache-hadoop-cluster-with-vagrant-and-cloudera-manager/) […]

Read More »

Mount Shared Folder to Ubuntu if auto-mount doesn’t work

I had some issues with mounting shared folders with Virtual Box because they don’t appear anywhere. I finally figured out that the Shared drive is already there, it’s just not showing anywhere. Before continuing, making sure you have installed the latest version of Guest Additions and your user is added to the vboxsf group. First, […]

Read More »

Ant returns code 137

I had this problem at work when running php unit tests on Jenkins (CI server) and it took the whole team ages to figure out this problem. I thought it’s something worth sharing. We use Jenkins to run ant which invokes our unit tests and to speed up the process we are running all the […]

Read More »

Debian Zero To Hero Guide (best for PHP developers)

Took me quite a while to pull all these information together. This guide should install most basic packages you will need to get started with PHP Development. *This was tested with Debian 7.1.0 Before we start, please launch a root terminal to save typing a million sudo commands. Short cut key: Alt + F2, search […]

Read More »

Ubuntu Zero To Hero Guide (best for PHP developers)

Took me quite a while to pull all these information together. This guide should install most basic packages you will need to get started with PHP Development. *This was tested with Ubuntu 13.04 but most things should also work on Ubuntu 12. Java First #remove open jdk and install oracle jdk sudo apt-get purge openjdk* […]

Read More »

Virtual Box Mount new Disk (Centos 6)

This is a step to step guide mounting a disk to Centos 6 running on Virtual Box. Add a new disk under virtualbox setting -> storage. Set the new disk as Primary Slave Boot up centos and type in fdisk -l You should see a disk called Disk /dev/sdb something like , Disk /dev/sdb: 12.8 GB, […]

Read More »

SSH Public / Private Key Setup

Create Public / Private key pairs ssh-keygen -t [Type of the key]  -b [Number of bits in the key to create] e.g. ssh-keygen -t rsa -b 4096 Copy public key to remote server ssh-copy-id -i [path to public key] [username]@[host] e.g. ssh-copy-id -i keys/sample_public_key.pub [email protected]   p.s. Public key is always associated with a user […]

Read More »

Useful Linux Commands

Commonly used Linux commands. //change permissions recursively on Directories: find . -type d -exec chmod XXX {} ; //change permissions recursively on Files: find . -type f -exec chmod XXX {} ; //extract .tar.gz file: tar -zxvf [file].tar.gz //logout logout //switch user: su [username] //change owner of a directory recursively chown -Rv [username] [somedir] //change […]

Read More »