Implementing functionality of Service Location

ickybiblegroveInternet and Web Development

Nov 3, 2013 (4 years and 6 days ago)

220 views

1


Implementing functionality of Service Location

Protocol in cloud



Team:

1.
Laxmi narayana.CH (MT2009024)

Email:laxminarayana.ch@iiitb.net

(M) 90369 86119


2.
Avinash Mehta (MT2009084) (Team Lead)



Email: avinash.mehta@iiitb.net

(M) 90191 49443


3.
Mehul J Sheth (MT2009141)

Email: mehulkumarjayprakash.sheth@iiitb.net

(M) 90362 86901


4.
Manoj Shukla (MT2009143)

Email: manojkumar.shukla@iiitb.net

(M) 95355 91465


5.
Smitha.V (MT2009149)

Email: smitha.v@iiitb.net

(M) 97420 68863



Acknowledgement

2



W
e exp
ress our gratitude to
Prof. Shrisha Rao for
his
guidance and advice. We
would like to thank him for
constant encouragement, support and
valuable suggestions

throughout this work. We take this opportunity to thank the institute, family and friends
for
their support throughout this project.



















Contents

1.

Introduction
-------------------------------------------------------------------
4

1.1 Main Feature
-------------------------------------------------------------
4

3


2.

Technical Description
---------
----------------------------------------------
5

2.1

Cloud
--------------------------------------------------------------------
5

2.1.1

Front end
-----------------------------------------------------------
5

2.1.2

Nodes
----------------------------------------------------------
------
7

2.2

SLP
----------------------------------------------------------------------
-
7

3.

Architecture
-------------------------------------------------------------------
-
9

4.

Approach
----------------------------------------------------------------------
10

5.

Implement
ation
--------------------------------
------------------------------
12

5.1

Cloud Setup
----------------------------
-------------------------------
12

5.2

Application Development
------------------------------------------
19

5.3

Integration
----------------------------------
----------------
-----------
2
1

6.

Conclusion
---------------------------------------------------------------------
-
22

7.

References
----------------------------------------------------------------------
-
23



1.
Introduction


C
loud computing
[1][2]

allows the user to

enjoy the services without having the
knowledge of underlying technical infrastructure that supports it.

I
t is kind of plug and
play,

wherein user logs in to the cloud,

requests for a service and logs out once the
service is
fulfilled. Hence

it facilitate
s both the user and
service

providers.

U
ser can
avail

the services on the web through his dumb terminal without having to actually know
the underlying technology. Simultaneously, it
benefits

the service providers who provide
various services like
Infrastru
cture as a Service (IAAS), Platform as a Service (PAAS),
Application as a Service, and Storage as a Service (SAAS)

[
3
]

without actually delivering
the product physically to

the

user. The cloud provides multi user service, and is not
dedicated to a single
u
ser, though

the user
perceives

it to be the latter.

4


There are several ways to setup a cloud. Of which, we chose
eucalyptus

[3
]
[8]

for the
following
reasons:



I
t is open source



Ease in formation and maintenance

of cluster



Allows

usage of different hyperviso
rs and
virtualization

techniques

The Service Location Protocol (SLP
)
[4][5
][
6
]

is a service discovery protocol that allows
computers and other devices to find services in a local area network without prior
configuration. Current SLP implementation is limite
d to LAN and is not scalable to
internet. It will be useful to have similar functionality of SLP in cloud that helps client to
select the most appropriate image that has the service.

1.1
Main Features

This project makes use of the advantages of the cloud
and eucalyptus architecture
to provide the functionality similar to that of SLP thereby allowing the users to make use
of the service without having to know neither the details of cloud nor the configuring
details of services.

This project allows user to s
elect among the services by specifying the service name
and version.
Users don’t

have to know about the pl
atform on which the service is
running and other attributes required
for
running

the service.



2. Technical Description

2.1
Cloud

Cloud
[1][2]

is an i
nternet computing paradigm which is built around services. For
example
IAAS
,

