Swarmlet

一个自我托管的开源平台即服务,能够轻松实现 Swarm 集群部署、负载平衡、自动 SSL、指标、分析等。「A self-hosted, open-source Platform as a Service that enables easy swarm deployments, load balancing, automatic SSL, metrics, analytics and more.」

Github星跟蹤圖

WebsiteDocumentationDemo 🧞‍♂

Swarmlet is a self-hosted, open-source Platform as a Service that runs on any single server. It's mainly intended for use with multiple servers, a server cluster / swarm. Heavily inspired by Dokku.


stability-wip
PRs Welcome

NOTE

Work In Progress.
This project is in beta and definitely not production-ready yet.

TL;DR

Why choose Kubernetes over Docker + Docker Swarm?
Why not automate some deployment things to get a pretty simple, versatile and solid setup?
Bonus, you're familiar with Docker already.

How:
Install swarmlet on a server. Develop projects locally as usual, add a docker-compose.yml file to describe your application stack, add a git remote, e.g. git remote add swarm git@my-swarm:my-project.
Then simply git push swarm master to deploy the project on your swarm (server cluster). A load balancer, SSL, and metrics/logging (optional) are enabled by default.

What is Swarmlet?

Swarmlet is a thin wrapper around Docker Compose and Docker Swarm mode.
A few core services, Traefik (v2.3), Let's Encrypt, Ansible and GlusterFS are included by default.
These enable automatic SSL, load balancing, swarm state management and distributed file storage.
Let's Encrypt wildcard certificates support - more info.

During the installation you can choose to install Matamo, Portainer, Swarmpit and Swarmprom.
These optional services are included to provide analytics and various metrics dashboards.

This project is aimed at developers that want to experiment with application deployment in a flexible multi-server / high-availability environment. The goal is to be able to set up your own swarm and deploy your app(s) in minutes.

Getting started

  1. Install Swarmlet on a new VPS running Ubuntu 18.04 x64 as root.
  2. Edit your local SSH config to use ssh swarm instead of ssh root@123.23.12.123
  3. Use an existing project, or clone one of the examples
  4. Add a docker-compose.yml file in the root of your project
  5. Add a git remote: git remote add swarm git@swarm:my-project
  6. Deploy your application stack to the swarm using git push swarm master

Example application setup and deployment guide

Installation

Make sure you have a (sub) domain available which is pointed to your server, this is necessary to access the Traefik or Portainer/Matomo dashboards located at e.g. portainer.your-domain.com.

To install the latest version of Swarmlet, log in to your server as root and run:

curl -fsSL https://get.swarmlet.dev, bash

The installation should take a few minutes to complete.

Full installation instructions can be found here

Custom installation

# Headless (noninteractive) installation:
curl -fsSL https://get.swarmlet.dev, bash -s \
  INSTALLATION_TYPE=noninteractive \
  INSTALL_ZSH=true \
  INSTALL_MODULES="matomo swarmpit" \
  NEW_HOSTNAME=swarm-manager-1 \
  SWARMLET_USERNAME=admin \
  SWARMLET_PASSWORD=nicepassword \
  ROOT_DOMAIN=dev.mydomain.com

Examples

Swarmlet includes various examples of services that you can deploy to your server cluster with a simple git push.

All these examples and the Swarmlet documentation and website are running on a €5/mo single server 'cluster', using Swarmlet for deployments.


Proudly sponsored by Passionate People

概覽

名稱與所有者swarmlet/swarmlet
主編程語言Shell
編程語言Shell (語言數: 6)
平台
許可證MIT License
發布數5
最新版本名稱v0.2.9 (發布於 2020-10-28 08:47:58)
第一版名稱v0.1.0 (發布於 )
創建於2020-04-15 13:06:59
推送於2023-04-13 17:58:55
最后一次提交2023-04-13 19:58:55
星數816
關注者數17
派生數51
提交數768
已啟用問題?
問題數67
打開的問題數18
拉請求數64
打開的拉請求數37
關閉的拉請求數8
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?
去到頂部