Monday, January 2, 2012

Large Scale & Big Data analysis with Hadoop cluster (Using Ubuntu 11.10 server)

Welcome back guys, as I promised to a setup of Hadoop cluster on Ubuntu Server(64 bit)
last time I posted a blog about OpenStack and Devstack.

While everybody celebrating New Year, I was working on setting up a Hadoop cluster and processing unstructured data.


Purpose
The purpose of this document is to help you get a single-node Hadoop installation up and running very quickly so that you can get a flavor of the Hadoop Distributed File System (see HDFS Architecture) and the Map/Reduce framework; that is, perform simple operations on HDFS and run example jobs.


Our Pre-requisites for setup:-
1) We Must need a Ubuntu Server (64 bit) or Debian (64bit ) {I am using same this tutorial}
2)  You must have there installed (in the main root)
     $ sudo apt-get install ssh (openssh )  
     $ sudo apt-get install rsync
  
3) JavaTM 1.6.x, preferably from Sun, must be installed.

    Installing Java
 
    $ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
    $ sudo apt-get update
    $ sudo apt-get install sun-java6-jdk sun-java6-plugin  ( while after Downloading  during installation plz press tab to accept JAVA terms and condition while a tab for conditions open )
A check Sun java is there :)


root@ruhil:~# sudo apt-get install sun-java6-jdk sun-java6-plugin
Reading package lists... Done
Building dependency tree   
Reading state information... Done
sun-java6-plugin is already the newest version.
sun-java6-jdk is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
root@ruhil:~# java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
root@ruhil:~#


Add a Dedicated User

$ sudo addgroup hadoop
$ sudo adduser --ingroup hadoop hduser


Configure and check is ssh working for local-host
(Please press the enter , you need not to specify the name  for File for  and Public key )
root@ruhil:~# su - hduser
hduser@ruhil:~$ ssh-keygen -t rsa -P ""
Generating public/private rsa key pair.
Enter file in which to save the key (/home/hduser/.ssh/id_rsa):
Created directory '/home/hduser/.ssh'.
Your identification has been saved in /home/hduser/.ssh/id_rsa.
Your public key has been saved in /home/hduser/.ssh/id_rsa.pub.
The key fingerprint is:
9b:82:ea:58:b4:e0:35:d7:ff:19:66:a6:ef:ae:0e:d2 hduser@ruhil
The key's randomart image is:
[...snipp...]
hduser@ruhil:~$

After doing this step carefully

hduser@ruhil:~$ cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_key

hduse@ruhil:~$ ssh localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established.
ECDSA key fingerprint is b8:be:26:41:44:7d:9b:82:02:fd:13:61:3c:ac:d4:0a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
Linux ruhil 3.0.0-14-server #23-Ubuntu SMP Mon Nov 21 20:49:05 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
[...snipp...]
hduser@ruhil:~$



IN Ubuntu 11.10
open /etc/sysctl.conf in the editor of your choice and add the following lines to the end of the file:

#disable ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

You have to reboot your machine in order to make the changes take effect.

You can check whether IPv6 is enabled on your machine with the following command:

$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6

A return value of 0 means IPv6 is enabled, a value of 1 means disabled (that’s what we want).



Installation of Hadoop (perform this action in your main root like root@ruhil)
{Note Downloading 0.20 version is stable other not stable mainly 0.23,Would like go with 0.20  :)}
root@ruhil:~# mkdir -p /usr/local
root@ruhil:~# cd /usr/local
root@ruhil:~# wget http://apache.mirrorcatalogs.com/hadoop/core/hadoop-0.20.2/hadoop-0.20.2.tar.gz -O hadoop-0.20.2.tar.gz
root@ruhil:~# sudo tar xzf hadoop-0.20.2.tar.gz
root@ruhil:~# mv hadoop-0.20.2 hadoop
root@ruhil:~$ sudo chown -R hduser:hadoop hadoop



