Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unreal Engine Horde Module #330

Merged
merged 14 commits into from
Oct 1, 2024
Merged

Unreal Engine Horde Module #330

merged 14 commits into from
Oct 1, 2024

Conversation

henrykie
Copy link
Contributor

Issue number:
Closes #11
Addresses #326

Summary

First version of the Unreal Engine Horde module.

This module provisions the following resources:

  • Unreal Engine Horde service on Elastic Container Service powered by AWS Fargate
  • Amazon Elasticache with Redis OSS cluster for Horde server
  • Amazon DocumentDB cluster for Horde server
  • Configurable autoscaling groups to be registered as Horde agents
  • SSM Command Document and Ansible playbook for configuring Ubuntu + AL2023 machines as Horde agents
  • Security groups, IAM roles, various supporting resources

Changes

Net new module.

Please provide a summary of what's being changed

This version provides an easy deployment path for the Unreal Engine Horde CI/CD system on AWS. It can be used to configure the Horde server and N autoscaling groups of agents.

User experience

Please share what the user experience looks like before and after this change

Horde server deployment now available.

Checklist

If your change doesn't seem to apply, please leave them unchecked.

  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented
Is this a breaking change?

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created might not be successful.

@henrykie henrykie added unreal engine terraform Pull requests that update Terraform code labels Sep 29, 2024
@henrykie henrykie linked an issue Sep 29, 2024 that may be closed by this pull request
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checkov found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Copy link
Contributor

@jorisdon jorisdon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great already! Left a few small comments on things to improve.

samples/horde-perforce/security.tf Outdated Show resolved Hide resolved
samples/horde-perforce/main.tf Outdated Show resolved Hide resolved
samples/horde-perforce/main.tf Outdated Show resolved Hide resolved
device_name = block_device_mappings.value.device_name
ebs {
volume_size = block_device_mappings.value.ebs.volume_size
volume_type = "gp2"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considered gp3?

Comment on lines +18 to +21
- name: Install DotNet
ansible.builtin.package:
name: dotnet-runtime-6.0
state: present
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that this will default to using a DPkg Lock Timeout of 60. In our Packer scripts, we always manually set a timeout of 180, because this lock has been known to be held by other software (e.g. automated patching solutions). It's been a while since I've used Ansible, but I think it may be useful to try setting the same timeout here as well to get a better experience that's less likely to occasionally fail. See these docs from the apt module.

]
healthCheck = {
command = [
"CMD-SHELL", "apt update && apt install curl -y && curl http://localhost:${var.container_api_port}/health/ok || exit 1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bad idea to run apt automatically, as it'll cause potentially unwanted or unexpected side-effects. Also, if really needed, run it using apt-get -o DPkg::Lock::Timeout=180 update -y and apt-get -o DPkg::Lock::Timeout=180 install -y (don't use apt as it does not have a stable CLI).

modules/unreal/horde/variables.tf Show resolved Hide resolved
modules/unreal/horde/variables.tf Show resolved Hide resolved
modules/unreal/horde/variables.tf Show resolved Hide resolved
modules/unreal/horde/docdb.tf Show resolved Hide resolved
@henrykie henrykie force-pushed the henrykie/ue-horde branch 2 times, most recently from c8c483f to 0adcd27 Compare October 1, 2024 00:36
henrykie and others added 13 commits September 30, 2024 17:48
…onfiguration

Provisions Unreal Engine Horde CI/CD service on AWS Fargate backed by DocumentDB and Elasticache Redis.
Provides variables for configuring OIDC on Horde directly from Terraform.
…l Horde service

Provisions a simple VPC and the Unreal Engine Horde module on AWS.
Provide an AMI, instance type, and minimum / maximum sizes for ASGs through the module.
Currently only supports Amazon Linux automated agent enrollment with SSM State Manager.
Provisions Helix Core, Helix Swarm, Helix Authentication Service.
Deploys Unreal Horde with Linux based agents that are configured on start.

Some configuration still required to Helix workloads.
…p. Minor changes to ansible playbook step names
@kylesomers kylesomers self-requested a review October 1, 2024 01:26
@kylesomers kylesomers marked this pull request as ready for review October 1, 2024 01:27
@kylesomers kylesomers requested a review from a team as a code owner October 1, 2024 01:27
@kylesomers kylesomers requested a review from gabebatista October 1, 2024 01:27
@kylesomers kylesomers merged commit 55895bf into main Oct 1, 2024
7 checks passed
@kylesomers kylesomers deleted the henrykie/ue-horde branch October 1, 2024 01:30
jcwolfaws pushed a commit to jcwolfaws/cloud-game-development-toolkit that referenced this pull request Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
terraform Pull requests that update Terraform code unreal engine unreal-horde
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Unreal Engine Horde
3 participants