Ubuntu 14.04 adding HP proliant support pack (hpacucli problem solved)

tfm_logoIn the begining there was nothing but few baremetal. After a while someone delivers a whole bunch of baremetal on your doorstep and say : “I need them installed by tomorrow”. Same configuration … With the harddisks in raid and ubuntu on all of them . What do you do ?

It’s a big problem. Like most big problems you split it in lots of little problems that can be managed easier.
What you need to do for one baremetal:

  1. Update the ILO firmware and Bios (if necessary) . This will come handy: https://play.google.com/store/apps/details?id=com.hp.essn.iss.ilo.iec.spa&feature=search_result . I’m not going into details about it in this post
  2. Create the disk arrays
  3. Install the operating system on it
  4.  Configure it and deploy it.

For one server let’s say you can do it in few hours , few beers and some pizza’s. But … wait a minute .. There are a LOT of baremetals to be installed. One option is to call some friends and do that while you watch a movie.

OR you can be smart and automate the tasks. How ? What i need ?

You need a baremetal installer server or a laptop or a virtual something (virtual box / vmware / you choose )  image that will do the job for you while you sit back and relax.

The ideea is simple:

  • Baremetal will boot from network
  • tftp server will deliver the boot image, boot it , get an ip addres from the dhcp server and register the new server into the baremetal installer and will fill the hardware configuration there.
  • Then you can ( using ansible  ) to actually do the raid configuration ,  bios updates ,  firmware updates, and operating system install.
  • Add the necessary configurations.
  • Once complete the system will boot from raid and you have a system up and and running ready to be deployed.

Now … Back to the post subject .

How you can configure HP raid from inside  ubuntu ? In order to have in the network bootable image the proper tools to do actually do the configurations…

First we install hpacucli :


sudo echo "deb http://downloads.linux.hp.com/SDR/downloads/MCP/ubuntu precise/current non-free" >>/etc/apt/sources.list
wget http://downloads.linux.hp.com/SDR/downloads/MCP/GPG-KEY-mcp
sudo apt-key add GPG-KEY-mcp
sudo apt-get update
apt-get install cpqacuxe hp-ams hp-health hpacucli hponcfg
service hpsmhd stop
update-rc.d hpsmhd disable
hpasmcli -s "show server"

Then when we boot the new baremetal to be installed we can gather the informations about the raids:


hpacucli ctrl all show config

That will produce an output like ( in this case i already configured the raid:


Smart Array E200i in Slot 0 (Embedded) (sn: VX9AMP1927 )

array A (SAS, Unused Space: 0 MB)

logicaldrive 1 (136.7 GB, RAID 1, OK)

physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK)
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, OK)

At this point you can create some scripts that will create the partitions in the way that the shareholder wants them.

for example:


hpacucli ctrl slot=9 create type=logicaldrive drives=1I:1:3,1I:1:4 raid=1

Custom version of nginx in Ubuntu

Building a custom ( adding a custom plugin )  version of nginx in debian is not a very complicated job:

Create a directory  ( ex test2 ) and change directory to it.

After that do:

apt-get source nginx

in debian directory you should modify rules file , then if necessary  source/include-binaries , add your module in modules directory and modify README.Modules-versions to reflect your changes .

Change back to test2/nginx-1.4.1 directory and run

dpkg-buildpackage -b

If everything works ok and module is configured correctly you should have it ready to be run:

dpkg -i nginx-full_1.4.1-3ubuntu1.3_amd64.deb nginx-common_1.4.1-3ubuntu1.3_all.deb

 

Enjoy.

Cloudera CDH5 adding mysql drivers to sqoop

I installed a Cloudera hadoop CDH5 cluster ( 4 mchines )  and started to play with it .

However soon i ran into a weird problem. When i tried to import some data from mysql using sqoop i realized that the mysql drivers weren’t installed .

Installation was done using parcels . So i after reading a lot of documentation i realized that the directory where i was supposed to put the mysql jar is:

/opt/cloudera/parcels/CDH-5.0.0-1.cdh5.0.0.p0.47/lib/sqoop2/webapps/sqoop/WEB-INF/lib

I used mysql-connector-java-5.1.30-bin.jar .

If the file is not there … It wont be deployed .

How to reset a error in bind zone serial number

If you misstype the serial number in a bind zone file you might be in a lot of trouble . Especially if you misstype it like this:
2014300101 instead of 2014030101 . Yet there is a way to fix it:

According to the docs :
Add to the current serial number 2147483647 and rndc reload, then put the correct serial and rndc reload again.