Jump to content


Photo

[Release] Sturmovik Server Control


  • Please log in to reply
26 replies to this topic

#1 coconut

coconut
  • Founder
  • Posts: 2026
  • Location:Sweden

Posted 27 February 2016 - 17:32

I'm announcing a new tool I have just developed to control and monitor DServer through the web.

 

Binaries can be downloaded there: https://bitbucket.or...ntrol/downloads

 

Source code: https://bitbucket.or...rvercontrol/src

 

The interface is pretty simple, as shown on the screenshots below:
 

Attached File  SSC1.PNG   46.3KB   12 downloads

 

This is the admin login page. Enter your secret password (not your ingame password, this one is a different one) and you get access to a number of functions described in the next shots. This step is optional, the site is also usable for regular non-privileged users.

 

Attached File  SSC2.PNG   49.15KB   3 downloads

 

The shot above shows the status page, which displays the status of the server, including its current load. It's not very useful, since DServer typically starts acting up long before the SPS falls below 50, but in the future I'm hoping I can show the tick delay, which is a better figure to show. The enigmatic "Reduce load" button simply triggers a server input MCU in the mission (configurable). It's then up to the mission logic to deactivate non-essential entities. Everybody gets to click that button, but it won't do anything unless you are logged in. Below is the list of players, empty in this case. The page auto-updates every 60 seconds.

 

Attached File  SSC3.PNG   73.13KB   4 downloads

 

Here comes the interesting part. This page is visible to all, but only editable if you are logged in. It allows one to schedule a number of events. It's all pretty self-explanatory, I believe. It may take up to a minute for the server to execute an event whose time has come.

 

The list is saved to disk, meaning if you need to restart the controller (for instance after an upgrade; it should not crash - if it does, you get all your money back ;)), the list will still be there. Note that events that should have executed but were missed will be simply dropped.

 

One last detail before I forget: event times in the GUI are UTC, keep that in mind. The format is year-month-day hour:minute, where year, month and day are optional. If left out, today's values will be used. The button on the right retrieves the current time of the server (UTC), so the easiest is probably to just click that button and edit the field.


Edited by coconut, 27 February 2016 - 17:51.

  • 9

intel core i5 4690K @ 4.2Ghz, nvidia 980ti, Acer predator XB271HU 1440p 144Hz, Oculus Rift. Win10 Home

My missions | My server


#2 ECV56_Moro

ECV56_Moro
  • Founder
  • Posts: 333
  • Location:San Clemente del Tuyu, Buenos Aires

Posted 27 February 2016 - 19:47

tks for tour works

 

Gracias por el trabajo saludos


  • 0

No hay nada deshonroso en el soldado que enciende un pitillo y levanta las manos,

si antes ha peleado bien a la vista de los suyos.

Si antes ha disparado su Ășltimo cartucho.


#3 coconut

coconut
  • Founder
  • Posts: 2026
  • Location:Sweden

Posted 29 February 2016 - 18:09

I've put online a new version 1.0.2.0. Previous versions created temporary files every minute, but did not delete them. Sorry about that, make sure you update to the new version, or your disk will slowly fill up (but it's easily cleaned up by running Windows' disk cleanup tools).


  • 0

intel core i5 4690K @ 4.2Ghz, nvidia 980ti, Acer predator XB271HU 1440p 144Hz, Oculus Rift. Win10 Home

My missions | My server


#4 coconut

coconut
  • Founder
  • Posts: 2026
  • Location:Sweden

Posted 30 April 2016 - 14:39

Version 1.1.0.0 is out.

  • Added support for running multiple instances of DServer (must be from different directories).

  • 1

intel core i5 4690K @ 4.2Ghz, nvidia 980ti, Acer predator XB271HU 1440p 144Hz, Oculus Rift. Win10 Home

My missions | My server


#5 TunaEatsLion

TunaEatsLion
  • Founder
  • Posts: 1355

