|
| 1 | +# ElasTest Cost Engine (ECE) |
| 2 | + |
| 3 | +The Cost, Energy and Resource Consumption Modeling Engines (ECE) will be used in order to make ElasTest consider the financial of using clouds. Using clouds cost money, in third party clouds you pay for the time and resources you use. As well as in on-premises clouds, you pay for the energy and the hardware resources utilization. If ElasTest does not consider this aspects, the risk of not being financially sustainable appears. |
| 4 | + |
| 5 | +The ECE is a service that needs information from the ElasTest Service Manager (ESM) and the ElasTest Platform Manager (EPM) for pulling information about the Platforms and Services Cost Models, and also needs information from the ElasTest Test Orchestration and Recommendation Manager (TORM) in order to know what T-Jobs can the ElasTest user estimate. |
| 6 | + |
| 7 | +## Features |
| 8 | + |
| 9 | +The version 0.1 of the ElasTest Cost Engine, provides the following features: |
| 10 | + |
| 11 | +- Estimate basic costs of T-Job executions based on already existing cost models. |
| 12 | +- Create and Manage Cost Models |
| 13 | + |
| 14 | +## How to run |
| 15 | + |
| 16 | +1. Install Docker. |
| 17 | + |
| 18 | +2. Install Docker Compose. |
| 19 | + |
| 20 | +3. Go to the `postgres` folder and build the database image: |
| 21 | + - `docker build -t postgres .` |
| 22 | +4. Go back to the root folder of the repository and build the main ECE image: |
| 23 | + - `docker build -t ece .` |
| 24 | +5. Run the image using the following command: |
| 25 | + - `docker-compose up` |
| 26 | + |
| 27 | +## Basic uasge |
| 28 | + |
| 29 | +When the ECE is started correctly, a basic UI will be exposed at http://localhost:8888 |
| 30 | + |
| 31 | +The 0.0.2 version of ECE initializes the databases and includes two different Cost Models as initial values. The T-Jobs are mocked up until the DSL is correctly defined. |
| 32 | + |
| 33 | +The ECE UI offers the functionality to estimate the price of running a specified T-Job running under a Cost Model. |
| 34 | + |
| 35 | + |
| 36 | +The ECE UI also ofers a simple way to manage all the Cost Models, creating, deleting and requesting for the json structure. |
| 37 | + |
| 38 | +--- |
| 39 | + |
| 40 | +## Development documentation |
| 41 | + |
| 42 | + |
| 43 | +ECE is developed using Java and Spring MVC. |
| 44 | +### Architecture |
| 45 | + |
| 46 | +The ElasTest Cost Engine has aims to provide a [HTTP Rest API](http://elastest.io/docs/api/ece/) that computes cost |
| 47 | +estimations for running T-Jobs under a concrete Infrastructure Cost Model. |
| 48 | + |
| 49 | +ECE will be in contact with the following ElasTest services: |
| 50 | + - [The ESM](https://github.com/elastest/elastest-service-manager) will be used to query the Services pricing strategies. |
| 51 | + - [The EPM](https://github.com/elastest/elastest-platform-manager) will be used to query the Platform pricing strategies. |
| 52 | + - [The TORM](https://github.com/elastest/elastest-torm) will provide the T-Job details. |
| 53 | + - [The EMS](https://github.com/elastest/elastest-monitoring-service) will provide information about the running T-Jobs. |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | +For now, the 0.0.2 version is using Mock up values to simmulate the interaction with the rest of the ElasTest Components. |
| 58 | + |
| 59 | + |
| 60 | +The Cost Models are defined in a generic way so can be adapted to several cases from VM orchestrations, Service |
| 61 | +instantiations and Services that contain VM orchestration as part of them. The used format is the following: |
| 62 | + |
| 63 | +``` |
| 64 | +{ |
| 65 | + "name" : "CostModelX", |
| 66 | + "type" : "On Demand", |
| 67 | + "fix_cost" : { |
| 68 | + "deployment" : 12.5 |
| 69 | + }, |
| 70 | + "var_rate" : { |
| 71 | + "cpu_core" : 10, |
| 72 | + "gb_ram" : 5, |
| 73 | + "gb_ssd" : 0.6, |
| 74 | + "gb_hhd" : 0.0775 |
| 75 | + }, |
| 76 | + "components":{ |
| 77 | + "id" : "CostModelYId" |
| 78 | + }, |
| 79 | + "description" : "On demand provisioning of a VM. Includes as a component a package X accounted by the Cost Model Y" |
| 80 | +} |
| 81 | +``` |
0 commit comments