X2A Convertor Reference
The x2a-convertor is the migration engine that powers X2Ansible. It can run inside the platform as Kubernetes jobs, or standalone as a CLI tool.
This section covers standalone CLI usage.
Installation
Docker (Recommended)
git clone https://github.com/x2ansible/x2a-convertor.git
cd x2a-convertor
docker build -t x2a-convertor:latest .
docker run --rm x2a-convertor:latest --help
The container image includes Python 3.12, Chef Workstation CLI, and all dependencies.
Local Installation
Requires Python 3.12+ and uv.
git clone https://github.com/x2ansible/x2a-convertor.git
cd x2a-convertor
uv sync
uv run app.py --help
For Chef cookbook analysis, install Chef Workstation separately.
Quick Start
Using the chef-examples repository:
git clone https://github.com/x2ansible/chef-examples.git
cd chef-examples
# Set LLM credentials
export LLM_MODEL=anthropic.claude-3-7-sonnet-20250219-v1:0
export AWS_REGION=your-region
export AWS_BEARER_TOKEN_BEDROCK=your-token
# Run the four phases
uv run app.py init --source-dir . "Migrate to Ansible"
uv run app.py analyze --source-dir . "Analyze nginx-multisite cookbook"
uv run app.py migrate \
--source-dir . \
--source-technology Chef \
--high-level-migration-plan migration-plan.md \
--module-migration-plan migration-plan-nginx-multisite.md \
"Convert nginx-multisite"
uv run app.py publish-project my-project nginx_multisite
Documentation
- CLI Reference: Complete command documentation
- Configuration: Environment variables and LLM provider setup
- Usage Examples: Detailed CLI and Docker usage examples
Source Technologies
- Chef: Cookbook analysis and migration
- PowerShell: Script and DSC configuration migration
- Ansible: Legacy role modernization
- Puppet: Manifest analysis and migration