Raised This Month: $32 Target: $400
 8% 

sync server config updates without FTP access


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dustinandband
Senior Member
Join Date: May 2015
Old 03-01-2020 , 12:00   sync server config updates without FTP access
Reply With Quote #1

Hello,

Oftentimes when renting a game server I prefer to rent privately from someone's personal dedicated machine instead of going the VPS/VDS route (except when renting from NFO servers). Over the years I've found that sometimes updates don't get uploaded for a week after I sent them (sometimes not at all), or I need to correct some bugs and reupload updates maybe 2 or 3 times before an issue is fully resolved. Preparing updates and sending them over is cumbersome and time consuming. So I've been thinking of a way to automate the process.

My server config is designed to shut off when everyone disconnects, or every hour if it's empty. A cron job runs every minute, launching a shell script which checks for official game updates & workshop collection updates before relaunching the server. I'm wanting to add functionality to this script so that it can sync server config updates as well.

What would be some ways to auto-sync updates to a game server which I don't have FTP access? Obviously the person I'm renting from would have to be willilng to install the cron job / shell script to their server - so they'd need to feel that it's secure and fully tested.

I've contemplated using rsync (something like this, except pulling (instead of pushing) + no dry run), but there's a few downsides, like needing to rent a vps just for syncing updates, the security issue (multiple server owners having access to that machine), being a hassle for admins to configure, etc.

Ideally I'd have a private github repository that's synced to all the servers.

I'm wondering if anyone's done anything like this before and if so, what method did you use?
dustinandband is offline
DennisF
Junior Member
Join Date: Sep 2019
Old 03-01-2020 , 16:52   Re: sync server config updates without FTP access
Reply With Quote #2

I'm not sure what kind of files you need to have synced but I just use ftp to apply changes to multiple servers at once.
If you are renting a non managed server, even if it's from soneone privately, without ftp access, they are probably not going to provide other options anyways.
DennisF is offline
dustinandband
Senior Member
Join Date: May 2015
Old 03-01-2020 , 19:35   Re: sync server config updates without FTP access
Reply With Quote #3

Quote:
Originally Posted by DennisF View Post
I'm not sure what kind of files you need to have synced but I just use ftp to apply changes to multiple servers at once.
If you are renting a non managed server, even if it's from soneone privately, without ftp access, they are probably not going to provide other options anyways.
FTP isn’t an option. 2 things I’m trying to do:

1) Automate the server config update process so I only have to keep 1 server (or a private github repository) updated and others will automatically sync to it before restarting.

2) find a method of doing that which wouldn’t be a security risk for anyone I privately rent from.

Dedicated server owners wouldn’t want someone having ftp access to their machine, so I’m looking for an alternative (as I explained originally).
dustinandband is offline
DennisF
Junior Member
Join Date: Sep 2019
Old 03-02-2020 , 06:13   Re: sync server config updates without FTP access
Reply With Quote #4

How do you apply changes or upload stuff to the server without ftp access?
DennisF is offline
dustinandband
Senior Member
Join Date: May 2015
Old 03-02-2020 , 10:43   Re: sync server config updates without FTP access
Reply With Quote #5

Quote:
Originally Posted by DennisF View Post
How do you apply changes or upload stuff to the server without ftp access?
The server owner would need to be willing to have a script running that syncs files from a server or private github repository.

Kind of off-topic example is the steam workshop downloader script, which uses steam API to automatically keep any maps within a steam workshop collection up-to-date. Running this script - you don't need FTP access to upload, delete, or update any maps - you just need to edit your workshop collection and the server will sync those updates automatically:
https://github.com/dustinandband/Aut...estart.sh#L180

I'm looking to do something similar, except it's server config files I'm wanting to keep synced.
dustinandband is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 03-03-2020 , 10:48   Re: sync server config updates without FTP access
Reply With Quote #6

Someone's going to have to host the infrastructure you'll sync from eventually.
The pull model's probably the way to go so there's no additional configuration per-server on your end.

I haven't had the need to yet, but if I had to, I'd narrow it down to the following two:
  • A public or private Git repository; clients clone the repository using read-access deploy keys to download the configuration files (please don't use normal git for storing large binary / non-text files)
  • Backblaze B2 / similar web hosting; have a client plugin, external script, or extension that requests a manifest file via HTTP(S) on a known URL then installs all your required files separately
A plugin (plus choice of HTTP client extension) would probably be good enough for most cases.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 03-03-2020 at 10:53.
nosoop is offline
DennisF
Junior Member
Join Date: Sep 2019
Old 03-03-2020 , 14:04   Re: sync server config updates without FTP access
Reply With Quote #7

Doubt that it will be "more secure" than ftp which again can sync and provide read/write only too.
DennisF is offline
dustinandband
Senior Member
Join Date: May 2015
Old 03-09-2020 , 21:17   Re: sync server config updates without FTP access
Reply With Quote #8

Trying to come up with logic for this script. Looks like a lot of work and variables to think of, for example this was a draft for the github logic:

Spoiler


Think I'd rather just put this up for a $100 commission. Probably wouldn't make up for all the R&D but at least getting the script started would be nice. Can post below with (include your paypal email) as long as it's in a working state and syncs additions, deletions, and updates to server config files.

I'm wanting the server config update check to run from the auto-restart.sh script (it can be a separate python / shell script that gets DL'd and called), since that script is already being used for the other two update checks.
dustinandband is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode