Skip to content

Simplified SaaS

Jishan Baig edited this page Sep 17, 2017 · 2 revisions

What is SaaS?

What is EBS?

What is Object Storage Service?

Simplified EBS

PROBLEM STATEMENT To provide an EBS like service to create and attach storage to any VM on the go. The created storage volume can then be used for other VMs as well.

PROBLEM SCOPE Considering the storage attached to the VMs as transient, we will provide a persistent storage service on top of the cloud that has already been created in problem 1. The newly created storage volumes will be reusable by any other VMs. The contents they hold will be intact and available for reuse by any other VM, to which we attach the selected VM.

ARCHITECTURE The storage service is being provided on top of the existing cloud infrastructure built in problem 1. The cloud controller takes inputs from the user for storage related services. The cloud cluster then sends request for the specified service to the cluster controller. The cluster controller checks which node controller has the specified domain and relays the request to the targeted node controller. The node controller then performs the specified operations. The architecture of the service is as given in the figure 1. The users interact with the cloud controller using the exposed REST API to use the storage services. The cloud controller then interacts with the cluster controllers again using the REST APIs. The cluster controller then finds out the node controller where the domain is located and performs the services as specified by the user. If a new storage volume has to be created then we assume that default named Storage Pool is available on each physical machine. The storage volume is created in this pool only. If there is an existing Storage Volume then that volume can be attached to any other device. The first time user of the storage has to format it so as to be able to use it. The storage volumes are attached to the VMs as USB drives. As these are persistent storage, we haven’t provided the functionality of deletion of storage volumes yet.

Various functionalities of each cloud component such as cloud controller, cluster controller and node controller along with their URIs are given below:

CLOUD CONTROLLER

  1. Creation of Storage Volume:

Method: createVolume(string domain, int capacity, string unit) This method is called by the cloud controller when a user requests to create a new volume. The user has to specify following things:

  • domain: The domain name where he/she wants a new volume
  • capacity: The capacity of the volume to be created. It should be integer.
  • unit : This is the unit of capacity of which the drive has to be created. It must be in K/M/G/T

 2. 	Listing of all the pools:

Method: getPoolList(string domain) This method will list all the pool names that are available on the domain

  • domain - name of the domain

Returns: A list of pool names available on the domain. 3. Listing of all volumes

Method: getVolumeList(string domain, string pool) This method is invoked to get the list of volumes present in a pool specified by domain name.

  • domain : name of domain
  • pool: name of pool

Returns: The list of all the volumes present inside a pool

4.    Attach Volume

Method: attachVolumeToVM(string domain, string pool, string volume) This method is invoked when a user wants to attach an existing volume to a VM.

  • domain : name of the domain
  • pool: name of the pool
  • volume: name of the volume

CLUSTER CONTROLLER All the REST URIs are internal to cluster controller and don’t provide much of functionalities besides relaying the request to appropriate node controller. The cluster controller maintains a list of nodes that are attached to each cluster controller. It queries each of the node controller to check whether they have the specified domain or not. If present it simply calls the appropriate URIs of the node controller.

NODE CONTROLLER The node controller is the one responsible for providing all the services specified by the cluster controller. It invokes the appropriate methods on each REST call by the cluster controller. The functionalities of the node controller are as given below:

  1. Creation of Volume

URI: http://ip-address:port/node/createVol Method Type: POST Method: createVolume(string domain, int capacity, string unit)

A new volume is created using a standard xml format already available with the node controller. The name is generated automatically based on the number of volumes already present in the pool. The format of the volume created is qcow2.

  • domain: The domain name where he/she wants a new volume
  • capacity: The capacity of the volume to be created. It should be integer.
  • unit : This is the unit of capacity of which the drive has to be created. It must be in K/M/G/T

Returns: result json format { “result” : “Success” } for success { “result” : “Failure” } for failure

2. List all the pools available

URI: http://ip-address:port/node/listPools Method Type: GET Method: getPoolList(string domain) This method will list all the pool names that are available on the domain

  • Domain - name of the domain

Returns: A list of pool names available on the domain in the form of json.

  1. List all the volumes available

URI: http://ip-address:port/node/listVolumes Method Type: GET Method: getVolumeList(string domain, string pool) This method is invoked to get the list of volumes present in a pool specified by domain name.

  • domain : name of domain
  • pool: name of pool

Returns: The list of all the volumes present inside a pool in the form of json.

  1. Attach a Volume to a VM

URI: http://ip-address:port/node/attachVM Method Type: POST Method: attachVolumeToVM(string domain, string pool, string volume) This method is invoked when a user wants to attach an existing volume to a VM.

  • domain : name of the domain
  • pool: name of the pool
  • volume: name of the volume Returns: result json format { “result” : “Success” } for success { “result” : “Failure” } for failure

Object Storage Service

PROBLEM STATEMENT To provide the objectstorage service to store objects like files on physical machines. For this we will be using the architecture from the part a of problem 2.

PROBLEM SCOPE Providing the object storage service where users will be specifying the name of file and posting the contents to the cloud controller. The cloud controller will store the file specified by the user in one of the buckets(storage space on PM) whose location is obtained by hashing the name of the file. The contents of the VM are obtained in a similar fashion.

ARCHITECTURE The object storage service is provided on top of the architecture as specified in the part A of the problem 2. The cloud controller exposes a set of REST URIs to be used by the users to interact with the system. The architecture of the same is given below:

The users interact with the cloud controller using the exposed REST API to use the object storage services. The cloud controller then interacts with the cluster controllers again using the REST APIs. The cluster controller then performs hashing on the name of the file and finds out the bucket where to store the file. The cloud controller stores the hash and corresponding file in a map. The cloud controller also maintains a map of the hash value and the corresponding bucket address in another map. The same process is repeated when the user needs his/her file back. Various functionalities of each cloud component such as cloud controller, cluster controller and node controller along with their URIs are given below:

CLOUD CONTROLLER

  1. Store file

Method: storeFile(string filename) Request: It contains the file contents Method Type: POST This method is called by the cloud controller when a user requests to store a file. The user has to specify following things:

  • Filename - name of the file Response : Result of operation { “result” : “SUCCESS” } is operation succeeds { “result” : “FAILURE” } is operation fails

  1. Retrieve File

Method: retrieveFile(string filename) Method Type: GET This method will return the content of file.

  • filename - name of the file

Response : Content of file

CLUSTER CONTROLLER All the REST URIs are internal to cluster controller and don’t provide much of functionalities besides relaying the request to appropriate node controller where the bucket is located.

NODE CONTROLLER The node controller is the one responsible for providing all the services specified by the cluster controller. It invokes the appropriate methods on each REST call by the cluster controller. The functionalities of the node controller are as given below:

  1. Store File

URI: http://ip-address:port/node/storeFile Method: storeFile(string filename) Request: It contains the file contents Method Type: POST This method actually creates a file on the bucket.

  • Filename - name of the file

Response : Result of operation { “result” : “SUCCESS” } is operation succeeds { “result” : “FAILURE” } is operation fails

  1. Retrieve File

URI: http://ip-address:port/node/retrieveFile Method Type: GET Method: retrieveFile(string filename)

This method will return the content of file.

  • filename - name of the file

Response : Content of file

Clone this wiki locally