Skip to content

Commit

Permalink
Unreal Engine Horde Module (#330)
Browse files Browse the repository at this point in the history
Co-authored-by: Joris van de Donk <[email protected]>
  • Loading branch information
henrykie and jorisdon authored Oct 1, 2024
1 parent 28fdb7a commit 55895bf
Show file tree
Hide file tree
Showing 30 changed files with 2,510 additions and 4 deletions.
146 changes: 146 additions & 0 deletions docs/media/diagrams/unreal-engine-horde-architecture.drawio

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions docs/modules/unreal/horde/examples/complete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Unreal Engine Horde Complete Example

This example provisions [Unreal Engine Horde](https://github.com/EpicGames/UnrealEngine/tree/5.4/Engine/Source/Programs/Horde).

## Variables

This example takes a two input variables:`root_domain_name` and `github_credentials_secret_arn`.

### `root_domain_name`

The `root_domain_name` is expected to correspond to an existing [AWS Route53 hosted zone](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/route-53-concepts.html#route-53-concepts-hosted-zone). This hosted zone is used for provisioning DNS records used for external and internal routing, and enables this example to create validated SSL certificates on your behalf.

If you do not have a domain yet you can [register one through Route53](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-register.html#domain-register-procedure-section).

If you already have a domain with a different domain registrar you can leverage Route53 for DNS services. [Please review the documentation for migrating to Route53 as your DNS provider.](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/MigratingDNS.html)

If you own the domain: "example.com" this example will deploy Helix Core to "core.helix.example.com" and Helix Swarm to "swarm.helix.example.com" - this can be modified from the `dns.tf` file.

### `github_credentials_secret_arn`

Unreal Engine Horde is only available through the Epic Games Github organization's package registry or the Unreal Engine source code. In order to get access to this software you will need to [join the Epic Games organization](https://github.com/EpicGames/Signup) on Github and accept the Unreal Engine EULA.

The `github_credentials_secret_arn` corresponds to a secret stored in AWS Secrets Manager. The Unreal Engine Horde module uses the Github credentials stored in this secret to pull the Horde container from the Epic Games Github organization. We recommend using a Github Personal Access Token in place of your password. This PAT will need `read:packages` permissions. Please consult the AWS documentation on [Using non-AWS container images in Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/private-auth.html) for more information.

This command shows how to create the secret from the AWS CLI:

```bash
aws secretsmanager create-secret \
--name HordeGithubCredentials \
--description "Github credentials for fetching the Unreal Engine Horde container." \
--secret-string "{\"username\":\"<YOUR GITHUB USERNAME>\",\"password\":\"<YOUR PERSONAL ACCESS TOKEN>\"}"
```

## Deployment

This example provisions the Unreal Engine Horde module into a new VPC. It also manages DNS with Amazon Route53 and provisions an autoscaling group of Ubuntu EC2 instances that will register with the Horde server as agents on startup. These machines come prepackaged with Wine to support Windows compilation.

To deploy this example please initialize the project with `terraform init`. Deployment is then as simple as `terraform apply`.
2 changes: 2 additions & 0 deletions docs/modules/unreal/horde/terraform-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Terraform Module Docs
--8<-- "modules/unreal/horde/README.md"
13 changes: 13 additions & 0 deletions docs/modules/unreal/horde/unreal-engine-horde.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Unreal Engine Horde

[Jump to Terraform docs](./terraform-docs.md){ .md-button .md-button--primary }

[Unreal Engine Horde](https://github.com/EpicGames/UnrealEngine/tree/5.4/Engine/Source/Programs/Horde) is a set of services supporting workflows Epic uses to develop Fortnite, Unreal Engine, and other titles. This module deploys the Unreal Engine Horde server on AWS Elastic Container Service using the [image available from the Epic Games Github organization.](https://github.com/orgs/EpicGames/packages/container/package/horde-server)

Unreal Engine Horde relies on a Redis cache and a MongoDB compatible database. This module provides these services by provisioning an [Amazon Elasticache with Redis OSS Compatibility](https://aws.amazon.com/elasticache/redis/) cluster and an [Amazon DocumentDB](https://aws.amazon.com/documentdb/) cluster.

## Deployment Architecture
![Unreal Engine Horde Module Architecture](../../../media/images/unreal-engine-horde-architecture.png)

## Prerequisites
Unreal Engine Horde is only available through the Epic Games Github organization's package registry or the Unreal Engine source code. In order to get access to this software you will need to [join the Epic Games organization](https://github.com/EpicGames/Signup) on Github and accept the Unreal Engine EULA.
6 changes: 5 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ nav:
- Installation and Usage: modules/perforce/helix-swarm/helix-swarm.md
- Module Docs: modules/perforce/helix-swarm/terraform-docs.md
- Examples: modules/perforce/examples/complete.md
- Unreal Engine:
- Unreal Engine Horde:
- Installation and Usage: modules/unreal/horde/unreal-engine-horde.md
- Module Docs: modules/unreal/horde/terraform-docs.md
- Examples: modules/unreal/horde/examples/complete.md
- Samples:
- Overview: samples/index.md
- Simple Build Pipeline: samples/simple-build-pipeline.md
Expand Down Expand Up @@ -148,5 +153,4 @@ extra_css:
- stylesheets/themes.css
- stylesheets/hero.css


copyright: Copyright &copy; 2024 Amazon Web Services
2 changes: 1 addition & 1 deletion modules/perforce/helix-authentication-service/local.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ locals {
name_prefix = "${var.project_prefix}-${var.name}"

tags = merge(var.tags, {
"ENVIRONMENT" = var.environment
"environment" = var.environment
})
}
2 changes: 1 addition & 1 deletion modules/perforce/helix-core/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ locals {
helix_core_az = data.aws_subnet.instance_subnet.availability_zone
tags = merge(
{
"ENVIRONMENT" = var.environment
"environment" = var.environment
},
var.tags,
)
Expand Down
2 changes: 1 addition & 1 deletion modules/perforce/helix-swarm/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ locals {
helix_swarm_data_volume_name = "helix-swarm-data"

tags = merge(var.tags, {
"ENVIRONMENT" = var.environment
"environment" = var.environment
})
}
Loading

0 comments on commit 55895bf

Please sign in to comment.