Contrail
Public Cloud Market Price Tracker
UC Davis ECS 193, 2019
Contrail is a public cloud market price tracker that allows you to easily access and compare the prices and characteristics of VMs over various locations, cloud providers, and times.
Quick Start
Virtual Environment
Create virtual environment:
virtualenv -p python3 venv
OR
python3 -m virtualenv venv
Start virtual environment:
source venv/bin/activate
You should see (venv) show up in command prompt.
Install requirements our project uses:
pip install -r requirements.txt
To exit virtual environment:
deactivate
Configure
By default, the site will read data from the official Contrail database. To collect your own data, see Collecting your own data below.
Start Django
Make sure you are in the main Contrail folder and the virtual environment is activated.
Collect static files:
python contrail.py frontend collectstatic
Start the Django server:
python contrail.py frontend runserver
Open 127.0.0.1:8000 in a browser.
API
/api/getinstances/
Given attributes, return instances that match and their prices
request:
{
'operating_system': "Linux",
'aws': "True",
'gcp': "True",
'azure': "False",
'region': None,
'vcpus': None,
'memory': 8,
}
response:
{
"instance_type": "c4"
"operating_system": "Linux",
"provider": "AWS",
"region": "US East",
"vcpus": 8,
"memory": 8,
"reserved", "spot",
"price_type": "on_demand",
"price": 0.233,
"price_unit": "per hour"
}
Collecting your own data
Contrail is split into a few distinct components:
- Crawler: Collects and stores raw offer data from various cloud providers.
- Loader: Parses raw offer data and stores it in a Clickhouse data warehouse.
- API/Frontend: Communicates with the data warehouse and displays data nicely.
The Quick Start above only sets up the API/Frontend component. By default, it points to our own data source. You will have to set up your own backend (crawler and loader) to collect your own data.
Read more about setting up the first two components here: Crawler, Loader.
Metadata
Release files for contrail 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| contrail-1.0.2.tar.gz | 37.0 kB | Without provenance | Details for contrail-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| contrail-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for contrail-1.0.2-py3-none-any.whl |
Total release size: 92.0 kB
Release files / contrail-1.0.2.tar.gz
| Download URL | contrail-1.0.2.tar.gz |
|---|---|
| Size | 37.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
42f9ad0a8c313eb32d3426db7bea399da4a187e21784f09258589ede18966622
|
|
BLAKE2b-256 checksum How to use checksums |
fbe6e2d7814cecdfd2e8684cecf544c8054db1de6d79f697691e89cfe30f63e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.5.4
|
Release files / contrail-1.0.2-py3-none-any.whl
| Download URL | contrail-1.0.2-py3-none-any.whl |
|---|---|
| Size | 55.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
379090fbba58267d5846a6197f65d65448b8d42cdbbe490f018bb9f29dfbc57f
|
|
BLAKE2b-256 checksum How to use checksums |
413ef058b1b2fbcfe2bed384c82ca2e97f7e694b3e57dba1c36f8564e3fa339d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.5.4
|
Security for contrail 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.