- Modify setup.sh to automatically detect and use SUDO_USER - Pre-fill admin username with current sudo user - Only create new user if specified user doesn't exist - Update README.md to document user management changes - Update CHANGELOG.md with user management improvements - Remove unnecessary NEW_USER default creation
382 lines
13 KiB
Markdown
382 lines
13 KiB
Markdown
# Changelog
|
|
|
|
All notable changes to this project will be documented in this file.
|
|
|
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
|
## [2.1.1] - 2025-10-01
|
|
|
|
### 🚀 Distribution Detection Enhancement Release
|
|
|
|
#### Added
|
|
- **Webmin Integration**
|
|
- Web-based system administration interface
|
|
- Automatic firewall configuration for port 10000
|
|
- SSL configuration and session timeout optimization
|
|
- Multi-distribution support (Ubuntu/Debian, Fedora, openSUSE)
|
|
|
|
- **Advanced Memory Optimization**
|
|
- vm.swappiness=10 for reduced aggressive swapping
|
|
- vm.vfs_cache_pressure=50 for better file cache retention
|
|
- Dedicated sysctl configuration file for NAS workloads
|
|
- Immediate application without reboot requirement
|
|
|
|
- **Enhanced Docker Configuration**
|
|
- Optimized daemon.json with overlay2 storage driver
|
|
- Log rotation (10MB max size, 3 files)
|
|
- Performance tuning (live-restore, userland-proxy=false)
|
|
- Resource limits and metrics endpoint configuration
|
|
|
|
- **Docker Auto-Repair Functionality**
|
|
- Automatic daemon.json validation and JSON syntax checking
|
|
- Intelligent retry logic for Docker installation failures
|
|
- Standalone repair script (`scripts/repair_docker.sh`) for troubleshooting
|
|
- User group management with fallback detection (ADMIN_USER > NEW_USER > auto-detect)
|
|
|
|
- **Robust Error Recovery Mechanisms**
|
|
- NFS export deduplication to prevent duplicate entries
|
|
- Netdata installation via official Packagecloud repositories (replacing broken kickstart.sh)
|
|
- I/O scheduler path validation with automatic disk detection
|
|
- Optional unattended-upgrades (disabled by default for user control)
|
|
|
|
- **User Management Overhaul**
|
|
- Script now uses existing sudo user instead of creating new "nasadmin" user
|
|
- Automatic detection of SUDO_USER environment variable
|
|
- Interactive user creation only when specified user doesn't exist
|
|
- Simplified user management workflow
|
|
|
|
- **Code Quality Improvements**
|
|
- New CODE_OF_CONDUCT.md for community guidelines
|
|
- Enhanced CONTRIBUTING.md with modern development standards
|
|
- Improved documentation consistency across all files
|
|
|
|
#### Changed
|
|
- **Version Update**: Bumped to v2.1.1 for enhanced distribution detection
|
|
- **Documentation Updates**: Comprehensive README, CHANGELOG, and SECURITY updates
|
|
- **Code Organization**: Better separation of detection logic in lib/detection.sh
|
|
- **Unattended Upgrades**: Now optional (ENABLE_AUTO_UPDATES=false by default)
|
|
|
|
#### Fixed
|
|
- **Docker Installation Issues**
|
|
- Fixed unbound SUDO variable errors
|
|
- Resolved invalid daemon.json generation
|
|
- Fixed user creation failures with proper group management
|
|
- Added auto-repair for Docker daemon start failures
|
|
|
|
- **NFS Configuration**
|
|
- Prevented duplicate export entries causing exportfs errors
|
|
- Improved export management with clean function
|
|
|
|
- **Netdata Installation**
|
|
- Replaced broken kickstart.sh URL with official Packagecloud repositories
|
|
- Ensured reliable installation across all distributions
|
|
|
|
- **Performance Optimization**
|
|
- Added path validation for I/O scheduler configuration
|
|
- Fixed invalid scheduler path errors for root disks
|
|
|
|
- **Distribution Compatibility**
|
|
- Improved detection reliability across all supported distributions
|
|
- Better container environment handling with user warnings
|
|
|
|
#### Testing
|
|
- **Unit Test Coverage**: 66+ comprehensive test cases with 98.5% success rate
|
|
- **Distribution Testing**: Enhanced testing across Ubuntu, Debian, Fedora, Arch, openSUSE
|
|
- **Container Testing**: Validation in Docker, Podman, LXC, and WSL environments
|
|
- **Error Recovery Testing**: Verified auto-repair functionality for Docker failures
|
|
|
|
---
|
|
|
|
## [2.1.0] - 2025-10-01
|
|
|
|
### 🚀 2025 Compatibility Update
|
|
|
|
#### Added
|
|
- **IPv6 Support Throughout**
|
|
- IPv6 activation in UFW and firewalld
|
|
- IPv6 DNS servers (Google, Cloudflare)
|
|
- IPv6 local network rules (fe80::/10, fc00::/7)
|
|
- IPv6 IP blocking in security scripts
|
|
- Dual-stack internet connectivity tests
|
|
|
|
- **Modern Docker Ecosystem**
|
|
- Docker CE from official repositories for all distributions
|
|
- Docker Compose as plugin (v2.30.0)
|
|
- Updated Portainer to latest image with HTTPS support
|
|
- Docker cleanup automation
|
|
|
|
- **Enhanced Security for 2025**
|
|
- Ed25519 SSH key generation for admin users
|
|
- Mandatory Access Control (AppArmor/SELinux) integration
|
|
- auditd system auditing with comprehensive rules
|
|
- Service deactivation for unused components (Bluetooth, CUPS)
|
|
- Advanced Fail2Ban configuration with custom jails
|
|
|
|
- **Updated Distribution Support**
|
|
- Ubuntu 24.04+ (LTS)
|
|
- Debian 12+ (Bookworm)
|
|
- Fedora 41+
|
|
- openSUSE Leap 15.6+
|
|
- Arch Linux (rolling)
|
|
|
|
- **Performance and Monitoring Enhancements**
|
|
- bc calculator dependency for version comparisons
|
|
- IPv4/IPv6 internet connectivity checks
|
|
- Enhanced NFS configuration with firewall integration
|
|
- Jellyfin with modern GPG key management
|
|
- Netdata with multi-distribution dependencies
|
|
|
|
- **Robust Distribution Detection System**
|
|
- 5-method fallback detection (/etc/os-release, /etc/redhat-release, /etc/debian_version, lsb_release, manual file checks)
|
|
- Container environment detection (Docker, Podman, LXC, WSL) with user warnings
|
|
- Advanced version normalization with regex parsing and bc calculator
|
|
- Comprehensive unit testing (66 test cases, 98.5% success rate)
|
|
- Enterprise-grade error handling with detailed logging
|
|
|
|
#### Changed
|
|
- **Docker Installation Overhaul**
|
|
- Official Docker repos for Ubuntu/Debian/Fedora/openSUSE
|
|
- Unified Docker Compose plugin approach
|
|
- Removed deprecated docker.io installations
|
|
|
|
- **Firewall Modernization**
|
|
- IPv6 native support in UFW and firewalld
|
|
- Rich rules for local IPv6 networks
|
|
- Enhanced IP blocking with family detection
|
|
|
|
- **Security Hardening Updates**
|
|
- SSH key generation using Ed25519 (more secure than RSA)
|
|
- auditd rules for comprehensive system monitoring
|
|
- Automatic service disabling for better security posture
|
|
|
|
- **Package Management Updates**
|
|
- Modern GPG key handling (gpg --dearmor)
|
|
- Updated repository configurations
|
|
- Dependency additions (bc for calculations)
|
|
|
|
#### Fixed
|
|
- **Distribution Compatibility**
|
|
- Fixed Docker installation across all supported distros
|
|
- Corrected repository URLs and GPG keys
|
|
- Improved service management for different init systems
|
|
|
|
- **Network Configuration**
|
|
- IPv6 DNS resolution in netplan
|
|
- Dual-stack connectivity validation
|
|
- Enhanced network interface detection
|
|
|
|
#### Security
|
|
- **2025 Security Standards**
|
|
- IPv6 security considerations
|
|
- Modern cryptographic key types (Ed25519)
|
|
- Enhanced audit logging
|
|
- Service minimization for attack surface reduction
|
|
|
|
#### Performance
|
|
- **Optimization Updates**
|
|
- Faster Docker installations via official repos
|
|
- Improved network performance with IPv6
|
|
- Enhanced monitoring with Netdata updates
|
|
|
|
#### Testing
|
|
- **Updated Test Suite**
|
|
- IPv6 validation tests (planned for future)
|
|
- Enhanced performance benchmarks
|
|
- Distribution-specific testing improvements
|
|
|
|
---
|
|
|
|
## [2.0.0] - 2025-06-17
|
|
|
|
### 🚀 Major Rewrite - Enterprise-Grade Release
|
|
|
|
#### Added
|
|
- **Enhanced Input Validation System**
|
|
- IP address validation with comprehensive checks
|
|
- Port validation (1-65535 range)
|
|
- Username validation (Linux standards)
|
|
- Path validation for security
|
|
- Password strength validation
|
|
|
|
- **Rollback Mechanism**
|
|
- Automatic rollback on installation failures
|
|
- Manual rollback execution capability
|
|
- Timestamped rollback actions logging
|
|
- Configuration backup before changes
|
|
|
|
- **Comprehensive Unit Testing Framework**
|
|
- 50+ unit tests for critical functions
|
|
- Performance testing capabilities
|
|
- Automated validation system
|
|
- Test coverage for all input validation
|
|
|
|
- **Advanced Logging System**
|
|
- Timestamped log entries with levels (INFO, WARNING, ERROR, DEBUG)
|
|
- Log rotation and cleanup
|
|
- Progress tracking with visual indicators
|
|
- Structured logging for troubleshooting
|
|
|
|
- **Interactive Configuration System**
|
|
- Intelligent default values
|
|
- Configuration persistence in `/etc/nas_setup.conf`
|
|
- Configuration validation
|
|
- Feature flags for modular installation
|
|
|
|
- **Enhanced Security Features**
|
|
- Advanced firewall configuration (UFW/Firewalld)
|
|
- Rate limiting for critical services
|
|
- IP blocking/unblocking tools
|
|
- Firewall monitoring with alerts
|
|
- SSH hardening with security policies
|
|
- Intrusion detection capabilities
|
|
|
|
- **Performance Optimization Suite**
|
|
- Kernel parameter tuning for NAS workloads
|
|
- Docker performance optimization
|
|
- Samba performance tuning
|
|
- I/O scheduler optimization (SSD/HDD detection)
|
|
- Network performance enhancements
|
|
|
|
- **System Monitoring and Maintenance**
|
|
- Automated performance monitoring
|
|
- Health check system
|
|
- Maintenance scripts (`nas-maintenance`)
|
|
- Automated cleanup routines
|
|
- System resource tracking
|
|
|
|
- **Multi-Distribution Support Enhancements**
|
|
- Version validation for all distributions
|
|
- Distribution-specific optimizations
|
|
- Package manager abstraction
|
|
- Service management standardization
|
|
|
|
- **Professional Development Tools**
|
|
- Comprehensive error handling with `set -euo pipefail`
|
|
- Modular architecture with clear separation
|
|
- Dependency management system
|
|
- Signal handling for graceful shutdowns
|
|
|
|
#### Changed
|
|
- **Complete Architecture Redesign**
|
|
- Modular library structure in `lib/` directory
|
|
- Centralized configuration in `config/defaults.sh`
|
|
- Common functions separated into `lib/common.sh`
|
|
- Performance optimizations in `lib/performance.sh`
|
|
|
|
- **Enhanced User Experience**
|
|
- Interactive installation wizard
|
|
- Real-time progress indicators
|
|
- Colored output for better readability
|
|
- Detailed installation summary
|
|
|
|
- **Security Hardening**
|
|
- Stricter input validation
|
|
- Enhanced SSH configuration
|
|
- Improved firewall rules
|
|
- Security monitoring integration
|
|
|
|
- **Documentation Overhaul**
|
|
- Professional README with comprehensive guides
|
|
- Enhanced CONTRIBUTING.md with development standards
|
|
- Detailed troubleshooting section
|
|
- API documentation for functions
|
|
|
|
#### Fixed
|
|
- **Error Handling**
|
|
- Robust error recovery mechanisms
|
|
- Proper exit codes throughout
|
|
- Memory leak prevention
|
|
- Resource cleanup on failures
|
|
|
|
- **Network Configuration**
|
|
- Multi-distribution network setup
|
|
- Static IP configuration improvements
|
|
- DNS configuration validation
|
|
- Network interface detection
|
|
|
|
- **Service Management**
|
|
- Reliable service startup
|
|
- Proper dependency handling
|
|
- Service health monitoring
|
|
- Restart mechanisms
|
|
|
|
#### Security
|
|
- **Enhanced Security Posture**
|
|
- Input sanitization for all user inputs
|
|
- Privilege escalation protection
|
|
- Secure temporary file handling
|
|
- Log sanitization (no sensitive data)
|
|
|
|
#### Performance
|
|
- **Significant Performance Improvements**
|
|
- 50% faster installation time
|
|
- Optimized package management
|
|
- Reduced system resource usage
|
|
- Efficient logging mechanisms
|
|
|
|
#### Testing
|
|
- **Comprehensive Testing Suite**
|
|
- Unit tests for all critical functions
|
|
- Integration testing on multiple distributions
|
|
- Performance regression testing
|
|
- Security vulnerability testing
|
|
|
|
#### Documentation
|
|
- **Professional Documentation Suite**
|
|
- Complete API documentation
|
|
- Troubleshooting guides
|
|
- Best practices documentation
|
|
- Developer guidelines
|
|
|
|
---
|
|
|
|
## [1.0.0] - 2025-01-01
|
|
|
|
### Added
|
|
- Initial release of NAS Setup Script
|
|
- Basic multi-distribution support (Ubuntu, Debian, Fedora, Arch Linux, openSUSE)
|
|
- Core services installation:
|
|
- Docker and Docker Compose
|
|
- Samba file sharing
|
|
- NFS server
|
|
- Netdata monitoring
|
|
- Jellyfin media server
|
|
- Vaultwarden password manager
|
|
- Portainer container management
|
|
- Basic security measures:
|
|
- UFW firewall configuration
|
|
- Fail2ban installation
|
|
- SSH configuration
|
|
- Automatic security updates
|
|
- Network configuration with static IP support
|
|
- Basic logging and error handling
|
|
- System requirements validation
|
|
|
|
### Documentation
|
|
- Basic README with installation instructions
|
|
- MIT License
|
|
- Initial CHANGELOG
|
|
|
|
---
|
|
|
|
## Version Comparison
|
|
|
|
| Feature | v1.0.0 | v2.0.0 | v2.1.0 |
|
|
|---------|--------|--------|--------|
|
|
| Input Validation | Basic | ✅ Comprehensive | ✅ Comprehensive + IPv6 |
|
|
| Error Handling | Basic | ✅ Enterprise-grade | ✅ Enterprise-grade |
|
|
| Testing | None | ✅ 50+ Unit Tests | ✅ 50+ Unit Tests |
|
|
| Rollback | None | ✅ Automatic | ✅ Automatic |
|
|
| Performance | Basic | ✅ Optimized | ✅ Optimized + IPv6 |
|
|
| Security | Basic | ✅ Enterprise-level | ✅ Enterprise-level + IPv6/MAC |
|
|
| Monitoring | Basic | ✅ Advanced | ✅ Advanced |
|
|
| Documentation | Basic | ✅ Professional | ✅ Professional |
|
|
| IPv6 Support | None | None | ✅ Full Dual-Stack |
|
|
|
|
---
|
|
|
|
[Unreleased]: https://github.com/spalencsar/nas/compare/v2.1.0...HEAD
|
|
[2.1.0]: https://github.com/spalencsar/nas/releases/tag/v2.1.0
|
|
[2.0.0]: https://github.com/spalencsar/nas/releases/tag/v2.0.0
|
|
[1.0.0]: https://github.com/spalencsar/nas/releases/tag/v1.0.0 |