automatic archives downloading using pr-downloader

automatic archives downloading using pr-downloader

SpringRTS Perl Autohost for Dedicated Server

Moderators: Moderators, Lobby Developers, SPADS AutoHost

Post Reply
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

automatic archives downloading using pr-downloader

Post by Jools »

I wonder how much work would remains to integrate automatic archives downloading to spads. I mean, if the module pr-downloader can be made to work, it's as simple as giving the command:

Code: Select all

pr-downloader --filesystem-writepath=<springDataDir> --downloadgame <rapidtag>
springDataDir is already known by spads.

With this functionality added it would be possible spads to lobbies in the same way as springie is now. With springie, if you want a new host you just issue the command !spawn mod=rapidtag and it opens a new autohost.
User avatar
Nemo
Spring 1944 Developer
Posts: 1376
Joined: 30 Jan 2005, 19:44

Re: SPADS AutoHost

Post by Nemo »

We did this on the S44 SPADS host:

Code: Select all

!s44update
grabs the latest tag for S44 and asks if you want to !rehost with the newer version. It works great for us, because we're awful at cutting releases, but push to the git version frequently.

ThinkSome has the source of the plugin. Yuritch hacked it originally to work via git, TS updated it for rapid and pr-downloader.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: SPADS AutoHost

Post by Jools »

Cool, that's what I was thinking about.

What about testing on development version of engine? pr-downloader can also download that, I guess spads has the config tag for where the engine is located but the unitsync library has to be re-generated I think, so is it possible to just !rehost the autohost from lobby?
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: SPADS AutoHost

Post by Jools »

Nemo wrote: ThinkSome has the source of the plugin. Yuritch hacked it originally to work via git, TS updated it for rapid and pr-downloader.
I now got pr-downloader working.

I have some issues with getting crontab to do its job. How did you manage to get the !s44update command to launch pr-downloader. Can spads launch external programs just like that?
User avatar
TurBoss
Jauria RTS Developer
Posts: 89
Joined: 27 Jan 2014, 01:04

Re: SPADS AutoHost

Post by TurBoss »

Jools wrote: I have some issues with getting crontab to do its job.
put this in the top of $ crontab -e

Code: Select all

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/pathtopr-dowloaderbin
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: SPADS AutoHost

Post by bibim »

Jools wrote:I have some issues with getting crontab to do its job. How did you manage to get the !s44update command to launch pr-downloader. Can spads launch external programs just like that?
You can easily launch any external program from SPADS in an asynchronous way, there is a function in the plugin API done just for that: forkProcess. It will track for you the state of the child process and call you back on completion, giving you the exit code. You can see an example of that in the DownloadArchives plugin, which calls wget to download files and sends messages on download completion/failure.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: SPADS AutoHost

Post by Jools »

bibim wrote: You can easily launch any external program from SPADS in an asynchronous way, there is a function in the plugin API done just for that: forkProcess.
Thanks. I now got it working so that you can spawn a new host also in spads with a command called !spawn hostname. It's already implemented in xta autohosts. The source is integrated with a plugin what kicks you from host if you say the word "semprini" so it may not be suitable on every autohost :)

It works for some predefined hostnames that already are defined on the server. I guess it would be possible to generate one dyncamically too. And also for spawning one with a new engine.
Post Reply

Return to “SPADS AutoHost”