Skip to content

Commit 85257f3

Browse files
Copilotsonikro
andauthored
Introduce new dedicated FastDL Server for TF2-QuickServer
* Initial plan * Add FastDL infrastructure with S3 and automated map sync Co-authored-by: sonikro <11502789+sonikro@users.noreply.github.com> * Fix YAML linting, add terraform providers, update gitignore, add map validation Co-authored-by: sonikro <11502789+sonikro@users.noreply.github.com> * Add implementation documentation and final validation Co-authored-by: sonikro <11502789+sonikro@users.noreply.github.com> * Remove FastDL documentation and validation script as part of the infrastructure overhaul * feat: add FastDL sync script and S3 lifecycle configuration - Added a new script `syncFastDL.ts` to compress and sync map files to S3. - Updated `package.json` to include a new script command for FastDL sync. - Added AWS SDK S3 client dependency to `package.json`. - Implemented S3 lifecycle configuration in Terraform to enable intelligent tiering for the FastDL bucket. * feat: add CloudFront distribution for FastDL and update HTTPS configurations * feat: remove default value for FastDL bucket name variable --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sonikro <11502789+sonikro@users.noreply.github.com> Co-authored-by: Jonathan Nagayoshi <jonathan@nagayoshi.com.br>
1 parent aafbe44 commit 85257f3

15 files changed

Lines changed: 1672 additions & 135 deletions

File tree

.github/workflows/sync-fastdl.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
name: Sync Maps to FastDL S3
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- "maps.json"
10+
- ".github/workflows/sync-fastdl.yaml"
11+
workflow_dispatch:
12+
13+
jobs:
14+
sync-maps:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
id-token: write
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Install CMake
25+
run: sudo apt-get update -y && sudo apt-get install -y cmake
26+
27+
- name: Cache maps directory
28+
id: cache-maps
29+
uses: actions/cache@v4
30+
with:
31+
path: maps/
32+
key: maps-${{ hashFiles('maps.json') }}
33+
restore-keys: |
34+
maps-
35+
36+
- name: Cache fastdl directory
37+
id: cache-fastdl
38+
uses: actions/cache@v4
39+
with:
40+
path: fastdl/
41+
key: fastdl-${{ hashFiles('maps.json') }}
42+
restore-keys: |
43+
fastdl-
44+
45+
- name: Use Node.js from .nvmrc
46+
if: steps.cache-maps.outputs.cache-hit != 'true'
47+
uses: actions/setup-node@v4
48+
with:
49+
node-version-file: .nvmrc
50+
cache: 'npm'
51+
52+
- name: Install dependencies
53+
if: steps.cache-maps.outputs.cache-hit != 'true'
54+
run: npm ci
55+
56+
- name: Download maps
57+
if: steps.cache-maps.outputs.cache-hit != 'true'
58+
run: npm run download:maps
59+
60+
- name: Configure AWS credentials
61+
uses: aws-actions/configure-aws-credentials@v5
62+
with:
63+
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
64+
aws-region: us-east-1
65+
66+
- name: Sync maps to S3
67+
run: npm run sync:fastdl
68+
env:
69+
FASTDL_BUCKET_NAME: ${{ secrets.FASTDL_BUCKET_NAME }}
70+
AWS_REGION: us-east-1

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ cdk.context.json
172172
*.sqlite3
173173
*.sqlite3-journal
174174

175+
# FastDL build directory
176+
fastdl/
177+
175178
keys/*
176179
config/development.json
177180

0 commit comments

Comments
 (0)