Configuring FCoE in Linux RHEL and HP FlexFabric

– First step is to identify Ethernet NIC’s and CNA that will pass FCoE traffic and thi is done by collecting information about MAC adresses.
– Installation of both of packages : fcoe-utils and lldpad
yum install fcoe-utils lldpad
– Load the driver bnx2fc
modprobe bnx2fc
– Renaming /etc/fcoe/cfg-ethx file to the name of the CNA, in our case it is eth2 :
cp /etc/fcoe/cfg-ethx /etc/fcoe/cfg-eth2
cat > /etc/fcoe/cfg-eth2 /etc/sysconfig/network-scripts/ifcfg-eth2<EOF
The MTU is set to 9000 because FC payload is 2,112 bytes jumbo frames must be turned on to
avoid unnecessary IP fragmentation
– Run ifup to bring FCoE interface up
ifup eth2
– Run fcoeadm -i to check all created FCoE interfaces and status.
– Run cat /proc/scsi/scsi to see the luns

Configuring FCoE in Linux RHEL and HP FlexFabric

Install bower on Ubuntu 14.04

I need to install bower to manage my js library for such use I need to install it using npm the nodejs package manager.
I you need nodejs on ubuntu 14.04 don’t install it using apt-get, the ubuntu packages are bad.
You may install the official package for ubuntu from nodejs website.

curl --silent --location | sudo bash -
sudo apt-get install --yes nodejs

bower is a shell tool, you have to install it globally so I run:
npm install -g bower

Install bower on Ubuntu 14.04

Quick setup : Free tier ec2 amazon instance

I create a free tier ec2 instance in amazon, I reserve an Elastic IP and assign it to my instance.
I install nginx and When I need to access nginx from internet, for that I went to my domain registrar godaddy I create a CNAME that point to this Elastic IP.
Finally I create a security group, I open stream to HTTP port, and my ec2 instance is became ready to use and to share http content.

Quick setup : Free tier ec2 amazon instance

Install and configure MongoDB in Ubuntu

We will install the most recent version of MongoDB from the 10gen repo. This requires us to first register the public key for the 10gen MongoDB apt repository, add the repository, and continue with the MongoDB installation.

Configure MongoDB
sudo apt-key adv --keyserver --recv 7F0CEB10
sudo echo "deb dist 10gen" | sudo tee -a /etc/apt/sources.list.d/10gen.list
sudo apt-get -y update
sudo apt-get -y install mongodb-10gen vim curl

Create the database and database user
We need to create our database (proddb) and database user(admin).All commands denoted with ‘>’ are executed inside of MongoDB.

sudo mongo
>use proddb
>db.addUser({user: "admin",pwd: "bacon&eggs",roles: ["dbAdmin"],})

Modify MongoDB settings
We need to modify our MongoDB configuration to set the bind address to ‘’ and port to ‘27017’. By default these values should be correct, but we want to ensure these settings are configured explicitly.

sudo vim /etc/mongodb.conf

Ensure the following is set correctly (note this is only a portion of the configuration file):

# mongodb.conf

# Where to store the data.

# Note: if you run mongodb as a non-root user (recommended) you may
# need to create and set permissions for this directory manually,
# e.g., if the parent directory isn't mutable by the mongodb user.

#where to log


port = 27017
bind_ip =

Restart the database
Now just restart the database for the changes to take effect.

sudo service mongodb restart

Install and configure MongoDB in Ubuntu

Fork from github and add change to your own repository

When playing with vagrant, I set up a haproxy keepalived apache stack on ubuntu precise.
For that I forked this repository vagrant-haproxy-demo from github ( that run a haproxy standalone instance and I append my change to it to support keepalived.

First of all, I create the repository vagrant-haproxy-keepalived.
and I set remote origin to the repository created.
I create a new branch named development, I modify code and I do a commit.

Finally I checkout to master and rebase the branch development.

git remote set-url origin
git checkout -b development
git add .
git commit -a
git checkout master
git rebase development
git push origin master

My code is here, you can browse code.

Fork from github and add change to your own repository

Build nginx flask vagrant vbox on windows

Before this post I wrote and article on how to serve flask on ubuntu.
I share with you my first contact with vagrant, on a windows box I build a virtualbox vm that run nginx, and a flask “hello world” application.

here the Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|

hostname = "propus"
locale = "en_GB.UTF.8"

# Box = "ubuntu/trusty64"

# Shared folders
config.vm.synced_folder ".", "/var/www/ovpn"

# Port forwarding :forwarded_port, guest: 80, host: 8080

# Setup
config.vm.provision :shell, :inline => "touch .hushlogin"
config.vm.provision :shell, :inline => "hostnamectl set-hostname #{hostname} && locale-gen #{locale}"
config.vm.provision :shell, :inline => "apt-get update --fix-missing"
config.vm.provision :shell, :inline => "apt-get install -q -y g++ make git vim"

# Lang
config.vm.provision :shell, :inline => "apt-get install -q -y python python-dev python-distribute python-pip"

# nginx
config.vm.provision :shell, :inline => "apt-get install -q -y nginx"

config.vm.provision :shell, :path => ""


And here is the script content


pip install virtualenv
mkdir -p /var/www/ovpn && cd /var/www/ovpn
mkdir /var/log/uwsgi/
virtualenv -p /usr/bin/python venv
source venv/bin/activate
pip install uwsgi
pip install flask
rm -f /etc/nginx/conf.d/default
cat <> /etc/nginx/conf.d/ovpn

server {
listen 80;
charset utf-8;
client_max_body_size 75M;

location / { try_files $uri @ovpn; }
location @ovpn {
include uwsgi_params;
uwsgi_pass unix:/tmp/demoapp_uwsgi.sock;

cat <>/var/www/ovpn/demoapp_uwsgi.ini
#application's base folder
base = /var/www/ovpn

#python module to import
app = hello
module = %(app)

home = %(base)/venv
pythonpath = %(base)

#socket file’s location
socket = /tmp/%n.sock

#permissions for the socket file
chmod-socket = 666

#the variable that holds a flask application inside the module imported at line #6
callable = application

#location of log files
logto = /var/log/uwsgi/%n.log

/etc/init.d/nginx restart

Place the Vagrantfile and the in the same directory.
and from powershell console Run:

vagrant up

This will build the vm image. have a fun !

Build nginx flask vagrant vbox on windows

Understanding Linux Load Average – Part 3

The Dutch Prutser's Blog

In part 1 we performed a series of experiments to explore the relation between CPU utilization and Linux load average. We concluded that the load average is influenced by processes running on or waiting for the CPU. Based on experiments in part 2 we came to the conclusion that processes that are performing disk I/O also influence the load average on a Linux system. In this posting we will do another experiment to find out if the Linux load average is also affected by processes performing network I/O.

Network I/O and load average

To check if a correlation exists between processes performing network I/O and the load average we will start 10 processes generating network I/O on an otherwise idle system and collect various performance related statistics using the sar command. Note: My load-gen script uses the ping command to generate network I/O.

The above output shows that the lo

View original post 602 more words

Understanding Linux Load Average – Part 3