Skip to main content
Discover Packs Jobs Registries Requests Docs About GitHub

lhaig / pack-garage-webui

Published by Lance Haig | View Source

pack
0 stars
Description
Nomad Pack for deploying Garage Web UI - a management interface for Garage S3-compatible storage
License
MIT
Tags
#storage #s3 #ui
Versions
Select a version to see its documentation and run command.
Quick Run (1.1.0)
ramble pack run lhaig/pack-garage-webui@1.1.0
metadata.hcl
app {
  url = "https://github.com/khairul169/garage-webui"
}

pack {
  name        = "garage-webui"
  description = "Web UI for Garage S3-compatible distributed object storage."
  // Keep in sync with 'version' variable in variables.hcl
  version     = "1.1.0"
}
README
# Garage Web UI Nomad Pack This pack deploys [garage-webui](https://github.com/khairul169/garage-webui), a web-based management interface for Garage S3-compatible object storage. ## Prerequisites - Running Nomad cluster - Garage deployed with admin API enabled (see [pack-garage](../pack-garage)) - Garage admin token ## Quick Start 1. First, ensure Garage is running with an admin token: ```bash nomad-pack run pack-garage -var admin_token=my-secret-token ``` 2. Deploy the Web UI: ```bash nomad-pack run pack-garage-webui -var garage_admin_token=my-secret-token ``` 3. Access the UI at `http://<node-ip>:3909` ## Variables | Variable | Description | Default | |----------|-------------|---------| | `job_name` | Job name override | `garage-webui` | | `region` | Nomad region | `""` | | `datacenters` | Target datacenters | `["dc1"]` | | `namespace` | Nomad namespace | `default` | | `garage_admin_service` | Garage admin service name | `garage-admin` | | `garage_s3_service` | Garage S3 service name | `garage-s3` | | `garage_admin_token` | Admin API bearer token | `""` (required) | | `version` | Container image version tag | `1.1.0` | | `image` | Docker image override (if empty, uses version) | `""` | | `port` | Web UI port (0 for dynamic) | `3909` | | `count` | Number of instances | `1` | | `auth_enabled` | Enable basic auth | `false` | | `auth_username` | Basic auth username | `admin` | | `auth_password_hash` | Bcrypt password hash | `""` | | `resources.cpu` | CPU allocation (MHz) | `200` | | `resources.memory` | Memory allocation (MB) | `256` | ## Authentication For production deployments, enable basic authentication: ```bash # Generate bcrypt hash HASH=$(htpasswd -nbB admin mypassword | cut -d: -f2) # Deploy with auth enabled nomad-pack run pack-garage-webui \ -var garage_admin_token=my-secret-token \ -var auth_enabled=true \ -var auth_username=admin \ -var auth_password_hash="$HASH" ``` ## Service Discovery The pack uses Nomad service discovery to find Garage services: - `garage-admin` - Admin API for cluster management - `garage-s3` - S3 API for file operations If your Garage deployment uses different service names, override them: ```bash nomad-pack run pack-garage-webui \ -var garage_admin_token=my-secret-token \ -var garage_admin_service=my-garage-admin \ -var garage_s3_service=my-garage-s3 ``` ## Traefik Integration The service is tagged for Traefik integration: ```hcl tags = [ "traefik.enable=true", "traefik.http.routers.garage-webui.rule=PathPrefix(`/garage-ui`)", ] ``` Customize routing by modifying the job template or using Traefik's tag-based configuration. ## Features The web UI provides: - Cluster status and node management - Bucket creation and management - Access key management - File browser with upload/download - Bucket policy configuration