Sunday, 24 August 2014

I created a ELB in eucalyptus, i attached an instance to ELB: myloadbal after attaching i checked the status of instance its saying out of service . I tried to solve but its not getting worked. I need to attach another new instance to current ELB . where i can performance some http load and check the load is sharing with both instance in ELB .   
Here the details.

root@ubuntu:/# eulb-create-lb -z cloudenci -l "lb-port=80, protocol=HTTP, instance-port=80, instance-protocol=HTTP" myloadbal
DNS_NAME myloadbal-166758844768.lb.localhost

root@ubuntu:/# eulb-describe-lbs myloadbal
LOAD_BALANCER myloadbal myloadbal-166758844768.lb.localhost 2014-08-23T12:34:10.656Z

root@ubuntu:/# eulb-create-lb-listeners -l "lb-port=80, protocol=HTTP, instance-port=80, instance-protocol=HTTP" myloadbal 
eulb-create-lb-listeners: error (400): A Listener already exists

root@ubuntu:/# eulb-describe-lbs
LOAD_BALANCER myloadbal myloadbal-166758844768.lb.localhost 2014-08-23T12:34:10.656Z
root@ubuntu:/# eulb-register-instances-with-lb --instances i-011F3AE0 myloadbal
INSTANCE i-011F3AE0


root@ubuntu:/# eulb-describe-instance-health myloadbal
INSTANCE i-011F3AE0 OutOfService

Sunday, 17 August 2014

Installing Apache Benchmark and Wireshark

Installing Apache Benchmark Tool

Apache Benchmark is a benchmarking tool which can be used to stress the serve by generating Http requests to server.
ubuntu@euca-10-1-3-53:~$ sudo apt-get install apache2-utils


Installing Wireshark

Wireshark is a monitoring tool which will monitor different network attributes. Here we are using to monitor incoming Http requests to static website which is running on localhost.
ubuntu@euca-10-1-3-53:~$ sudo apt-get install wireshark
ubuntu@euca-10-1-3-53:~$ sudo groupadd wireshark
ubuntu@euca-10-1-3-53:~$ sudo usermod -a -G wireshark ubuntu
ubuntu@euca-10-1-3-53:~$ sudo chgrp wireshark /usr/bin/dumpcap
ubuntu@euca-10-1-3-53:~$ sudo chmod 750 /usr/bin/dumpcap
ubuntu@euca-10-1-3-53:~$ sudo setcap cap_net_raw,cap_net_admin=eip /usr/bin/dumpcap
ubuntu@euca-10-1-3-53:~$ sudo getcap /usr/bin/dumpcap
ubuntu@euca-10-1-3-53:~$ sudo dpkg-reconfigure wireshark-common


Installing XAMPP server on Instance

jaideep@ubuntu:~/Downloads$ ssh -i /home/jaideep/Downloads/x13109561-a.pem -l ubuntu 193.1.202.12

Welcome to Ubuntu 12.04.5 LTS (GNU/Linux 3.2.0-65-virtual x86_64)
 * Documentation:  https://help.ubuntu.com/
  System information as of Sun Aug 17 23:32:35 UTC 2014
System load:  0.0               Processes:           152
  Usage of /:   51.3% of 9.85GB   Users logged in:     0
  Memory usage: 28%               IP address for eth0: 10.1.3.53
  Swap usage:   36%
Graph this data and manage this system at:
    https://landscape.canonical.com/
 Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud
6 packages can be updated.
6 updates are security updates.
New release '14.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
Last login: Fri Aug 15 15:53:57 2014 from 109.255.221.201
ubuntu@euca-10-1-3-53:~$

Installing XAMPP server
XAMPP server is used to run the static website on localhost.
 ubuntu@euca-10-1-3-53:~$ sudo wget bit.ly/1cmyrUo -O xampp-64bit.run
ubuntu@euca-10-1-3-53:~$ chmod 777 xampp-64bit.run
ubuntu@euca-10-1-3-53:~$ sudo ./xampp-64bit.run
ubuntu@euca-10-1-3-55:~$ sudo /opt/lampp/lampp start
Starting XAMPP for Linux 1.8.3-4...
XAMPP: Starting Apache...ok.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.

ubuntu@euca-10-1-3-55:~$ 

There is a Volume Issues with Instance.