Create.Bashrc or If have already pasted below for Hadoop(Note: -you need paste in root and hduser ,if you like you can paste for all, My Paste of .bashrc is http://paste.ubuntu.com/791667/):-

# Set Hadoop-related environment variables
export HADOOP_HOME=/usr/local/hadoop

# Set JAVA_HOME (we will also configure JAVA_HOME directly for Hadoop later on)
export JAVA_HOME=/usr/lib/jvm/java-6-sun

# Some convenient aliases and functions for running Hadoop-related commands
unalias fs &> /dev/null
alias fs="hadoop fs"
unalias hls &> /dev/null
alias hls="fs -ls"

# If you have LZO compression enabled in your Hadoop cluster and
# compress job outputs with LZOP (not covered in this tutorial):
# Conveniently inspect an LZOP compressed file from the command
# line; run via:
#
# $ lzohead /hdfs/path/to/lzop/compressed/file.lzo
#
# Requires installed 'lzop' command.
#
lzohead () {
    hadoop fs -cat $1 | lzop -dc | head -1000 | less
}

# Add Hadoop bin/ directory to PATH
export PATH=$PATH:$HADOOP_HOME/bin




Configuration(Note all the configuration setting you need to be made in hduser):-

The following picture gives an overview of the most important HDFS components.HDFS Architecture (source: http://hadoop.apache.org/core/docs/current/hdfs_design.html)

Our goal in this tutorial is a single-node setup of Hadoop. More information of what we do in this section is available on the Hadoop Wiki.
hadoop-env.sh

The only required environment variable we have to configure for Hadoop in this tutorial is JAVA_HOME. Open /conf/hadoop-env.sh in the editor of your choice (if you used the installation path in this tutorial, the full path is /usr/local/hadoop/conf/hadoop-env.sh) and set the JAVA_HOME environment variable to the Sun JDK/JRE 6 directory.

Change

# The java implementation to use.  Required.
# export JAVA_HOME=/usr/lib/j2sdk1.5-sun

to

# The java implementation to use.  Required.
export JAVA_HOME=/usr/lib/jvm/java-6-sun



Now we create the directory and set the required ownerships and permissions:
$ sudo mkdir -p /app/hadoop/tmp
$ sudo chown hduser:hadoop /app/hadoop/tmp
$ sudo chmod 755 /app/hadoop/tmp
{Set Your chmod according to your settings  }


Add the following snippets between the <configuration> ... </configuration> tags in the respective configuration XML file.
Note for all given below we need perform all this  below config files


In file conf/core-site.xml:(cd /usr/local/hadoop there all this config )
<!-- In: conf/core-site.xml -->
<property>
  <name>hadoop.tmp.dir</name>
  <value>/app/hadoop/tmp</value>
  <description>A base for other temporary directories.</description>
</property>

<property>
  <name>fs.default.name</name>
  <value>hdfs://localhost:54310</value>
  <description>The name of the default file system.  A URI whose
  scheme and authority determine the FileSystem implementation.  The
  uri's scheme determines the config property (fs.SCHEME.impl) naming
  the FileSystem implementation class.  The uri's authority is used to
  determine the host, port, etc. for a filesystem.</description>
</property>

In file conf/mapred-site.xml:

<!-- In: conf/mapred-site.xml -->
<property>
  <name>mapred.job.tracker</name>
  <value>localhost:54311</value>
  <description>The host and port that the MapReduce job tracker runs
  at.  If "local", then jobs are run in-process as a single map
  and reduce task.
  </description>
</property>

In file conf/hdfs-site.xml:

<!-- In: conf/hdfs-site.xml -->
<property>
  <name>dfs.replication</name>
  <value>1</value>
  <description>Default block replication.
  The actual number of replications can be specified when the file is created.
  The default is used if replication is not specified in create time.
  </description>
</property>



hduser@ruhil:~$ /usr/local/hadoop/bin/hadoop namenode -format
The output will look like this:
hduser@ruhil:/usr/local/hadoop$ bin/hadoop namenode -format
1/01/12 1:30:41 INFO namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG:   host = ruhil/127.0.1.1
STARTUP_MSG:   args = [-format]
STARTUP_MSG:   version = 0.20.2
STARTUP_MSG:   build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20 -r 911707; compiled by 'ruhil' on Sun Jan 1 01:30:41 UTC 2012
************************************************************/
1/01/12 1:30:41 INFO namenode.FSNamesystem: fsOwner=hduser,hadoop
1/01/12 1:30:41  INFO namenode.FSNamesystem: supergroup=supergroup
1/01/12 1:30:41  INFO namenode.FSNamesystem: isPermissionEnabled=true
1/01/12 1:30:41  INFO common.Storage: Image file of size 96 saved in 0 seconds.
1/01/12 1:30:41  INFO common.Storage: Storage directory .../hadoop-hduser/dfs/name has been successfully formatted.
1/01/12 1:30:41 5/08 16:59:57 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at ruhil/127.0.1.1
************************************************************/
hduser@ruhil:/usr/local/hadoop$


Starting your single-node cluster
hduser@ruhil:/usr/local/hadoop/bin/start-all.sh
hduser@ruhil://usr/local/hadoop$ jps
all this shown below in bash too





Stop Hadoop using below command:-
hduser@ruhil:~$ /usr/local/hadoop/bin/stop-all.sh
stopping jobtracker
localhost: stopping tasktracker
stopping namenode
localhost: stopping datanode
localhost: stopping secondarynamenode
hduser@ruhil:~$


Now Run a Map-reduce job:-
Just watch bash carefully







NOW Finally Look into your Browser Yeah:-)

Hadoop Web Interfaces

Hadoop comes with several web interfaces which are by default (see conf/hadoop-default.xml) available at these locations:















I hope you enjoyed it :), process your data with ease and super speed :)
Looking for any kind Help (on Hadoop IRC  with #cloudgeek)
Feel free to mail me vikasruhil06@gmail.com 

FOLLOW US OF TWITTER 

THANKS FOR VISITING


LHS AS A SOURCE OF INFORMATION – AND A SOURCE OF INSPIRATION – I HOPE YOU’LL CHOOSE TO ACT RIGHT NOW. ENJOY KEEP LEARNING.






















                        



             

Friday, December 16, 2011

E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable),How to fix (Solved)

