generated from amazon-archives/__template_MIT-0
-
Notifications
You must be signed in to change notification settings - Fork 40
feat(perforce): add P4 Broker ECS submodule #871
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
Open
hwkiem
wants to merge
7
commits into
main
Choose a base branch
from
feat/p4-broker-pr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5916d07
refactor(docs): rename section index files to README.md
hwkiem b00e895
fix(docs): update internal links to match renamed files
hwkiem 9c2bf83
fix(perforce): restructure tests and fix pre-existing module bugs
hwkiem af771a4
style(perforce): fix terraform fmt on test files
hwkiem eb8bfcb
Merge branch 'refactor/docs-rename-section-indexes' into feat/p4-brok…
hwkiem d103d59
feat(perforce): add P4 Broker as fourth component in Perforce module
hwkiem 4e0d8d2
style(perforce): fix terraform fmt on broker test file
hwkiem File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| FROM amazonlinux:2023 | ||
|
|
||
| # Install p4broker from Perforce YUM repository | ||
| RUN rpm --import https://package.perforce.com/perforce.pubkey && \ | ||
| echo -e "[perforce]\nname=Perforce\nbaseurl=https://package.perforce.com/yum/rhel/9/x86_64\nenabled=1\ngpgcheck=1\ngpgkey=https://package.perforce.com/perforce.pubkey" \ | ||
| > /etc/yum.repos.d/perforce.repo && \ | ||
| dnf install -y helix-broker && \ | ||
| dnf clean all && \ | ||
| rm -rf /var/cache/dnf | ||
|
|
||
| # Create config directory | ||
| RUN mkdir -p /config /tmp | ||
|
|
||
| # p4broker listens on 1666 by default | ||
| EXPOSE 1666 | ||
|
|
||
| # Run p4broker in foreground mode | ||
| ENTRYPOINT ["/usr/sbin/p4broker", "-c", "/config/p4broker.conf"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # P4 Broker Container Image | ||
|
|
||
| This directory contains the Dockerfile for building a Perforce Helix Broker (`p4broker`) container image. | ||
|
|
||
| ## Building the Image | ||
|
|
||
| ```bash | ||
| docker build -t p4-broker . | ||
| ``` | ||
|
|
||
| ## Pushing to Amazon ECR | ||
|
|
||
| ```bash | ||
| # Authenticate with ECR | ||
| aws ecr get-login-password --region <region> | docker login --username AWS --password-stdin <account-id>.dkr.ecr.<region>.amazonaws.com | ||
|
|
||
| # Tag the image | ||
| docker tag p4-broker:latest <account-id>.dkr.ecr.<region>.amazonaws.com/p4-broker:latest | ||
|
|
||
| # Push the image | ||
| docker push <account-id>.dkr.ecr.<region>.amazonaws.com/p4-broker:latest | ||
| ``` | ||
|
|
||
| ## Pushing to Another Container Registry | ||
|
|
||
| ```bash | ||
| # Tag the image for your registry | ||
| docker tag p4-broker:latest <registry-url>/p4-broker:latest | ||
|
|
||
| # Push the image | ||
| docker push <registry-url>/p4-broker:latest | ||
| ``` | ||
|
|
||
| ## Local Testing | ||
|
|
||
| ```bash | ||
| # Create a local broker config file | ||
| cat > p4broker.conf <<EOF | ||
| target = ssl:your-p4-server:1666; | ||
| listen = 1666; | ||
| directory = /tmp; | ||
| logfile = /tmp/p4broker.log; | ||
|
|
||
| command: * | ||
| { | ||
| action = pass; | ||
| } | ||
| EOF | ||
|
|
||
| # Run the container | ||
| docker run -p 1666:1666 -v $(pwd)/p4broker.conf:/config/p4broker.conf p4-broker | ||
| ``` | ||
|
|
||
| ## Configuration | ||
|
|
||
| The container expects a broker configuration file at `/config/p4broker.conf`. When deployed via the Terraform module, this file is downloaded from S3 by an init container and mounted into the broker container via a shared volume. |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / checkov
Ensure AWS Load Balancers use strong ciphers Warning