Skip to content

Commit 1ebb8d9

Browse files
committed
Implement ORB Worker Adapter
1 parent 279ba5a commit 1ebb8d9

File tree

17 files changed

+1071
-11
lines changed

17 files changed

+1071
-11
lines changed

ami/opengris-scaler.pkr.hcl

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
packer {
2+
required_plugins {
3+
amazon = {
4+
version = "~> 1"
5+
source = "github.com/hashicorp/amazon"
6+
}
7+
}
8+
}
9+
10+
variable "aws_region" {
11+
type = string
12+
default = "us-east-1"
13+
}
14+
15+
variable "version" {
16+
type = string
17+
}
18+
19+
variable "ami_regions" {
20+
type = list(string)
21+
default = []
22+
description = "A list of regions to copy the AMI to."
23+
}
24+
25+
variable "ami_groups" {
26+
type = list(string)
27+
default = ["all"]
28+
description = "A list of groups to share the AMI with. Set to ['all'] to make public."
29+
}
30+
31+
source "amazon-ebs" "opengris-scaler" {
32+
ami_name = "opengris-scaler-${var.version}"
33+
instance_type = "t2.small"
34+
region = var.aws_region
35+
ami_regions = var.ami_regions
36+
ami_groups = var.ami_groups
37+
source_ami_filter {
38+
filters = {
39+
name = "al2023-ami-2023.*-kernel-*-x86_64"
40+
root-device-type = "ebs"
41+
virtualization-type = "hvm"
42+
}
43+
most_recent = true
44+
owners = ["898188442017"]
45+
}
46+
ssh_username = "ec2-user"
47+
}
48+
49+
build {
50+
name = "opengris-scaler-build"
51+
sources = ["source.amazon-ebs.opengris-scaler"]
52+
53+
provisioner "shell" {
54+
inline = [
55+
"sudo dnf update -y",
56+
"sudo dnf install -y python3-pip",
57+
"sudo pip3 install opengris-scaler==${var.version}"
58+
]
59+
}
60+
}

0 commit comments

Comments
 (0)