As a administer, newbie UNIX/Linux user ,or developer/programmer  , you face a problem like this in your shell/bash  in Ubuntu/Debian when any package is broken or due to any reason  your get lock /var/lib/dpkg/lock. or like below you face problem


root@pythongeek:~# apt-get update
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

you can fix this problem in few steps without rebooting !!


1) type this in bash

    sudo dpkg --configure -a

2) type in bash

    sudo killall apt-get apt aptitude adept synaptic

your output like this

root@pythongeek:~# sudo killall apt-get apt aptitude adept synaptic
apt-get: no process found
apt: no process found
aptitude: no process found
adept: no process found
synaptic: no process foun

Note:if you face problem during installation of any software/package

don't forget accept EULA ,or accepting licensee of user agreement while you have pop-up during installation
 
3) this is final if you failed last to attempt to unlock
Close all running packages, and open a Konsole window.

type in bash

sudo rm /var/lib/dpkg/lock

then again type this bash

sudo dpkg --configure -a

for reinstallation type like this in bash

sudo apt-get  install -f  package  name here


FOLLOW US OF TWITTER 

THANKS FOR VISITING


LHS as a source of information – and a source of inspiration – I hope you’ll choose to act right now.enjoy keep learning.


Sunday, December 11, 2011

Installing openstack on Ubuntu using Devstack with ease in 15 min only (Cloud computing part 2)

Devstack script is a useful tools and good tutorial for us.

It help me know how to install openstack(nova, glance, keystone and so on) from git. And teach us how to config them and make them work fine together. Now using devstack script is very easy if you just want to set up an openstack environment for learning.

Remember you need not install mysql and anything else in advance it will automatically installed from script   

Make sure your system is 11.10 Ubuntu server
you can test it in your really machine or in your vmware or virtualbox desktop machine.



Make sure you open your virtualization switch in your BIOS setting.
you need have to two interfaces, ie eth0 and eth1
--------------------------------------------------------------------------------------
$ sudo apt-get install bridge-utils     # install birdge
$ vi /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 10.11.3.62
netmask 255.255.255.0
network 10.11.3.0
broadcast 10.11.3.255
gateway 10.11.3.1

auto br100
iface br100 inet static
bridge_ports eth2
bridge_stp off
bridge_maxwait 0
bridge_fd 0
address 10.200.200.1
netmask 255.255.255.0



in this file, eth0 is your public network, you need it to connect to internet. eth2(maybe in your system is eth1) is another network interface used as a bridge(br100), 10.200.200.1 is your private ip, it is not need connect to any other network in our test.just choose a private network like 10.200.200.0/24 and remember.


$ sudo apt-get install git
$ git clone git://github.com/cloudbuilders/devstack
$ cd devstack
$ vi localrc
add these info into localrc


PUBLIC_INTERFACE=eth0
FIXED_RANGE=10.200.200.0/24
FIXED_NETWORK_SIZE=256
FLOATING_RANGE=10.11.3.0/24
NET_MAN=FlatDHCPManager
FLAT_NETWORK_BRIDGE=br100
VIRT_DRIVER=libvirt
LIBVIRT_TYPE=kvm
SCHEDULER=nova.scheduler.simple.SimpleScheduler



