Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/create-flavors-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
branches:
- main
paths:
- 'Tests/iaas/standard-flavors/flavor-manager-input.py'
- 'Tests/iaas/scs-0103-v1-flavors.yaml'
- 'Tests/iaas/scs_0103_standard_flavors/standard_flavors.py'
- 'Tests/iaas/generate_flavors_yaml.py'
workflow_dispatch:

jobs:
Expand All @@ -27,7 +27,7 @@ jobs:
pip install PyYAML==6.0
- name: Run flavor-manager-input.py
run: |
python Tests/iaas/standard-flavors/flavor-manager-input.py < Tests/iaas/scs-0103-v1-flavors.yaml > Tests/iaas/SCS-Spec.MandatoryFlavors.verbose.yaml
python Tests/iaas/generate_flavors_yaml.py > Tests/iaas/SCS-Spec.MandatoryFlavors.verbose.yaml
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
Expand Down
34 changes: 29 additions & 5 deletions Standards/scs-0103-v1-standard-flavors.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ description: |

## Introduction

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

## Terminology

Expand Down Expand Up @@ -99,7 +96,7 @@ Note that this statement does not preclude the existence of additional flavors.
| SCS-4V-32 | 4 | shared-core | 32 | | |
| SCS-1L-1 | 1 | crowded-core | 1 | | |

### Recommended
### Recommended, part 1

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

### Recommended, part 2

The following flavors were added with v1.2 of this standard. If a CSP wants to offer
flavors with more RAM than the ones above, they should try to use these.

