- Notifications
You must be signed in to change notification settings - Fork51
A self-hosted, open-source Platform as a Service that enables easy swarm deployments, load balancing, automatic SSL, metrics, analytics and more.
License
swarmlet/swarmlet
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Website —Documentation —Demo 🧞♂
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 byDokku.
Work In Progress.
This project is in beta and definitely not production-ready yet.
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:
Installswarmlet
on a server. Develop projects locally as usual, add adocker-compose.yml
file to describe your application stack, add a git remote, e.g.git remote add swarm git@my-swarm:my-project
.
Then simplygit push swarm master
to deploy the project on your swarm (server cluster). A load balancer, SSL, and metrics/logging (optional) are enabled by default.
Swarmlet is a thin wrapper aroundDocker Compose andDocker Swarm mode.
A few core services,Traefik (v2.3),Let's Encrypt,Ansible andGlusterFS 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 installMatamo,Portainer,Swarmpit andSwarmprom.
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.
- Install Swarmlet on a new VPS running Ubuntu 18.04 x64 as root.
- Edit your local SSH config to use
ssh swarm
instead ofssh root@123.23.12.123
- Use an existing project, or clone one of theexamples
- Add a
docker-compose.yml
file in the root of your project - Add a git remote:
git remote add swarm git@swarm:my-project
- Deploy your application stack to the swarm using
git push swarm master
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.
# 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
Swarmlet includes various examples of services that you can deploy to your server cluster with a simplegit push
.
- swarmlet-website - The swarmlet.dev website
- get-swarmlet - The get.swarmlet.dev install script
- Basic example - Static site
- Basic example - Python web server + Redis
- Moderate example - NGINX + React app + Node.js API
- (FIX)Advanced example - NGINX + React app + Node.js API + CMS + staging/production
- (FIX)GitLab CE (self-hosted)
- (FIX)GitLab Runner (self-hosted)
All these examples and theSwarmlet documentation and website are running on a €5/mosingle server 'cluster', using Swarmlet for deployments.
About
A self-hosted, open-source Platform as a Service that enables easy swarm deployments, load balancing, automatic SSL, metrics, analytics and more.