feat(samples): add Unity build pipeline with TeamCity integration#775
feat(samples): add Unity build pipeline with TeamCity integration#775gabebatista wants to merge 7 commits intomainfrom
Conversation
0341cee to
c9be979
Compare
8318d2c to
96ba3fa
Compare
96ba3fa to
06fc1ff
Compare
joshral7459
left a comment
There was a problem hiding this comment.
Minor issues that prevent progress. Would be happy to do a working session and step through the deployment together.
samples/unity-build-pipeline/docker/teamcity-unity-build-agent/Dockerfile
Outdated
Show resolved
Hide resolved
samples/unity-build-pipeline/docker/teamcity-unity-build-agent/Dockerfile
Outdated
Show resolved
Hide resolved
samples/unity-build-pipeline/docker/teamcity-unity-build-agent/Dockerfile
Show resolved
Hide resolved
| # Navigate to your workspace root | ||
| cd ~/perforce/<workspace-name>/ |
There was a problem hiding this comment.
My workspace root defaulted to my current directory which happened to be the unity sample folder in the toolkit. Did i miss a step to set it to something else?
There was a problem hiding this comment.
The workspace location is not explicitly defined in that command. When you run:
p4 client -o -S //game/main | p4 client -i
Here's what happens:
Where the location comes from:
p4 client -ogenerates a client spec template with Perforce's default values- The Root: field in that spec determines the workspace location
- By default, Perforce sets Root: to your current working directory (where you run the command)
The command breakdown:
p4 client -o- Output a client spec template-S //game/main- Base it on the stream //game/main| p4 client -i- Pipe that spec to create the client
To control the workspace location:
You need to modify the client spec before piping it to p4 client -i. Here are better approaches:
Option 1: Set it explicitly
p4 client -o -S //game/main | \
sed 's|^Root:.*|Root: /path/to/your/workspace|' | \
p4 client -i
Option 2: Run from your desired directory
cd /path/to/your/workspace
p4 client -o -S //game/main | p4 client -i
Option 3: Edit manually
p4 client -S //game/main
# This opens an editor where you can set the Root field manually
The Root: field in the generated spec is what defines where files will be synced to on your local machine.
|
|
||
| **Step 2.1: Initial Access** | ||
|
|
||
| Visit `https://swarm.yourdomain.com` in your browser. On first access, Swarm will: |
There was a problem hiding this comment.
I was not able to access the swarm server at all.
|
|
||
| **Step 3.1: Complete Initial Setup Wizard** | ||
|
|
||
| 1. Visit `https://teamcity.yourdomain.com` |
There was a problem hiding this comment.
also was not able to access. When i did nslookup in the beginning, there were no errors
1d59fe2 to
996312e
Compare
| alias { | ||
| name = module.perforce.shared_application_load_balancer_dns_name | ||
| zone_id = module.perforce.shared_application_load_balancer_zone_id | ||
| evaluate_target_health = true | ||
| } | ||
| } |
There was a problem hiding this comment.
Since the NLB is the public entry point, the record should point to the NLB alias rather than the ALB
| project_prefix = local.project_prefix | ||
| vpc_id = aws_vpc.unity_pipeline_vpc.id | ||
|
|
||
| create_route53_private_hosted_zone = true |
There was a problem hiding this comment.
is the intention to create a 2nd hosted zone for perforce and its subdomains as defined in the perforce module, route53 file?
996312e to
3d63fbe
Compare
📚 Documentation Preview✅ Preview deployed successfully! 🔗 Preview URL: https://aws-games.github.io/cloud-game-development-toolkit/preview-pr-775/ 🔒 Maintainer Action RequiredThe preview requires approval before it's accessible. A maintainer must approve the GitHub Pages deployment in the Environments section. Once approved, the preview will be accessible within 1-2 minutes. Build Information
This preview will be automatically deleted when the PR is merged or closed. |
- Add language specifiers to fenced code blocks - Convert bold emphasis to proper headings for sub-steps - Add blank lines around lists and fenced code blocks - Fix heading spacing issues
…deployment descriptions - Replace ASCII diagram with draw.io architecture diagram - Fix P4 Swarm deployment type: ECS -> EC2 with Auto Scaling Group - Fix Unity License Server deployment type: ECS -> EC2 with ENI - Fix troubleshooting section references - Remove cost estimate section (too risky to maintain)
…TeamCity and Unity Accelerator - Add alb_security_group_id output to TeamCity module - Add ingress rules for TeamCity ALB (port 443) in sample security.tf - Add ingress rules for Unity Accelerator ALB (port 443) in sample security.tf - Document security group access pattern in README
- Add shared_network_load_balancer_dns_name output to Perforce module - Add shared_network_load_balancer_zone_id output to Perforce module - Fix P4 Swarm DNS record to point to NLB instead of internal ALB The Swarm DNS was pointing to the internal ALB which is not accessible from the internet. It should point to the public NLB which forwards HTTPS traffic to the internal ALB.
- Add shared_network_load_balancer_security_group_id output - Add security group rule for HTTPS traffic to NLB for Swarm access
Issue number: N/A
Summary
Changes
This PR adds a new Unity build pipeline sample demonstrating how to deploy a production-ready Unity CI/CD infrastructure on AWS. The sample integrates Perforce (version control with code review), TeamCity
(CI/CD), Unity Accelerator (asset caching), and Unity Floating License Server with comprehensive documentation and a Docker image for Unity TeamCity build agents.
User experience
Before: Users had no reference sample showing how to deploy a complete Unity build pipeline on AWS. Individual Unity module documentation existed, but integration patterns were unclear.
After: Users can deploy a production-ready Unity build pipeline with
terraform apply, following clear step-by-step documentation. The sample demonstrates best practices for integrating all componentswith proper networking, security, and DNS configuration.
Testing This PR
To test this sample:
samples/unity-build-pipeline/README.mdto understand the architecture and deployment stepssamples/unity-build-pipeline/docker/teamcity-unity-build-agent/and run./build-and-push.shto verify the Unity TeamCity agent image builds successfully (~20minutes)
terraform initandterraform validatein the sample directoryterraform.tfvars.exampleandvariables.tffor proper variable definitionsterraform.tfvarswith your Route53 domain, license server zip path, and TeamCity agent image URIterraform applyto deploy all componentshttps://swarm.yourdomain.comand verify login with Perforce credentialsterraform output -raw teamcity_url