| Recommended name | vCPUs | vCPU type | RAM [GiB] | Root disk [GB] | Disk type |
| ---------------- | ------ | ------------- | ---------- | --------------- | ---------- |
| SCS-16V-64 | 16 | shared-core | 64 | | |
| SCS-16V-64-100 | 16 | shared-core | 64 | 100 | (any) |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest NOT to recommend flavors with root disks any more unless those are local SSDs.
We can add a reminder that we do recommend to use 5, 10, 20, 50, 100, 200, 500, 1000 as disk sizes (and scale them with RAM) in case providers feel a need to have flavors with disks.
(The flavors with 64GiB RAM could have a 200GB disk and 128GiB a 500G disk in my world, but again, let's rather not recommend them at all.)

| SCS-8V-64 | 8 | shared-core | 64 | | |
| SCS-16V-128 | 16 | shared-core | 128 | | |
| SCS-8V-64-100 | 8 | shared-core | 64 | 100 | (any) |
| SCS-16V-128-100 | 16 | shared-core | 128 | 100 | (any) |
| SCS-4V-64 | 4 | shared-core | 64 | | |
| SCS-8V-128 | 8 | shared-core | 128 | | |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that 1:16 (vCPU:RAM) is rather exotic, certainly if it's not even dedicated Cores (or Threads).

| SCS-4V-64-100 | 4 | shared-core | 64 | 100 | (any) |
| SCS-8V-128-100 | 8 | shared-core | 128 | 100 | (any) |
| SCS-4V-128 | 4 | shared-core | 128 | | |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1:32 is even more extreme.

| SCS-4V-128-100 | 4 | shared-core | 128 | 100 | (any) |

### Guarantees and properties

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

## Previous standard versions

This is v1.2 of the standard, which adds recommended flavors with more RAM.

Version 1.1 lifted a restriction regarding the property `scs:name-vN` as follows:
this property may now be used on any flavor, rather than standard flavors only. In addition, the "vN" is
now interpreted as "name variant N" instead of "version N of the naming standard". Note that this change
indeed preserves compliance, i.e., compliance with v1.0 implies compliance with v1.1.

The list of standard flavors used to be part of the flavor naming standard up until
[version 3](scs-0100-v3-flavor-naming.md). The following changes have been made to
the list in comparison with said standard:
Expand Down
97 changes: 97 additions & 0 deletions Tests/iaas/SCS-Spec.MandatoryFlavors.verbose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,90 +109,187 @@ recommended:
ram: 4096
disk: 10
scs:cpu-type: shared-core
scs:disk0-type: network
scs:name-v1: SCS-1V:4:10
scs:name-v2: SCS-1V-4-10
- name: SCS-2V-8-20
cpus: 2
ram: 8192
disk: 20
scs:cpu-type: shared-core
scs:disk0-type: network
scs:name-v1: SCS-2V:8:20
scs:name-v2: SCS-2V-8-20
- name: SCS-4V-16-50
cpus: 4
ram: 16384
disk: 50
scs:cpu-type: shared-core
scs:disk0-type: network
scs:name-v1: SCS-4V:16:50
scs:name-v2: SCS-4V-16-50
- name: SCS-8V-32-100
cpus: 8
ram: 32768
disk: 100
scs:cpu-type: shared-core
scs:disk0-type: network
scs:name-v1: SCS-8V:32:100
scs:name-v2: SCS-8V-32-100
- name: SCS-1V-2-5
cpus: 1
ram: 2048
disk: 5
scs:cpu-type: shared-core
scs:disk0-type: network
scs:name-v1: SCS-1V:2:5
scs:name-v2: SCS-1V-2-5
- name: SCS-2V-4-10
cpus: 2
ram: 4096
disk: 10
scs:cpu-type: shared-core
scs:disk0-type: network
scs:name-v1: SCS-2V:4:10
scs:name-v2: SCS-2V-4-10
- name: SCS-4V-8-20
cpus: 4
ram: 8192
disk: 20
scs:cpu-type: shared-core
scs:disk0-type: network
scs:name-v1: SCS-4V:8:20
scs:name-v2: SCS-4V-8-20
- name: SCS-8V-16-50
cpus: 8
ram: 16384
disk: 50
scs:cpu-type: shared-core
scs:disk0-type: network
scs:name-v1: SCS-8V:16:50
scs:name-v2: SCS-8V-16-50
- name: SCS-16V-32-100
cpus: 16
ram: 32768
disk: 100
scs:cpu-type: shared-core
scs:disk0-type: network
scs:name-v1: SCS-16V:32:100
scs:name-v2: SCS-16V-32-100
- name: SCS-1V-8-20
cpus: 1
ram: 8192
disk: 20
scs:cpu-type: shared-core
scs:disk0-type: network
scs:name-v1: SCS-1V:8:20
scs:name-v2: SCS-1V-8-20
- name: SCS-2V-16-50
cpus: 2
ram: 16384
disk: 50
scs:cpu-type: shared-core
scs:disk0-type: network
scs:name-v1: SCS-2V:16:50
scs:name-v2: SCS-2V-16-50
- name: SCS-4V-32-100
cpus: 4
ram: 32768
disk: 100
scs:cpu-type: shared-core
scs:disk0-type: network
scs:name-v1: SCS-4V:32:100
scs:name-v2: SCS-4V-32-100
- name: SCS-1L-1-5
cpus: 1
ram: 1024
disk: 5
scs:cpu-type: crowded-core
scs:disk0-type: network
scs:name-v1: SCS-1L:1:5
scs:name-v2: SCS-1L-1-5
- name: SCS-16V-64
cpus: 16
ram: 65536
scs:cpu-type: shared-core
scs:name-v1: SCS-16V:64
scs:name-v2: SCS-16V-64
- name: SCS-16V-64-100
cpus: 16
ram: 65536
disk: 100
scs:cpu-type: shared-core
scs:disk0-type: network
scs:name-v1: SCS-16V:64:100
scs:name-v2: SCS-16V-64-100
- name: SCS-8V-64
cpus: 8
ram: 65536
scs:cpu-type: shared-core
scs:name-v1: SCS-8V:64
scs:name-v2: SCS-8V-64
- name: SCS-16V-128
cpus: 16
ram: 131072
scs:cpu-type: shared-core
scs:name-v1: SCS-16V:128
scs:name-v2: SCS-16V-128
- name: SCS-8V-64-100
cpus: 8
ram: 65536
disk: 100
scs:cpu-type: shared-core
scs:disk0-type: network
scs:name-v1: SCS-8V:64:100
scs:name-v2: SCS-8V-64-100
- name: SCS-16V-128-100
cpus: 16
ram: 131072
disk: 100
scs:cpu-type: shared-core
scs:disk0-type: network
scs:name-v1: SCS-16V:128:100
scs:name-v2: SCS-16V-128-100
- name: SCS-4V-64
cpus: 4
ram: 65536
scs:cpu-type: shared-core
scs:name-v1: SCS-4V:64
scs:name-v2: SCS-4V-64
- name: SCS-8V-128
cpus: 8
ram: 131072
scs:cpu-type: shared-core
scs:name-v1: SCS-8V:128
scs:name-v2: SCS-8V-128
- name: SCS-4V-64-100
cpus: 4
ram: 65536
disk: 100
scs:cpu-type: shared-core
scs:disk0-type: network
scs:name-v1: SCS-4V:64:100
scs:name-v2: SCS-4V-64-100
- name: SCS-8V-128-100
cpus: 8
ram: 131072
disk: 100
scs:cpu-type: shared-core
scs:disk0-type: network
scs:name-v1: SCS-8V:128:100
scs:name-v2: SCS-8V-128-100
- name: SCS-4V-128
cpus: 4
ram: 131072
scs:cpu-type: shared-core
scs:name-v1: SCS-4V:128
scs:name-v2: SCS-4V-128
- name: SCS-4V-128-100
cpus: 4
ram: 131072
disk: 100
scs:cpu-type: shared-core
scs:disk0-type: network
scs:name-v1: SCS-4V:128:100
scs:name-v2: SCS-4V-128-100

32 changes: 0 additions & 32 deletions Tests/iaas/SCS-Spec.MandatoryFlavors.yaml

This file was deleted.

72 changes: 72 additions & 0 deletions Tests/iaas/generate_flavors_yaml.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/usr/bin/env python3
"""
Generate flavor specification file for osism's flavor manager,
cf. https://github.com/osism/openstack-flavor-manager .

The spec file is output to stdout.
"""
import logging
import sys

import yaml

from scs_0100_flavor_naming.flavor_names import compute_flavor_spec
from scs_0103_standard_flavors.standard_flavors import \
SCS_0103_V1_MANDATORY, SCS_0103_V1_RECOMMENDED

logger = logging.getLogger(__name__)


def convert_flavor_spec(canonical_name, spec):
"""convert `spec` into format for openstack-flavor-manager"""
converted = {
'name': canonical_name,
'cpus': spec['cpus'],
'ram': int(1024 * spec['ram']),
}
if 'disk' in spec:
converted['disk'] = spec['disk']
for k, v in spec.items():
if not k.startswith('scs:'):
continue
converted[k] = v
return converted


def compute_spec_list(canonical_names):
return [
convert_flavor_spec(
canonical_name,
compute_flavor_spec(canonical_name),
)
for canonical_name in canonical_names
]


def main(argv):
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO)

