-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(helix-core): add ARM64 support (#239)
Co-authored-by: Henry Kiem <[email protected]>
- Loading branch information
Showing
15 changed files
with
337 additions
and
133 deletions.
There are no files selected for viewing
This file contains 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 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,98 @@ | ||
packer { | ||
required_plugins { | ||
amazon = { | ||
version = ">= 0.0.2" | ||
source = "github.com/hashicorp/amazon" | ||
} | ||
} | ||
} | ||
|
||
locals { | ||
timestamp = regex_replace(timestamp(), "[- TZ:]", "") | ||
ami_prefix = "p4_al2023" | ||
} | ||
|
||
variable "region" { | ||
type = string | ||
default = "us-west-2" | ||
} | ||
|
||
variable "vpc_id" { | ||
type = string | ||
default = null | ||
} | ||
|
||
variable "subnet_id" { | ||
type = string | ||
default = null | ||
} | ||
|
||
variable "associate_public_ip_address" { | ||
type = bool | ||
default = true | ||
} | ||
|
||
variable "ssh_interface" { | ||
type = string | ||
default = "public_ip" | ||
} | ||
|
||
source "amazon-ebs" "al2023" { | ||
region = var.region | ||
ami_name = "${local.ami_prefix}-${local.timestamp}" | ||
instance_type = "t4g.medium" | ||
|
||
vpc_id = var.vpc_id | ||
subnet_id = var.subnet_id | ||
|
||
associate_public_ip_address = var.associate_public_ip_address | ||
ssh_interface = var.ssh_interface | ||
|
||
source_ami_filter { | ||
filters = { | ||
name = "al2023-ami-2023.5.*" | ||
architecture = "arm64" | ||
root-device-type = "ebs" | ||
virtualization-type = "hvm" | ||
} | ||
most_recent = true | ||
owners = ["amazon"] | ||
} | ||
|
||
ssh_username = "ec2-user" | ||
} | ||
|
||
build { | ||
name = "P4_SDP_AWS" | ||
sources = [ | ||
"source.amazon-ebs.al2023" | ||
] | ||
|
||
provisioner "shell" { | ||
inline = [ | ||
"cloud-init status --wait", | ||
"sudo dnf install -y git sendmail nfs-utils s-nail unzip cronie" | ||
] | ||
} | ||
|
||
provisioner "shell" { | ||
script = "${path.root}/p4_setup.sh" | ||
execute_command = "sudo sh {{.Path}}" | ||
} | ||
|
||
provisioner "file" { | ||
source = "${path.root}/p4_configure.sh" | ||
destination = "/tmp/p4_configure.sh" | ||
} | ||
|
||
provisioner "shell" { | ||
inline = ["mkdir -p /home/ec2-user/gpic_scripts", | ||
"sudo mv /tmp/p4_configure.sh /home/ec2-user/gpic_scripts" | ||
] | ||
} | ||
|
||
provisioner "shell" { | ||
inline = ["sudo chmod +x /home/ec2-user/gpic_scripts/p4_configure.sh"] | ||
} | ||
|
||
} |
File renamed without changes.
This file contains 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 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
Binary file not shown.
Binary file not shown.
This file contains 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.