$ ./stack

it will ask for some password, remeber don't use special characters like $*_.! and so on. you can simply set password like 123456
then it will begin install , how much it take depends on your network bandwidth. If it failed since of network or some reason. look at error log carefully, delete /opt/stack/devstack and run ./stack again.




At last, you will see successful information, and then you can type your IP in your browser. Enjoy your open-stack time and it is a good thing you need learning more and more. finally you are here .

Looking for Help/ Technical support  !

Feel free to mail me vikasruhil06@gmail.com

FOLLOW US OF TWITTER 

THANKS FOR VISITING


LHS as a source of information – and a source of inspiration – I hope you’ll choose to act right now.enjoy keep learning.






Creating a Private Cloud using Openstack in Ubuntu Maually (Cloud Computing Part 1)

This article dedicated to developer ,project leaders , Cloud architects . I am gonna explain how to setup a cloud using command line .This useful for newbies to cloud and UNIX both !

I am using a Ubuntu 11.10 (64 bit server ), so lets play with shell !!

for setting up a prefect cloud you need minimum two network NIC on your hardware , a lot of public Ip . :)

But i am setting it on one network  it on one NIC hardware , with One IP (students and tester can with way those have less resources ) :)

We are setting up it with open-stack .
Official website of this document is below:

ubuntu 11.10 environment deployment, select the network mode FLATDHCP

public interface: eth0 used to connect to the user
private interface: eth1 do bridge br100, used, and other nodes, keystone, glance, volume and other connections

Minimum installed Ubuntu

Remember to open-ssh installed, where we have established a common user open-stack

Giving it the NOPASSWD sudo privileges, so easy to operate behind

$ Sudo apt-get update          //  (apt update about the tree)
$ Sudo apt-get install bridge-utils     //   (  installed bridge components )

Configure the network
$ vi / etc / network / interfaces      //(gksudo also can be used instead of vi for GUI Fans )

auto eth0
iface eth0 inet static
address 192.168.200.21
netmask 255.255.255.0
network 192.168.200.0
broadcast 192.168.200.255
gateway 192.168.200.10

auto br100
iface br100 inet static
bridge_ports eth1
bridge_stp off
bridge_maxwait 0
bridge_fd 0
address 10.200.200.2
netmask 255.255.255.0

$ Sudo / etc / init.d / networking restart

Initial preparatory work to do, the next step is to install on nova, glance and other components

$ Sudo apt-get install-y rabbitmq-server  // (install the MQ message components )
$ Sudo apt-get install-y python-greenlet python-mysqldb     // (install Python dependencies )

Next, install the various nova components and dependencies


$ Sudo apt-get install nova-volume nova-vncproxy nova-api nova-ajax-console-proxy
$ Sudo apt-get install nova-doc nova-scheduler nova-objectstore
$ Sudo apt-get install nova-network nova-compute
$ Sudo apt-get install glance

Installation euca2ools and unzip
$ Sudo apt-get install-y euca2ools unzip

Next we install the database, I chose MYSQL, PostgreSQL actually personally feel better
$ Sudo su - to root user to change
# MYSQL_PASS = nova nova set mysql database password and the password
# NOVA_PASS = notnova here nova and notnova modified according to their definitions
# Cat <<MYSQL_PRESEED | debconf-set-selections
> Mysql-server-5.1 mysql-server/root_password password $ MYSQL_PASS
> Mysql-server-5.1 mysql-server/root_password_again password $ MYSQL_PASS
> Mysql-server-5.1 mysql-server/start_on_boot boolean true
> MYSQL_PRESEED
# Apt-get install-y mysql-server
# Exit exit root environment

$ Sudo sed-i 's/127.0.0.1/0.0.0.0/g' / etc / mysql / my.cnf modify my.cnf configuration file
$ Sudo service mysql restart

$ MYSQL_PASS = nova in the general user environment variable to the password once again set about
$ NOVA_PASS = notnova
$ Sudo mysql-uroot-p $ MYSQL_PASS-e 'CREATE DATABASE nova;'

// (to create a name for the ova of the database, I recommend that new users nova's name, if here for another name, then the configuration file in the nova which also need to change )
$ Sudo mysql-uroot-p $ MYSQL_PASS-e "GRANT ALL PRIVILEGES ON *.* TO
'Nova'@'%' WITH GRANT OPTION; "
$ Sudo mysql-uroot-p $ MYSQL_PASS-e "SET PASSWORD FOR 'nova'@'%' =
PASSWORD ('$ NOVA_PASS'); "

