Skip to content

Commit 230ad52

Browse files
authored
Merge pull request #822 from yeoldegrove/master_aws_nitro
aws: master: change instances types from xen to nitro (KVM)
2 parents 81ffd7c + f50baa8 commit 230ad52

File tree

41 files changed

+132
-228
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+132
-228
lines changed

aws/main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ module "common_variables" {
128128
netweaver_ha_enabled = var.netweaver_ha_enabled
129129
netweaver_cluster_fencing_mechanism = var.netweaver_cluster_fencing_mechanism
130130
netweaver_sbd_storage_type = var.sbd_storage_type
131+
drbd_cluster_vip = local.drbd_cluster_vip
132+
drbd_cluster_vip_mechanism = ""
133+
drbd_cluster_fencing_mechanism = var.drbd_cluster_fencing_mechanism
134+
drbd_sbd_storage_type = var.sbd_storage_type
131135
}
132136

133137
module "drbd_node" {
@@ -148,8 +152,6 @@ module "drbd_node" {
148152
aws_access_key_id = var.aws_access_key_id
149153
aws_secret_access_key = var.aws_secret_access_key
150154
host_ips = local.drbd_ips
151-
fencing_mechanism = var.drbd_cluster_fencing_mechanism
152-
drbd_cluster_vip = local.drbd_cluster_vip
153155
drbd_data_disk_size = var.drbd_data_disk_size
154156
drbd_data_disk_type = var.drbd_data_disk_type
155157
cluster_ssh_pub = var.cluster_ssh_pub

aws/modules/drbd_node/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resource "aws_route_table_association" "drbd-subnet-route-association" {
2121
resource "aws_route" "drbd-cluster-vip" {
2222
count = var.drbd_count > 0 ? 1 : 0
2323
route_table_id = var.route_table_id
24-
destination_cidr_block = "${var.drbd_cluster_vip}/32"
24+
destination_cidr_block = "${var.common_variables["drbd"]["cluster_vip"]}/32"
2525
instance_id = aws_instance.drbd.0.id
2626
}
2727

@@ -63,7 +63,7 @@ resource "aws_instance" "drbd" {
6363
ebs_block_device {
6464
volume_type = var.drbd_data_disk_type
6565
volume_size = var.drbd_data_disk_size
66-
device_name = "/dev/xvdd"
66+
device_name = "/dev/sdb"
6767
}
6868

6969
volume_tags = {

aws/modules/drbd_node/salt_provisioner.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ resource "null_resource" "drbd_provisioner" {
2121
content = <<EOF
2222
role: drbd_node
2323
${var.common_variables["grains_output"]}
24+
${var.common_variables["drbd_grains_output"]}
2425
region: ${var.aws_region}
2526
name_prefix: ${var.name}
2627
aws_cluster_profile: Cluster
@@ -32,9 +33,7 @@ hostname: ${var.name}0${count.index + 1}
3233
network_domain: ${var.network_domain}
3334
host_ips: [${join(", ", formatlist("'%s'", var.host_ips))}]
3435
host_ip: ${element(var.host_ips, count.index)}
35-
fencing_mechanism: ${var.fencing_mechanism}
36-
drbd_disk_device: /dev/xvdd
37-
drbd_cluster_vip: ${var.drbd_cluster_vip}
36+
drbd_disk_device: /dev/nvme1n1
3837
route_table: ${var.route_table_id}
3938
sbd_lun_index: 2
4039
iscsi_srv_ip: ${var.iscsi_srv_ip}

aws/modules/drbd_node/variables.tf

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,6 @@ variable "host_ips" {
7373
type = list(string)
7474
}
7575

76-
variable "fencing_mechanism" {
77-
description = "Choose the fencing mechanism for the cluster. Options: sbd, native"
78-
type = string
79-
}
80-
81-
variable "drbd_cluster_vip" {
82-
description = "IP address used to configure the drbd cluster floating IP. It must be in other subnet than the machines!"
83-
type = string
84-
}
85-
8676
variable "drbd_data_disk_size" {
8777
description = "Disk size of the disks used to store drbd content"
8878
type = string

aws/modules/hana_node/main.tf

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
21
locals {
3-
hana_disk_device = "/dev/xvdd"
4-
create_ha_infra = var.hana_count > 1 && var.common_variables["hana"]["ha_enabled"] ? 1 : 0
2+
create_ha_infra = var.hana_count > 1 && var.common_variables["hana"]["ha_enabled"] ? 1 : 0
53
}
64

75
# Network resources: subnets, routes, etc
@@ -76,7 +74,7 @@ resource "aws_instance" "clusternodes" {
7674
ebs_block_device {
7775
volume_type = var.hana_data_disk_type
7876
volume_size = var.hana_data_disk_size
79-
device_name = local.hana_disk_device
77+
device_name = "/dev/sdb"
8078
}
8179

8280
volume_tags = {

aws/modules/hana_node/salt_provisioner.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ host_ips: [${join(", ", formatlist("'%s'", var.host_ips))}]
3535
network_domain: "tf.local"
3636
sbd_lun_index: 0
3737
iscsi_srv_ip: ${var.iscsi_srv_ip}
38-
hana_disk_device: ${local.hana_disk_device}
38+
hana_disk_device: /dev/nvme1n1
3939
cluster_ssh_pub: ${var.cluster_ssh_pub}
4040
cluster_ssh_key: ${var.cluster_ssh_key}
4141
EOF

aws/modules/iscsi_server/main.tf

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# iscsi server resources
22

3-
locals {
4-
iscsi_device_name = "/dev/xvdd"
5-
}
6-
73
module "get_os_image" {
84
source = "../../modules/get_os_image"
95
os_image = var.os_image
@@ -29,7 +25,7 @@ resource "aws_instance" "iscsisrv" {
2925
ebs_block_device {
3026
volume_type = "gp2"
3127
volume_size = var.iscsi_disk_size
32-
device_name = local.iscsi_device_name
28+
device_name = "/dev/sdb"
3329
}
3430

3531
volume_tags = {

aws/modules/iscsi_server/salt_provisioner.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ role: iscsi_srv
1818
${var.common_variables["grains_output"]}
1919
region: ${var.aws_region}
2020
iscsi_srv_ip: ${element(aws_instance.iscsisrv.*.private_ip, count.index)}
21-
iscsidev: ${local.iscsi_device_name}
21+
iscsidev: /dev/nvme1n1
2222
${yamlencode(
2323
{ partitions : { for index in range(var.lun_count) :
2424
tonumber(index + 1) => {

aws/modules/monitoring/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ resource "aws_instance" "monitoring" {
2323
ebs_block_device {
2424
volume_type = "gp2"
2525
volume_size = "10"
26-
device_name = "/dev/xvdd"
26+
device_name = "/dev/sdb"
2727
}
2828

2929
volume_tags = {

aws/modules/netweaver_node/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ resource "aws_instance" "netweaver" {
9898
ebs_block_device {
9999
volume_type = "gp2"
100100
volume_size = "60"
101-
device_name = "/dev/xvdd"
101+
device_name = "/dev/sdb"
102102
}
103103

104104
volume_tags = {

0 commit comments

Comments
 (0)