Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pwrlab-admin

Configuration and scripts for the Power Transformation Lab compute node (pwrlab).

Repository structure

pwrlab-admin/
├── CHANGES.md          ← admin changelog (update this with every change)
├── features.md         ← what's installed and available on the node
├── docs/
│   └── user-guide.md   ← lab member user guide
├── scripts/            ← admin scripts (deployed to /usr/local/bin/)
│   ├── pwrlab-status
│   ├── pwrlab-maintenance
│   ├── pwrlab-check-alerts
│   └── pwrlab-claude
├── motd/               ← MOTD scripts (deployed to /etc/update-motd.d/)
│   ├── 01-pwrlab-banner
│   └── 05-pwrlab-sysinfo
├── skel/               ← new-user dotfiles (deployed to /etc/skel/)
│   ├── .bashrc
│   ├── .vimrc
│   └── .tmux.conf
├── config/
│   ├── fail2ban/jail.local      → /etc/fail2ban/jail.local
│   ├── cron/pwrlab-alerts       → /etc/cron.d/pwrlab-alerts
│   └── profile.d/claude-code.sh → /etc/profile.d/claude-code.sh
└── deploy.sh           ← run as root to push all files to system paths

Initial setup

After cloning this repo, run once as root:

# 1. Install required packages
apt-get update
apt-get install -y btop ncdu iotop vnstat nethogs smartmontools fail2ban
curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
apt-get install -y nodejs
npm install -g @anthropic-ai/claude-code

# 2. Deploy all configs and scripts
sudo bash /home/pwrlabadmin/pwrlab-admin/deploy.sh --apply

# 3. Fix SSH keepalive (if not already done)
# Edit /etc/ssh/sshd_config and uncomment/set:
#   ClientAliveInterval 60
#   ClientAliveCountMax 10
# Then: systemctl reload ssh

# 4. Enable services
systemctl enable --now fail2ban vnstat smartd
vnstat --add --interface eno3

Making changes

  1. Edit files in this repo
  2. Run sudo bash deploy.sh --apply to push changes to the system
  3. Commit the changes:
    git add -A
    git commit -m "Brief description of change"
    git push
  4. Add an entry to CHANGES.md

Connecting GitHub remote

After creating the private repo in the lab org:

git remote add origin git@github.com:<org>/pwrlab-admin.git
git push -u origin main

About

Development scripts, change log, and user guide are stored here.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages