Skip to content

Commit

Permalink
chore: Updates to docs (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylesomers authored Jun 10, 2024
1 parent 3d170b1 commit da68a50
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 49 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
name: Update Changelog

on:
schedule:
- cron: '0 0 * * *' # This will run the action every day at midnight

workflow_dispatch: # If we need to run the action manually
jobs:
update-changelog:
if: github.repository == 'aws-games/cloud-game-development-toolkit'
# Force Github action to run only a single job at a time (based on the group name)
# This is to prevent race-condition and inconsistencies with changelog push
concurrency:
group: changelog-build
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
go-version: 1.16

- name: Install git-chglog
run: go get -u github.com/git-chglog/git-chglog

fetch-depth: 0
- name: Update Changelog
run: git-chglog -o CHANGELOG.md

run: docker run --rm -v $(pwd):/workdir quay.io/git-chglog/git-chglog -o CHANGELOG.md
- name: Create Pull Request
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -34,4 +29,4 @@ jobs:
git commit -m "Update Changelog"
git push origin changelog-update
echo $GH_TOKEN | gh auth login --with-token
gh pr create --title "Update Changelog" --body "This is an auto-generated PR to update the changelog." --base main --head changelog-update --repo ${{ github.repository }} --confirm
gh pr create --title chore: update changelog" --body "This is an auto-generated PR to update the changelog." --base main --head changelog-update --repo ${{ github.repository }} --confirm
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ docs-deploy: ## Build and deploy the docs using 'mike'. Example: `make docs-depl
--build-arg GIT_USER_EMAIL="$(GIT_USER_EMAIL)" \
--build-arg GITHUB_ACTIONS=$(GITHUB_ACTIONS) \
--no-cache
docker run -t docs:$(VERSION) mike set-default $(VERSION)
docker run -t docs:$(VERSION) mike deploy --push --update-aliases $(VERSION) ${ALIAS}


Expand All @@ -57,11 +58,4 @@ docs-local-docker: ## Build and run the docs locally using docker and 'serve'. E
.PHONY: help
help: ## Display this help
@echo -e "Usage: make [TARGET]\n"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "${CYAN}%-30s${RESET} %s\n", $$1, $$2}'