Now i am able to run the instance. But the things are not going well i m getting problem on every step. I think there is problem in ubuntu server images while i am trying to install Xampp server i am getting there is no sufficient space is available. I tried in Google but i didn't find exact solution,  Here below the error that i got. 
I used   cc1.4xlarge : 8 CPUs, 3072 memory (MB), 60 disk(GB, root device). also attached volume of 15 GB to instance 

ubuntu@euca-10-1-3-61:/tmp$ wget bit.ly/1cmyrUo -O xampp-64bit.run
--2014-08-11 18:49:22--  http://bit.ly/1cmyrUo
Resolving bit.ly (bit.ly)... 69.58.188.39, 69.58.188.40
Connecting to bit.ly (bit.ly)|69.58.188.39|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://goo.gl/CAXLhV [following]
--2014-08-11 18:49:23--  http://goo.gl/CAXLhV
Resolving goo.gl (goo.gl)... 74.125.24.113, 74.125.24.100, 74.125.24.101, ...
Connecting to goo.gl (goo.gl)|74.125.24.113|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://cdn.mirror.garr.it/sf/project/xampp/XAMPP%20Linux/1.8.3/xampp-linux-1.8.3-2-installer.run [following]
--2014-08-11 18:49:23--  http://cdn.mirror.garr.it/sf/project/xampp/XAMPP%20Linux/1.8.3/xampp-linux-1.8.3-2-installer.run
Resolving cdn.mirror.garr.it (cdn.mirror.garr.it)... 193.206.139.45, 193.206.140.45, 2001:760:ffff:b0::45, ...
Connecting to cdn.mirror.garr.it (cdn.mirror.garr.it)|193.206.139.45|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 126657636 (121M) [application/x-makeself]
Saving to: ‘xampp-64bit.run’

 0% [                                                                                                        ] 38,720      --.-K/s   in 0.03s   


Cannot write to ‘xampp-64bit.run’ (No space left on device).
ubuntu@euca-10-1-3-61:/tmp$ 

Solving Error with Networking Issues

It’s working now on both instances,
 
I am trying to fix the problem with DHCP now.
 
If you are starting anymore instances open /etc/resolv.conf
 
Sudo vi /etc/resolv.conf
 
And change:
Nameserver 127.0.0.1
 
To nameserver 8.8.8.8

Networking Issues in Instance.

There is a networking issue in the instance, There is no net connectivity in the instance,
 
Last login: Mon Aug 11 15:57:53 2014 from 109.255.221.201
ubuntu@euca-10-1-3-59:~$ sudo apt-get update
sudo: unable to resolve host euca-10-1-3-59
Err http://archive.ubuntu.com precise Release.gpg
  Temporary failure resolving 'archive.ubuntu.com'
Err http://security.ubuntu.com precise-security Release.gpg
  Temporary failure resolving 'security.ubuntu.com'
Err http://archive.ubuntu.com precise-updates Release.gpg
  Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise/Release.gpg  Temporary failure resolving 'archive.ubuntu.com'
 
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/Release.gpg  Temporary failure resolving 'archive.ubuntu.com'
 
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/Release.gpg  Temporary failure resolving 'security.ubuntu.com'
 
W: Some index files failed to download. They have been ignored, or old ones used instead.
ubuntu@euca-10-1-3-59:~$
 
ubuntu@euca-10-1-3-59:~$ ping google.com
ping: unknown host google.com

Successfully Launched Instance in Eucalyptus.

jaideep@ubuntu:~$ ssh -i /home/jaideep/Downloads/x13109561.pem ubuntu@193.1.202.14
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-30-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Mon Aug 11 15:39:37 UTC 2014

  System load:  0.0               Processes:           77
  Usage of /:   55.7% of 1.32GB   Users logged in:     0
  Memory usage: 3%                IP address for eth0: 10.1.3.50
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

0 packages can be updated.
0 updates are security updates.


Last login: Mon Aug 11 15:39:38 2014 from 109.255.221.201
ubuntu@euca-10-1-3-50:~$ 

Problem on Accessing NCI Eucalyptus Private Cloud.

I am trying to runn a instance of NCI EUcalyptus private cloud but when i am trying to do that, it is asking for a pasword. I tryed many but did't workd ( i added my private key to ssh). Please provide information to slove this isuue. Here below i am mentioning the out which i got.

