Skip to content

Commit

Permalink
Use appdb ID instead of vmi id (#92)
Browse files Browse the repository at this point in the history
* use appdb ID instead of vmi id

* trigger alma build to test this

* linting

* linting

* troubleshooting
  • Loading branch information
sebastian-luna-valero authored Aug 30, 2024
1 parent a821a40 commit 80b9262
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion alma/alma-9.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ source "qemu" "alma_9" {
qemuargs = [["-cpu", "host"]]
shutdown_command = "shutdown -h now"
ssh_private_key_file = "${var.SSH_PRIVATE_KEY_FILE}"
ssh_timeout = "90m"
ssh_timeout = "20m"
ssh_username = "root"
vm_name = "alma.9-2024.08.29"
}
Expand Down
3 changes: 0 additions & 3 deletions builder/SCAI.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ net_id = "c38b0272-637e-4665-a79c-1a37222b572c"

# Flavor: medium
flavor_id = "73302761-40dc-4ced-91d6-7dd18524a82e"

# Image: ubuntu 24.04
image_id = "645e3a38-8a8e-4e88-9b9c-5387fd2017d5"
13 changes: 7 additions & 6 deletions builder/vm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,21 @@ variable "net_id" {
description = "The id of the network"
}

variable "image_id" {
type = string
description = "VM image id"
}

variable "flavor_id" {
type = string
description = "VM flavor id"
}

data "openstack_images_image_v2" "ubuntu-24" {
most_recent = true
properties = {
"ad:appid" = "1157"
}
}

resource "openstack_compute_instance_v2" "builder" {
name = "builder"
image_id = var.image_id
image_id = data.openstack_images_image_v2.ubuntu-24.id
flavor_id = var.flavor_id
security_groups = ["default"]
user_data = file("cloud-init.yaml")
Expand Down

0 comments on commit 80b9262

Please sign in to comment.