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: 2804
Joined: 23 Feb 2009, 16:29

automatic archives downloading using pr-downloader

Post by Jools » 28 Jan 2015, 01:05

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.
0 x

User avatar
Nemo
Spring 1944 Developer
Posts: 1376
Joined: 30 Jan 2005, 19:44

Re: SPADS AutoHost

Post by Nemo » 28 Jan 2015, 01:12

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.
0 x

User avatar
Jools
XTA Developer
Posts: 2804
Joined: 23 Feb 2009, 16:29

Re: SPADS AutoHost

Post by Jools » 28 Jan 2015, 01:55

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?
0 x

User avatar
Jools
XTA Developer
Posts: 2804
Joined: 23 Feb 2009, 16:29

Re: SPADS AutoHost

Post by Jools » 29 Jan 2015, 15:06

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?
0 x

User avatar
TurBoss
Jauria RTS Developer
Posts: 88
Joined: 27 Jan 2014, 01:04

Re: SPADS AutoHost

Post by TurBoss » 29 Jan 2015, 15:13

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
0 x

User avatar
bibim
Lobby Developer
Posts: 901
Joined: 06 Dec 2007, 11:12

Re: SPADS AutoHost

Post by bibim » 29 Jan 2015, 17:47

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.
0 x

User avatar
Jools
XTA Developer
Posts: 2804
Joined: 23 Feb 2009, 16:29

Re: SPADS AutoHost

Post by Jools » 30 Jan 2015, 00:57

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.
0 x

Post Reply

Return to “SPADS AutoHost”