An open API service indexing awesome lists of open source software.

https://github.com/elastic-io/plus

A modern, high-performance package repository server written in Go
https://github.com/elastic-io/plus

artifacts-repository deb-packages high-performance linux-server rpm-packages

Last synced: 12 days ago
JSON representation

A modern, high-performance package repository server written in Go

Awesome Lists containing this project

README

          

# Plus Artifacts Server

A modern, high-performance package repository server written in Go, designed to replace traditional nginx+createrepo solutions with a unified, cloud-native approach.

[![Go Report Card](https://goreportcard.com/badge/github.com/elastic-io/plus)](https://goreportcard.com/report/github.com/elastic-io/plus)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Docker Pulls](https://img.shields.io/docker/pulls/elastic-io/plus)](https://hub.docker.com/r/elastic-io/plus)

## πŸš€ Features

### Core Capabilities
- **Multi-format Support**: RPM and DEB packages
- **RESTful API**: Complete package management via HTTP API
- **Real-time Metadata**: Automatic repository metadata generation
- **Batch Operations**: Efficient bulk package uploads
- **Built-in Monitoring**: Metrics and health checks
- **Web Interface**: Modern UI for repository management
- **High Performance**: Built with fasthttp for maximum throughput

### Storage Options
- **Local Storage**: Direct filesystem storage
- **Cloud Storage**: S3-compatible object storage (planned)
- **Flexible Backend**: Pluggable storage architecture

## 🎯 Why Choose Plus Over nginx+createrepo?

| Feature | nginx+createrepo | Plus | Advantage |
|---------|------------------|------|-----------|
| Static File Serving | βœ… nginx | βœ… fasthttp | Comparable performance, lighter weight |
| Metadata Generation | βœ… createrepo_c | βœ… Pure Go | No external dependencies |
| Package Upload | ❌ Custom scripts needed | βœ… Built-in API | Simpler integration |
| Batch Operations | ❌ Manual scripting | βœ… Native support | Higher efficiency |
| Real-time Monitoring | ❌ Additional tools required | βœ… Built-in metrics | Out-of-the-box |
| Multi-format Support | ❌ RPM only | βœ… RPM+DEB | More flexible |
| Container Ready | ❌ Complex setup | βœ… Single binary | Cloud-native |

## πŸ“¦ Quick Start

### Using Docker (Recommended)

```bash
# Pull and run
docker run -d \
--name plus-server \
-p 8080:8080 \
-v $(pwd)/storage:/app/storage \
elastic-io/plus:latest

# Or use docker-compose
curl -O https://raw.githubusercontent.com/elastic-io/plus/main/docker-compose.yml
docker-compose up -d
```

### Binary Installation

```bash
# Download latest release
wget https://github.com/elastic-io/plus/releases/latest/download/plus-linux-amd64
chmod +x plus-linux-amd64
mv plus-linux-amd64 /usr/local/bin/plus

# Run with default config
plus --config config.yaml
```

### From Source

```bash
git clone https://github.com/elastic-io/plus.git
cd plus

# Build using make
make build # Build for your current platform
make build-all # Build for all supported platforms

# Run the application
./bin/plus --config config.yaml
```

### Using Make Commands

```bash
make deps # Install dependencies
make test # Run tests
make build-amd # Build for Linux AMD64
make build-arm # Build for Linux ARM
make clean # Clean build artifacts
make help # Show all available commands
```

## βš™οΈ Configuration

### Basic Configuration

```yaml
# config.yaml
server:
listen: ":8080"
dev_mode: false

storage:
type: "local"
path: "./storage"

logging:
level: "info"
format: "json"
```

## πŸ”§ API Usage

### Repository Management

```bash
# List all repositories
curl http://localhost:8080/repos

# Create a new repository
curl -X POST http://localhost:8080/repos \
-H "Content-Type: application/json" \
-d '{"name": "my-repo", "path": "centos/7"}'

# Get repository information
curl http://localhost:8080/repo/my-repo

# Delete repository
curl -X DELETE http://localhost:8080/repo/my-repo
```

### Package Management

```bash
# Upload a package
curl -X POST http://localhost:8080/repo/my-repo/upload \
-F "file=@package.rpm"

# Download a package
curl -O http://localhost:8080/repo/my-repo/rpm/package.rpm

# Get package checksum
curl http://localhost:8080/repo/my-repo/checksum/package.rpm
```

### Repository Operations

```bash
# Refresh repository metadata
curl -X POST http://localhost:8080/repo/my-repo/refresh

# Browse repository files
curl http://localhost:8080/repo/my-repo/files/
```

## πŸ–₯️ Web Interface

Access the modern web interface at `http://localhost:8080/static/`

Features:
- Repository browsing and management
- Package upload with drag-and-drop
- Real-time metrics dashboard
- Batch operations interface

## πŸ“Š Monitoring & Metrics

### Health Checks

```bash
# Basic health check
curl http://localhost:8080/health

# Readiness check
curl http://localhost:8080/ready

# Detailed metrics
curl http://localhost:8080/metrics
```

## 🐳 Container Deployment

### Docker Compose

```yaml
version: '3.8'
services:
plus:
image: elastic-io/plus:latest
ports:
- "8080:8080"
volumes:
- ./storage:/app/storage
- ./config.yaml:/app/config.yaml
environment:
- PLUS_CONFIG=/app/config.yaml
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
```

## πŸ”„ Migration from nginx+createrepo

See our [Migration Guide](docs/migration.md) for detailed instructions on migrating from traditional nginx+createrepo setups.

## πŸ“ˆ Performance Benchmarks

### Throughput Comparison

| Scenario | nginx+createrepo | Plus | Improvement |
|----------|------------------|------|-------------|
| Static File Serving | 10,000-15,000 QPS | 15,000-25,000 QPS | +67% |
| Package Upload | Manual process | 500-1000 uploads/min | ∞ |
| Metadata Generation | 30-60 seconds | 1-5 seconds | 10x faster |
| Memory Usage | ~200MB (nginx+tools) | ~50MB | 75% less |

## 🀝 Contributing

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.

## πŸ“š Documentation

- [API Reference](docs/api.md)
- [Development Guide](docs/development.md)
- [Migration Guide](docs/migration.md)

## πŸ—ΊοΈ Roadmap

### v1.1.0 (Next Release)
- [ ] Authentication and authorization
- [ ] S3-compatible storage backend
- [ ] Package signing verification
- [ ] Advanced metrics and alerting

### v1.2.0
- [ ] Multi-tenant support
- [ ] Package vulnerability scanning
- [ ] GraphQL API

## πŸ“„ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## πŸ†˜ Support

- **Documentation**: [docs/](docs/)
- **Issues**: [GitHub Issues](https://github.com/elastic-io/plus/issues)
- **Discussions**: [GitHub Discussions](https://github.com/elastic-io/plus/discussions)

## πŸ™ Acknowledgments

- Built with [fasthttp](https://github.com/valyala/fasthttp) for high performance
- Inspired by modern package management needs
- Thanks to all contributors and users

---

**Plus Artifacts Server** - Modern package repository management made simple.