forked from usegalaxy-eu/infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request usegalaxy-eu#195 from sanjaysrikakulam/cloud_migra…
…tion_15_4_2024 Cloud migration April 2024
- Loading branch information
Showing
35 changed files
with
23,246 additions
and
29,050 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
resource "openstack_compute_instance_v2" "apollo-usegalaxy" { | ||
name = "apollo.internal.galaxyproject.eu" | ||
image_name = "apollo_16_04_2024" | ||
flavor_name = "m1.large" | ||
key_pair = "cloud2" | ||
security_groups = ["egress", "public-web2", "public-ssh", "default", "public-ping"] | ||
|
||
network { | ||
name = "bioinf" | ||
} | ||
|
||
user_data = <<-EOF | ||
#cloud-config | ||
package_update: true | ||
package_upgrade: true | ||
EOF | ||
} | ||
|
||
resource "aws_route53_record" "apollo-usegalaxy-internal" { | ||
allow_overwrite = true | ||
zone_id = var.zone_galaxyproject_eu | ||
name = "apollo.internal.galaxyproject.eu" | ||
type = "A" | ||
ttl = "600" | ||
records = ["${openstack_compute_instance_v2.apollo-usegalaxy.access_ip_v4}"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,56 @@ | ||
variable "workers-bronze" { | ||
default = 1 | ||
} | ||
# 26.04.2024: Disabled as not needed anymore | ||
# variable "workers-bronze" { | ||
# default = 1 | ||
# } | ||
|
||
variable "workers-bronze-volume-size" { | ||
default = 200 | ||
} | ||
# variable "workers-bronze-volume-size" { | ||
# default = 200 | ||
# } | ||
|
||
resource "openstack_compute_instance_v2" "jenkins-workers-bronze" { | ||
name = "worker-${count.index}.bronze.build.galaxyproject.eu" | ||
image_name = var.jenkins_image | ||
flavor_name = "m1.xlarge" | ||
key_pair = "jenkins2" | ||
security_groups = ["default"] | ||
count = var.workers-bronze | ||
# resource "openstack_compute_instance_v2" "jenkins-workers-bronze" { | ||
# name = "worker-${count.index}.bronze.build.galaxyproject.eu" | ||
# image_name = var.jenkins_image | ||
# flavor_name = "m1.xlarge" | ||
# key_pair = "jenkins2" | ||
# security_groups = ["default"] | ||
# count = var.workers-bronze | ||
|
||
network { | ||
name = "bioinf" | ||
} | ||
# network { | ||
# name = "bioinf" | ||
# } | ||
|
||
user_data = <<-EOF | ||
#cloud-config | ||
bootcmd: | ||
- test -z "$(blkid /dev/vdb)" && mkfs -t ext4 -L jenkins /dev/vdb | ||
- mkdir -p /scratch | ||
mounts: | ||
- ["/dev/vdb", "/scratch", auto, "defaults,nofail", "0", "2"] | ||
runcmd: | ||
- [ chown, "centos.centos", -R, /scratch ] | ||
EOF | ||
} | ||
# user_data = <<-EOF | ||
# #cloud-config | ||
# bootcmd: | ||
# - test -z "$(blkid /dev/vdb)" && mkfs -t ext4 -L jenkins /dev/vdb | ||
# - mkdir -p /scratch | ||
# mounts: | ||
# - ["/dev/vdb", "/scratch", auto, "defaults,nofail", "0", "2"] | ||
# runcmd: | ||
# - [ chown, "centos.centos", -R, /scratch ] | ||
# EOF | ||
# } | ||
|
||
resource "openstack_blockstorage_volume_v2" "jenkins-workers-bronze-volume" { | ||
name = "jenkins-workers-bronze-volume" | ||
description = "Data volume for Jenkins worker-${count.index}.bronze.build.galaxyproject.eu" | ||
volume_type = "default" | ||
size = var.workers-bronze-volume-size | ||
count = var.workers-bronze | ||
} | ||
# resource "openstack_blockstorage_volume_v2" "jenkins-workers-bronze-volume" { | ||
# name = "jenkins-workers-bronze-volume" | ||
# description = "Data volume for Jenkins worker-${count.index}.bronze.build.galaxyproject.eu" | ||
# volume_type = "default" | ||
# size = var.workers-bronze-volume-size | ||
# count = var.workers-bronze | ||
# } | ||
|
||
resource "openstack_compute_volume_attach_v2" "jenkins-workers-bronze-va" { | ||
instance_id = element(openstack_compute_instance_v2.jenkins-workers-bronze.*.id, count.index) | ||
volume_id = element(openstack_blockstorage_volume_v2.jenkins-workers-bronze-volume.*.id, count.index) | ||
count = var.workers-bronze | ||
} | ||
# resource "openstack_compute_volume_attach_v2" "jenkins-workers-bronze-va" { | ||
# instance_id = element(openstack_compute_instance_v2.jenkins-workers-bronze.*.id, count.index) | ||
# volume_id = element(openstack_blockstorage_volume_v2.jenkins-workers-bronze-volume.*.id, count.index) | ||
# count = var.workers-bronze | ||
# } | ||
|
||
resource "aws_route53_record" "jenkins-workers-bronze" { | ||
allow_overwrite = true | ||
zone_id = var.zone_galaxyproject_eu | ||
name = "worker-${count.index}.bronze.build.galaxyproject.eu" | ||
type = "A" | ||
ttl = "7200" | ||
records = ["${element(openstack_compute_instance_v2.jenkins-workers-bronze.*.access_ip_v4, count.index)}"] | ||
count = var.workers-bronze | ||
} | ||
# resource "aws_route53_record" "jenkins-workers-bronze" { | ||
# allow_overwrite = true | ||
# zone_id = var.zone_galaxyproject_eu | ||
# name = "worker-${count.index}.bronze.build.galaxyproject.eu" | ||
# type = "A" | ||
# ttl = "7200" | ||
# records = ["${element(openstack_compute_instance_v2.jenkins-workers-bronze.*.access_ip_v4, count.index)}"] | ||
# count = var.workers-bronze | ||
# } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.