This point. nova, glance of the installation completed, next is the configuration

nova configuration
$ Sudo vi / etc / nova / nova.conf
- Dhcpbridge_flagfile = / etc / nova / nova.conf
- Dhcpbridge = / usr / bin / nova-dhcpbridge
- Logdir = / var / log / nova
- State_path = / data / openstack / nova here / data / openstack / nova is a new volume and directory, make sure you have this, and the user should belong to nova
- Instances_path = / data / openstack / nova / instances to modify the default storage of instances where
- Lock_path = / var / lock / nova
- Force_dhcp_release = True
- Use_deprecated_auth
- Iscsi_helper = tgtadm
- Verbose
- Scheduler_driver = nova.scheduler.simple.SimpleScheduler
- Network_manager = nova.network.manager.FlatDHCPManager
- My_ip = 10.200.200.2 This is my ip address within the network
- Public_interface = eth0
# - Vlan_interface = eth0
- Sql_connection = mysql: / / nova: notnova @ localhost / nova
- Libvirt_type = kvm
# - Osapi_extensions_path = / opt / nova / bin / openstackx / extensions
# - Vncproxy_url = http://10.200.200.2:6080
# - Vncproxy_wwwroot = / data / stack / noVNC /
- Api_paste_config = / etc / nova / api-paste.ini
- Image_service = nova.image.glance.GlanceImageService
- Ec2_dmz_host = 192.168.200.21
- Ec2_url = http://192.168.200.21:8773/services/Cloud
- Rabbit_host = localhost
- Glance_api_servers = 10.200.200.2:9292
- Flat_network_bridge = br100
- Flat_interface = eth1
- Flat_network_dhcp_start = 10.200.200.51 specified instances allocated from the beginning from the 51, but looks like this option does not work
- Fixed_range = 10.200.200.0/24 This option specifies the instances of the network segment
- Flat_injected = False
- Multi_host = 1 using multi_host
- Libvirt_use_virtio_for_bridges instances using virtio network card model do
# - Start_guests_on_host_boot = true
# - Resume_guests_state_on_host_boot = true
- Use_ipv6 = false

$ Sudo vi / etc / glance / glance-api.conf
// (In this file without using keystone of the present case, according to your needs, modify filesystem_store_datadir parameter to specify the directory you need to store images, Dangran are the main users have Gaicheng glance )
$ Sudo vi / etc / glance / glance-registry.conf
// (This file can be selected to modify sql_connection parameter to specify your database. Of course you can not change.
If you want to modify, use mysql which database to ensure that the mysql which established a corresponding database )

sql_connection = mysql: / / nova: notnova @ localhost / glance this is my configuration, I created a glance in the mysql database

$ Sudo chown-R root: nova / etc / nova to change / etc / nova's owner
$ Sudo chmod 640 / etc / nova / nova.conf

Restart all services
$ Sudo restart libvirt-bin
$ Sudo restart nova-network
$ Sudo restart nova-compute
$ Sudo restart nova-api
$ Sudo restart nova-objectstore
$ Sudo restart nova-scheduler
$ Sudo restart glance-registry
$ Sudo restart glance-api
Note: We do not have from the nova-volume, because although we installed the volume, but the volume needs to use a separate vg, we have not configure the volume, so get up.

There may be network services and can not compute it, do not worry about being first

Next, we do configure the operating environment of the nova
$ Sudo nova-manage db sync
nova-manage user admin <user_name> where we can create a user, such as
$ Sudo nova-manage user admin test, create a successful return on the screen like:
export EC2_ACCESS_KEY = d6aa7747-4324-4abc-9604-4f7d6a2f8f3f
export EC2_SECRET_KEY = 2b204b75-da2d-47b8-ba7a-611d71f0ecbf

nova-manage project create <project_name> <user_name> create a project, we built that are just users, such as:
$ Sudo nova-manage project create test-proj test
nova-manage network create - help create an instance of the network, such as:
$ Sudo nova-manage network create - label = test-net - fixed_range_v4 = 10.200.200.0/24 - num_network = 1 - network_size = 256

Services have failed to start again
$ Sudo start nova-network
$ Sudo start nova-compute
$ Sudo start nova-scheduler
In addition, since each service, the best look at the log, such as sudo tail-f / var / log / nova / nova-network to determine there is no error, you can also use the ps aux | grep [n] ova-network to confirm the service is not open. If the starting service fails, you confirm that a good reason to modify a good future, need to use sudo start to play instead of sudo restart

