This package contains a collection of automation scripts designed to enhance the development, testing, deployment, and monitoring workflows for the ChainFinity project.
These scripts address various automation opportunities identified in the ChainFinity repository, focusing on:
- CI/CD Pipeline Enhancement
- Environment Setup Automation
- Testing Automation
- Monitoring and Alerting
- Deployment Orchestration
A comprehensive GitHub Actions workflow that implements continuous integration and deployment for all components of the ChainFinity platform.
Features:
- Automated linting, testing, and security scanning
- Multi-component build process
- Environment-specific deployments
- Slack notifications
Usage:
- Place this file in the
.github/workflows/directory of your repository - Configure necessary secrets in your GitHub repository settings
- Push changes to trigger the workflow
An improved setup script that automates the environment configuration process for ChainFinity development.
Features:
- Automated dependency installation
- Environment-specific configuration
- Database setup
- Error handling and logging
Usage:
./env_setup.sh [options]
Options:
--project-dir DIR Set project directory (default: current directory)
--node-version VERSION Set Node.js version (default: 18)
--python-version VERSION Set Python version (default: 3.11)
--skip-docker Skip Docker installation
--skip-databases Skip database setup
--environment ENV Set environment (development, staging, production)
--help Show help messageA comprehensive monitoring solution for the ChainFinity platform that tracks system health, services, and blockchain components.
Features:
- System resource monitoring
- Docker container health checks
- Database monitoring
- API endpoint validation
- Blockchain node status checks
- Automated reporting and alerting
Usage:
./monitor_chainfinity.sh [options]
Options:
--config FILE Configuration file path (default: monitor_config.json)
--log-dir DIR Log directory (default: ./logs)
--alert-threshold NUM Alert threshold percentage (default: 80)
--check-interval SEC Check interval in seconds (default: 300)
--report-interval SEC Report interval in seconds (default: 86400)
--slack-webhook URL Slack webhook URL for notifications
--email ADDRESS Email address for notifications
--help Show help messageA script that automates the testing process for all components of the ChainFinity platform.
Features:
- Component-specific testing
- Coverage reporting
- Parallel test execution
- HTML report generation
Usage:
./test_chainfinity.sh [options]
Options:
--project-dir DIR Set project directory (default: current directory)
--log-dir DIR Log directory (default: ./logs)
--report-dir DIR Test report directory (default: ./test-reports)
--timeout SEC Test timeout in seconds (default: 300)
--no-parallel Disable parallel testing
--coverage-threshold NUM Minimum code coverage percentage (default: 80)
--component NAME Test only specific component (blockchain, backend, frontend, all)
--help Show help messageA script that automates the deployment process for all components of the ChainFinity platform.
Features:
- Environment-specific deployments
- Component backups before deployment
- Infrastructure provisioning
- Deployment reporting
Usage:
./deploy_chainfinity.sh [options]
Options:
--project-dir DIR Set project directory (default: current directory)
--log-dir DIR Log directory (default: ./logs)
--env-file FILE Environment file (default: .env)
--environment ENV Deployment environment (development, staging, production)
--backup-dir DIR Backup directory (default: ./backups/YYYYMMDD_HHMMSS)
--dry-run Perform a dry run without making changes
--component NAME Deploy only specific component (blockchain, backend, frontend, all)
--help Show help message- Extract the zip file to a directory of your choice
- Make the scripts executable:
chmod +x *.sh - Copy the CI/CD workflow file to your repository:
mkdir -p .github/workflows/ cp ci-cd.yml .github/workflows/
- Bash shell environment
- Git
- Node.js and npm
- Python 3.x
- Docker and Docker Compose (for certain features)
- AWS CLI (for deployment features)
- Always review scripts before running them in your environment
- Test in development before using in production
- Backup your data before running deployment scripts
- Customize configuration files to match your specific needs
- Monitor logs for any errors or warnings