Posted 30 April 2016 - 20:12

Worth every penny.
  • 1

#6 coconut

coconut
  • Founder
  • Posts: 2026
  • Location:Sweden

Posted 30 April 2016 - 21:48

Thanks!


  • 0

intel core i5 4690K @ 4.2Ghz, nvidia 980ti, Acer predator XB271HU 1440p 144Hz, Oculus Rift. Win10 Home

My missions | My server


#7 MF-Belgarufo

MF-Belgarufo
  • Member
  • Posts: 22
  • Location:Pittsburgh Pennsylvania

Posted 01 May 2016 - 21:59

Ok got it up and running!

 

Will keep you posted on my usage...  This looks like a great tool.  

 

This may be wishful thinking on my part, but is there a way to parse the mission that is running and have it return the names of all the server inputs in the mission?  Then maybe have them displayed as an array of buttons that can be clicked?  Would need to have deactivate loops back to the server input MCU in mission, so it is not triggered more than once (unless on a timer)  Just a thought.  Stuff like this gets me all excited but I unfortunately have not the skills to write programs...  I know you were working with these server inputs so I thought I'd see what you thought.

 

Attached File  Untitled.jpg   58.53KB   0 downloads


Edited by MF-Belgarufo, 01 May 2016 - 22:01.

  • 0

#8 MF-Belgarufo

MF-Belgarufo
  • Member
  • Posts: 22
  • Location:Pittsburgh Pennsylvania

Posted 01 May 2016 - 22:12

just scheduled a chat string and had it execute flawlessly.

 

So far so good!

 

Would be nice to get a return on chats, instead of having to split the log and open it everytime I want to see if my message got through, and if there is any response. Maybe something that splits the log once a minute and displays the chat as a continuous string. I like very much to be able to chat to players in game without having to be ingame, especially when I have the ME open. 

 

 

 


ooo ooo I know! how about a timer for scheduling chat string at regular intervals?  This is easily done in the ME, but not as easy to add to and modify translators across ALL my missions after the missions have been written, where as a timed chat string would work perfectly. Heck you've got nearly everything in place to do it.  


Edited by MF-Belgarufo, 01 May 2016 - 22:14.

  • 0

#9 coconut

coconut
  • Founder
  • Posts: 2026
  • Location:Sweden

Posted 01 May 2016 - 22:28

Repeating schedule tasks have been on my mind for a while, I'll add them at some point. Same thing about the button array for the inputs. I need to plug in talek's log parser first, to know what is the mission currently running.


  • 0

intel core i5 4690K @ 4.2Ghz, nvidia 980ti, Acer predator XB271HU 1440p 144Hz, Oculus Rift. Win10 Home

My missions | My server


#10 DeadMeat0383

DeadMeat0383
  • Member
  • Posts: 55

Posted 07 September 2017 - 08:27

I am trying to get this up and running however ive run into an issue where it seems to ignore the config file, is there anything I need to do for it read the config.json?


  • 0

Ryzen 7 1700 @3.8GHz, 16GB RAM @2933MHz, GTX 1080ti, Thrustmaster Warthog Hotas, Saitek Combat flight pedals.


#11 coconut

coconut
  • Founder
  • Posts: 2026
  • Location:Sweden

Posted 07 September 2017 - 16:54

Probably a syntax error in the file somewhere. Normally an error message should be printed out, but maybe it's lost. I would recommend opening a cmd window and launching the program from there, rather than double-clicking on the exe.

 

In any case I see it's not a good idea to just run on the default config when the config file cannot be read. That's just weird. I'll change it so that it makes clear what the problem is. I'll make a new build and publish that. Since the last release I've changed the syntax to yaml, which should be a bit more user-friendly. Json is known to trick humans by making it easy to forget commas.


  • 0

intel core i5 4690K @ 4.2Ghz, nvidia 980ti, Acer predator XB271HU 1440p 144Hz, Oculus Rift. Win10 Home

