Skip to content

Commit

Permalink
docs: updates to getting started guide and helix core packer document…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
kylesomers committed Sep 27, 2024
1 parent 9c32ff0 commit 2eae3b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions assets/packer/perforce/helix-core/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Perforce Helix Core Packer Template

This Packer template creates an Amazon Machine Image for installing and configuring a Perforce [Helix Core] server on Linux.
This Packer template creates an Amazon Machine Image for installing and configuring a Perforce [Helix Core] server on Linux. It supports both x86 and ARM architectures.

The `p4_configure.sh` script contains the majority of Helix Core setup. It performs the following operations:

Expand All @@ -20,10 +20,10 @@ The `p4_configure.sh` script contains the majority of Helix Core setup. It perfo

## How to Use

Building this AMI is as easy as running:
Building this AMI is as easy as running (ARM example):

``` bash
packer build ./assets/packer/perforce/helix-core/perforce.pkr.hcl
packer build ./assets/packer/perforce/helix-core/perforce_arm64.pkr.hcl
```

Packer will attempt to leverage the default VPC available in the AWS account and Region specified by your CLI credentials. It will provision an instance in a public subnet and communicate with that instance over the public internet. If a default VPC is not provided the above command will fail. This Packer template can take a number of variables as specified in `example.pkrvars.hcl`. Variables can be passed individually through the `-var` command line flag or through a configuration file with the `-var-file` command line flag.
Expand Down
8 changes: 5 additions & 3 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ You will need the following tools to complete this tutorial:

Prior to deploying the infrastructure for running Perforce Helix Core we need to create an [Amazon Machine Image](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) containing the necessary software and tools. The **Cloud Game Development Toolkit** contains a Packer template for doing just this.

1. From your terminal, run the following commands from the root of the repository:
1. From your terminal, run the following commands from the root of the repository (this example assumes usage of arm64 architecture):

``` bash
packer init ./assets/packer/perforce/helix-core/perforce.pkr.hcl
packer build ./assets/packer/perforce/helix-core/perforce.pkr.hcl
packer init ./assets/packer/perforce/helix-core/perforce_arm64.pkr.hcl
packer build ./assets/packer/perforce/helix-core/perforce_arm64.pkr.hcl
```

This will use your AWS credentials to provision an [EC2 instance](https://aws.amazon.com/ec2/instance-types/) in your [Default VPC](https://docs.aws.amazon.com/vpc/latest/userguide/default-vpc.html). The Region, VPC, and Subnet where this instance is provisioned and the AMI is created are configurable - please consult the [`example.pkrvars.hcl`](./assets/packer/perforce/helix-core/example.pkrvars.hcl) file and the [Packer documentation on assigning variables](https://developer.hashicorp.com/packer/guides/hcl/variables#assigning-variables) for more details.
Expand All @@ -62,6 +62,8 @@ packer build amazon-linux-2023-arm64.pkr.hcl \
???+ Note
The above command assumes you are running `packer` from the `/assets/packer/build-agents/linux` directory.

Then securely store the private key value as a secret in AWS Secrets Manager.

``` bash
aws secretsmanager create-secret \
--name JenkinsPrivateSSHKey \
Expand Down

0 comments on commit 2eae3b7

Please sign in to comment.