Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions examples/templates/tenant/tenant/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,17 @@ ec2_runner_specs:
ami_kms_key_arn: <KMS_ARN>
runner_os: <OS>
runner_architecture: <ARCH>
runner_user: ubuntu
runner_user: <RUNNER_USER>
placement:
host_resource_group_arn: arn:aws:resource-groups:eu-west-1:123456789012:group/acme-dedicated-hosts
host_resource_group_arn: <HOST_RESOURCE_GROUP_ARN>
tenancy: host
availability_zone: eu-west-1b
license_specifications:
- license_configuration_arn: arn:aws:license-manager:eu-west-1:123456789012:license-configuration:lic-0123456789abcdef0
use_dedicated_host: true
vpc_id: vpc-0abc1234def567890
subnet_ids:
- subnet-0abc1234def567890
availability_zone: <AVAILABILITY_ZONE>
max_instances: <MAX_PARALLEL>
license_specifications: <LICENSE_SPECIFICATIONS>
use_dedicated_host: <USE_DEDICATED_HOST>
vpc_id: <VPC_ID>
subnet_ids:
- <SUBNET_ID>
instance_types:
- <AWS_INSTANCE_TYPE>
pool_config:
Expand Down
6 changes: 3 additions & 3 deletions modules/platform/ec2_deployment/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ module "runners" {
# Retention period for the logs in days.
logging_retention_in_days = var.runner_configs.logging_retention_in_days

webhook_lambda_zip = "/tmp/${var.runner_configs.prefix}/webhook.zip"
runner_binaries_syncer_lambda_zip = "/tmp/${var.runner_configs.prefix}/runner-binaries-syncer.zip"
runners_lambda_zip = "/tmp/${var.runner_configs.prefix}/runners.zip"
webhook_lambda_zip = "${data.external.download_lambdas.result.path}/webhook.zip"
runner_binaries_syncer_lambda_zip = "${data.external.download_lambdas.result.path}/runner-binaries-syncer.zip"
runners_lambda_zip = "${data.external.download_lambdas.result.path}/runners.zip"

# Configure the various types of runners we provide, along with on-demand
# versus standby pools, etc.
Expand Down
20 changes: 13 additions & 7 deletions modules/platform/ec2_deployment/scripts/download_lambdas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,18 @@ fi
DOWNLOAD_PATH="$1"
VERSION="$2"

rm -rf "$DOWNLOAD_PATH"
mkdir -p "$DOWNLOAD_PATH"
if [ -n "$USE_CACHE" ] && [ -n "$CACHE_PATH" ] && [ -d "$CACHE_PATH" ]; then
echo "USE_CACHE is set and $CACHE_PATH exists, skipping download." >&2
DOWNLOAD_PATH="$CACHE_PATH"
VERSION="local-cache"
else
rm -rf "$DOWNLOAD_PATH"
mkdir -p "$DOWNLOAD_PATH"

# Download files to the specified director
wget --no-verbose -P "$DOWNLOAD_PATH" "https://github.com/github-aws-runners/terraform-aws-github-runner/releases/download/${VERSION}/runner-binaries-syncer.zip"
wget --no-verbose -P "$DOWNLOAD_PATH" "https://github.com/github-aws-runners/terraform-aws-github-runner/releases/download/${VERSION}/runners.zip"
wget --no-verbose -P "$DOWNLOAD_PATH" "https://github.com/github-aws-runners/terraform-aws-github-runner/releases/download/${VERSION}/webhook.zip"
# Download files to the specified directory
wget --no-verbose -P "$DOWNLOAD_PATH" "https://github.com/github-aws-runners/terraform-aws-github-runner/releases/download/${VERSION}/runner-binaries-syncer.zip"
wget --no-verbose -P "$DOWNLOAD_PATH" "https://github.com/github-aws-runners/terraform-aws-github-runner/releases/download/${VERSION}/runners.zip"
wget --no-verbose -P "$DOWNLOAD_PATH" "https://github.com/github-aws-runners/terraform-aws-github-runner/releases/download/${VERSION}/webhook.zip"
fi

echo -n "{\"version\":\"${VERSION}\"}"
echo -n "{\"version\":\"${VERSION}\",\"path\":\"${DOWNLOAD_PATH}\"}"