Skip to content

Commit 6b955ce

Browse files
scoopexMarc Schöchlinmbuechsegarloff
authored
Add larger memory flavors (#938)
Signed-off-by: Marc Schöchlin <[email protected]> Signed-off-by: Matthias Büchse <[email protected]> Signed-off-by: Kurt Garloff <[email protected]> Co-authored-by: Marc Schöchlin <[email protected]> Co-authored-by: Matthias Büchse <[email protected]> Co-authored-by: Kurt Garloff <[email protected]>
1 parent f586cd8 commit 6b955ce

15 files changed

+164
-414
lines changed

.github/workflows/create-flavors-spec.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ on:
55
branches:
66
- main
77
paths:
8-
- 'Tests/iaas/standard-flavors/flavor-manager-input.py'
9-
- 'Tests/iaas/scs-0103-v1-flavors.yaml'
8+
- 'Tests/iaas/scs_0103_standard_flavors/standard_flavors.py'
9+
- 'Tests/iaas/generate_flavors_yaml.py'
1010
workflow_dispatch:
1111

1212
jobs:
@@ -27,7 +27,7 @@ jobs:
2727
pip install PyYAML==6.0
2828
- name: Run flavor-manager-input.py
2929
run: |
30-
python Tests/iaas/standard-flavors/flavor-manager-input.py < Tests/iaas/scs-0103-v1-flavors.yaml > Tests/iaas/SCS-Spec.MandatoryFlavors.verbose.yaml
30+
python Tests/iaas/generate_flavors_yaml.py > Tests/iaas/SCS-Spec.MandatoryFlavors.verbose.yaml
3131
- name: Commit changes
3232
uses: stefanzweifel/git-auto-commit-action@v4
3333
with:

Standards/scs-0103-v1-standard-flavors.md

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,18 @@ track: IaaS
77
description: |
88
The SCS-0103 standard outlines mandatory and recommended specifications for flavors and properties in OpenStack
99
environments to ensure uniformity across SCS clouds. Mandatory and recommended flavors are defined with specific
10-
configurations of vCPUs, vCPU types, RAM, and root disk sizes, alongside extra specs like scs:name-vN, scs:cpu-type,
10+
configurations of vCPUs, vCPU types, RAM, and root disk sizes, alongside extra_specs like scs:name-vN, scs:cpu-type,
1111
and scs:diskN-type to detail the flavor's specifications. This standard facilitates guaranteed availability and
1212
consistency of flavors, simplifying the deployment process for DevOps teams.
1313
---
1414

1515
## Introduction
1616

17-
This is v1.1 of the standard, which lifts the following restriction regarding the property `scs:name-vN`:
18-
this property may now be used on any flavor, rather than standard flavors only. In addition, the "vN" is
19-
now interpreted as "name variant N" instead of "version N of the naming standard". Note that this change
20-
indeed preserves compliance, i.e., compliance with v1.0 implies compliance with v1.1.
17+
Note that this is v1.2 of this standard. See the closing section for more details.
2118

2219
## Terminology
2320

24-
extra_specs
21+
extra\_specs:
2522
Additional properties on an OpenStack flavor, see
2623
[OpenStack Nova user documentation](https://docs.openstack.org/nova/2024.1/user/flavors.html#extra-specs)
2724
and
@@ -36,9 +33,9 @@ OpenStack providers thus typically offer a large selection of flavors.
3633
While flavors can be discovered (`openstack flavor list`), it is helpful for users (DevOps teams),
3734
to have a guaranteed set of flavors available on all SCS clouds, so these need not be discovered.
3835

39-
## Properties (extra_specs)
36+
## Properties (extra\_specs)
4037

41-
The following extra_specs are recognized, together with the respective semantics:
38+
The following extra\_specs are recognized, together with the respective semantics:
4239

4340
- `scs:name-vN=NAME` (where `N` is a positive integer, and `NAME` is some string) means that
4441
`NAME` is a valid name for this flavor according to any major version of the [SCS standard on
@@ -56,22 +53,22 @@ The following extra_specs are recognized, together with the respective semantics
5653

5754
Whenever ANY of these are present on ANY flavor, the corresponding semantics must be satisfied.
5855

59-
The extra_spec `scs:name-vN` is to be interpreted as "name variant N". This name scheme is designed to be
56+
The extra\_spec `scs:name-vN` is to be interpreted as "name variant N". This name scheme is designed to be
6057
backwards compatible with v1.0 of this standard, where `scs:name-vN` is interpreted as
6158
"name according to naming standard vN". We abandon this former interpretation for two reasons:
6259

6360
1. the naming standards admit multiple (even many) names for the same flavor, and we want to provide a means
6461
of advertising more than one of them (said standards recommend using two: a short one and a long one),
6562
2. the same flavor name may be valid according to multiple versions at the same time, which would lead to
66-
a pollution of the extra_specs with redundant properties; for instance, the name
63+
a pollution of the extra\_specs with redundant properties; for instance, the name
6764
`SCS-4V-16` is valid for both [scs-0100-v2](scs-0100-v2-flavor-naming.md) and
6865
[scs-0100-v3](scs-0100-v3-flavor-naming.md), and, since it does not use any extension, it will be valid
6966
for any future version that only changes the extensions, such as the GPU vendor and architecture.
7067

7168
Note that it is not required to use consecutive numbers to number the name variants.
7269
This way, it becomes easier to remove a single variant (no "closing the gap" required).
7370

74-
If extra_specs of the form `scs:name-vN` are used to specify SCS flavor names, it is RECOMMENDED to include
71+
If extra\_specs of the form `scs:name-vN` are used to specify SCS flavor names, it is RECOMMENDED to include
7572
names for the latest stable major version of the standard on flavor naming.
7673

7774
## Standard SCS flavors
@@ -99,7 +96,7 @@ Note that this statement does not preclude the existence of additional flavors.
9996
| SCS-4V-32 | 4 | shared-core | 32 | | |
10097
| SCS-1L-1 | 1 | crowded-core | 1 | | |
10198

102-
### Recommended
99+
### Recommended, part 1
103100

104101
| Recommended name | vCPUs | vCPU type | RAM [GiB] | Root disk [GB] | Disk type |
105102
| ---------------- | ------ | ------------- | ---------- | --------------- | ---------- |
@@ -117,6 +114,26 @@ Note that this statement does not preclude the existence of additional flavors.
117114
| SCS-4V-32-100 | 4 | shared-core | 32 | 100 | (any) |
118115
| SCS-1L-1-5 | 1 | crowded-core | 1 | 5 | (any) |
119116

117+
### Recommended, part 2
118+
119+
The following flavors were added with v1.2 of this standard. If a CSP wants to offer
120+
flavors with more RAM than the ones above, they should try to use these.
121+
122+
| Recommended name | vCPUs | vCPU type | RAM [GiB] | Root disk [GB] | Disk type |
123+
| ---------------- | ------ | ------------- | ---------- | --------------- | ---------- |
124+
| SCS-16V-64 | 16 | shared-core | 64 | | |
125+
| SCS-8V-64 | 8 | shared-core | 64 | | |
126+
| SCS-16V-128 | 16 | shared-core | 128 | | |
127+
128+
Note that no flavors with disks have been added here; providers are of course welcome to
129+
also add variants with unspecified (e.g. `-200`) or ssd+ (e.g. `-200s`) disk types.
130+
Sticking to the 5, 10, 20, 50, 100, 200, 500, 1000 schedule for disk sizes is recommended
131+
in that case to avoid unnecessary fragmentation.
132+
133+
Likewise, flavors with more vCPUs (e.g. `-32V`, `-64V`) may be added and we recommend
134+
sticking to powers of two and to keep the vCPU to GiB RAM ratios 1:2, 1:4 and 1:8,
135+
unless customers have very specific demands.
136+
120137
### Guarantees and properties
121138

122139
The figures given in the table (number of CPUs, amount of RAM, root disk size) must match
@@ -158,6 +175,13 @@ instance life cycle.)
158175

159176
## Previous standard versions
160177

178+
This is v1.2 of the standard, which adds recommended flavors with more RAM.
179+
180+
Version 1.1 lifted a restriction regarding the property `scs:name-vN` as follows:
181+
this property may now be used on any flavor, rather than standard flavors only. In addition, the "vN" is
182+
now interpreted as "name variant N" instead of "version N of the naming standard". Note that this change
183+
indeed preserves compliance, i.e., compliance with v1.0 implies compliance with v1.1.
184+
161185
The list of standard flavors used to be part of the flavor naming standard up until
162186
[version 3](scs-0100-v3-flavor-naming.md). The following changes have been made to
163187
the list in comparison with said standard:

Standards/scs-0103-w1-standard-flavors-implementation.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ supplements:
99
## Operational tooling
1010

1111
The [openstack-flavor-manager](https://github.com/osism/openstack-flavor-manager) is able to
12-
create all standard, mandatory SCS flavors for you. It takes input that can be generated by
12+
create all standard, mandatory as well as recommended SCS flavors for you. It now has a `--limit-memory`
13+
(defaulting to 32 GiB) to skip the creation of recommended flavors above this memory limit.
14+
15+
You can generate input for it using the tool
1316
[`flavor-manager-input.py`](https://github.com/SovereignCloudStack/standards/blob/main/Tests/iaas/scs_0100_flavor_naming/flavor-manager-input.py).
1417

1518
## Automated tests

Tests/iaas/SCS-Spec.MandatoryFlavors.verbose.yaml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,90 +109,120 @@ recommended:
109109
ram: 4096
110110
disk: 10
111111
scs:cpu-type: shared-core
112+
scs:disk0-type: network
112113
scs:name-v1: SCS-1V:4:10
113114
scs:name-v2: SCS-1V-4-10
114115
- name: SCS-2V-8-20
115116
cpus: 2
116117
ram: 8192
117118
disk: 20
118119
scs:cpu-type: shared-core
120+
scs:disk0-type: network
119121
scs:name-v1: SCS-2V:8:20
120122
scs:name-v2: SCS-2V-8-20
121123
- name: SCS-4V-16-50
122124
cpus: 4
123125
ram: 16384
124126
disk: 50
125127
scs:cpu-type: shared-core
128+
scs:disk0-type: network
126129
scs:name-v1: SCS-4V:16:50
127130
scs:name-v2: SCS-4V-16-50
128131
- name: SCS-8V-32-100
129132
cpus: 8
130133
ram: 32768
131134
disk: 100
132135
scs:cpu-type: shared-core
136+
scs:disk0-type: network
133137
scs:name-v1: SCS-8V:32:100
134138
scs:name-v2: SCS-8V-32-100
135139
- name: SCS-1V-2-5
136140
cpus: 1
137141
ram: 2048
138142
disk: 5
139143
scs:cpu-type: shared-core
144+
scs:disk0-type: network
140145
scs:name-v1: SCS-1V:2:5
141146
scs:name-v2: SCS-1V-2-5
142147
- name: SCS-2V-4-10
143148
cpus: 2
144149
ram: 4096
145150
disk: 10
146151
scs:cpu-type: shared-core
152+
scs:disk0-type: network
147153
scs:name-v1: SCS-2V:4:10
148154
scs:name-v2: SCS-2V-4-10
149155
- name: SCS-4V-8-20
150156
cpus: 4
151157
ram: 8192
152158
disk: 20
153159
scs:cpu-type: shared-core
160+
scs:disk0-type: network
154161
scs:name-v1: SCS-4V:8:20
155162
scs:name-v2: SCS-4V-8-20
156163
- name: SCS-8V-16-50
157164
cpus: 8
158165
ram: 16384
159166
disk: 50
160167
scs:cpu-type: shared-core
168+
scs:disk0-type: network
161169
scs:name-v1: SCS-8V:16:50
162170
scs:name-v2: SCS-8V-16-50
163171
- name: SCS-16V-32-100
164172
cpus: 16
165173
ram: 32768
166174
disk: 100
167175
scs:cpu-type: shared-core
176+
scs:disk0-type: network
168177
scs:name-v1: SCS-16V:32:100
169178
scs:name-v2: SCS-16V-32-100
170179
- name: SCS-1V-8-20
171180
cpus: 1
172181
ram: 8192
173182
disk: 20
174183
scs:cpu-type: shared-core
184+
scs:disk0-type: network
175185
scs:name-v1: SCS-1V:8:20
176186
scs:name-v2: SCS-1V-8-20
177187
- name: SCS-2V-16-50
178188
cpus: 2
179189
ram: 16384
180190
disk: 50
181191
scs:cpu-type: shared-core
192+
scs:disk0-type: network
182193
scs:name-v1: SCS-2V:16:50
183194
scs:name-v2: SCS-2V-16-50
184195
- name: SCS-4V-32-100
185196
cpus: 4
186197
ram: 32768
187198
disk: 100
188199
scs:cpu-type: shared-core
200+
scs:disk0-type: network
189201
scs:name-v1: SCS-4V:32:100
190202
scs:name-v2: SCS-4V-32-100
191203
- name: SCS-1L-1-5
192204
cpus: 1
193205
ram: 1024
194206
disk: 5
195207
scs:cpu-type: crowded-core
208+
scs:disk0-type: network
196209
scs:name-v1: SCS-1L:1:5
197210
scs:name-v2: SCS-1L-1-5
198-
211+
- name: SCS-16V-64
212+
cpus: 16
213+
ram: 65536
214+
scs:cpu-type: shared-core
215+
scs:name-v1: SCS-16V:64
216+
scs:name-v2: SCS-16V-64
217+
- name: SCS-8V-64
218+
cpus: 8
219+
ram: 65536
220+
scs:cpu-type: shared-core
221+
scs:name-v1: SCS-8V:64
222+
scs:name-v2: SCS-8V-64
223+
- name: SCS-16V-128
224+
cpus: 16
225+
ram: 131072
226+
scs:cpu-type: shared-core
227+
scs:name-v1: SCS-16V:128
228+
scs:name-v2: SCS-16V-128

Tests/iaas/SCS-Spec.MandatoryFlavors.yaml

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#!/usr/bin/env python3
2+
"""
3+
Generate flavor specification file for osism's flavor manager,
4+
cf. https://github.com/osism/openstack-flavor-manager .
5+
6+
The spec file is output to stdout.
7+
"""
8+
import logging
9+
import sys
10+
11+
import yaml
12+
13+
from scs_0100_flavor_naming.flavor_names import compute_flavor_spec
14+
from scs_0103_standard_flavors.standard_flavors import \
15+
SCS_0103_V1_MANDATORY, SCS_0103_V1_RECOMMENDED
16+
17+
logger = logging.getLogger(__name__)
18+
19+
20+
def convert_flavor_spec(canonical_name, spec):
21+
"""convert `spec` into format for openstack-flavor-manager"""
22+
converted = {
23+
'name': canonical_name,
24+
'cpus': spec['cpus'],
25+
'ram': int(1024 * spec['ram']),
26+
}
27+
if 'disk' in spec:
28+
converted['disk'] = spec['disk']
29+
for k, v in spec.items():
30+
if not k.startswith('scs:'):
31+
continue
32+
converted[k] = v
33+
return converted
34+
35+
36+
def compute_spec_list(canonical_names):
37+
return [
38+
convert_flavor_spec(
39+
canonical_name,
40+
compute_flavor_spec(canonical_name),
41+
)
42+
for canonical_name in canonical_names
43+
]
44+
45+
46+
def main(argv):
47+
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO)
48+
49+
# boilerplate / scaffolding
50+
result = yaml.safe_load("""
51+
reference:
52+
- field: name
53+
mandatory_prefix: SCS-
54+
- field: public
55+
default: true
56+
- field: disabled
57+
default: false
58+
- field: cpus
59+
- field: ram
60+
- field: disk
61+
mandatory: []
62+
recommended: []
63+
""")
64+
65+
result['mandatory'] = compute_spec_list(SCS_0103_V1_MANDATORY)
66+
result['recommended'] = compute_spec_list(SCS_0103_V1_RECOMMENDED)
67+
68+
print(yaml.dump(result, sort_keys=False))
69+
70+
71+
if __name__ == "__main__":
72+
sys.exit(main(sys.argv[1:]))

Tests/iaas/openstack_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
import openstack
1616

17+
from scs_0100_flavor_naming.flavor_names import compute_flavor_spec
1718
from scs_0100_flavor_naming.flavor_names_check import \
18-
compute_scs_flavors, compute_scs_0100_syntax_check, compute_scs_0100_semantics_check, \
19-
compute_flavor_spec
19+
compute_scs_flavors, compute_scs_0100_syntax_check, compute_scs_0100_semantics_check
2020
from scs_0101_entropy.entropy_check import \
2121
compute_scs_0101_image_property, compute_scs_0101_flavor_property, compute_canonical_image, \
2222
compute_collected_vm_output, compute_scs_0101_entropy_avail, compute_scs_0101_rngd, \

Tests/iaas/scs-0100-v3-flavors.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)