My missions | My server


#12 TP_Jacko

TP_Jacko
  • Founder
  • Posts: 725
  • Location:Netherlands then UK most weekends

Posted 07 September 2017 - 18:48

Any chance this can be used to run the next mission based on a win or loose result. I am dreaming of a moving war server
  • 0

#13 coconut

coconut
  • Founder
  • Posts: 2026
  • Location:Sweden

Posted 07 September 2017 - 19:36

I have just published version 1.4. I should be better able to give support for this version rather than the older one from one+ year ago.

 

https://bitbucket.or...rol-1.4.0.0.zip

 

Any chance this can be used to run the next mission based on a win or loose result. I am dreaming of a moving war server

 

Yes, I actually use this to control my dynamic campaign, however the campaign system itself is not available to the public. The campaign system is implemented as a plugin, and you could build your own plugin instead. But I guess that the reason you are asking this question is because you do not want to do that yourself.

 

To give you an idea, this is roughly what I do:

  • 5 minutes before the mission end, the plugin extracts mission results from the mission log
  • It builds a new mission based on those results
  • It calls resaver.exe to generate an msnbin file
  • The msnbin file is overwritten over the old one
  • The plugin sends a server input to DServer.exe, which in the mission is linked to an EndMission MCU

If you have a fixed set of missions, you can skip the resaver.exe step, and the next mission "generation" is trivial, simply pick the mission files from your collection.

 

For the technically minded people, these are the interface types:

namespace CampaignServerControl.Api

open System

/// An async computation that is scheduled at a specific time and
/// returns a list of following scheduled async computations.
type ScheduledTask =
    | SomeTask of DateTime * Async<ScheduledTask> * string
    | NoTask
with
    static member SomeTaskNow description t =
        SomeTask(
            DateTime.UtcNow,
            async {
                let! res = t
                return res
            },
            description
        )

/// Append messages to the server controller log.
/// Implemented by the server controller.
type LoggingApi =
    abstract LogError : string -> unit
    abstract LogInfo : string -> unit

/// Identify a player uniquely.
/// Implemented by the server controller.
type PlayerId =
    abstract GetName : unit -> string

/// Identify a team (axis, allies) uniquely.
/// Implemented by the server controller.
type TeamId =
    abstract GetName : unit -> string

/// Interaction with the game server.
/// Implemented by the server controller.
type ServerControlApi =
    abstract SkipMission : Async<unit>
    abstract GetPlayerList : Async<PlayerId list>
    abstract GetAxisTeam : unit -> TeamId
    abstract GetAlliesTeam : unit -> TeamId
    abstract MessagePlayer : PlayerId * string list -> Async<unit>
    abstract MessageTeam : TeamId * string list -> Async<unit>
    abstract MessageAll : string list -> Async<unit>

type SupportApis =
    { Logging : LoggingApi
      ServerControl : ServerControlApi
    }

/// Interface between SturmovikServerControl and the campaign system.
/// Implemented by the campaign system.
type CampaignServerApi =
    /// Called by the server controller to provide the logging and server control APIs
    abstract Init : SupportApis -> unit
    /// Start or resume the campaign system, and return the next scheduled updates
    abstract StartOrResume : config:string -> Choice<ScheduledTask, string>
    /// Reset campaign state and then start the camapign
    abstract Reset : config:string -> Choice<ScheduledTask, string>

Most interfaces are implemented by Sturmovik Server Control, only the last one CampaignServerApi is implemented by the plugin.


Edited by coconut, 08 September 2017 - 16:47.

  • 0

intel core i5 4690K @ 4.2Ghz, nvidia 980ti, Acer predator XB271HU 1440p 144Hz, Oculus Rift. Win10 Home

My missions | My server


#14 coconut

coconut
  • Founder
  • Posts: 2026
  • Location:Sweden

