narc0tiq / factorio-updater

Factorio update helper for headless servers
MIT License
244 stars 48 forks source link

Support initial installation #33

Open rycuda opened 6 years ago

rycuda commented 6 years ago

Support initial installation of the headless client. This would allow automation of server creation/updating.

narc0tiq commented 6 years ago

Sounds cool, I guess -- this reference page on the wiki might help.

It's all HTML scraping, of course -- there's no API for requesting available Factorio versions. I generally prefer going to https://factorio.com/download-headless myself and copying the URL I'm interested in, then applying it to a wget -O factorio.tar.xz [whatever]. It really barely takes any effort to start a new Factorio server.

rycuda commented 6 years ago

I'm in the process of building myself an ansible playbook to try and keep running a server or two for various friend groups as pain free as possible. Hence wanting the automation for installation. I've thrown together some fairly quick and dirty python to grab the URL for the download of the latest version by scraping the headless page. If you're interested I'll try and polish it to be committable here?

narc0tiq commented 6 years ago

Would be good, if it's not too much trouble. I'm not likely to get to it myself very soon, so I'd certainly appreciate the help.

henriquegemignani commented 6 years ago

The API for downloading Factorio is documented here: https://wiki.factorio.com/Download_API

There's no API for listing versions there (aside from scrapping HTML), but we could get the intended version from arguments, or otherwise use the existing logic for finding the latest version from get-available-versions endpoint.

cwilson21 commented 5 years ago

@narc0tiq Any chance you can provide ability to branch so I can tak this up and maybe get a working install option?

narc0tiq commented 5 years ago

@cwilson21 I'm sorry, I don't understand what I need to do? The Github model is predicated on making your own fork and sending pull requests (which I happily accept). Factorio updater is covered by the MIT license, so that hopefully shouldn't be a limitation.

I'm on the Factorio discord as Narc if you'd like some real-time assistance. I'm also on the factorio IRC (espernet#factorio), if you prefer.

cwilson21 commented 5 years ago

All good, as discussed on discord was just a confusion from my normal workflow in my 9-5. I will work on getting this added into the script may take some time because I do have a normal day job.

Eeems commented 4 years ago

@cwilson21 any progress?

cwilson21 commented 4 years ago

Yes, sorry I have been extremely busy with work so this has been put aside, I am going to start looking more into this and getting it completed.