This Python package automates the process of estimating AWS migration costs based on RVTools output. It takes an RVTools Excel report as input, analyzes the virtual machine specifications, and generates a detailed cost estimate for equivalent AWS instances, including storage costs.
- Converts RVTools Excel tabs to CSV for processing
- Calculates AWS instance types based on CPU and RAM requirements
- Estimates costs for on-demand, 1-year reserved, and 3-year reserved instances
- Includes storage cost calculations
- Generates a CSV report with detailed cost breakdowns
- Creates a PDF quote with a summary and detailed instance information
- Utilizes multithreading for improved performance with large datasets
- Provides progress updates during processing
- Modular architecture for easy extension and customization
- Python 3.6+
- AWS account with configured credentials
-
Clone the repository:
git clone https://github.com/bitbucket90/rvtools-aws-cost-estimator.git cd rvtools-aws-cost-estimator
-
Install the package:
pip install -e .
pip install rv2aws
- Configure AWS credentials following the official AWS guide.
Run the tool with the following command:
rv2aws --input_file path/to/rvtools_report.xlsx --output_file path/to/output.csv
or using the included script:
./rv2aws-cli.py --input_file path/to/rvtools_report.xlsx --output_file path/to/output.csv
--input_file
: Path to RVTools Excel file (required)--output_file
: Path to output CSV file (required)--threads
: Number of worker threads (default: 5)--pdf_output
: Path to output PDF file (default: aws_migration_quote.pdf)--verbose
: Enable verbose logging--region
: AWS region for pricing (default: us-east-1)
The tool generates two output files:
- A CSV file (
output.csv
) containing detailed cost estimates for each virtual machine. - A PDF file (
aws_migration_quote.pdf
) with a summary of projected costs and a breakdown of instance types.
The package is organized into modular components:
data_processing.py
: Handles input/output operations and data transformationaws_instance.py
: Manages instance type selection logicaws_pricing.py
: Interacts with AWS pricing APIsreport_generator.py
: Generates CSV reportspdf_generator.py
: Creates PDF quotes with visualizationutils.py
: Contains utility functionsmain.py
: Orchestrates the overall process
The modular architecture makes it easy to extend the tool:
- To add support for new cloud providers, create a new module similar to
aws_instance.py
- To create new report formats, add a module similar to
pdf_generator.py
- To customize AWS pricing logic, modify the
aws_pricing.py
module
The tool provides an extension mechanism through three extension points:
pre_process
: Runs before VM processing, allows modifying input datapost_process
: Runs after VM processing, allows transforming resultsreport_generators
: Runs after standard reports, adds custom report formats
Example: Create a new Excel report generator extension:
-
Create a file in
rv2aws/extensions/excel_report.py
:from rv2aws.main import register_extension def generate_excel_report(processed_host_records, context): # Generate an Excel report with the processed data # ... # Register the extension register_extension('report_generators', generate_excel_report)
-
Import the extension in
rv2aws/extensions/__init__.py
:# Import extensions here to register them from rv2aws.extensions.excel_report import generate_excel_report
The tool will automatically discover and run registered extensions.
- Ensure your RVTools Excel file contains the required "vCPU" and "vDisk" tabs.
- Check AWS credentials are correctly configured if you encounter API-related errors.
- For large datasets, increase the
--threads
parameter for faster processing.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Brandon Pendleton ([email protected]) for the original script and documentation.
- The RVTools team for their excellent virtualization documentation tool.
For any queries or support, please contact Brandon Pendleton at [email protected] or submit an issue or merge request on the repo.