itenv_tools/tools
2025-06-15 17:59:14 +02:00
..
example_autoconfig ... 2025-06-15 17:35:24 +02:00
erase.sh ... 2025-06-15 17:21:36 +02:00
git_checkout.sh init 2025-06-15 17:12:55 +02:00
git_push.sh ... 2025-06-15 17:10:57 +02:00
install_rust_sal.sh ... 2025-06-15 17:59:14 +02:00
install_rust.sh ... 2025-06-15 17:59:14 +02:00
readme.md ... 2025-06-15 17:59:14 +02:00
ubuntu_install.sh ... 2025-06-15 17:37:19 +02:00

ITenv Tools - Tool Documentation

This directory contains various utility scripts for server management, disk operations, and git repository management. Each tool is designed for specific infrastructure tasks.

Tools Overview

1. erase.sh

Purpose: Secure disk erasure utility for SSD drives

Usage:

sudo ./erase.sh

⚠️ WARNING: This tool permanently destroys all data on selected disks. Use with extreme caution!

2. git_checkout.sh

Purpose: Git repository management for itenv projects

What it does:

  • Verifies SSH agent has loaded keys for git authentication
  • Checks and configures git user.name and user.email if not set
  • Creates the standard directory structure: /root/code/git.threefold.info/ourworld_web
  • Clones or updates two repositories:
    • itenv_web2 - Main web application repository
    • itenv_tools - Tools and utilities repository

Prerequisites:

  • SSH key must be loaded in ssh-agent
  • Git must be installed
  • Access to git.threefold.info repositories

Usage:

./git_checkout.sh

3. git_push.sh

Purpose: Quick git commit and push utility

./git_push.sh

Note: This is a simple automation script for quick commits. For production use, consider more descriptive commit messages.

4. ubuntu_install.sh

Purpose: Automated Ubuntu 24.04 installation for Hetzner dedicated servers

only do this on rescue system for hetzner servers

What it does:

  • Detects available NVMe drives (requires minimum 2 drives)
  • Creates Hetzner installimage configuration for Ubuntu 24.04
  • Sets up btrfs filesystem with RAID 1 across two drives
  • Configures btrfs subvolumes for better organization:
    • @ (root filesystem)
    • @home (/home)
    • @var (/var)
    • @var/log (/var/log)
    • @tmp (/tmp)
    • @opt (/opt)
    • @srv (/srv)
    • @snapshots (/.snapshots)
  • Creates post-installation scripts for:
    • btrfs optimization and maintenance
    • Automatic snapshot management with snapper
    • RAID monitoring utilities

Features:

  • RAID 1 for data redundancy
  • btrfs compression (zstd:3) for space efficiency
  • Automated weekly balance and scrub operations
  • Snapshot management with configurable retention

Prerequisites:

  • Must be run from Hetzner rescue system
  • Requires at least 2 NVMe drives
  • installimage must be available

Usage:

./ubuntu_install.sh

⚠️ WARNING: This script will completely wipe the selected drives and install a fresh Ubuntu system.