The project aims to bring cloudformation like service to cloudstack. One of the prime use-case is cluster computing frameworks on cloudstack. A cloudformation service will give users and administrators of cloudstack ability to manage and control a set of resources easily. The cloudformation will allow booting and configuring a set of VMs and form a cluster. Simple example would be LAMP stack. More complex clusters such as mesos or hadoop cluster requires a little more advanced configuration. There is already some work done by Chiradeep Vittal at this front . In this project, I will implement server side cloudformation service for cloudstack and demonstrate how to run mesos cluster using it.
Mesos is a resource management platform for clusters . It aims to increase resource utilization of clusters by sharing cluster resources among multiple processing frameworks(like MapReduce, MPI, Graph Processing) or multiple instances of same framework. It provides efficient resource isolation through use of containers. Uses zookeeper for state maintenance and fault tolerance.
What can run on mesos ?
Spark: A cluster computing framework based on the Resilient Distributed Datasets (RDDs) abstraction. RDD is more generalized than MapReduce and can support iterative and interactive computation while retaining fault tolerance, scalability, data locality etc.
Hadoop: Hadoop is fault tolerant and scalable distributed computing framework based on MapReduce abstraction.
Begel: A graph processing framework based on pregel.
and other frameworks like MPI, Hypertable.
How to deploy mesos
Mesos provides cluster installation scripts  for cluster deployment. There are also scripts available to deploy a cluster on Amazon EC2 . It would be interesting to see if this scripts can be leveraged in anyway.
1. Deploy CloudStack and understand instance configuration/contextualization
2. Test and deploy Mesos on a set of CloudStack based VM, manually. Design/propose an automation framework.
3. Test stackmate and engage chiradeep (report bugs, make suggestion, make pull request)
4. Create cloudformation template to provision a Mesos Cluster
5. Compare with Apache Whirr or other cluster provisioning tools for server side implementation of cloudformation service.
Architecture and Tools:
The high level architecture is as follows:
It includes following components:
1. CloudFormation Query API server:
This acts as a point of contact to and exposes CloudFormation functionality as Query API. This can be accessed directly or through existing tools from Amazon AWS for their cloudformation service. It will be easy to start as a module which resides outside cloudstack at first and I plan to use dropwizard  to start with. Later may be the API server can be merged with cloudstack core. I plan to use mysql for storing details of clusters.
Provisioning module is responsible for handling the booting process of the VMs through cloudstack. This uses the cloudstack APIs for launching VMs. I plan to use preconfigured templates/images with required dependencies installed, which will make cluster creation process much faster even for large clusters. Error handling is very important part of this module. For example, what you do if few VMs fail to boot in cluster ?
This module deals with configuring the VMs to form a cluster. This can be done via manual scripts/code or via configuration management tools like chef/ironfan/knife. Potentially workflow automation tools like rundeck  also can be used. Also Apache whirr and Provisionr are options. I plan to explore this tools and select suitable ones.
Query API will be based on Amazon AWS cloudformation service . This will allow leveraging existing tools for AWS .
1-1.5 week : project design. Architecture, tools selection, API design
1-1.5 week : getting familiar with cloudstack and stackmate codebase and architecture details
1-1.5 week : getting familiar with mesos internals
1-1.5 week : setting up the dev environment and create mesos templates
2-3 week : build provisioning and configuration module
Midterm evaluation: provisioning module, configuration module
2-3 week : develope cloudformation server side implementation
2-3 week : test and integrate
1. Auto Scaling :
Automatically adding or removing VMs from mesos cluster based on various conditions like utilization going above/below a static threshold. There can be more sophisticated strategies based on prediction or fine grained metric collection with tight integration with mesos framework.
2. Cluster Simulator :
Integrating with existing simulator to simulate mesos clusters. This can be useful in various scenarios, for example while developing a new scheduling algorithm, testing autoscaling etc.