Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a docker-compose for installing GenericModules with templates #199

Open
djmulder opened this issue Sep 30, 2024 · 5 comments
Open

Comments

@djmulder
Copy link

djmulder commented Sep 30, 2024

I apologize for the "hacky" way I did this. I could have done a PR for the appropriate files (namely: main.sh and routines.sh) .. but I thought I'd let that up to you guys as I am working through a burnout and can't have the commitment to keep that sort of stuff up to date.

This will allow you to set the amp template you want with the env var: AMP_TEMPLATE. Then it will download that template, download the mandatory config files and ports/update files. Update the template to implement the ports and update files (AMP needs this to be done as it works with some @IncludeJson that it only uses when deploying an instance) and then backups the GenericModule.kvp and symbolic links all the required files. (and sets the appropriate file permissions)

I've tested this with ARK Survival Ascended (as well that's the game I wanted this to work on hehe). Also I'm no linux expert/bash expert so probably a few things that could have been done more efficient. There's a few changes I probably will do myself, so perhaps this isn't even the final of the one I'm uploading now.

docker-compose.yaml.txt

@djmulder
Copy link
Author

Already forked it and added code.. but my Homepc disconnected >.< so can't test

@MitchTalmadge
Copy link
Owner

Wow this is really cool! I will find time to look it over more closely :) Thanks for doing this!

@djmulder
Copy link
Author

djmulder commented Oct 1, 2024

Hmm I tried to do a MR, but steam doesn't want to update it's application.. not sure what goes wrong there.. it does look like it's not related to my code. Weird part is that it returns with an html error 200, which suggests it returns an ok.. so why it's not ok baffles me

I see in the past there were steam issues as well.. but I can't figure out what the fix was. (and why it doesn't work for me)

@djmulder
Copy link
Author

djmulder commented Oct 1, 2024

Yup, not my scripts. It's SteamCMD, long story short: it hates IPv6 and has trouble with a few DNS servers. Disable IPv6 and set DNS to 8.8.8.8 and 8.8.4.4 in resolv.conf and it works.

Re-making merge request

@djmulder djmulder mentioned this issue Oct 1, 2024
@djmulder
Copy link
Author

djmulder commented Oct 4, 2024

Meh I'm trying to do it via the "CreateInstance" command but that's quite a b*tch, pardon my french. Linux doesn't like a lot of key-value pairs in the kvp file. So I tried quoting but that doesn't go flawlessly either.

Reason I'm doing it is that: well it seems to work in the original way I uploaded but the console log isn't working nor is it showing ports opened (even tho I can connect to the server, so it looks like it's just visual). Which suggests there's "some" mojo happening other than just loading template at the CreateInstance. (I looked at the code and I feel it just grabs a few values from the file and puts them in some standard parameters)

But yeh CreateInstance doesn't take a file, it takes all the pairs as "provision settings" and here's where Linux quote parsing messes up a lot of things (regexes, direct variable evaluation... the list goes on quite long)

I might end up writing a plugin that just grabs the file and uses the internal functions directly. I feel that's actually the fastest path here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants