mrsk 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -1
- data/lib/mrsk/commands/builder/base.rb +17 -9
- data/lib/mrsk/commands/builder/multiarch.rb +1 -3
- data/lib/mrsk/commands/builder/native/remote.rb +1 -3
- data/lib/mrsk/commands/builder/native.rb +1 -1
- data/lib/mrsk/commands/prune.rb +2 -3
- data/lib/mrsk/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72714468cef4a41762f0da7a7a1af4b63a09181ae8ce73839b642ff0f91dd7ab
|
4
|
+
data.tar.gz: 147c1b2ca7bca7b0a5e91489b0cfa5d4efec52a9233978c50e5e4c3b6079b1d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e69b26849eedbc5fe5a17870b7184e8f73bfa2ac9b8c802ceedfab9fd688427445422e1709037548b87d06478aae49e681a5250195b111ff4d6f3560c56db02e
|
7
|
+
data.tar.gz: dbbda93a73d43820ac11c184b5ce838eb95216f54fae27961fbd3e735066cc01906960da9759818a994b6d9629ef538319577e9c48d3cb1925c94cd09c33b1e4
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# MRSK
|
2
2
|
|
3
|
-
MRSK deploys web apps in containers to servers running Docker with zero downtime. It uses the dynamic reverse-proxy Traefik to hold requests while the new application container is started and the old one is stopped. It works seamlessly across multiple hosts, using SSHKit to execute commands.
|
3
|
+
MRSK deploys web apps in containers to servers running Docker with zero downtime. It uses the dynamic reverse-proxy Traefik to hold requests while the new application container is started and the old one is stopped. It works seamlessly across multiple hosts, using SSHKit to execute commands. It was built for Rails applications, but works with any type of web app that can be bundled with Docker.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -43,6 +43,16 @@ This will:
|
|
43
43
|
|
44
44
|
Voila! All the servers are now serving the app on port 80. If you're just running a single server, you're ready to go. If you're running multiple servers, you need to put a load balancer in front of them.
|
45
45
|
|
46
|
+
## Vision
|
47
|
+
|
48
|
+
In the past decade+, there's been an explosion in commercial offerings that make deploying web apps easier. Heroku kicked it off with an incredible offering that stayed ahead of the competition seemingly forever. These days we have excellent alternatives like Fly.io and Render. And hosted Kubernetes is making things easier too on AWS, GCP, Digital Ocean, and elsewhere. But these are all offerings that have you renting computers in the cloud at a premium. If you want to run on our own hardware, or even just have a clear migration path to do so, you need to carefully consider how locked in you get to these commercial platforms. Preferably before the bills swallow your business whole!
|
49
|
+
|
50
|
+
MRSK seeks to bring the advance in ergonomics pioneered by these commercial offerings to deploying web apps anywhere. Whether that's low-cost cloud options without the managed-service markup from the likes of Digital Ocean, Hetzner, OVH, etc, or it's your own colocated metal. To MRSK, it's all the same. Feed the config file a list of IP addresses with vanilla Ubuntu servers that have seen no prep beyond an added SSH key, and you'll be running in literally minutes.
|
51
|
+
|
52
|
+
This structure also gives you enormous portability. You can have your web app deployed on several clouds at ease like this. Or you can buy the baseline with your own hardware, then deploy to a cloud before a big seasonal spike to get more capacity. When you're not locked into a single provider from a tooling perspective, there's a lot of compelling options available.
|
53
|
+
|
54
|
+
Ultimately, MRSK is meant to compress the complexity of going to production using open source tooling that isn't tied to any commercial offering. Not to zero, though. You're probably still better off with a fully managed service if basic Linux or Docker is still difficult, but from an early stage when those concepts are familiar.
|
55
|
+
|
46
56
|
## Why not just run Capistrano, Kubernetes or Docker Swarm?
|
47
57
|
|
48
58
|
MRSK basically is Capistrano for Containers, which allow us to use vanilla servers as the hosts. No need to ensure that the servers have just the right version of Ruby or other dependencies you need. That all lives in the Docker image now. You can boot a brand new Ubuntu (or whatever) server, add it to the deploy servers of MRSK, and it'll be auto-provisioned with Docker, and run right away. Docker's layer caching also allows for quicker deployments with less mucking about on the server. And the images built for MRSK can be used for CI or later introspection.
|
@@ -5,19 +5,27 @@ class Mrsk::Commands::Builder::Base < Mrsk::Commands::Base
|
|
5
5
|
docker :pull, config.absolute_image
|
6
6
|
end
|
7
7
|
|
8
|
-
def
|
9
|
-
|
8
|
+
def build_options
|
9
|
+
[ *build_tags, *build_labels, *build_args, *build_secrets ]
|
10
10
|
end
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
private
|
13
|
+
def build_tags
|
14
|
+
[ "-t", config.absolute_image, "-t", config.latest_image ]
|
15
|
+
end
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
def build_labels
|
18
|
+
argumentize "--label", { service: config.service }
|
19
|
+
end
|
20
|
+
|
21
|
+
def build_args
|
22
|
+
argumentize "--build-arg", args, redacted: true
|
23
|
+
end
|
24
|
+
|
25
|
+
def build_secrets
|
26
|
+
argumentize "--secret", secrets.collect { |secret| [ "id", secret ] }
|
27
|
+
end
|
19
28
|
|
20
|
-
private
|
21
29
|
def args
|
22
30
|
(config.builder && config.builder["args"]) || {}
|
23
31
|
end
|
data/lib/mrsk/commands/prune.rb
CHANGED
@@ -6,11 +6,10 @@ class Mrsk::Commands::Prune < Mrsk::Commands::Base
|
|
6
6
|
PRUNE_CONTAINERS_AFTER = 3.days.in_hours.to_i
|
7
7
|
|
8
8
|
def images
|
9
|
-
docker :image, :prune, "
|
9
|
+
docker :image, :prune, "--all", "--force", "--filter", "label=service=#{config.service}", "--filter", "until=#{PRUNE_IMAGES_AFTER}h"
|
10
10
|
end
|
11
11
|
|
12
12
|
def containers
|
13
|
-
docker :
|
14
|
-
docker :container, :prune, "-f", "--filter", "label=service=#{config.service}", "--filter", "'until=#{PRUNE_CONTAINERS_AFTER}h'"
|
13
|
+
docker :container, :prune, "--force", "--filter", "label=service=#{config.service}", "--filter", "until=#{PRUNE_CONTAINERS_AFTER}h"
|
15
14
|
end
|
16
15
|
end
|
data/lib/mrsk/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mrsk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|