Skip to content

Commit

Permalink
docs: updates to documentation (#329)
Browse files Browse the repository at this point in the history
Co-authored-by: Kyle Somers <17753062+kylesomers@users.noreply.github.com>
  • Loading branch information
henrykie and kylesomers authored Sep 30, 2024
1 parent db4f623 commit 53135f4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
7 changes: 5 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,13 @@ Looking at the existing issues is a great way to find something to contribute on
This project uses [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) to generate versioned documentation automatically. Content for the documentation is auto-generated by referencing the markdown contained in the project's `README.md` files.

**Local development:**
- To build the project documentation, run: `make docs-local-docker VERSION=<Semantic Release Version>`. This will build the project using `./docs/Dockerfile` and host the documentation using `mkdocs serve` on port `8000`.

* To build the project documentation, execute the following command: `make docs-build-local VERSION=<VERSION> ALIAS=<ALIAS>`, including a semantic release version (i.e. `v1.0.0`) and an alias (i.e. `latest`). This will build the project using `./docs/Dockerfile`.
* To run the documentation locally, execute the following command: `make docs-run VERSION=<VERSION> ALIAS=<ALIAS>` which runs the documentation in a local container using `mkdocs serve` on port `8000`.

**Live documentation (GitHub Pages):**
- A Github workflow is used to build and deploy the documentation to the gh-pages branch: `.github/workflows/docs.yml`

* A Github workflow is used to build and deploy the documentation to the gh-pages branch: `.github/workflows/docs.yml`

## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
Expand Down
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 53135f4

Please sign in to comment.