Skip to content

gitinkent1967/flock-hpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flock HPC Lab

License: MIT Docker Slurm Ubuntu Architecture

A Docker-based lab environment to practice and familiarise oneself with the principles of High Performance Computing (HPC), cluster administration, workload management, and Linux infrastructure.


Overview

Flock is a small-scale HPC cluster built as a reproducible laboratory environment.

The goal is to learn and practise the core concepts behind HPC systems:

  • Linux-based compute environments
  • Cluster architecture
  • Job scheduling
  • Resource allocation
  • Batch processing
  • Interactive workloads
  • Authentication between nodes
  • Shared storage concepts
  • Accounting and monitoring
  • Containerised infrastructure

Although the physical resources are modest, the architecture follows the same principles used by much larger research computing environments.


Architecture

                    User
                     |
              SSH login node
              flock-login
                     |
              Slurm controller
              slurmctld
                     |
          +----------+----------+
          |                     |
     compute001            compute002
       slurmd                slurmd
          |                     |
          +----------+----------+
                     |
              Job execution
                     |
              MariaDB accounting

Components

Component Purpose


flock-login User access and administration slurmctld Slurm workload scheduler compute001 Compute node compute002 Compute node MUNGE Cluster authentication MariaDB Persistent accounting database Docker Compose Orchestration Colima Local virtualisation


Technology Stack

  • Ubuntu 24.04 LTS
  • ARM64
  • Docker
  • Docker Compose
  • Colima
  • Slurm 23.11
  • MUNGE
  • MariaDB 11

Why Flock?

Modern HPC environments combine many services:

  • login nodes
  • scheduler nodes
  • compute nodes
  • authentication systems
  • storage
  • databases
  • monitoring

Flock provides a local environment to explore these concepts without requiring access to a production cluster.


Slurm Examples

Submit a job:

sbatch job.slurm

View jobs:

squeue

Inspect jobs:

scontrol show job <JOBID>

View cluster status:

sinfo

Interactive allocation:

salloc

Example Batch Job

#!/bin/bash

#SBATCH --job-name=test
#SBATCH --partition=long
#SBATCH --time=01:00:00
#SBATCH --mem=512M

hostname
sleep 300

Submit:

sbatch test.slurm

Job Lifecycle

User
 |
sbatch
 |
slurmctld
 |
Scheduler
 |
Compute node
 |
slurmd
 |
Job execution
 |
Accounting

Authentication

Flock uses MUNGE authentication between cluster components.

This provides:

  • secure credentials
  • node authentication
  • identity verification

Storage Model

Directory Purpose


/home User configuration and files /project Shared project data /scratch Temporary working area


Accounting

Flock includes MariaDB as the foundation for Slurm accounting.

slurmctld
    |
 slurmdbd
    |
 MariaDB

This allows historical analysis of:

  • completed jobs
  • CPU usage
  • memory usage
  • workloads

Project Structure

flock/
├── compose.yml
├── config/
│   ├── slurm.conf
│   └── cgroup.conf
├── image/
│   ├── Dockerfile
│   └── entrypoint.sh
├── jobs/
├── secrets/
├── shared/
└── state/

Skills Demonstrated

Building Flock provided practical experience with:

  • Linux administration
  • Docker infrastructure
  • virtualisation
  • networking troubleshooting
  • Slurm administration
  • workload management
  • database integration
  • infrastructure as code
  • open-source documentation

Future Development

Possible future work:

  • full Slurm accounting integration
  • Prometheus monitoring
  • Grafana dashboards
  • job arrays
  • workflow dependencies
  • GPU simulation
  • additional compute nodes

Disclaimer

Flock is a learning and development environment designed to demonstrate HPC concepts and cluster administration principles.

It is not intended to replace production HPC infrastructure.


Author

Built as a personal HPC learning laboratory exploring Linux systems, scientific computing infrastructure, workload management, and open-source technologies.

About

A Docker-based lab to practice and familarise oneself with principles of HPC Computing

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages