Skip to content
Snippets Groups Projects

Integration Testing: Sequential Merge and Validation of Four Feature Branches (PR #43,#44, #45,#46)

Compare and
4 files
+ 87
37
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 38
13
@@ -9,7 +9,6 @@ required_version = ">= 0.14.0"
}
}
variable "ohpc_instance_name" {}
variable "image_ohpc" {}
variable "flavor" {}
@@ -26,7 +25,10 @@ variable "floating_ip_ohpc" {type = string}
variable "ohpc_user" {}
variable "ssh_private_key" {}
variable "vol_id" {}
variable "vol_ids" {
type = list(string)
default = []
}
# creates details for the OHPC instance
resource "openstack_compute_instance_v2" "ohpc" {
@@ -37,12 +39,24 @@ resource "openstack_compute_instance_v2" "ohpc" {
security_groups = ["default"]
user_data = <<-EOF
#cloud-config
write_files:
- content: |
10.1.1.10 ohpc ohpc.novalocal
owner: centos:centos
path: /etc/hosts
permissions: 0644
write_files:
- content: |
10.1.1.10 ohpc ohpc.novalocal
owner: centos:centos
path: /etc/hosts
permissions: '0644'
runcmd:
- |
#!/bin/bash
sudo mkdir -p /data/xdmod/queues
sudo mount /dev/vdb1 /var/lib/mysql
sudo mount /dev/vdc1 /data/xdmod/queues
sudo df -h
sudo systemctl restart mariadb
sudo sed -i -E 's/xdmod..nip.io/xdmod.rc.uab.edu/g' /etc/httpd/conf.d/xdmod.conf
sudo sed -i -E 's/xdmod..nip.io/xdmod.rc.uab.edu/g' /etc/xdmod/simplesamlphp/config/config.php
sudo systemctl restart httpd
EOF
# defines the networks of the instance
@@ -61,14 +75,20 @@ resource "openstack_compute_floatingip_associate_v2" "ohpc" {
instance_id = openstack_compute_instance_v2.ohpc.id
}
# Attach a volume
resource "openstack_compute_volume_attach_v2" "volume_attach" {
# Attach specific volumes
resource "openstack_compute_volume_attach_v2" "attach_prod_volume" {
instance_id = openstack_compute_instance_v2.ohpc.id
volume_id = var.vol_id
volume_id = data_volume
}
resource "openstack_compute_volume_attach_v2" "attach_prod_queue_volume" {
instance_id = openstack_compute_instance_v2.ohpc.id
volume_id = prod_volume_id
}
output "xdmod_instance_id" {
value = openstack_compute_instance_v2.ohpc.id
value = openstack_compute_instance_v2.ohpc.id
}
output "ssh_host" {
@@ -76,5 +96,10 @@ output "ssh_host" {
}
output "device" {
value = openstack_compute_volume_attach_v2.volume_attach.device
value = [
openstack_compute_volume_attach_v2.attach_prod_volume.device,
openstack_compute_volume_attach_v2.attach_prod_queue_volume.device
]
}
Loading