Propel has a new core team

Hi folk,


You might know that Carpe Hora is using Propel ORM for internal developpments, and that a month ago propel project became orphan as @francoisz chosed to stop his involvemnet.
Well Propel is an awsome project that just can’t die, so in cooperation with @couac and @mazenovi we decided to take the project over.


Propel core team now maintain propel 1.6, PropelBundle for symfony2 and sfPropel15Plugin for symfony 1.x


For more information have a look to William’s post on propel blog.


Cheers,


Julien.

LVM in OVH rescue mode

Hey,
Booting in OVH rescue mode results in a netboot, and in such a mode LVM is not detected.
My logs being located in an LVM partition, I had to figure out a way to access it.
In order to detect logical volumes, you can use vgscan as follow :

vgscan
vgchange -ay

From now your volume group can be found in /dev/your_volume_group/, and can be mounted as usual.
Camille

Xen on OVH server (SuperPlan-2011)

Hey,


A few days ago, Carpe-Hora rent 2 SP-2011 to our own needs. We want install Xen on them.


We are habituate to install a Xen server, but with this type of server it’s was more complicated … Indeed, the NIC driver, wasn’t include in the Xen kernel of Debian package.


So, we must install the « e1000e » driver by the network on a server which haven’t a network connection :-) ! That will be funny !


We have 2 solutions, the first it’s slow but you can check every step, and the second for the sysadmin players :-) !


In the twice case, you must install Xen such as usual :

aptitude install xen-hypervisor-4.0-amd64 xen-tools xen-utils-4.0 linux-headers-2.6-xen-amd64 linux-image-2.6-xen-amd64

Configure grub to boot on the Xen Kernel :

mv /etc/grub.d/10_linux /etc/grub.d/21_linux
mv /etc/grub.d/06_OVHkernel /etc/grub.d/22_OVHkernel
update-grub

And download the driver e1000e :

cd /usr/local/src
wget http://freefr.dl.sourceforge.net/project/e1000/e1000e%20stable/1.4.4/e1000e-1.4.4.tar.gz
tar -xzvf e1000e-1.4.4.tar.gz

The easy way



With this way, we will use the vKVM. It’s a virtual KVM, it works but it’s very slow … For example, to the compilation of our driver, it will take 15 minutes … Furthermore, the keyboard is very weird, maybe it’s because I french, but I haven’t find the underscore ! To take it the use of the kVM more simply, we will create a little script before :

#!/bin/bash
cd /usr/local/src/e1000e-1.4.4/src
BUILD_KERNEL=2.6.32-5-xen-amd64 make install

Save it in /root, and make it executable :

chmod +x compile_e1000e.sh

Now, you must go in your OVH manager, and in Services-Netboot, define the vKVM option.

Reboot.

Wait the mail of OVH, with your couple of login/password and log in.


Check that you are on the good kernel :

# uname -a
Linux xxxxxxxxxx.ovh.net 2.6.32-5-xen-amd64

Ok, you are on the Xen Kernel, it’s ok we can execute our script. The compilation will take a while … 15 minutes in my server … I think this is in link with the vKVM.


Brief, after the compilation, go back in your OVH Manager and set the Netboot to « HD ». Shutdown the vKVM, and reboot your server.


If all it’s ok, you have now a Xen server with the Xen Kernel on your SP-2011 :-).

The players way



Before, I know the solution, I wanted control all the operation, so I use the vKVM. But now, I think if you do a little script with a crontask (take 2mn to the reboot) it can works.

#!/bin/bash
 
cd /usr/local/src/e1000e-1.4.4/src
BUILD_KERNEL=2.6.32-5-xen-amd64 make install
reboot

Here, the hardness is the OVH monitoring check if your server ask to the ping, and after 5 or 10 minutes, OVH reboot it in rescue mode. So you must boot on Xen kernel, compile the driver and reboot very quickly. But I think, it can works !


Have fun :-) !


Camille.

Thanks to : http://forum.ovh.com/showthread.php?p=442880