.PHONY: changelog
changelog: ## Generate CHANGELOG.md file
git fetch --tags origin
CURRENT_VERSION=$(shell git describe --abbrev=0 --tag) ;\
echo "[+] Pre-generating CHANGELOG for tag: $$CURRENT_VERSION" ;\
docker run -v "${PWD}":/workdir quay.io/git-chglog/git-chglog:latest > CHANGELOG.md
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "${CYAN}%-30s${RESET} %s\n", $$1, $$2}'
6 changes: 2 additions & 4 deletions assets/packer/build-agents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ Packer templates to create machine images for Unreal Engine build agents.
| **Unreal Engine Build Agent (Linux)** | Packer templates for building Unreal Engine on Linux, with support for x86 and ARM (i.e. Graviton). | Packer Template | [Docs](#unreal-engine-build-agent-linux)
| **Unreal Engine Build Agent (Windows)** | Packer templates for building Unreal Engine on Windows | Packer Template | [Docs](#unreal-engine-build-agent-windows)


#### Unreal Engine Build Agent (Linux)

Documentation for UE Build Agents for Linux
<!-- Linux Build Agents README #packer-templates-for-linux-build-agents -->
--8<-- "assets/packer/build-agents/linux/README.md"

#### Unreal Engine Build Agent (Windows)

Expand Down
38 changes: 18 additions & 20 deletions assets/packer/build-agents/linux/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
# Packer templates for Linux build agants
#### Packer templates for Unreal Engine Linux build agents

This folder contains [Packer](https://www.packer.io/) templates for Linux build agents. You can use these templates as-is, or modify them to suit your needs.
The following templates provide Unreal Engine Linux build agents:

The following templates are currently supported:
|Operating sytem | CPU architecture | file location |
|---|---|---|
|Ubuntu Jammy 22.04 | x86_64 (a.k.a. amd64) | `x86_64/ubuntu-jammy-22.04-amd64-server.pkr.hcl` |
|Ubuntu Jammy 22.04 | aarch64 (a.k.a. arm64) | `aarch64/ubuntu-jammy-22.04-arm64-server.pkr.hcl` |
|Amazon Linux 2023 | x86_64 (a.k.a. amd64) | `x86_64/amazon-linux-2023-x86_64.pkr.hcl` |
|Amazon Linux 2023 | aarch64 (a.k.a. arm64) | `aarch64/amazon-linux-2023-arm64.pkr.hcl` |
| Operating system | CPU architecture | file location
|-|-|-|
|Ubuntu Jammy 22.04 | x86_64 (a.k.a. amd64) | [`x86_64/ubuntu-jammy-22.04-amd64-server.pkr.hcl`](https://github.com/aws-games/cloud-game-development-toolkit/blob/main/assets/packer/build-agents/linux/x86_64/ubuntu-jammy-22.04-amd64-server.pkr.hcl)
|Ubuntu Jammy 22.04 | aarch64 (a.k.a. arm64) | [`aarch64/ubuntu-jammy-22.04-arm64-server.pkr.hcl`](https://github.com/aws-games/cloud-game-development-toolkit/blob/main/assets/packer/build-agents/linux/aarch64/ubuntu-jammy-22.04-arm64-server.pkr.hcl)
|Amazon Linux 2023 | x86_64 (a.k.a. amd64) | [`x86_64/amazon-linux-2023-x86_64.pkr.hcl`]((https://github.com/aws-games/cloud-game-development-toolkit/blob/main/assets/packer/build-agents/linux/x86_64/amazon-linux-2023-x86_64.pkr.hcl) )
|Amazon Linux 2023 | aarch64 (a.k.a. arm64) | [`aarch64/amazon-linux-2023-arm64.pkr.hcl`](https://github.com/aws-games/cloud-game-development-toolkit/blob/main/assets/packer/build-agents/linux/aarch64/amazon-linux-2023-arm64.pkr.hcl)

## Usage
##### Usage

1. Make a copy of `example.pkrvars.hcl` and adjust the input variables as needed
2. Ensure you have active AWS credentials
3. Invoke `packer build --var-file=<your .pkrvars.hcl file> <path to .pkr.hcl file>`, then wait for the build to complete.

## Software packages included
##### Software packages included

The templates install various software packages:

### common tools
**common tools**

Some common tools are installed to enable installing other software, performing maintenance tasks, and compile some C++ software:

Expand All @@ -41,11 +40,11 @@ Some common tools are installed to enable installing other software, performing
* Development libraries for compiling the [Amazon GameLift Server SDK for C++](https://aws.amazon.com/gamelift/)
* Development libraries for compiling the Godot 4 game engine (if available in the OS's package manager)

### mold
**mold**

The '[mold](https://github.com/rui314/mold)' linker is installed to enable faster linking.

### FSx automounter service
**FSx automounter service**

The FSx automounter systemd service is a service written in Python that automatically mounts FSx for OpenZFS volumes on instance bootup. The service uses resource tags on FSx volumes to determine if and where to mount volumes on.

Expand All @@ -57,29 +56,28 @@ For example, if the FSx automounter service is running on an EC2 instance with N

Note that the automounter service makes use of the [ListTagsForResource](https://docs.aws.amazon.com/fsx/latest/APIReference/API_ListTagsForResource.html) FSx API call, which is rate-limited. If you intend to scale up hundreds of EC2 instances that are running this service, then we recommend [automatically mounting FSx volumes using `/etc/fstab`](https://docs.aws.amazon.com/fsx/latest/OpenZFSGuide/attach-linux-client.html).

### mount_ephemeral service
**mount_ephemeral service**

The mount_ephemeral service is a systemd service written as a simple bash script that mounts NVMe attached instance storage volume automatically as temporary storage. It does this by formatting `/dev/nvme1n1` as xfs and then mounting it on `/tmp`. This service runs on instance bootup.

### create_swap service
**create_swap service**

The create_swap service is a systemd service written as a simple bash script that creates a 1GB swap file on `/swapfile`. This service runs on instance bootup.

### sccache
**sccache**

'[sccache](https://github.com/mozilla/sccache)' is installed to cache c/c++ compilation artefacts, which can speed up builds by avoiding unneeded work.

sccache is installed as a _systemd service_, and configured to use `/mnt/fsx_cache/sccache` as its cache folder. The service expects this folder to be available or set up by another service.

### octobuild
**octobuild**

'[Octobuild](https://github.com/octobuild/octobuild)' is installed to act as a compilation cache for Unreal Engine.

Octobuild is configured (in [octobuild.conf](octobuild.conf)) to use `/mnt/fsx_cache/octobuild_cache` as its cache folder, and expects this folder to be available or set up by another service.

NOTE: Octobuild is not supported on aarch64, and therefore not installed there.


## Processor architectures and naming conventions
##### Processor architectures and naming conventions

Within this folder, the processor architecture naming conventions as reported by `uname -m` are used, hence why there are scripts here with names containing "x86_64" or "aarch64". The packer template `.hcl` files are named following the naming conventions of the operating system that they are based on. Unfortunately, because some operating systems don't use the same terminology in their naming conventions throughout, this means that you'll see this lack of consistency here has well.
38 changes: 38 additions & 0 deletions docs/media/logos/aws-logo-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ site_description: Cloud Game Development Toolkit
site_author: Amazon Web Services
repo_url: https://github.com/aws-games/cloud-game-development-toolkit
site_url: https://aws-games.github.io/cloud-game-development-toolkit/
edit_uri: edit/main/docs/

theme:
name: material
Expand All @@ -27,7 +28,9 @@ theme:
icon: material/lightbulb-outline
name: Switch to light mode
features:
- toc
- toc:
permalink: true
sticky: true
- header.autohide
- navigation.sections
- navigation.top
Expand All @@ -47,6 +50,8 @@ theme:
repo: fontawesome/brands/github
admonition:
info: octicons/info-16
logo: media/logos/aws-logo-white.svg
favicon: media/logos/aws-logo-white.svg

markdown_extensions:
- admonition
Expand All @@ -56,7 +61,7 @@ markdown_extensions:
restrict_base_path: false
- toc:
permalink: true
toc_depth: 4
toc_depth: 5
- attr_list
- md_in_html
- pymdownx.emoji:
Expand Down

0 comments on commit da68a50

Please sign in to comment.