Use install.sh with Realtime Servers

Hi,

Is there a way to tap into the install.sh mechanism when using the “Realtime” product?

My use case:
There are a few things I want to install on every instance of a fleet. In this case, a log collection service for all the logs in /local/game/logs.

Here’s the initial log when launching the realtime server component:

FLEET_STATE_ACTIVE								Fleet fleet-xyz changed state to ACTIVE
FLEET_STATE_ACTIVATING							Fleet fleet-xyz changed state to ACTIVATING
FLEET_STATE_BUILDING							Fleet fleet-xyz changed state to BUILDING
FLEET_STATE_VALIDATING							Fleet fleet-xyz changed state to VALIDATING
FLEET_CREATION_VALIDATING_RUNTIME_CONFIG		Searching for runtime path.
FLEET_CREATION_RUNNING_INSTALLER				Running installer at /local/game/install.sh
FLEET_CREATION_EXTRACTING_BUILD					Extracting Build.
FLEET_CREATION_EXTRACTING_LIGHTWEIGHT_SERVER	Extracting Lightweight Server.
FLEET_STATE_DOWNLOADING							Fleet fleet-xyz changed state to DOWNLOADING
FLEET_CREATED									Fleet fleet-xyz has been created with state NEW.

As you can see, we had:

  1. FLEET_CREATION_EXTRACTING_LIGHTWEIGHT_SERVER

    • The Realtime server component.
    • Extracted into /local/game/
  2. FLEET_CREATION_EXTRACTING_BUILD

    • The contents of my Script.
    • First run, extracted into /local/game/etag-0
    • Later, calls to RTS_SCRIPT_UPDATED extract the script into /local/game/etag-*
  3. FLEET_CREATION_RUNNING_INSTALLER

    • This will attempt to run /local/game/install.sh
    • In the case of an RT server, this file does not exist.

If it wasn’t for the fact that the initial extraction of the user script was into /local/game/etag-0, I would have been able to package my script with its own install.sh :frowning:

Considering that the RT server still attempts the FLEET_CREATION_RUNNING_INSTALLER step, it would be fantastic and extremely helpful if I could specify an install.sh.

Can we make this possible?

Otherwise, do you have any recommendations on how to customize the instances of a fleet? Can I specify user data scripts somehow? https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html

Thanks!

Unfortunately AFAIK there isn’t a mechanism to extend / use the install.sh for a realtime server.

I’ve pinged someone from the GameLift service team about your request so they can add it into their backlog and may be come up with a workaround for you.

What requirements do you have? What are you trying to do (if you can share details)?

You could potentially modify your log collection service so that on a call to Init(), the service is checked to see if its running and then launched via exec with a suitable mutex like object to prevent multiple execs (may not help depending on your install/permission requirements).

Other options including sending events via an existing AWS service ie Kinesis, CW logs etc where you don’t need to exec a process etc.