Well. This computing environment, we deployed the. We can look at the state command
$ Sudo nova-manage service list
$ Sudo nova-manage network list
Etc.

Next, create a certificate, to facilitate the tool we use euca
$ Cd
$ Mkdir creds
$ Sudo nova-manage project zipfile test-proj test creds / novacreds.zip
$ Unzip creds / novacreds.zip-d creds /
$ Source creds / novarc

OK, done, we can use the tool to look at
$ Euca-describe-availability-zones verbose
VAILABILITYZONE nova available
AVAILABILITYZONE | - Nova-test
AVAILABILITYZONE | | - Nova-network enabled :-) 2011-10-17 04:45:44
AVAILABILITYZONE | | - Nova-compute enabled :-) 2011-10-17 04:45:45
AVAILABILITYZONE | | - Nova-scheduler enabled :-) 2011-10-17 04:45:46

So far, successfully enabled services. When you find that service is not working, use ps aux | grep nova check services are not open, and the need for detailed observations / var / log / nova / directory log files for each service, in order to obtain further information.


Then we can use kvm to create a mirror image

$ Sudo apt-get install kvm-pxe installation about this, otherwise there will be time to run kvm warning
$ Kvm-img create-f raw server.img 5G
$ Sudo kvm-m 1024-cdrom rhel5.iso-drive file = server.img, if = virtio, index = 0-boot d-net nic-net user-nographic-vnc: 0

Here we use rhel5(Redhat) the iso, after running this command, you can use vnc to connect the machine to connect to your server: ssvncviewer 192.168.200.21: 0
Open vnc you can see the installation interface After the installation, the following paragraph written rhel mirror / etc / rc.local the beginning of the
depmod-a
modprobe acpiphp

# Simple attempt to get the user ssh key using the meta-data service
mkdir-p / root / .ssh
echo>> / root / .ssh / authorized_keys
curl-m 10-s http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key | grep 'ssh-rsa'>> / root / .ssh / authorized_keys
echo "AUTHORIZED_KEYS:"
echo "************************"
cat / root / .ssh / authorized_keys
echo "************************"
Save and exit, so that image on the well

Upload images using glance
$ Glance - verbose add name = "rhel5" disk_format = raw is_public = true <server.img
You should also observe the / var / log / glance / registry and the log api
$ Glance index to see a list of mirrors

Start your instance
$ Euca-describe-images
You can now view the image, output similar to the
IMAGE ami-00000003 server.img
Remember this image here ami-000000003 No.
$ Euca-run-instances-t m1.tiny ami-00000003 start an instance of ami-00000003 image
-T specifies the type of instance, provides the type of cpu, memory, disk size, etc..
Watch / var / log / nova / nova-api.log nova-scheduler.log, nova-compute, nova-network.log of output, but you can also use vnc to connect serverip: 0 look at the console instance
With the command $ euca-describe-instances to see your current instance of the first instance will be relatively slow start because of the need to copy the image from a glance under the instance directory to the nova

Conclusion As the nova is currently growing fast, diablo release version of the function of some of the requirements to be completed daily. But the development version of the nova can be better combined with keystone, novaclient, dashboard and some other projects. Makes openstack more robust. Friends who are interested, you can use in a production environment repo's installation, test development versions of the test environment. Since I use in a production environment install git development version. Therefore, a more complete integration of follow-up, I will develop versions of the form. Of course, using the development version, then there will be more trouble, but also have more fun and hands-on practice, to further understand the mechanism of its working principle.

Looking for help /technical support  !

Feel free to mail me vikasruhil06@gmail.com



FOLLOW US OF TWITTER 

THANKS FOR VISITING


LHS as a source of information – and a source of inspiration – I hope you’ll choose to act right now.enjoy keep learning.


 

Sunday, November 20, 2011

SECURING THE CLOUDS

Even though the cloud continues to grow in popularity and respectability, complications with data privacy and data protection still plague the market.There's a long way to go before cloud becomes mainstream ,Obstacles on the road to cloud computing.Data security is a concern for any enterprise, and cloud computing often can magnify security anxieties. Adopting a few ground rules will help protect users, their data and your overall cloud investment



