
opencloudtool
A tool to hide the complexity of the cloud.
Install oct-cli
|
or
|
Install as Python library
See the Python library README for details: crates/oct-py/README.md
Log in to AWS
Basic login (docs):
Using AWS SSO (docs):
Deployment Examples
- Multiple REST services on the same host with NGINX load balancer
- Multiple REST services on different hosts with NGINX load balancer
- S3 remote state storage
- REST service with domain
- Single host multi services with domains
- Ray single worker
- Inject system env variables
- HTTP server with single dockerfile
- HTTP server with multiple dockerfiles
- Dedicated CS2 server
- FastAPI app via python library
High Level Design

Versions Design
Each version of OpenCloudTool has a mini-project to prove the design and implementation.
v0.7.0 "VMs deployment based on user services resources"

Fixed infra graph
Shows the current state of the graph from crates/oct-cloud/src/infra.
The diagram can be moved to the infra-specific folder later, keeping it here for now to have all the design documents in one place.

Development
Command examples
Install pre-commit hooks
Build project
Run deploy command
Run destroy command
Show all available commands
Show all available parameters for command
For example:
Writing tests
[WIP] Main principles:
- Each module provides its own mocks in a public
mocksmodule
...main code...
- Each module tests cover only the functionality in the module
- If a module uses external modules, they are mocked using mocks provided by the imported module's
mocksmodule
...other imports...
use MockModule as Module;
use Module;
...main code...
Imports ordering
When importing modules, the following order should be used:
- Standard library imports
- Third-party imports
- Local crate imports
use fs;
use ;
use crateInstanceType;
Dev tools
Machete
Removes unused dependencies
Cargo Features Manager
Removes unused features
Profile building time
Produces HTML file with building time report.
Can be found in target/cargo-timings.html
Pricing comparison
This section compares the cost of running a set of services in a cloud with different approaches which do not require the end user to manage underlying infrastructure (serverless).
Note that OpenCloudTool is a free to use open-source tool and there is no charge for using it.
Simple REST service
Main components:
- Django REST service (0.5 vCPU, 1GB RAM)
- Celery worker (0.5 vCPU, 1GB RAM)
- Redis (0.5 vCPU, 1GB RAM)
- Postgres (0.5 vCPU, 1GB RAM)
- Load Balancer (nginx, ELB, etc.)
AWS ECS Fargate
- 2 vCPU (1 vCPU per hour - $0.04048) - $61.5 per month
- 4 GB RAM (1 GB RAM per hour - $0.004445) - $13.5 per month
- Load Balancer ($0.0225 per hour) - $17 per month
Total: $92 per month
Single EC2 instance managed by OpenCloudTool
- 1 EC2 t4g.medium instance ($0.0336 per hour): $25.5 per month
Total: $25.5 per month