Closed netzzer closed 6 years ago
After thinking about this there are 3 items needed.
Example one cluster:
Enter your choice [1-5] : 4
------------------------------------------------------------
For this configuration 7 nodes are recommended
With a minimum of 3 required
------------------------------------------------------------
How many nodes are available ?: 3
What hosts will be used for application storage (IP/FQDN) ?: aaa.com bbb.com ccc.com
What are the raw storage devices for these hosts(/dev/<device>) ?: /dev/sdb /dev/sdc
What is the size of each raw storage device (GB) ?: 100
What is the size for the registry persistent volume (GB)?: 20
How many replicas for logging ?: 3
What is the size for each logging persistent volume (GB) ?: 20
What is the size for each metrics persistent volume (GB) ?: 20
------------------------------------------------------------
Cluster 1
Total Storage allocated (GB) = 124
Total Storage available (GB) = 200
------------------------------------------------------------
Example two cluster:
Enter your choice [1-5] : 4
------------------------------------------------------------
For this configuration 7 nodes are recommended
With a minimum of 3 required
------------------------------------------------------------
How many nodes are available ?: 6
What hosts will be used for application storage (IP/FQDN) ?: aaa.com bbb.com ccc.com
What are the raw storage devices for these hosts(/dev/<device>) ?: /dev/sdb
What is the size of each raw storage device (GB) ?: 100
What is the size for the registry persistent volume (GB)?: 150
How many replicas for logging ?: 3
What is the size for each logging persistent volume (GB) ?: 25
What is the size for each metrics persistent volume (GB) ?: 25
What hosts will be used for CNS logging + metrics backend storage (IP/FQDN) ?: ddd.com eee.com fff.com
What are the raw storage devices for logging + metrics backend on these hosts (/dev/<device>) ?: /dev/sdb /dev/sdc /dev/sdd
What is the size of each raw storage device (GB) ? : 100
------------------------------------------------------------
Cluster 1
Total Storage allocated (GB) = 0
Total Storage available (GB) = 100
Cluster2
Total Storage allocated (GB) = 280
Total Storage available (GB) = 300
>>>Warning one or more persistent volumes are larger than the raw storage device size<<<
------------------------------------------------------------
The PR #22 handles this issue. Needs testing.
WIP calcs cluster_storage = len(raw_devices) raw_storage_size len(app_hosts) block_calc = registry_pvsize + block_host_size totalcalc = block_calc if totalcalc < cluster_storage : print "cluster_storage=%d" % cluster_storage print "totalstoragecalc=%d" % totalcalc print "\033[91m Total Storage is Oversubscribed \033[0m" print "\033[91m Please provision the storage \033[0m" print "Total storage calc = block_host_vol_size (if it exists) \n" print "+registry PV < sum of storage devices per node \033[0m" exit()