# boilerplate / scaffolding
result = yaml.safe_load("""
reference:
- field: name
mandatory_prefix: SCS-
- field: public
default: true
- field: disabled
default: false
- field: cpus
- field: ram
- field: disk
mandatory: []
recommended: []
""")

result['mandatory'] = compute_spec_list(SCS_0103_V1_MANDATORY)
result['recommended'] = compute_spec_list(SCS_0103_V1_RECOMMENDED)

print(yaml.dump(result, sort_keys=False))


if __name__ == "__main__":
sys.exit(main(sys.argv[1:]))
4 changes: 2 additions & 2 deletions Tests/iaas/openstack_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

import openstack

from scs_0100_flavor_naming.flavor_names import compute_flavor_spec
from scs_0100_flavor_naming.flavor_names_check import \
compute_scs_flavors, compute_scs_0100_syntax_check, compute_scs_0100_semantics_check, \
compute_flavor_spec
compute_scs_flavors, compute_scs_0100_syntax_check, compute_scs_0100_semantics_check
from scs_0101_entropy.entropy_check import \
compute_scs_0101_image_property, compute_scs_0101_flavor_property, compute_canonical_image, \
compute_collected_vm_output, compute_scs_0101_entropy_avail, compute_scs_0101_rngd, \
Expand Down
5 changes: 0 additions & 5 deletions Tests/iaas/scs-0100-v3-flavors.yaml

This file was deleted.

Loading
Loading