PAAS, SAAS

[3
]
[8]

etc. The main idea is to provide scalable resources
‘‘as a service’’ allowing users to access technology
-
enabled services over the net,
without knowledge of, exp
ertise with, or control over the technology infrastructure that
supports them. Cloud infrastructure consists of two dedicated systems



A Front End



One or more Nodes



2.1.1
Front end
:


Cloud Controller (CLC)

[3
]
:

5


The cloud controller is the most visible el
ement of the eucalyptus architecture. It
consis
ts of a "query interface".
The euca2ools
[3][7]

and HybridFox
[7]

makes use of this
interface for communication over the web. It is the entry
-
point into the cloud for users
and administrators. The cloud controll
er interacts with the cluster controller regarding
the arriving requests by various levels of users and accordingly allocates new instances.
In addition to this,

T
he CLC maintains the state information, meaning details of all the
running instances, collect
ion of available machines to run,

and the overall load of the
system.


Cluster Controller (CC)

[
3
]
:

The Cluster Controller (CC) operates between the Node Controller and the Cloud
Controller. Since it has to operate between CLC and Node Controller it has ac
cess to
both the networks. CC receives requests from the CLC to allocate the machine images.
Then, CC decides the Node Controller on which the machine instance has to run. This
decision is based upon status reports which the Cluster Controller receives fro
m each of
the Node Controllers.


Walrus (put/get storage)
[
3]

:

Walrus is a storage device that allows the users to store persistent data. It is organized
as buckets and objects. It allows users to create, delete, list buckets, put, get,
and
delete

objec
ts. Walrus is compatible with Amazon’s S3, and allows storing and
accessing of both the virtual machine images and user data.


It is used for:



Storing the the machine images (MI) that can be instantiated on our cloud



Accessing and storing data (either fro
m a running instance or from
anywhere on the web)



System Requirements


Hardware

Minimum

CPU

1GHZ

Memory

1GB

6


Disk Space

40GB







2.1.2

Nodes

Node Controller (NC)

[
3
]
:

The Node
Controllers (
NC) is installed on various end systems on which machine
ins
tances are instantiated. It

interacts

with the OS and the hypervisor. NC discovers the
environment, meaning the details of available
resources (
disk space, type and number
of cores, memory). The Node Controller will then wait for requests from the Cluster
Controller. It starts the instances once the request for service is received.


System Requirements:


Hardware

Minimum

CPU

VT extensions

Memory

1GB

Disk Space

40GB



2.2
SLP

7


In recent times, 'Service Location Protocol (SLP)

[
4
]

[
5
]

[
6
]
, an

emerging Int
ernet standard
network protocol drive much focus from
industry. It

provides a framework which

eases

users of various networking applications in discovering the existence, location, and
configuration of services in enterprise networks. SLP is designed to si
mplify the
discovery and use of


various network resources like printers, Web servers, fax
machines, video cameras, files systems, backup devices (tape drives).

In conventional
networks,

in order to locate services on the network, users are required
to sup
ply the host name or network address of the machine that supplies a desired
service. SLP relieves the user from knowing the name of a network host supporting a
service. Moreover, the user can choose the desired type of service by giving set of
attributes o
r keywords

describing

the service.
Using

that description, the Service
Location Protocol does the job of resolving the network address

of the service of the
user. SLP

