Commit 0f7b1be7 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add CLAUDE.md for Claude Code guidance

🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: 's avatarClaude Opus 4.5 <noreply@anthropic.com>
parent 287c4945
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Overview
etersoft-admin-essential is a collection of 340+ system administration scripts for Etersoft's ALT Linux infrastructure. It covers server provisioning, hosting platform operations (Azbyka project), storage management, and monitoring automation.
## Repository Structure
**Core Domains:**
- `vz/` - OpenVZ container management (cloning, migration, task-based creation)
- `vz/azbyka/` - Azbyka hosting automation (50+ scripts for nginx, migrations, task-based VM creation)
- `web/` - Site management, user/FTP management, nginx statistics
- `gluster/` - GlusterFS repair and recovery tools
- `hdd/` - RAID, SSD failure handling, LVM caching, disk diagnostics
- `mail/` - Mail queue management, account archival, spam handling
- `router/` - Network failover, traffic monitoring
- `dns/` - Domain management via NetBreeze/NIC
**System Management:**
- `ansible/playbooks/` - Ansible playbooks for desktop upgrades, system setup, package management
- `etersoft/` - System/user configuration (`tune_new_system.sh`, `tune_new_user.sh`)
- `etersoft-cron/` - Scheduled tasks (updates, rsync, log rotation)
- `fail2ban/` - Custom filters and rule checking
- `backup/` - Database backup, archive management
**Other:**
- `users/` - User management scripts
- `ddos/` - DDoS mitigation
- `dc/`, `dc-client/` - Domain controller scripts
- `nginx/` - URL statistics and error analysis (Python + Shell)
## Technology Stack
- **Shell/Bash** - Primary scripting language
- **Python** - Data processing and statistics
- **Ansible** - System automation playbooks
- **OpenVZ** - Virtualization (legacy containers)
- **GlusterFS** - Distributed storage
- **Nginx/Apache** - Web serving
## Common Patterns
- Modular functions in `common/`, `vz/azbyka/functions`, `web/functions`
- Task-based configs (`.task` files) for automation
- Error handling via `fatal()`, `assure()` functions
- SSH automation for remote execution across hosts
- girar integration for ALT Linux task tracking
## Ansible
Playbooks are in `ansible/playbooks/`. Inventory is typically linked from `/root/.ansible/`.
```bash
ansible-playbook -i /root/.ansible/hosts ansible/playbooks/NAME.yml
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment