mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-08 21:16:39 +09:00
M #-: oneprovision: make aws root configurable (#1995)
(cherry picked from commit fc3e7e20cf)
This commit is contained in:
1 parent
6a32c50b64
commit
c1bc788e5c
9 files changed
+29
No files matched your search
@@ -48,6 +48,7 @@ defaults:
|
||||
provision:
|
||||
provider_name: 'aws'
|
||||
ami: "${input.aws_ami_image}"
|
||||
root_size: "${input.aws_root_size}"
|
||||
instancetype: "${input.aws_instance_type}"
|
||||
cloud_init: true
|
||||
connection:
|
||||
|
||||
@@ -46,6 +46,11 @@ inputs:
|
||||
description: 'AWS ami image used for host deployments'
|
||||
default: 'default'
|
||||
|
||||
- name: 'aws_root_size'
|
||||
type: text
|
||||
description: 'AWS instance root volume size, in GB'
|
||||
default: '100'
|
||||
|
||||
- name: 'aws_instance_type'
|
||||
type: text
|
||||
description: 'AWS instance type, use virtual instances'
|
||||
|
||||
@@ -36,6 +36,11 @@ inputs:
|
||||
description: 'AWS ami image used for host deployments'
|
||||
default: 'default'
|
||||
|
||||
- name: 'aws_root_size'
|
||||
type: text
|
||||
description: 'AWS instance root volume size, in GB'
|
||||
default: '100'
|
||||
|
||||
- name: 'aws_instance_type'
|
||||
type: text
|
||||
description: 'AWS instance type, use virtual instances'
|
||||
|
||||
@@ -47,6 +47,7 @@ defaults:
|
||||
provision:
|
||||
provider_name: 'aws'
|
||||
ami: "${input.aws_ami_image}"
|
||||
root_size: "${input.aws_root_size}"
|
||||
instancetype: "${input.aws_instance_type}"
|
||||
cloud_init: true
|
||||
connection:
|
||||
|
||||
@@ -48,6 +48,7 @@ defaults:
|
||||
provision:
|
||||
provider_name: 'aws'
|
||||
ami: "${input.aws_ami_image}"
|
||||
root_size: "${input.aws_root_size}"
|
||||
instancetype: "${input.aws_instance_type}"
|
||||
cloud_init: true
|
||||
connection:
|
||||
|
||||
@@ -51,6 +51,11 @@ inputs:
|
||||
description: 'AWS instance type, use bare-metal instances'
|
||||
default: 'c5.metal'
|
||||
|
||||
- name: 'aws_root_size'
|
||||
type: text
|
||||
description: 'AWS instance root volume size, in GB'
|
||||
default: '100'
|
||||
|
||||
- name: 'ceph_disk_size'
|
||||
type: text
|
||||
description: 'Disk size of CEPH disk volume, in GB'
|
||||
|
||||
@@ -36,6 +36,11 @@ inputs:
|
||||
description: 'AWS ami image used for host deployments'
|
||||
default: 'default'
|
||||
|
||||
- name: 'aws_root_size'
|
||||
type: text
|
||||
description: 'AWS instance root volume size, in GB'
|
||||
default: '100'
|
||||
|
||||
- name: 'aws_instance_type'
|
||||
type: text
|
||||
description: 'AWS instance type, use bare-metal instances'
|
||||
|
||||
@@ -46,6 +46,7 @@ defaults:
|
||||
provision:
|
||||
provider_name: 'aws'
|
||||
ami: "${input.aws_ami_image}"
|
||||
root_size: "${input.aws_root_size}"
|
||||
instancetype: "${input.aws_instance_type}"
|
||||
cloud_init: true
|
||||
connection:
|
||||
|
||||
@@ -13,6 +13,11 @@ resource "aws_instance" "device_<%= obj['ID'] %>" {
|
||||
|
||||
subnet_id = aws_subnet.device_<%= c['ID'] %>.id
|
||||
|
||||
root_block_device {
|
||||
volume_size = "<%= provision['ROOT_SIZE'] %>"
|
||||
}
|
||||
|
||||
|
||||
<% ecidr = c['TEMPLATE']['PROVISION']['CIDR'] || "10.0.0.0/16"
|
||||
pref = ecidr.split('/').first.rpartition(".")[0]
|
||||
ip = pref << '.' << ( provision['INDEX'].to_i + 4 ).to_s
|
||||
|
||||
Reference in new issue
Block a user