Archive for August, 2010

Add bridge and assign unique IP for each container in OpenVZ

I am writing this tutorial to refresh my mind ( I am not configuring the machine right now ), so forgive if me the explanations are not clear and structured.

After you successfully installed the OpenVZ you need to configure the IP for the containers. If you are using the built in “Venet” you will end up making the host as the gateway. In the other words if you traceroute to your container IP, it will through your host then to your container. Here are the sample of the scenario :

  1. Host IP : 202.58.181.2
  2. Container 1 : 202.58.181.50
  3. Container 2 : 202.58.181.51

Basically if you use the venet, if you traceroute to the Container 1 the result should be : Your ISP -> 202.58.181.2 -> 202.58.181.50 so the IP of the Host is showed up. Same if try to traceroute to the second container. My solution to overcome this problem are :

  1. Make a bridge using brctl command
  2. Use the Veth instead of Venet
  3. Put all the Veth into the bridge
  4. Assign the Host IP to the bridge

If you not ASSIGN the host IP to the bridge, you can’t access the host machine. The guidelines that I followed is from link http://wiki.openvz.org/Using_veth_and_brctl_for_protecting_HN_and_saving_IP_addresses

Here is my /etc/rc.local configuration looks like :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
 
touch /var/lock/subsys/local
brctl addbr vzbr0
brctl addif vzbr0 eth0
brctl addif vzbr0 veth1.0
brctl addif vzbr0 veth2.0
brctl addif vzbr0 veth3.0
brctl addif vzbr0 veth4.0
ifconfig vzbr0 0
ip addr add 202.58.181.2/25 dev vzbr0
cd /usr/local/webvz/ && /usr/bin/ruby script/server &>/dev/null &

I’ll update this post if I need to configure another VPS Server.

Sydney PHP Group

Sydney PHP Group or sydphp is a PHP community in Sydney, Australia. I found the website when I was reading an article in Graham Weldon’s blog. Graham is one of the CakePHP core team and also the organisers of Sydney PHP Group.

From what I read, it’s said that they run regular meetings in the city. But when I clicked it, it didn’t show any histories or upcoming events ( maybe they not runs it regularly as they said ). That’s fine at least I found already one of the PHP community in Australia, yay :) plus it has the job vacancies post in it ( so I think I won’t have any difficulty to find any freelancer job if I were in Sydney ). :D

First post in August 2010

Hmm it’s August already and that’s mean my time in Binus is just two months left. Yeah, my contract will be ended on 31st October ( I hope so :P ). There are so much experiences that I got while working in Binus, not mentioning the technical experiences but more about the life experiences.

The last 3 weeks I was busy taking my IELTS preparation course, it’s teach you to get accustomed to the IELTS test. The course has 4 parts : the speaking ( in which I needed the most ), the writing ( I have difficulties to write in Indonesian but now I have to write in English, damn ), the reading and the listening. The parts that I most feared are the speaking and the writing ( that’s why I am practicing right now by writing my blog post using English :P ). The IELTS course will be over on 23rd August and that’s mean I have to take the test in September or October so that I can start to looking for the universities in November and December ( I hope it’s not late ).

To tell you the truth, actually I feel a bit scared and not sure if my decision right now is the best. It’s just funny because I remembered that I was so sure about my plan to study abroad. I remembered how I convince my mother about my plan. At first she didn’t agree, she prefer that I continue my study in Singapore because she said it’s closer than Australia. But my father is different, he looks happy when I told him that I want to continue my study. I know that my father put so much faith in me, my sister told me that my father keep telling his friends about my plan to continue my study in Australia. From that I can conclude that he is hoping something big from me, I am happy to heard that and at the same time feel burdened because it’s all my choice to study abroad and my father give all the decision up to me. How if I can’t be what my father wanted me to be ? How if in the end I just ended up wasting his money ?

Maybe it’s just a pessimistic side of me, but after working for about one year and several months has made me questioned several things. The first is what I want to achieve and to do in this life. I keep asking my friends about this question : “What is the differences between you die now and later ?” Some said with the religious point in view in which he said that if you die now, you will ended up to a place that you shouldn’t been to. Others said that you can’t paid back for what your parents had gave to you, and there is also ‘confucius’ alike opinion : “You must find it by yourself, as long as you keep living, you will find your purpose eventually”.

The second is about the reason why I should take my master degree and abroad. First time I decided to take the master degree is because I already completed my bachelor and I think it will be better if I can continue it to master. So simple, no particular reasons such as for getting good job or showing people that I have money to take my master degree. Time goes by, I started working, feels how to live by your own feet, see how other people struggling with their problems and realize how lucky I am. I am happy to be lucky, I am happy that I have a chance to continue my study abroad but it’s feels like taking another people luck. I am thinking at the moment that maybe I don’t deserve this, why not my sister ? why not my brother ? why me ?

The third is, let’s say I continue my study abroad, after wasting so much money and in the end I can’t pay back what I already wasted. One of my friend in my IELTS course said that if you decided to study abroad, don’t ever think to return to Indonesia before you can pay back what you had wasted. And it’s not included with the plan if I am getting married.

I think right now I just full of confusion, lack of planning, motivation, and reasons. So let’s living this life and wondering what surprise I’ll get next.