Everywhere the acceptance of cloud computing by corporate, now one of the fastest emerging technology in field of Information Technology (IT). From startup to experienced companies often lack of protection measure to weather off an attack on their servers due to scarcity of resources:
  • Due to poor programming skills that explores software vulnerabilities in Python, Ruby, PhP, JavaScript.
  • Even some good programmers aren't aware about Cyber security so Companies need hybrid developers (security + good programmers)
  • Open ports to firewalls or insufficient knowledge of security by system administrator, Knowledge of Nmap. Nessues, Snort must be mendentory for system administrator before hiring them for cloud based firms.
  • Those companies are encouraged to pursue cloud computing must have need to support their own hardware backbone.



Due to Ineffective Security Policies many of startup or firms afraid to adopt cloud computing. But there is solution how Rescue security in cloud their are above 4 point must be remembered by companies when they gonna to hire guys for their cloud operations.
SECURITY CHALLENGES



DATA SECURITY

Basic Definition of Information security have 3 aspects according to our Corporate world refers as confidentiality, integrity and availability, these are major security issue for cloud vendors.

Confidentiality refers that who stores the encryption key is must be secure from users, employees only permitted to respected officials whose are responsible for operation.

Integrity refers every firms must need to have some policies for no data exchange without strict set of rules or protocols. Must be aware from client side don't store sensitive data and password those can be stolen easily.

Availability, this is one major concern by security experts, many of large caps in cloud computing have already experienced downtime. There must be relationship only among clients and provider, no third parties. Also need to focus on protocols to increase security during authentication should backed several methods using combination of hardware and password, or including face rectification of face, figure prints. Because SSL is also hacked by some hackers so need to focus on these protocols. Even Amazon faced denial of service attack.

Untrustworthy supplier, eavesdropping, impersonation, data theft, lack of performance and logical and physical disasters are addressed by this pattern. Consider checking supplier applications for Cross-site scripting (XSS) attacks which can be used to log keystrokes and capture data, and propagate web application worms such as Samy. Feed injection for RSS and Atom can allow an attacker to compromise applications, if feeds are not properly secured


All programmer must need to go through some Relevant Technologies those are safer than other such Django in python, AJAX, RSS, JSON, Gears in JAVA, SOAP (Simple object access Protocol), REST (Representational State Transfer)

PRIVACY IN CLOUDS


Information privacy is the interest an individual has in controlling or at-least significantly influencing, the handling of data about themselves. Need to ensure data among only the clients and provider only but how?

  • Need to insure security of MapReduce for privacy and confidentiality using Airavat our main aim here to provide assurances privacy for sensitive data
  • Using System Model such as data provider have their own set of data, cloud provider need to use Airavat Framework.
  • Trustworthiness of data provider using a Threat Model
  • Computation Model of MapReduce must be deployed into input chunks so that mapper and reducer so that set of the input and output can have separate function and chunks
  • Differential privacy concept can used to ensure privacy and Random Laplacian noise, other noise algorithm can be used or implemented during designing.
  • Functional Sensitivity algorithm can be used during designing of model for cloud architecture, some new policies such as use of SELinux and MAC model for key architecture of any cloud access control.
  • In case must concern over such as Security (OpenID,. Net Access Control, PKI), and Load Monitoring and Testing (Soasta, Hyperic), Provisioning and Configuration Management.

NETWORK SECURITY
Basic Network Security refers performance, bandwidth, quality, availability, more flexibility over the networks. Reconfiguration of network according to clients such as Network as a Service (NaaS)
and virtualization of cloud network to users

  • Provide the basic network functions for applications with highly variable demands according.
  • Integrating functionality with computing and storage with variable demands during seasons with peak requirement
  • Integration of necessary tools for management and security such as Snort, Nmap, Tcpdump ... etc

MALWARE IN CLOUD

Security as a service can be used to ensure security in cloud. Need to run anti-virus on both side of cloud on vendor and client side, multi-version of anti-virus can be used for ensuring proper security from malware.

  • Reduce possibility number of bugs, contribute to open-source so can benefited from community.
  • Multiple Functionality equivalent programmers independently, use multiple scanner's in parallel to increase detection rate
  • Use cloud forensics also go trough with no-vendor lock in service for better productivity so that
    clients never agnostic with vendor service

  • Need to improve system Architecture, include specific protocols on both side for the end-users
    and use hash technique to extract unique id of host and user using MAC.

  • Certification and 3 rd party audits is provider is certified.



CONCLUSION