jaideep@ubuntu:~/Downloads$ ssh -i /home/jaideep/Downloads/jaideep.pem ubuntu@193.1.202.10

ubuntu@193.1.202.10's password: 

Permission denied, please try again.

ubuntu@193.1.202.10's password: 

Connection closed by 193.1.202.10

jaideep@ubuntu:~/Downloads$ ssh -i /home/jaideep/Downloads/jaideep.pem ubuntu@193.1.202.10

ubuntu@193.1.202.10's password: 

Permission denied, please try again.

ubuntu@193.1.202.10's password: 

Permission denied, please try again.

ubuntu@193.1.202.10's password: 

Permission denied (publickey,password).




Error in Uploading Image in Private Cloud.

I am trying to install an image to run instance in eucalyptus private cloud. I tried many other sources to resolve but i couldn't get through it, Here i am mentioning the error below.

--------------------------------------------------------------------------------------------------------------------------
[root@localhost euca2ools-3.1.0]# bash <(curl -Ls eucalyptus.com/install-emis)
Error: Unable to find EC2_URL
Make sure your eucarc is sourced.
[root@localhost euca2ools-3.1.0]# source eucarc
bash: eucarc: No such file or directory
[root@localhost euca2ools-3.1.0]# cd jaideep
bash: cd: jaideep: No such file or directory
[root@localhost euca2ools-3.1.0]# cd ..
[root@localhost jaideep]# source eucarc
WARN: Walrus URL is not configured.
WARN: Load Balancing service URL is not configured.
[root@localhost jaideep]# bash <(curl -Ls eucalyptus.com/install-emis)
Error: Unable to find EC2_URL
Make sure your eucarc is sourced.
[root@localhost jaideep]# xz -d /home/jaideep/Downloads/ubuntu.raw.xz
[root@localhost jaideep]#
[root@localhost jaideep]# euca-install-image -b my-bucket -r x86_64 -i <path-to-downloaded-file>.raw -n my-image-name --virtualization-type hvm
bash: path-to-downloaded-file: No such file or directory
[root@localhost jaideep]# euca-install-image -b my-bucket -r x86_64 -i /home/jaideep/Downloads/ubuntu.raw -n my-image-name --virtualization-type hvm
euca-install-image: error (403): Forbidden
[root@localhost jaideep]# euca-install-image -b my-bucket -r x86_64 -i /home/jaideep/Downloads/ubuntu.raw -n ubuntu_12.04 --virtualization-type hvm
euca-install-image: error (403): Forbidden
[root@localhost jaideep]#
----------------------------------------------------------------------------------------------------------------------------------------------

Installing Eucalyptus Private Cloud

Installing Eucalyptus Private Cloud on Cent OS 6.5 on a Virtual Machine.

All components are planed to install on same machine.

Configuring Dependency for Installing Eucalyptus

1. Configuring Bridges:

$yum install bridge-utils

2. Go to the /etc/sysconfig/network-scripts directory :

$cd /etc/sysconfig/network-scripts

3. Open the network script for the device you are adding to the bridge and add your bridge device to it. The edited file should look similar to the following :

DEVICE=eth0
# change the hardware address to match the hardware address your NIC uses
HWADDR=00:16:76:D6:C9:45
ONBOOT=yes
BRIDGE=br0

NM_CONTROLLED=no

4. Create a new network script in the /etc/sysconfig/network-scripts directory called ifcfg-br0 or something similar. The br0 is the name of the bridge, but this can be anything as long as the name of the file is the same as the DEVICE parameter, and the name is specified correctly in the previously created physical interface configuration (ifcfg-ethX).
If you are using DHCP, the configuration will look similar to, 
DEVICE=br0
TYPE=Bridge
BOOTPROTO=dhcp
ONBOOT=yes

DELAY=0

5. Enter the following command:
$service network restart

6. To disable your firewall:
$Run the command $system-config-firewall-tui 
Turn off the Enabled check box.

7. Install NTP on the machines that will host Eucalyptus components. 
$yum install ntp
Open the /etc/ntp.conf file and add NTP servers, as in the following example.
server 0.pool.ntp.org
server 1.pool.ntp.org

server 2.pool.ntp.org
Save and close the file.
Configure NTP to run at reboot.
$ chkconfig ntpd on

