1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-08 21:17:43 +03:00

M #-: oneprovisoin: count total instead of client (#1990)

This commit is contained in:
Jan Orel 2022-04-29 12:44:50 +02:00 committed by GitHub
parent 4cbe17f51c
commit 87480c1790
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 21 deletions

View File

@ -16,20 +16,20 @@
# ---------------------------------------------------------------------------- #
inputs:
- name: 'number_hosts'
type: text
description: 'Total number of AWS instances to create'
default: '1'
- name: 'number_ceph_full_hosts'
type: text
description: 'Number of instances to install Ceph HCI (osd + mon), usually 3'
default: '1'
description: 'Number of instances for Ceph full nodes (OSD+MON), usually 3'
default: '3'
- name: 'number_ceph_osd_hosts'
type: text
description: 'Number of instances to install Ceph HCI (osd only)'
default: '1'
description: 'Number of instances for Ceph OSD (OSD only)'
default: '0'
- name: 'number_ceph_client_hosts'
type: text
description: 'Number of instances for hypervisor (Ceph client only)'
default: '0'
- name: 'number_public_ips'
type: text

View File

@ -30,7 +30,7 @@ hosts:
- im_mad: "${input.one_hypervisor}"
vm_mad: "${input.one_hypervisor}"
provision:
count: "${input.number_hosts}"
ceph_full_count: "${input.number_ceph_full_hosts}"
ceph_osd_count: "${input.number_ceph_osd_hosts}"
hostname: "edge-vhost${index}"
ceph_client_count: "${input.number_ceph_client_hosts}"
hostname: "edge-host${index}"

View File

@ -16,20 +16,20 @@
# ---------------------------------------------------------------------------- #
inputs:
- name: 'number_hosts'
type: text
description: 'Total number of AWS instances to create'
default: '1'
- name: 'number_ceph_full_hosts'
type: text
description: 'Number of instances to install Ceph HCI (osd + mon), usually 3'
default: '1'
description: 'Number of instances for Ceph full nodes (OSD+MON), usually 3'
default: '3'
- name: 'number_ceph_osd_hosts'
type: text
description: 'Number of instances to install Ceph HCI (osd only)'
default: '1'
description: 'Number of instances for Ceph OSD (OSD only)'
default: '0'
- name: 'number_ceph_client_hosts'
type: text
description: 'Number of instances for hypervisor (Ceph client only)'
default: '0'
- name: 'number_public_ips'
type: text

View File

@ -30,8 +30,8 @@ hosts:
- im_mad: "${input.one_hypervisor}"
vm_mad: "${input.one_hypervisor}"
provision:
count: "${input.number_hosts}"
ceph_full_count: "${input.number_ceph_full_hosts}"
ceph_osd_count: "${input.number_ceph_osd_hosts}"
ceph_client_count: "${input.number_ceph_client_hosts}"
hostname: "edge-host${index}"
...

View File

@ -886,6 +886,10 @@ module OneProvision
hostnames = h['provision']['hostname']
elsif h['provision']['count']
count = Integer(h['provision']['count'])
elsif h['provision']['ceph_full_count']
count = Integer(h['provision']['ceph_full_count']) + \
Integer(h['provision']['ceph_osd_count']) + \
Integer(h['provision']['ceph_client_count'])
else
count = 1
end