mirror of
https://git.photon.obnh.io/AXSY/whois.git
synced 2025-12-11 04:39:15 +00:00
Migrate infrastructure from as60284.net to photon.obnh.io
Infrastructure migration and session documentation for project transition. Detailed changes: - Reconfigured git remotes to new infrastructure - Primary: git.photon.obnh.io (AXSY/whois) - Mirror: git.proton.obr.sh (axsy/whois, automatic DR sync) - Removed: git.as60284.net (infrastructure deleted) - Added comprehensive environment documentation (ENVIRONMENT.md) - Python 3.12.10 runtime details - Project structure and dependencies - Server configuration (mwhoisd) - Development workflow instructions - Continuation guide for user olaf - Added migration documentation (MIGRATION.md) - Infrastructure comparison (old vs new) - Remote reconfiguration steps - Disaster recovery procedures - Verification checklist - Added Gitea configuration (.gitea-config.md) - Primary, backup, and mirror instance details - API keys and access credentials - Repository organization structure - Updated server logs (mwhois.log) - Latest query activity through 2025-07-31 Project state preserved for seamless continuation on new host. All work can be resumed by cloning from git.photon.obnh.io.
This commit is contained in:
36
.gitea-config.md
Normal file
36
.gitea-config.md
Normal file
@@ -0,0 +1,36 @@
|
||||
## Git Configuration
|
||||
|
||||
### Primary Gitea Instance: photon.obnh.io
|
||||
- URL: https://photon.obnh.io
|
||||
- Username: olaf
|
||||
- API-KEY: 7ca0e04e56df443163657e5e83c5b2ef2794e0cf
|
||||
- Status: PRIMARY (Production)
|
||||
- Repositories: 24 repos (AXSY, OBNH-mirror, olaf)
|
||||
|
||||
### Backup Gitea Instance: elektron.obnh.io
|
||||
- URL: https://elektron.obnh.io
|
||||
- Username: olaf
|
||||
- API-KEY: 7d73260d408f40b8b6ab23ea6ff6941a58079244
|
||||
- Status: BACKUP (Legacy)
|
||||
|
||||
### Disaster Recovery Mirror: proton.obr.sh
|
||||
- URL: https://git.proton.obr.sh (Traefik configured, DNS pending)
|
||||
- Internal URL: http://localhost:3000 (from proton.obr.sh)
|
||||
- Username: olaf
|
||||
- API-KEY: 151b26b25ffa4100ea776b09e2ed72a2dcb0787e
|
||||
- Status: MIRROR (Disaster Recovery)
|
||||
- Repositories: 24 repos (ALL from photon.obnh.io)
|
||||
- Server IPv6: 2a02:4780:41:5469::1
|
||||
- Mirroring: ACTIVE (automatic sync from photon.obnh.io)
|
||||
- Organizations: AXSY, OBNH-mirror, olaf
|
||||
- Setup Date: 2025-11-08
|
||||
|
||||
### SCION-OPS-GUIDE Remotes
|
||||
- Primary: https://photon.obnh.io/AXSY/SCION-OPS-GUIDE.git
|
||||
- Backup: https://elektron.obnh.io/AXSY/SCION-OPS-GUIDE.git
|
||||
- Mirror: https://git.proton.obr.sh/axsy/scion-ops-guide.git
|
||||
|
||||
### DNS Configuration Required
|
||||
- DNS record needed: git.proton.obr.sh AAAA 2a02:4780:41:5469::1
|
||||
- Currently accessible via IP workaround: curl -sk --resolve git.proton.obr.sh:443:2a02:4780:41:5469::1
|
||||
- Action required: Create DNS record using exo CLI or web interface
|
||||
226
ENVIRONMENT.md
Normal file
226
ENVIRONMENT.md
Normal file
@@ -0,0 +1,226 @@
|
||||
# WHOIS Project Environment Documentation
|
||||
|
||||
## Project Overview
|
||||
**Project Name:** mwhois - RFC 3912 compliant WHOIS server
|
||||
**Working Directory:** /root/whois
|
||||
**Git Branch:** master
|
||||
**Last Updated:** 2025-11-12
|
||||
|
||||
## Infrastructure Migration Notice
|
||||
**CRITICAL:** The original infrastructure at as60284.net has been DELETED and is NO LONGER AVAILABLE.
|
||||
|
||||
### Previous Configuration (DEPRECATED)
|
||||
- Previous remote: https://git.as60284.net/AXSY/whois.git
|
||||
- Status: INFRASTRUCTURE DELETED - DO NOT USE
|
||||
|
||||
### Current Configuration (ACTIVE)
|
||||
- **Primary Remote:** git.photon.obnh.io (Production)
|
||||
- **Mirror Remote:** git.proton.obr.sh (Disaster Recovery - automatic sync)
|
||||
- **User:** olaf
|
||||
- **Organization:** AXSY
|
||||
|
||||
## Python Environment
|
||||
|
||||
### Python Version
|
||||
- **Version:** Python 3.12.10
|
||||
- **Location:** /root/venv/bin/python3
|
||||
- **Note:** System Python in global venv, no project-local venv
|
||||
|
||||
### Dependencies
|
||||
The project uses an embedded Python library:
|
||||
- **netaddr** (included in /root/whois/netaddr/)
|
||||
- Purpose: IP address and network manipulation
|
||||
- License: Separate license included in netaddr folder
|
||||
- Status: Embedded for compatibility, updated when necessary
|
||||
|
||||
### No Additional Dependencies
|
||||
- No requirements.txt
|
||||
- No pyproject.toml
|
||||
- No Pipfile
|
||||
- All dependencies are embedded or system-provided
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
/root/whois/
|
||||
├── mwhoisd # Main WHOIS server (Python 3 script)
|
||||
├── db/ # Database directory
|
||||
│ ├── ipv4/ # IPv4 address records
|
||||
│ ├── domains/ # Domain name records
|
||||
│ ├── as/ # AS number records
|
||||
│ └── isd/ # ISD records
|
||||
├── netaddr/ # Embedded netaddr library
|
||||
├── add-as # Script to add AS records
|
||||
├── add-as-batch # Batch AS addition script
|
||||
├── add-ip # Script to add IP ranges
|
||||
├── add-ip-auto # IP block wizard
|
||||
├── add-ip-wind # IP block wizard (ID instead of AS)
|
||||
├── add-domain # Domain addition script
|
||||
├── add-isd # ISD addition script
|
||||
├── remove-as # AS removal utility
|
||||
├── check-axpo-as # Axpo AS validation script
|
||||
├── hwhois # Bash wrapper for custom whois queries
|
||||
├── mwhois.log # Server log file
|
||||
├── README.txt # Project documentation
|
||||
├── LICENSE # MIT License
|
||||
├── NOTICE # Legal notices
|
||||
└── .gitea-config.md # Gitea instance configuration
|
||||
```
|
||||
|
||||
## Server Configuration
|
||||
|
||||
### mwhoisd Configuration Variables (lines 8-11)
|
||||
- **LISTEN_ADDRESS:** "::" (all IPv6 addresses, includes IPv4-mapped)
|
||||
- **LISTEN_PORT:** 43 (standard WHOIS port)
|
||||
- **MAX_QUERY_SIZE:** 128 bytes
|
||||
- **LOGFILE:** /root/whois/mwhois.log
|
||||
|
||||
### Runtime Requirements
|
||||
- Must run as root to bind to port 43
|
||||
- Requires write access to LOGFILE location
|
||||
- Auto-creates db subdirectories on startup
|
||||
|
||||
## Database Structure
|
||||
|
||||
### Storage Format
|
||||
- Filesystem-based storage (no external database)
|
||||
- IPv4 records: db/ipv4/[IP]-[CIDR] (e.g., 10.0.0.0-8)
|
||||
- Domain records: db/domains/[domain-name]
|
||||
- AS records: db/as/[as-number]
|
||||
- ISD records: db/isd/[isd-number]
|
||||
- All records use CRLF line endings (RFC 3912 compliance)
|
||||
|
||||
## Development Workflow
|
||||
|
||||
### Running the Server
|
||||
```bash
|
||||
cd /root/whois
|
||||
sudo ./mwhoisd # Must run as root for port 43
|
||||
```
|
||||
|
||||
### Testing Queries
|
||||
```bash
|
||||
whois -h 127.0.0.1 10.0.0.1
|
||||
whois -h 127.0.0.1 example.com
|
||||
./hwhois [query] # Uses local server
|
||||
```
|
||||
|
||||
### Adding Records
|
||||
```bash
|
||||
./add-ip # Add IPv4 ranges
|
||||
./add-ip-auto # Interactive IP block wizard
|
||||
./add-domain # Add domain records
|
||||
./add-as # Add AS records
|
||||
./add-as-batch # Batch add AS records
|
||||
./add-isd # Add ISD records
|
||||
./remove-as # Remove AS records
|
||||
```
|
||||
|
||||
## Git Configuration
|
||||
|
||||
### Remote Repositories
|
||||
See `.gitea-config.md` for complete configuration details.
|
||||
|
||||
**Primary (Production):**
|
||||
- URL: https://git.photon.obnh.io/AXSY/whois.git
|
||||
- SSH: git@git.photon.obnh.io:AXSY/whois.git
|
||||
- User: olaf
|
||||
- Status: ACTIVE
|
||||
|
||||
**Mirror (Disaster Recovery):**
|
||||
- URL: https://git.proton.obr.sh/axsy/whois.git
|
||||
- SSH: git@git.proton.obr.sh:axsy/whois.git
|
||||
- User: olaf
|
||||
- Status: ACTIVE (automatic sync from primary)
|
||||
- Note: Read-only mirror, all pushes go to primary
|
||||
|
||||
### Git User Configuration
|
||||
```bash
|
||||
git config user.name "Olaf"
|
||||
git config user.email "admin@obr.sh"
|
||||
```
|
||||
|
||||
## Project History
|
||||
|
||||
### Recent Changes (from git log)
|
||||
- 2025-11-12: Migration to new git infrastructure (photon.obnh.io)
|
||||
- 2025-07-31: Last mwhois.log update
|
||||
- 2025-06-27: Added remove-as utility
|
||||
- 2025-06-10: Added AS 60284 removal
|
||||
- 2025-06-03: SCION SSUN ISD76 allocations (Semax AG, Litecom AG)
|
||||
- 2025-05-13: Initial migration from external repository
|
||||
|
||||
### Key Features
|
||||
- RFC 3912 compliant WHOIS server
|
||||
- IPv4 address lookups
|
||||
- Domain name lookups
|
||||
- AS (Autonomous System) number lookups
|
||||
- ISD (SCION Isolation Domain) lookups
|
||||
- Filesystem-based storage
|
||||
- Python 3 compatible (migrated from Python 2.7)
|
||||
|
||||
## Continuation Instructions for User "olaf"
|
||||
|
||||
### Environment Recreation
|
||||
1. Clone repository:
|
||||
```bash
|
||||
git clone git@git.photon.obnh.io:AXSY/whois.git
|
||||
cd whois
|
||||
```
|
||||
|
||||
2. Verify Python version:
|
||||
```bash
|
||||
python3 --version # Should be 3.12+ or compatible
|
||||
```
|
||||
|
||||
3. Set git configuration:
|
||||
```bash
|
||||
git config user.name "Olaf"
|
||||
git config user.email "admin@obr.sh"
|
||||
```
|
||||
|
||||
4. Verify remotes:
|
||||
```bash
|
||||
git remote -v
|
||||
# Should show:
|
||||
# origin git@git.photon.obnh.io:AXSY/whois.git (fetch)
|
||||
# origin git@git.photon.obnh.io:AXSY/whois.git (push)
|
||||
# mirror git@git.proton.obr.sh:axsy/whois.git (fetch)
|
||||
# mirror git@git.proton.obr.sh:axsy/whois.git (push)
|
||||
```
|
||||
|
||||
5. Test server:
|
||||
```bash
|
||||
sudo ./mwhoisd # Run as root
|
||||
# In another terminal:
|
||||
whois -h 127.0.0.1 10.0.0.1
|
||||
```
|
||||
|
||||
### Important Notes
|
||||
- No virtual environment setup needed (uses system Python 3.12+)
|
||||
- All dependencies are embedded (netaddr/)
|
||||
- Server must run as root to bind port 43
|
||||
- Database is filesystem-based in db/ directory
|
||||
- All git operations should use primary remote (photon.obnh.io)
|
||||
- Mirror (proton.obr.sh) syncs automatically, push only to primary
|
||||
|
||||
## Maintenance
|
||||
|
||||
### Backup Strategy
|
||||
- Git repository: Automatically mirrored to git.proton.obr.sh
|
||||
- Database: Located in db/ directory (committed to git)
|
||||
- Logs: mwhois.log (committed selectively)
|
||||
|
||||
### Monitoring
|
||||
- Check mwhois.log for query logs and errors
|
||||
- Monitor mwhoisd.out for server output
|
||||
- Review mwhoisd.err for error messages
|
||||
|
||||
## Contact & Support
|
||||
- Primary Administrator: olaf (admin@obr.sh)
|
||||
- Organization: AXSY
|
||||
- Git Infrastructure: git.photon.obnh.io (primary)
|
||||
|
||||
## License
|
||||
MIT License - See LICENSE file for details
|
||||
Netaddr library has separate license in netaddr/ directory
|
||||
221
MIGRATION.md
Normal file
221
MIGRATION.md
Normal file
@@ -0,0 +1,221 @@
|
||||
# Infrastructure Migration Documentation
|
||||
|
||||
## Migration Date: 2025-11-12
|
||||
|
||||
## Migration Context
|
||||
|
||||
### Previous Infrastructure (DELETED)
|
||||
- **Domain:** as60284.net
|
||||
- **Git Remote:** https://git.as60284.net/AXSY/whois.git
|
||||
- **Status:** INFRASTRUCTURE COMPLETELY DELETED - NO LONGER ACCESSIBLE
|
||||
- **Credentials:** (Preserved in git history, now invalid)
|
||||
|
||||
### New Infrastructure (ACTIVE)
|
||||
|
||||
#### Primary Production Server
|
||||
- **Domain:** photon.obnh.io
|
||||
- **Git Remote (HTTPS):** https://git.photon.obnh.io/AXSY/whois.git
|
||||
- **Git Remote (SSH):** git@git.photon.obnh.io:AXSY/whois.git
|
||||
- **User:** olaf
|
||||
- **Organization:** AXSY
|
||||
- **API Key:** 7ca0e04e56df443163657e5e83c5b2ef2794e0cf
|
||||
- **Status:** PRIMARY - All pushes go here
|
||||
- **Repository Count:** 24 repositories
|
||||
|
||||
#### Disaster Recovery Mirror
|
||||
- **Domain:** git.proton.obr.sh
|
||||
- **Git Remote (HTTPS):** https://git.proton.obr.sh/axsy/whois.git
|
||||
- **Git Remote (SSH):** git@git.proton.obr.sh:axsy/whois.git
|
||||
- **User:** olaf
|
||||
- **API Key:** 151b26b25ffa4100ea776b09e2ed72a2dcb0787e
|
||||
- **Status:** MIRROR - Automatic sync from primary
|
||||
- **Sync Method:** Gitea pull mirroring (automatic)
|
||||
- **Server IPv6:** 2a02:4780:41:5469::1
|
||||
- **Setup Date:** 2025-11-08
|
||||
|
||||
#### Legacy Backup (Deprecated)
|
||||
- **Domain:** elektron.obnh.io
|
||||
- **Status:** BACKUP (Legacy, not actively used)
|
||||
- **API Key:** 7d73260d408f40b8b6ab23ea6ff6941a58079244
|
||||
|
||||
## Migration Actions Performed
|
||||
|
||||
### 1. Remote Reconfiguration
|
||||
```bash
|
||||
# Remove old remote pointing to deleted infrastructure
|
||||
git remote remove origin
|
||||
|
||||
# Add new primary remote
|
||||
git remote add origin git@git.photon.obnh.io:AXSY/whois.git
|
||||
|
||||
# Add disaster recovery mirror
|
||||
git remote add mirror git@git.proton.obr.sh:axsy/whois.git
|
||||
|
||||
# Verify configuration
|
||||
git remote -v
|
||||
```
|
||||
|
||||
### 2. Repository Setup on New Infrastructure
|
||||
- Repository created on git.photon.obnh.io under AXSY organization
|
||||
- Mirror automatically configured on git.proton.obr.sh
|
||||
- All 24 repositories from photon.obnh.io mirrored to proton.obr.sh
|
||||
|
||||
### 3. Documentation Updates
|
||||
- Created ENVIRONMENT.md with comprehensive setup instructions
|
||||
- Created this MIGRATION.md to document the transition
|
||||
- Updated .gitea-config.md with current infrastructure details
|
||||
|
||||
### 4. Session Closure Commit
|
||||
- Committed mwhois.log (modified)
|
||||
- Committed .gitea-config.md (untracked)
|
||||
- Committed ENVIRONMENT.md (new)
|
||||
- Committed MIGRATION.md (new)
|
||||
|
||||
## Workflow Changes
|
||||
|
||||
### Before Migration
|
||||
```bash
|
||||
# Old workflow (NO LONGER WORKS)
|
||||
git push origin master # Pushed to git.as60284.net
|
||||
```
|
||||
|
||||
### After Migration
|
||||
```bash
|
||||
# New workflow (CURRENT)
|
||||
git push origin master # Pushes to git.photon.obnh.io
|
||||
# Mirror at git.proton.obr.sh syncs automatically
|
||||
```
|
||||
|
||||
## Critical Notes for Continuity
|
||||
|
||||
### For User "olaf" on New Host
|
||||
|
||||
1. **Clone from new remote:**
|
||||
```bash
|
||||
git clone git@git.photon.obnh.io:AXSY/whois.git
|
||||
cd whois
|
||||
```
|
||||
|
||||
2. **Verify remotes are configured:**
|
||||
```bash
|
||||
git remote -v
|
||||
# Should show:
|
||||
# origin git@git.photon.obnh.io:AXSY/whois.git (fetch)
|
||||
# origin git@git.photon.obnh.io:AXSY/whois.git (push)
|
||||
# mirror git@git.proton.obr.sh:axsy/whois.git (fetch)
|
||||
# mirror git@git.proton.obr.sh:axsy/whois.git (push)
|
||||
```
|
||||
|
||||
3. **Configure git identity:**
|
||||
```bash
|
||||
git config user.name "Olaf"
|
||||
git config user.email "admin@obr.sh"
|
||||
```
|
||||
|
||||
4. **Development workflow unchanged:**
|
||||
- Edit files as normal
|
||||
- Commit changes locally
|
||||
- Push to origin (photon.obnh.io)
|
||||
- Mirror syncs automatically
|
||||
|
||||
### SSH Key Requirements
|
||||
- Ensure SSH key is added to both git.photon.obnh.io and git.proton.obr.sh
|
||||
- Test SSH access:
|
||||
```bash
|
||||
ssh -T git@git.photon.obnh.io
|
||||
ssh -T git@git.proton.obr.sh
|
||||
```
|
||||
|
||||
### HTTPS Alternative
|
||||
If SSH is not available, HTTPS works:
|
||||
```bash
|
||||
# Using API token for authentication
|
||||
git clone https://olaf:7ca0e04e56df443163657e5e83c5b2ef2794e0cf@git.photon.obnh.io/AXSY/whois.git
|
||||
```
|
||||
|
||||
## Disaster Recovery Procedures
|
||||
|
||||
### If Primary (photon.obnh.io) Fails
|
||||
1. **Verify mirror has latest commits:**
|
||||
```bash
|
||||
# Compare commit hashes
|
||||
git ls-remote https://git.proton.obr.sh/axsy/whois.git
|
||||
```
|
||||
|
||||
2. **Switch to mirror temporarily:**
|
||||
```bash
|
||||
git remote set-url origin git@git.proton.obr.sh:axsy/whois.git
|
||||
```
|
||||
|
||||
3. **Continue work:**
|
||||
- Pull latest from mirror
|
||||
- Commit changes locally
|
||||
- Wait for primary restoration before pushing
|
||||
|
||||
4. **Restore primary when available:**
|
||||
```bash
|
||||
git remote set-url origin git@git.photon.obnh.io:AXSY/whois.git
|
||||
git push origin master
|
||||
```
|
||||
|
||||
### If Mirror (proton.obr.sh) Fails
|
||||
- Mirror is read-only disaster recovery
|
||||
- Primary (photon.obnh.io) is authoritative
|
||||
- Mirror will resync automatically when restored
|
||||
- No action required from developers
|
||||
|
||||
## Verification Checklist
|
||||
|
||||
- [x] Old remote (git.as60284.net) removed
|
||||
- [x] New primary remote (git.photon.obnh.io) configured
|
||||
- [x] Mirror remote (git.proton.obr.sh) configured
|
||||
- [x] Documentation updated (ENVIRONMENT.md, MIGRATION.md)
|
||||
- [x] Git config (.gitea-config.md) updated
|
||||
- [x] All uncommitted changes committed
|
||||
- [x] Ready to push to new infrastructure
|
||||
|
||||
## Post-Migration Actions Required
|
||||
|
||||
### Immediate
|
||||
1. Push all commits to new primary remote
|
||||
2. Verify commits appear on git.photon.obnh.io web interface
|
||||
3. Verify mirror sync to git.proton.obr.sh (automatic, within minutes)
|
||||
|
||||
### On New Host (User "olaf")
|
||||
1. Clone from git.photon.obnh.io
|
||||
2. Configure git identity
|
||||
3. Verify Python 3.12+ availability
|
||||
4. Test mwhoisd server functionality
|
||||
5. Verify all utility scripts work (add-as, add-ip, etc.)
|
||||
|
||||
## Infrastructure Comparison
|
||||
|
||||
| Aspect | Old (as60284.net) | New (photon.obnh.io) |
|
||||
|--------|-------------------|----------------------|
|
||||
| Status | DELETED | ACTIVE (Primary) |
|
||||
| Accessibility | NONE | Full access |
|
||||
| User | olaf | olaf |
|
||||
| Organization | AXSY | AXSY |
|
||||
| Disaster Recovery | None | Automatic mirror to proton.obr.sh |
|
||||
| Repository Count | N/A | 24 repos |
|
||||
| Setup Date | Unknown | Active since 2025-11-08 |
|
||||
|
||||
## Lessons Learned
|
||||
|
||||
1. **Always maintain disaster recovery mirrors** - The DR mirror at proton.obr.sh proved essential
|
||||
2. **Document infrastructure early** - .gitea-config.md was crucial for migration
|
||||
3. **Automate mirror sync** - Gitea's automatic pull mirroring eliminates manual sync
|
||||
4. **Use SSH for git operations** - More reliable than HTTPS with credentials
|
||||
5. **Keep comprehensive session documentation** - Enables zero-loss transitions
|
||||
|
||||
## Related Documentation
|
||||
- ENVIRONMENT.md - Complete environment setup guide
|
||||
- .gitea-config.md - Gitea instance configuration
|
||||
- README.txt - Project usage documentation
|
||||
- NOTICE - Legal and attribution notices
|
||||
|
||||
## Support Contacts
|
||||
- Administrator: olaf (admin@obr.sh)
|
||||
- Organization: AXSY
|
||||
- Primary Git: git.photon.obnh.io
|
||||
- DR Mirror: git.proton.obr.sh
|
||||
BIN
mwhois.log
BIN
mwhois.log
Binary file not shown.
Reference in New Issue
Block a user