8.  Start NTP.
$ service ntpd start
ntpdate -u <your_ntp_server>
hwclock --systohc

9. Edit the sysctl.conf on each machine you plan to install the Cluster Controller (CC) component on. IP forwarding is required for the CC to work.
net.ipv4.ip_forward = 1 

10 . Configure the Eucalyptus package repository on each host that will run a Eucalyptus component:
 $ yum install http://downloads.eucalyptus.com/software/eucalyptus/3.4/centos/6/x86_64/eucalyptus-release-3.4.noarch.rpm

11. Configure the Euca2ools package repository on each host that will run a Eucalyptus component or Euca2ools:
$ yum install http://downloads.eucalyptus.com/software/euca2ools/3.0/centos/6/x86_64/euca2ools-release-3.0.noarch.rpm

12. Configure the EPEL package repository on each host that will run a Eucalyptus component or Euca2ools:
$ yum install http://downloads.eucalyptus.com/software/eucalyptus/3.4/centos/6/x86_64/epel-release-6.noarch.rpm

13. Configure the ELRepo repository on each host that will run Walrus:
$ yum install http://downloads.eucalyptus.com/software/eucalyptus/3.4/centos/6/x86_64/elrepo-release-6.noarch.rpm

14. Install the Eucalyptus node controller software on each planned NC host:
$ yum install eucalyptus-nc

15. Check that the KVM device node has proper permissions.
Run the following command: 
$ ls -l /dev/kvm

16. Install the Eucalyptus cloud controller software on each planned CLC host:
$ yum install eucalyptus-cloud

17. Install the software for the remaining Eucalyptus components. The following example shows most components being installed on the same host. We recommend that you use different hosts for each component:
$ yum install eucalyptus-cc eucalyptus-sc eucalyptus-walrus

18. If you would like Load Balancer support enabled in your Cloud, you will need to install the Load Balancer image package on the machine hosting the primary CLC:
$ yum install eucalyptus-load-balancer-image

19. Log in to the CC and open the /etc/eucalyptus/eucalyptus.conf file. ( Managed (No-VLAN) Mode )

VNET_MODE="MANAGED-NOVLAN"
VNET_SUBNET="[Subnet for VMs private IPs. Example: 192.168.0.0]"
VNET_NETMASK="[Netmask for the vnet_subnet. Example: 255.255.0.0]"
VNET_DNS="[DNS server IP]"
VNET_ADDRSPERNET="[Number of simultaneous instances per security group]"
VNET_PUBLICIPS="[Free public IP 1] [Free public IP 2] ..."
VNET_LOCALIP="[IP address that other CCs can use to reach this CC]"
VNET_DHCPDAEMON="[Path to DHCP daemon binary. Example: /usr/sbin/dhcpd3]"

VNET_DHCPUSER='[DHCP user. Example: dhcpd]"

VNET_PRIVINTERFACE="[Ethernet device on same network as NCs. Example: eth1]"


VNET_PUBINTERFACE="[Ethernet device on ‘public’ network. Example: eth0]"

20. Log in to the Cloud Controller (CLC).
/usr/sbin/euca_conf --initialize 

21. Enter the following command to start the CLC:

service eucalyptus-cloud start

22. Log in to the Walrus server and enter the following command: 
service eucalyptus-cloud start

23. To register Walrus:

On the CLC server, enter the following command: 
$ /usr/sbin/euca_conf --register-walrus --partition walrus --host 192.168.1.28  --component s3walrus 

24. To register the CC:

On the CLC, enter the following command:
$ /usr/sbin/euca_conf --register-cluster --partition cluster01 --host 192.168.1.28 --component CloudCC

25. To register the SC:
$ /usr/sbin/euca_conf --register-sc --partition cloudsc --host 192.168.1.28 --component SC

26. Euca2ools is the Eucalyptus command line interface for interacting with Eucalyptus.
Configure the EPEL package repository
$ yum install http://downloads.eucalyptus.com/software/eucalyptus/3.4/centos/6/x86_64/epel-release-6.noarch.rpm

27. Configure the Euca2ools package repository:
$ yum install http://downloads.eucalyptus.com/software/euca2ools/3.0/centos/6/x86_64/euca2ools-release-3.0.noarch.rpm

28.Install Euca2ools:
yum install euca2ools