Despite the numerous security involved with cloud computing, it is critical that industry ans organization taking a thoughtful and proactive approach to cloud. So as we need it as basic utility in our in daily uses so we need to insure security in cloud. There are following suggestion are provided here to ensure security of your cloud

  • Secure Architecture Model such need to integrated applications, for security architecture community. Some important entities involved in the data flow are end users, developers, system architect, Auditors. Need to integrate all application level tool inside architecture so that we can use the grid concept of security with step by step.
  • End Uses: Use certain protocol and policies those committed to ensure security while they are accessing resources from cloud. Need to use signatures and token on server side and on client side must need to use firewalls, entry point protocols, need to update regularly so that can patch bugs as soon as possible. Also need to ensure security using TSL, SSL, using Secure IPSEC.
  • System Architects: These Guys must employed using some certain policies should have knowledge of basic security concepts and tools that are need to use to prevention of cloud. They also need to write policies that pertain to installation and configuration of hardware components such as Firewalls, Servers, Routers, Operating systems, Proxy server configurations and encryption tunnels
  • Developers: Developers must need to gone through with security concepts. They may desire extra virtual machines to either generate test data or to perform data analysis, processes and penetrate their code. Monitoring of API call for the server requests for software must be include inside the architectural model

PLEASE HELP US GROW 

FOLLOW US OF TWITTER 

THANKS FOR VISITING


LHS as a source of information – and a source of inspiration – I hope you’ll choose to act right now.enjoy keep learning.

Sunday, October 2, 2011

Setting up your first Rails project on Ubuntu 11.04

Installing  from Terminal
sudo apt-get install ruby-full
wget production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
tar -xvf rubygems-1.3.7.tgz
cd rubygems-1.3.7/
sudo ruby setup.rb
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
sudo gem install rdoc
sudo gem install rails

Looking for Ruby 1.9.2
I recommended above version 1.8 but if anybody looking for 1.92 you install following :) yeah  

$ sudo apt-get install curl bison build-essential autoconf zlib1g-dev \
    libssl-dev libxml2-dev libreadline6-dev git-core subversion
$ rvm package install openssl
$ rvm package install readline
$ rvm install 1.9.2 -C --with-openssl-dir=$HOME/.rvm/usr,--with-readline-dir=$HOME/.rvm/usr


Installing MySQL Server from Terminal
sudo apt-get install mysql-server libmysqlclient-dev libmysql-ruby
Setting up your first Rails project
It seems that Rails 3 depends on sqlite3 even if you don’t intend to use it as the backend for your application. We’ll create an example rails project  to make sure everything is working.
sudo apt-get install libsqlite3-dev build-essential
rails new vikas
cd vikas/
 sudo bundle install
sudo rake db:create
rails s
while
you go to rake db:create you have such kind problem that i face

 sudo rake db:create
rake aborted!
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.

So no need to worry just install node.js using Terminal
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

same kind problem also with "heroku with ruby"so Just need to install node.js
like above
Now fire up your browser, and go to http://localhost:3000 and you should be greeted with a nice little rails homepage  




Sunday, September 25, 2011

how to install Unetbootin , Default Java Jdk on Ubuntu , Debian ..Thing's you can't find on the Google

If you are a programmer And Looking For a portable solution for the Live system installation for any Linux you need Unetbootin to install them on   Usb  , I also Try a lot on Google these Things I thought That why should i have to mention it on My blog for my Friends

For Ubuntu 9.10 and higher
Go to Command Terminal to install UNetbootin from PPA:
sudo add-apt-repository ppa:gezakovacs/ppa
sudo apt-get update
sudo apt-get install unetbootin
Java jdk is Recommended for if you are using Hadoop or Eclipse or any kind of Java application It helps to build an environment and in increase in Performance so For Developer , Coder, Programmers , Hackers  I just write blog for how install it on Ubuntu make it default  For  Ubuntu 11.04 or  In Ubuntu 10.04 LTS, the package sun-java6-jdk has been dropped from the Multiverse section of the Ubuntu archive. You have to perform the following four steps to install the package.
1. Add the Canonical Partner Repository to your apt repositories:
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" 2. Update the source list
$ sudo apt-get update 3. Install sun-java6-jdk
$ sudo apt-get install sun-java6-jdk 4. Select Sun’s Java as the default on your machine.
$ sudo update-java-alternatives -s java-6-sun The full JDK which will be placed in /usr/lib/jvm/java-6-sun (well, this directory is actually a symlink on Ubuntu).
After installation, make a quick check whether Sun’s JDK is correctly set up:
user@ubuntu:~# java -version java version "1.6.0_20" Java(TM) SE Runtime Environment (build 1.6.0_20-b02) Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)