-
Notifications
You must be signed in to change notification settings - Fork 25
/
instance_dedicated_gpu-alpha.tf
75 lines (66 loc) · 3.59 KB
/
instance_dedicated_gpu-alpha.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# 26.04.2024: Disabled; User VMs are still in the old cloud and they are informed to take backups of all of their data
# and then we will recreate the new VMs in the new cloud.
# variable "gpu-node-alpha-dns" {
# default = "gpu-node-alpha.galaxyproject.eu"
# }
# data "openstack_images_image_v2" "gpu-node-alpha-image" {
# name = "vggp-v60-gpu-j322-692e75a7c101-main"
# }
# resource "openstack_compute_instance_v2" "gpu-node-alpha" {
# name = var.gpu-node-alpha-dns
# flavor_name = "g1.c8m100g1d50"
# key_pair = "cloud2"
# security_groups = ["default", "public-ssh"]
# network {
# name = "public"
# }
# block_device {
# uuid = data.openstack_images_image_v2.gpu-node-alpha-image.id
# source_type = "image"
# volume_size = 200
# destination_type = "volume"
# boot_index = 0
# delete_on_termination = true
# }
# user_data = <<-EOF
# #cloud-config
# bootcmd:
# - test -z "$(blkid /dev/vdb)" && mkfs -t ext4 /dev/vdb
# - mkdir -p /scratch
# mounts:
# - ["/dev/vdb", "/scratch", auto, "defaults,nofail", "0", "2"]
# runcmd:
# - [ chown, "centos.centos", -R, /scratch ]
# package_update: true
# package_upgrade: true
# packages:
# - cuda-11-6
# - nvidia-container-toolkit
# users:
# - default
# ssh_authorized_keys:
# - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDC6kanRFWmhjkV8pkwOYtHoCNDIP/nj2umigbSylMFmiXm2rwnqi1qhDeJqd53PTrT4RWynT7Gqg7/HSITPAZA4wdGNcDLHD7QvexBDhIhUJCERmMZa6EWPvOPgDACbJDjrwLxd8oF65UhQU+meVrkBmpod6YDSuVIfmZ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k= [email protected]"
# EOF
# }
# resource "random_id" "gpu-node-alpha-volume_name_unique" {
# byte_length = 8
# }
# resource "openstack_blockstorage_volume_v2" "gpu-node-alpha-vol" {
# name = "gpu-node-alpha-scratch-vol-${random_id.gpu-node-alpha-volume_name_unique.hex}"
# volume_type = "default"
# description = "Scratch volume for gpu-node-alpha"
# size = 1024
# }
# resource "openstack_compute_volume_attach_v2" "gpu-node-alpha-internal-va" {
# instance_id = openstack_compute_instance_v2.gpu-node-alpha.id
# volume_id = openstack_blockstorage_volume_v2.gpu-node-alpha-vol.id
# }
# resource "aws_route53_record" "gpunodealpha" {
# allow_overwrite = true
# zone_id = var.zone_galaxyproject_eu
# name = var.gpu-node-alpha-dns
# type = "A"
# ttl = "600"
# records = ["${openstack_compute_instance_v2.gpu-node-alpha.access_ip_v4}"]
# }