https://github.com/zakirkun/neon
A CLI tool for automating Docker Swarm deployments with zero-downtime updates and advanced monitoring.
https://github.com/zakirkun/neon
devops docker neon
Last synced: about 1 year ago
JSON representation
A CLI tool for automating Docker Swarm deployments with zero-downtime updates and advanced monitoring.
- Host: GitHub
- URL: https://github.com/zakirkun/neon
- Owner: zakirkun
- Created: 2025-01-25T18:33:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-18T00:19:25.000Z (about 1 year ago)
- Last Synced: 2025-03-25T19:10:45.722Z (about 1 year ago)
- Topics: devops, docker, neon
- Language: Go
- Homepage:
- Size: 63.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Neon - Docker Swarm Management Tool
A CLI tool for automating Docker Swarm deployments with zero-downtime updates and advanced monitoring.
## Features
- Zero-downtime deployments with health checks
- Rolling updates with automatic rollback
- Service monitoring and metrics
- Volume backup and restore
- Network management
- Resource limits and scaling
- Configuration-based deployments
## Installation
```bash
go install github.com/zakirkun/neon@latest
```
## Quick Start
```bash
# Show version
neon --version
# Deploy with zero downtime
neon deploy rolling myapp --image nginx:latest --replicas 3 --update-delay 10s
# Deploy using config file
neon deploy config -f deploy.yaml
# List and manage resources
neon image list
neon network list
neon volume list
```
## Configuration
Default config location: `~/.neon/config.yaml`
```yaml
docker:
registry: "registry.example.com"
username: "user"
password: "pass"
swarm:
manager_node: "127.0.0.1:2377"
network_name: "neon-network"
deploy:
replicas: 3
update_delay: "10s"
rollback_delay: "5s"
failure_action: "rollback"
```
## Deployment Configuration
Example `deploy.yaml`:
```yaml
services:
webapp:
image: registry.example.com/webapp:latest
replicas: 3
update_config:
parallelism: 1
delay: 10s
order: start-first
failure_action: rollback
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost/health || exit 1"]
interval: 5s
timeout: 3s
retries: 3
resources:
limits:
cpus: '0.5'
memory: 512M
```
## Commands
### Deployment
```bash
# Zero-downtime deployment
neon deploy rolling --image [options]
--replicas Number of replicas (default: 3)
--update-delay Delay between updates (default: 10s)
--image New image to deploy
# Config-based deployment
neon deploy config -f deploy.yaml
```
### Resource Management
```bash
# Images
neon image list
neon image rm
neon image pull
# Networks
neon network list
neon network create
neon network rm
# Volumes
neon volume list
neon volume create
neon volume rm
```
### Monitoring
```bash
# Monitor service metrics
neon monitor service
```
## Development
Requirements:
- Go 1.22 or later
- Docker Engine with Swarm mode enabled
Build from source:
```bash
git clone https://github.com/zakirkun/neon.git
cd neon
go build
```
## License
MIT License