internally uses Uniform Resources Locators (URL's) to locate services.

The SLP
[7]
[8]

fram
ework consists of the following agents:

User Agent (UA)

The User Agent (UA) issues a service request on behalf of the client application.

Service Agent (SA)

The Service Agent (SA) works on behalf of one or more services to advertise the
service on the netw
ork.

In the absence of Directory Agents (DAs), the SA responds to
multicast requests sent by the User Agents. If a DA is available, the SA registers and,
optionally, withdraws services with DAs that support its scopes.


Directory Agent (DA)

The Directory A
gent (DA) is an optional SLP agent that maintains a cache of

service
advertisements sent by the SA.

Analogy:



SLP


Cloud

User Agent

Client

Directory Agent

Cloud Controller

Service Agent

Node Controller

8







3. SLP in Clou
d

Archite
cture




























Cloud












Cloud Controller

(CLC)


Directory

Agent

(
D
A)


Cluster
-
1 (CC)


Service Type
-
1


NC
-
1


S
A
-
1


Cluster
-
2 (CC)

Service Type
-
2

Clus
ter
-
3 (CC)

Service Tyep
-
3


NC
-
1


S
A
-
1


NC
-
2


S
A
-
2


NC
-
2


S
A
-
2


NC
-
3


S
A
-
3


NC
-
3


S
A
-
3


Client


User Agent

(UA)


Service Request


Service Reply


Service Registration


Service Acknowledgment

Legend:

SA
-
Service Agent

NC
-
Node Controller


9


4
. Approach


Services

Machine ID

Java Compiler Version 5.01

Machine ID of NC
-
1

Java Compiler Version 6.01

Machine ID of NC
-
2

GCC Compiler 4.0

Machine ID of NC
-
3

GCC Compiler 4.1.2

Machine ID of NC
-
4













Use
r interaction with the Cloud


User Interaction with the cloud


Steps:



Create a page using JSP and XML on the cloud controller that will contain the
information of all the services and the machine ids on which that service may run



















Groups



Key Pairs



Address



Image



WS In
terfa
ce





ce



VM Control



CC
-
1



CC
-
2



CC
-
N



User Authentication

Persistent
Metadata












System State

User Request



10




In a traditional cloud env
ironment, when client requests for any service, CLC
assigns NC to client without client interferenc
e in selection of the services



When client requests for any service, a page containing information about the
selected service is displayed by the cloud contr
oller. The client can now select a
service and depending on the service, CLC will assign a NC to the client.


5.

Implementation


It can be divided into three steps:



Cloud setup



Application development



Integration

5.1
Cloud setup

[7]
:


Installation and conf
iguration of Eucalyptus on a single NC
-
CLC
Environment

Step

1
: Install the Cloud/Cluster/Storage/Walrus Front End Server(s)

1.

Install Ubuntu 9.10 Server

2.

Update to the most current state in the Ubuntu archive:





sudo apt
-
get update






sudo apt
-
get dist
-
upgrade

3.

Install the eucalyptus
-
cloud and eucalyptus
-
cc packages on the
Front End
:



sudo apt
-
get install eucalyptus
-
cloud eucalyptus
-
cc eucalyptus
-
walrus
eucalyptus
-
sc

Answer debconf's questions:



Configure postfix for
internet

delivery



Name your cluster e.g. cluster1

11




Add a list of available IP addresses on your network e.g.
192.168.1.200
-
192.168.1.249


Step
2
: Install and Configure the Node Controller(s)

Installing the Eucalyptus Node Service on

a running Ubuntu system consists of doing
the following on one or more systems:

1.
Install Ubuntu 9.10 Server


2. Update to the most current state in the Ubuntu archive:



sudo apt
-
get update



sudo apt
-
get dist
-
upgrad
e

3. Install the eucalyptus
-
nc package



sudo apt
-
get install eucalyptus
-
nc

4. Configure the system's primary
Ethernet

interface as a bridge. The node controller
will attach virtual network interfaces to this bridge for VM that is starte
d before it to
enable network connectivity.




The following script should be run to configure the bridge correctly:



interface=eth0


bridge=br0



sudo sed
-
i "s/^iface $interface inet
\
(.*
\
)$/iface $interface inet
manual
\
n
\
nauto

br
0
\
niface $bridge inet
\
1/" /etc/network/interfaces


sudo tee
-
a /etc/network/interfaces <<EOF


bridge_ports $interface


bridge_fd 9


bridge_hello 2




bridge_maxage 12



bridge_stp off




EOF




sudo /et
c/init.d/networking restart



12


5.


Configure /etc/eucalyptus/eucalyptus.conf with the name of the bridge, and
restart the node controller:






sudo sed
-
i "s/^VNET_BRIDGE=.*$/VNET_BRIDGE=$bridge/"
/etc/eucalyptus/eucalyptus.conf







sudo /etc/i
nit.d/eucalyptus
-
nc restart

6.


Finally, you need to install the Cloud Controller's
eucalyptus

user's public ssh
key into the Node Controller's eucalyptus user's authorized_keys file.




On the Node Controller, temporarily set a password for the

eucalyptu
s

user:




sudo passwd eucalyptus



Then, on the Cloud Controller:





sudo
-
u eucalyptus ssh
-
copy
-
id
-
i
~eu
calyptus/.ssh/id_rsa.pub

eucalyptus@<IP_OF_NODE>



You ca
n now remove the password of the
eucalyptus

account on the
Node:




sudo passwd
-
d eucalyptus

Step 3
: Register the Walrus, Cluster, Storage, and Node Controllers

As of Ubuntu 9.10

LTS, all component registration should be automatic, assuming:

1.

Public SSH keys have been exchanged properly

2.

The services are configure
d properly

3.

The services are publishing their existence

4.

The appropriate uec
-
component
-
listener is running

Exchange Public SSH Keys

The Cloud Controller's
eucalyptus

user needs to have SSH access to the Walrus
Controller, Cluster Controller, and Storage C
ontroller as the
eucalyptus

user.

Install the Cloud Controller's
eucalyptus

user's public ssh key by:



On the
target

controller, temporarily set a password for the
eucalyptus

user:

sudo passwd eucalyptus







13




Then, on the Cloud Controller:







sudo
-
u eucalyptus ssh
-
copy
-
id
-
i
~eucalyptus/.ssh/id_rsa.pub eucalyptus@<IP_OF_NODE>



You can now remove the password of the
eucalyptus

account on the
target controller, if you wish:






sudo passwd
-
d eucalyptus

Configure th
e Services

On the Cloud Controller:

For the Cluster Controller Registration:



Define the shell variable CC_NAME in /etc/eucalyptus/eucalyptus
-
cc.conf



Define the shell variable CC_IP_ADDR in /etc/eucalyptus/eucalyptus
-
ipaddr.conf, as a space separated list

of one or more IP addresses
.

For the Walrus Controller Registration:



Define the shell variable WALRUS_IP_ADDR in
/etc/eucalyptus/eucalyptus
-
ipaddr.conf,

as a single IP address.

On the Cluster Controller:

For Storage Controller Registration:



Define th
e cluster name in the shell variable CC_NAME in
/etc/eucalyptus/eucalyptus
-
cc.conf



Define the shell variable SC_IP_ADDR in
/etc/eucalyptus/eucalyptus
-
ipaddr.conf
, as a space separated list of one or more IP addresses.

Now start the publication services.



Walrus Controller
:

sudo start eucalyptus
-
walrus
-
publication




Cluster Controller
:



14


sudo start eucalyptus
-
cc
-
publication




Storage Controller
:






sudo start eucalyptus
-
cc
-
publication



Node Controller






sudo start eucalyptus
-
nc
-
publication

Start t
he Listener

On the Cloud Controller and the Cluster Controller(s), run:



sudo start uec
-
component
-
listener


Verify Registration



cat /var/log/eucalyptus/registration.log


Step 4
: Obtain Credentials

After installing and booting the Cloud Controller, use
rs of the cloud will need to retrieve
their
credentials
. This can be done either through a web browser, or at the command
line.

From a Web Browser

1.

From your web browser (either remotely or on your Ubuntu server) access the
following URL:





https://<cl
oud
-
controller
-
ip
-
address>:8443/

2.

Use username 'admin' and password 'admin' for the first time login (you will be
prompted to change your password).

3.

Then follow the on
-
screen instructions to update the admin password and email
address.

15


4. Once the first t
ime configuration process is completed, click the 'credentials' tab

located in the top
-
left portion of the screen.

5.

Click the 'Download Credentials' button to get your certificates


6.


Save them to ~/.euca

7.

Unzip the downloaded zipfile into a s
afe location (~/.euca)

unzip
-
d ~/.euca mycreds.zip

Extracting and Using Your Credentials

Now you will need to setup EC2 API and AMI tools on your server using X.509
certificates.

1.

Install the required cloud user tools:

sudo apt
-
get install euca2ools



2.

To validate that everything is working correctly, get the local cluster availability
details:




. ~/.euca/eucarc euca
-
describe
-
availability
-
zones verbose

Step
5
: Run an Image

There are multiple ways to instantiate an image in UEC:



se the co
mmand line



U
Use one of the UEC compatible management tools such as Landscape



Use the hybridfox extension to Firefox

Here we will describe the process from the command line:

1.

Before running an instance of your image, you should first create a keypair (s
sh
key) that you can use to log into your instance as root, once it boots. The key is
stored, so you will only have to do this once. Run the following command:

if [ !
-
e ~/.euca/mykey.priv ]; then



mkdir
-
p
-
m 700 ~/.euca



touch ~/.euca/mykey.priv




chmod 0600 ~/.euca/mykey.priv



euca
-
add
-
keypair mykey > ~/.euca/mykey.priv

fi

16


euca
-
run
-
instances $EMI
-
k mykey
-
t m1.small




2. You must also allow access to port 22 in your instances:



euca
-
authorize default
-
P tcp
-
p 22
-
s 0.0.0.0
/0



3. Next, you can create instances of your registered image:



euca
-
run
-
instances $EMI
-
k mykey
-
t m1.small




5.2
Application development

It involves development of application that provides web interface to the user.
The user is authentic
ated based on the username, password and group level provided
by him at the time of login.

After successful login, the user is provided with options to select the required
software along with version. This is implemented by creating a page using jsp.

A xm
l file containing details of all the available images is maintained. Depending
on the software and version selected by the user, the corresponding image id is read
from the xml file. The details thus obtained are sent to the script to run instances of the
image to provide the requested service.

17



Login page


Page that allows the user to specify the service and version


18



The output got after selection of software and service by the user


5.3

Integration

The application developed is deployed on the cloud contro
ller on cloud. The
application allows the user to interact with the cloud to get the requested services.









6. Conclusion

This project is developed as an attempt to provide SLP functionality in cloud
environment that allows the user to select among th
e available services without having
to know about other attributes of the service. This project was a great step in the
19


direction to allow rich browsing facility while selecting the service. As an improvement to
the work done in this project, it can be sca
lable over the internet.
















REFERENCES

[1]
http://www.ibm.com/developerworks/opensource/library/os
-
cloud
-

virtual1/index.html?ca=dth
-
cloud


[Accessed: 12 January 2010]


[2]
http://www.sun.com/featured
-
articles/CloudComputing.pdf


[Accessed: 12
January 2010]


20


[3
] ‘‘Eucalyptus Community’’.[Online] Available: http://open.eucalyptus.com/

[Accessed: 13 January 2010]

[4
] Guttman, E ‘‘Service location protocol’’. July
-
August 1999. [Online].

Available: http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber
=00780963

[Accessed: 12 January 2010]

[5
] ‘‘OpenSLP Home Page’’.[Online].

Available: http://www.openslp.org/doc/html/IntroductionToSLP/index.html

[Accessed: 15 January 2010]

[6
] ‘‘SLP Architecture (Service Location Protocol Administration Guide)’’.February

2000[Online]

Available: http://docs.sun.com/app/docs/doc/806
-
1412/6jamu408d?l=ru&a=view

[Accessed: 20 January 2010]

[7
] ‘‘SRVLOC Home Page’’.[Online] Available: http://srvloc.sourceforge.net/

[Accessed; 15

April

2010]


[8]
“Forums”


“Ubuntu

forum

http://
ubuntuforums.org
/


“Eucalyptus forum “
http://open.eucalyptus.com/forum