OpenWRT and OpenVPN

Hey,


Today, we will see how create a OpenVPN server (domU) with OpenWRT project.

Why use OpenWRT rather than GNU/Debian ?



2 answers to this question : security and performance. Indeed, an OpenWRT is very light, they are only the necessary so it’s more secure and consume less resource.

OpenWRT is for embedded devices, how can I use with Xen ?



You can recompile OpenWRT to use the domU architecture and add the software that you want !

How ?



First, install the requirements :

aptitude install subversion subversion-tools build-essential asciidoc autoconf binutils bison bzip2 flex gawk gettext libncurses5-dev libz-dev patch unzip zlib1g-dev ia32-libs lib32gcc1 libc6-dev-i386

Then, get the source :

svn co svn://svn.openwrt.org/openwrt/trunk trunk
cd trunk
./scripts/feeds update
./scripts/feeds install -a

Configure OpenWRT :

make menuconfig
[.....]
Target System
  [x] x86
Subtarget
  [x] Xen Paravirt Guest
Kernel modules
  Xen paravirtualized guest support
      [x] kmod-xen-evtchn
      [ ] kmod-xen-fbdev
      [x] kmod-xen-fs
      [x] kmod-xen-kbddev
      [x] kmod-xen-netdev
Network
  VPN
      [x] openvpn
      [x] openvpn-easy-rsa
[.....]

Finally, compile it :

make



After the compilation, you must transfer OpenWRT on your dom0, and create the config file :

kernel       = '/boot/openwrt-x86-xen_domu-vmlinuz'                                                 
root         = '/dev/xvda2 ro'
 
memory       = '32'
 
disk         = [ 'file:/boot/openwrt-x86-xen_domu-combined-ext4.img,xvda,w' ]
 
on_poweroff  = 'destroy'
on_reboot    = 'restart'
on_crash     = 'restart'
 
extra = "console=hvc0 xencons=tty"
 
dhcp = 'dhcp'
vif  = [ 'bridge=xenbr-eth0' ]
 
name         = 'openvpn'

Yes, I did define 32mo of memory :-) !


Launch your domU OpenWRT :

xm create /etc/xen/openwrt-openvpn.cfg

Now you have an OpenWRT with OpenVPN, you just have to configure OpenVPN. To do this, I suggest you to check this article : http://doc.ubuntu-fr.org/openvpn


Thanks to : http://publications.jbfavre.org/virtualisation/xen_openwrt_domu_pci_passthrough.fr


Camille

Pinba with symfony application (3/3) : integration in Centreon

Hello !


Since it is Friday afternoon, I stop all activity on my servers and I write documentation and article for the blog! We started a few days ago, to write a set of articles about Pinba and symfony. Today, this is the last one.


After the 2 previous articles, we had a Pinba server able to measure the requests of our own symfony application. That data is stored in a Mysql database. I would like to use this information to generate some graphics. To do that, I can use rrdtool, but I have a Nagios/Centreon server which is already used to monitoring and generate charts. So, I would like to integrate Pinba data, in my Nagios. To do that, I needed a Nagios plugin, but after a few research I didn’t find one. Therefore, I decided to write it. The source code is under GNU/GPL v2 and it is available on Github

How to use it ?



It’s pretty easy :


1. You download check_pinba.py : Exchange Nagios
2. You add it in your Nagios plugin folder (such as /usr/local/nagios/libexec)
3. Make it, executable :

chmod +x check_pinba.py

4. In Centreon, create a command : Configuration-Commands-Add :

$USER1$/check_pinba.py -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -D $ARG3$ -r $ARG4$ -q $ARG5$ -v $ARG6$ -w $ARG7$ -c $ARG8$

Argument definition :

ARG1 : database username
ARG2 : database password
ARG3 : database name
ARG4 : table name
ARG5 : column name
ARG6 : filter of column name
ARG7 : warning
ARG8 : critical



5. Then, you just have to configure your service and a few minutes later you can go in « Views » to check your chart :-). For example :

Have fun !

Camille.