News for hackers. Stuff that matters.
Re:MRSK vs. Fly.io by rozenmd on Wednesday March 22, 2023 @05:12PM (#35267152)
I wish there was something like MRSK for deploying generic Dockerfiles onto VMs from scratch, without the mess of Kubernetes or needing to use Rails.

Like, provision Hetzner -> pass the IP address to the tool + a Dockerfile -> your image Just Works on the server and restarts if it crashes.

Re:MRSK vs. Fly.io by nwienert on Wednesday March 22, 2023 @05:21PM (#35267263)
Docker Swarm is very underrated, more for multiple apps but you can of course just have one.
Re:MRSK vs. Fly.io by jordemort on Wednesday March 22, 2023 @05:32PM (#35267358)
I think this is what MRSK is? There's no Kubernetes. It even installs Docker for you.
Re:MRSK vs. Fly.io by jahsome on Wednesday March 22, 2023 @05:53PM (#35267574)
I may be ignorant but doesn't that scenario you described encapsulate how MRSK functions?

From the MRSK readme[1]:

    Connect to the servers over SSH (using root by default, authenticated by your ssh key)
    Install Docker on any server that might be missing it (using apt-get)
    Log into the registry both locally and remotely
    Build the image using the standard Dockerfile in the root of the application.
    Push the image to the registry.
    Pull the image from the registry onto the servers.
    Ensure Traefik is running and accepting traffic on port 80.
    Ensure your app responds with 200 OK to GET /up.
    Start a new container with the version of the app that matches the current git version hash.
    Stop the old container running the previous version of the app.
    Prune unused images and stopped containers to ensure servers don't fill up.
---

1. https://github.com/mrsked/mrsk#readme

Re:MRSK vs. Fly.io by andrewmutz on Wednesday March 22, 2023 @06:53PM (#35268171)
I don't think you need to use rails to use MRSK
Re:MRSK vs. Fly.io by stavros on Wednesday March 22, 2023 @07:15PM (#35268400)
I wrote something to do just that:

https://gitlab.com/stavros/harbormaster

SSH into the server, run the Docker container, give it a config file with the images you want to run, and it handles everything else automatically.

Re:MRSK vs. Fly.io by mr_ndrsn on Wednesday March 22, 2023 @07:30PM (#35268522)
mrsk doesn't require rails. It makes no assumptions about what you're running, we deploy a golang service with it.

mrsk does require a ruby install on your machine, tho.

Re:MRSK vs. Fly.io by KingOfCoders on Thursday March 23, 2023 @02:13AM (#35271023)
I would be very interested in that, do you have a writeup?
Re:MRSK vs. Fly.io by mr_ndrsn on Thursday March 23, 2023 @09:17AM (#35274286)
I don't think there's a writeup out there, but mrsk just uses docker under the hood. So, if you have a CMD in your Dockerfile, it will use that.

If you have an image that can run multiple things, like a rails app that can run the app process for web traffic by default, but it can also run job workers with the right command, you can provide the cmd in the mrsk config. You can see this in the jobs role in the example: https://github.com/mrsked/mrsk#using-different-roles-for-ser....

Re:MRSK vs. Fly.io by KingOfCoders on Thursday March 23, 2023 @12:38PM (#35277397)
Thanks!
Re:MRSK vs. Fly.io by e12e on Wednesday March 22, 2023 @11:20PM (#35270164)
> Like, provision Hetzner -> pass the IP address to the tool + a Dockerfile -> your image Just Works on the server and restarts if it crashes.

This is MRSK. It's just that rails now comes with a dockerfile. And your service need a health check.

Re:MRSK vs. Fly.io by fbdab103 on Thursday March 23, 2023 @01:31AM (#35270831)
Dokku[0] does exactly that. Feels a very space to mrsk, but has been around for several years now.

[0] https://dokku.com/