thmhoag / arkserver

Docker image for a dedicated ARK Server with ArkManager.
MIT License
121 stars 43 forks source link

Support for ARK cluster + shared server files #38

Closed DrPsychick closed 3 years ago

DrPsychick commented 3 years ago

@thmhoag I'm happy to make some adjustments if this PR does not work for you

jcirizar commented 3 years ago

Very interested in this PR, is this going to be merged anytime soon?

thmhoag commented 3 years ago

Hey @DrPsychick, thanks for the PR!

Looking at the changes, it looks like the main goal is to basically have one server installation across multiple containers on the same machine?

Also, it's been a while since I've really dug into the semantics of symlinking a folder, but IIRC it doesn't play nice if the container is running on a Windows machine with the file path being linked to a mount. I haven't explicitly declared support for Windows hosts in the readme but I've always tried to support the possibility.

jcirizar commented 3 years ago

@thmhoag quick question if you can give me a hint, do you think with this PR is possible to run a docker swarm with multiple vps and use one of them as a volume to share data and cluster config so not everything is in the same server?

DrPsychick commented 3 years ago

Looking at the changes, it looks like the main goal is to basically have one server installation across multiple containers on the same machine?

Yes and no. The idea is to support sharing the server files, because they take up most of the space and one would likely want to run all servers on the same/latest version. With docker, yes all containers must then run on the same host. In a kubernetes environment, the volume can be shared across multiple nodes/hosts.

Also, it's been a while since I've really dug into the semantics of symlinking a folder, but IIRC it doesn't play nice if the container is running on a Windows machine with the file path being linked to a mount. I haven't explicitly declared support for Windows hosts in the readme but I've always tried to support the possibility.

Ok, I missed that point. To me it honestly does not make sense to run a linux docker on a windows host to run a natively windows supported server 😁 I'd rather use a linux server for such cases - or run ark natively on windows.

DrPsychick commented 3 years ago

@thmhoag quick question if you can give me a hint, do you think with this PR is possible to run a docker swarm with multiple vps and use one of them as a volume to share data and cluster config so not everything is in the same server?

I haven't used docker swarm yet. If the shared volume can be connected all hosts it should work. Currently I'm working on running an ARK cluster on kubernetes, but I'm running all containers on the same host and use shared local disk (called "ephemeral" on AWS) storage. With decent network the impact of using a network storage should not have a massive impact. https://github.com/DrPsychick/ark-cluster-chart

DrPsychick commented 3 years ago

New proposal - which I hope also works with Windows: Nothing is symlinked, everything is just mounted separately.

  1. default behaviour remains as it is and nothing has changed.
  2. if you want to use ARKSERVER_SHARED, you must also mount your Saved directory (and possibly the clusters directory)

I tested it with a script with different scenarios.

DrPsychick commented 3 years ago

@thmhoag all should be clarified and also backwards compatible. Feel free to merge or let me know if you need any other change.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

DrPsychick commented 3 years ago

@thmhoag want to give it a try? After all, if merged and it breaks stuff, it can easily be rolled back...

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

DrPsychick commented 2 years ago

Hey @thmhoag , do you want to give this another look?