Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use appdb ID instead of vmi id #92

Merged
merged 5 commits into from
Aug 30, 2024
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
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
Loading