Posted 08 September 2017 - 16:47

Minor update: https://bitbucket.or...rol-1.4.2.0.zip

 

The gremlins I mentioned in an earlier post were solely on my PCs, not in the software. Do not allow binding to http://+:1234/ (or some other port number), that seems to confuse the web server.

To remove it, execute as admin in a cmd window:

 

netsh http remove urlacl url=http://+:1234/


Edited by coconut, 08 September 2017 - 17:16.

  • 0

intel core i5 4690K @ 4.2Ghz, nvidia 980ti, Acer predator XB271HU 1440p 144Hz, Oculus Rift. Win10 Home

My missions | My server


#15 DeadMeat0383

DeadMeat0383
  • Member
  • Posts: 55

Posted 08 September 2017 - 18:02

I am trying to start the new version and when I set the config to the following it just says "E main: ControllerUrls cannot be empty":

 

Server:
  AdminPassword: PasswordHere
  ControllerUrl: http://localhost:8083/
  Instances:
    - Name: Primary
      Description: No description yet.
      ServerHostname: localhost
      ServerPort: 8991
      Login: LoginHere
      Password: PasswordHere
      OffLoadServerInput: ReqKill
      GameDirectory: C:\IL2
      LogDirectory: 
      CompactedLogDirectory: 
      ProcessedLogDirectory: 

  • 0

Ryzen 7 1700 @3.8GHz, 16GB RAM @2933MHz, GTX 1080ti, Thrustmaster Warthog Hotas, Saitek Combat flight pedals.


#16 coconut

coconut
  • Founder
  • Posts: 2026
  • Location:Sweden

Posted 08 September 2017 - 18:07

Change

 

ControllerUrl: http://localhost:8083/

 

to

 

ControllerUrls: ["http://localhost:8083/"]


  • 0

intel core i5 4690K @ 4.2Ghz, nvidia 980ti, Acer predator XB271HU 1440p 144Hz, Oculus Rift. Win10 Home

My missions | My server


#17 DeadMeat0383

DeadMeat0383
  • Member
  • Posts: 55

Posted 08 September 2017 - 18:22

Ok that worked thanks, I am getting the message "Failed to load symbols: C:\pathtolocation\ploggy.pdb" is that something I should be concerned about?

 

Also which Url should I be setting it to so I can access it externally? The internal IP, the external ip/url, localhost?


  • 0

Ryzen 7 1700 @3.8GHz, 16GB RAM @2933MHz, GTX 1080ti, Thrustmaster Warthog Hotas, Saitek Combat flight pedals.


#18 TP_Jacko

TP_Jacko
  • Founder
  • Posts: 725
  • Location:Netherlands then UK most weekends

Posted 08 September 2017 - 18:41

Coconut. Thanks for the reply my skills are quite limited :))
  • 0

#19 coconut

coconut
  • Founder
  • Posts: 2026
  • Location:Sweden

Posted 08 September 2017 - 19:21

Ok that worked thanks, I am getting the message "Failed to load symbols: C:\pathtolocation\ploggy.pdb" is that something I should be concerned about?

 

Also which Url should I be setting it to so I can access it externally? The internal IP, the external ip/url, localhost?

 

The message is harmless. Try with the internal IP.


  • 0

intel core i5 4690K @ 4.2Ghz, nvidia 980ti, Acer predator XB271HU 1440p 144Hz, Oculus Rift. Win10 Home

My missions | My server


#20 DeadMeat0383

DeadMeat0383
  • Member
  • Posts: 55

Posted 09 September 2017 - 07:24

The message is harmless. Try with the internal IP.

Yep internal IP is working, should come in usefulness for managing the server while im at work :P


  • 0

Ryzen 7 1700 @3.8GHz, 16GB RAM @2933MHz, GTX 1080ti, Thrustmaster Warthog Hotas, Saitek Combat flight pedals.


#21 DeadMeat0383

