Skip to content

Specify additional command line parameters for Gamelift Container Fleet

0

When creating a Gamelift Fleet using aws gamelift create-fleet, we have the option of specifying server processes and their launch parameters.

We want to try out the Container Fleets, and we don't see a similar option. In our case, different fleets use the same binaries and content (i.e., they would share the same Gamelift Build or Gamelift Container Group), and we change which type of server is run based off of server parameters.

However, I can't seem to find a way to specify any additional launch parameters / process parameters. aws gamelift create-container-fleet doesn't seem to have a matching option.

asked 10 months ago153 views
2 Answers
0

Container fleets do not have a launch parameter. You just have an entry point of the container group definition and it just runs that. Using multiple container fleets with different game server containers could be an option. How do you decide what parameters to pass? There's GameSessionData if that looks interesting to you - https://docs.aws.amazon.com/gameliftservers/latest/apireference/API_GameSession.html.

AWS
answered 10 months ago
  • We have a defined set of "server types". Each of them uses the same packaged game and server binaries, because the server binaries are relatively small and quick to load.

    Using "standard" fleets, our flow looked something like this:

    • Promote a build internally
    • Upload this build to AWS Gamelift.
    • Create new a new fleet for each of our defined server types.
      • All fleets use the Build ID of the promoted build.
      • We add in custom command lines depending on the server type.

    At least according to the documentation for "create-container-group-definition", it doesn't seem like you can actually specify the entry point. It seems like we'd actually need to upload different Build Images to ECR that had the ENTRYPOINT set in the dockerfile directly. If you can set the entrypoint separately, then that would also solve our issue.

    https://docs.aws.amazon.com/cli/latest/reference/gamelift/create-container-group-definition.html

    What would be nice is if the Container Fleets worked the same way. E.G.

    • Promote a build internally
    • Upload the build image to ECR
    • Create a Container Group Definition
    • Create the fleets with different entrypoints.

    We could create mappings from fleet to settings and then at server process startup change maps, configurations, etc. However, with the flow of just passing things via the commandline, it allows us to make command line tweaks and update a fleet, rather than having to create and upload a new build each time (which is very time consuming).

  • If you want to keep all the builds in the same ECR Image, you could try using environment overrides to point the dockerfile to the correct entrypoint. It would still require a new container group definition for each server type. https://docs.aws.amazon.com/gameliftservers/latest/apireference/API_GameServerContainerDefinitionInput.html#gameliftservers-Type-GameServerContainerDefinitionInput-EnvironmentOverride

-1

When working with Amazon GameLift container fleets, the approach to specifying server parameters differs from traditional GameLift fleets.

For container fleets, you don't specify server process parameters directly in the create-container-fleet command. Instead, these parameters are defined in the container group definition that you reference when creating the fleet.

The container group definition includes details about your containers, including the launch parameters for your game server processes. You would define these parameters when creating or updating your container group definition, and then reference this definition when creating your container fleet.

For example, when updating a container fleet, you would reference a specific container group definition that contains your desired configuration:

aws gamelift update-container-fleet \
--fleet-id "your-fleet-id" \
--game-server-container-group-definition-name "arn:aws:gamelift:region:account:containergroupdefinition/YourContainerGroup:version"

The container group definition would contain all the necessary configuration for your game server processes, including any parameters they need to run.

If you need to run different types of servers using the same binaries but with different parameters, you would need to create different container group definitions that specify these different parameters, and then create separate container fleets referencing each definition.

This differs from traditional GameLift fleets where you can specify server process parameters directly in the create-fleet command using the --runtime-configuration parameter.
Sources
Update an Amazon GameLift Servers managed container fleet - Amazon GameLift Servers
Amazon GameLift Servers examples using AWS CLI - AWS SDK Code Examples

answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.