Skip to content

Commit

Permalink
Add new maintenance VM
Browse files Browse the repository at this point in the history
This VM will be used for running cronjobs, cleanups, hosting primary galaxy codebase (rsync will be used to keep sn06 and sn07 in sync), monitoring via influxdb
  • Loading branch information
sanjaysrikakulam committed Jan 25, 2023
1 parent 543e23b commit b9728ab
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions instance_maintenance.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
data "openstack_images_image_v2" "maintenance-image" {
name = "Rocky 9.0"
}

resource "openstack_compute_instance_v2" "maintenance" {
name = "maintenance.galaxyproject.eu"
image_id = data.openstack_images_image_v2.maintenance-image.id
flavor_name = "m1.xlarge"
key_pair = "cloud2"
tags = []
security_groups = ["default"]

network {
name = "bioinf"
}

block_device {
uuid = data.openstack_images_image_v2.maintenance-image.id
source_type = "image"
volume_size = 256
destination_type = "volume"
boot_index = 0
delete_on_termination = true
}

user_data = <<-EOF
#cloud-config
package_update: true
package_upgrade: true
EOF
}

resource "aws_route53_record" "maintenance-galaxyproject" {
allow_overwrite = true
zone_id = var.zone_galaxyproject_eu
name = "maintenance.galaxyproject.eu"
type = "A"
ttl = "600"
records = ["${openstack_compute_instance_v2.maintenance.access_ip_v4}"]
}

0 comments on commit b9728ab

Please sign in to comment.