DeadMeat0383
  • Member
  • Posts: 55

Posted 11 September 2017 - 06:22

Been trying to make this software work externally to my network and have failed. Looks like it doesnt play nicely with NAT, is there any way to get it to repond on a network interface in general instead of a specific IP? it would make NAT much easier to set up.


  • 0

Ryzen 7 1700 @3.8GHz, 16GB RAM @2933MHz, GTX 1080ti, Thrustmaster Warthog Hotas, Saitek Combat flight pedals.


#22 coconut

coconut
  • Founder
  • Posts: 2026
  • Location:Sweden

Posted 11 September 2017 - 07:12

It works with NAT, I'm using it that way. But you have to configure the windows firewall properly and that can be tricky. The way I did it was to open a tcp port. Check also if edge traversal is allowed in the advanced properties. Do not try to open the firewall for the EXE file, that doesn't work for unknown reasons.
  • 0

intel core i5 4690K @ 4.2Ghz, nvidia 980ti, Acer predator XB271HU 1440p 144Hz, Oculus Rift. Win10 Home

My missions | My server


#23 DeadMeat0383

DeadMeat0383
  • Member
  • Posts: 55

Posted 14 September 2017 - 01:18

Any progress on the tick delay?

I finally worked out why I wasnt able to access it remotely, turns out I was using the wrong DNS name... I had a typo in my link /facepalm


  • 0

Ryzen 7 1700 @3.8GHz, 16GB RAM @2933MHz, GTX 1080ti, Thrustmaster Warthog Hotas, Saitek Combat flight pedals.


#24 coconut

coconut
  • Founder
  • Posts: 2026
  • Location:Sweden

Posted 16 September 2017 - 13:40

Any progress on the tick delay?

What do you mean?


  • 0

intel core i5 4690K @ 4.2Ghz, nvidia 980ti, Acer predator XB271HU 1440p 144Hz, Oculus Rift. Win10 Home

My missions | My server


#25 DeadMeat0383

DeadMeat0383
  • Member
  • Posts: 55

Posted 16 September 2017 - 14:10

The shot above shows the status page, which displays the status of the server, including its current load. It's not very useful, since DServer typically starts acting up long before the SPS falls below 50, but in the future I'm hoping I can show the tick delay, which is a better figure to show. The enigmatic "Reduce load" button simply triggers a server input MCU in the mission (configurable). It's then up to the mission logic to deactivate non-essential entities. Everybody gets to click that button, but it won't do anything unless you are logged in. Below is the list of players, empty in this case. The page auto-updates every 60 seconds.

As noted above, you were hoping to be able to display the tick delay on the page.


  • 0

Ryzen 7 1700 @3.8GHz, 16GB RAM @2933MHz, GTX 1080ti, Thrustmaster Warthog Hotas, Saitek Combat flight pedals.


#26 coconut

coconut
  • Founder
  • Posts: 2026
  • Location:Sweden

Posted 16 September 2017 - 14:16

I see. I had asked in the questions to devs if they could add a command to show the tick delay, instead of the SPS. Han answered positively, but that hasn't been implemented AFAIK. They probably forgot. I suppose I could use the CPU usage by the DServer process instead.


  • 0

intel core i5 4690K @ 4.2Ghz, nvidia 980ti, Acer predator XB271HU 1440p 144Hz, Oculus Rift. Win10 Home

My missions | My server


#27 coconut

coconut
  • Founder
  • Posts: 2026
  • Location:Sweden

Posted 05 December 2017 - 22:03

Version 1.5.0.0 released: https://bitbucket.or...rol-1.5.0.0.zip

  • Admin password now securely stored
  • More responsive Schedule page, no longer frozen while controller performs scheduled actions

  • 0

intel core i5 4690K @ 4.2Ghz, nvidia 980ti, Acer predator XB271HU 1440p 144Hz, Oculus Rift. Win10 Home

My missions | My server





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users