Anya Core Upgrade Guide¶
Table of Contents¶
[AIR-3][AIS-3][BPC-3][RES-3]
Overview¶
This document provides guidelines for upgrading Anya Core between versions. Always review this guide before performing an upgrade to ensure a smooth transition.
Version Compatibility¶
| From Version | To Version | Upgrade Path | Notes |
|---|---|---|---|
| ≤ 0.2.0 | 0.3.0 | Full reinstall required | Major architectural changes |
| 0.3.0 | ≥ 0.3.1 | In-place upgrade | Follow these instructions |
Pre-Upgrade Checklist¶
- Backup Important Data
# Create backup directory
mkdir -p ~/anya_backup_$(date +%Y%m%d)
# Backup configuration
cp -r /etc/anya ~/anya_backup_$(date +%Y%m%d)/config
# Backup wallet and chain data (if applicable)
cp -r ~/.anya/{wallets,chaindata} ~/anya_backup_$(date +%Y%m%d)/
- Check System Requirements
- Verify disk space:
df -h /(minimum 20GB free) - Check memory:
free -h(minimum 4GB RAM) - Verify Docker:
docker --version(≥ 20.10) -
Verify Docker Compose:
docker-compose --version(≥ 2.0) -
Review Release Notes Always check the CHANGELOG.md for breaking changes and new requirements.
Upgrade Procedure¶
Standard Upgrade (v0.3.0+)¶
- Stop Running Services
# Stop Anya Core service
sudo systemctl stop anya-core
# Stop monitoring stack (if running)
cd monitoring
docker-compose down
cd ..
- Update Repository
# Fetch latest changes
git fetch origin
# Checkout the target version
git checkout v0.3.0 # Replace with target version
# Pull latest changes
git pull
- Run Database Migrations (if any)
- Update Configuration
# Backup current config
cp config/config.toml config/config.toml.bak
# Update configuration (preserve your settings)
./scripts/update-config.sh
- Restart Services
# Start Anya Core
sudo systemctl start anya-core
# Start monitoring (if enabled)
cd monitoring
./start-monitoring.sh
cd ..
Monitoring Stack Upgrade¶
If upgrading the monitoring stack separately:
cd monitoring
# Pull latest container images
docker-compose pull
# Recreate containers with new images
docker-compose up -d --force-recreate
# Verify all services are running
docker-compose ps
Post-Upgrade Verification¶
- Check Service Status
# Check Anya Core
systemctl status anya-core
# Check monitoring stack
docker-compose -f monitoring/docker-compose.yml ps
- Verify Data Integrity
- Check logs for errors:
journalctl -u anya-core -n 50 - Verify metrics are being collected in Grafana
-
Test alert notifications
-
Update Documentation
- Review and update any local documentation
- Note any configuration changes in your runbook
Rollback Procedure¶
If you encounter issues after upgrade:
- Stop Services
- Restore Backup
# Restore configuration
cp -r ~/anya_backup_$(date +%Y%m%d)/config /etc/anya/
# Restore data (if needed)
cp -r ~/anya_backup_$(date +%Y%m%d)/* ~/.anya/
- Revert Code
- Restart Services
Troubleshooting¶
Common Issues¶
- Version Mismatch
- Symptom: Services fail to start after upgrade
-
Solution: Ensure all components are at compatible versions
-
Database Migration Failures
- Symptom: Errors during migration
-
Solution: Restore from backup and check migration scripts
-
Permission Issues
- Symptom: Permission denied errors
- Solution:
sudo chown -R anya:anya /var/lib/anya
Getting Help¶
If you encounter issues:
- Check logs:
journalctl -u anya-core -n 100 - Review Troubleshooting Guide
- Open an issue on GitHub
- Email support: botshelomokoka@gmail.com
Security Considerations¶
- Always verify checksums of downloaded packages
- Use secure channels for all file transfers
- Rotate credentials after upgrade
- Review and update firewall rules if needed
AI Labeling¶
- [AIR-3] - Automated upgrade process with validation
- [AIS-3] - Secure upgrade procedures with rollback
- [BPC-3] - Follows Bitcoin node upgrade best practices
- [RES-3] - Resilient upgrade process with verification