Skip to content

Instantly share code, notes, and snippets.

@shivaprasad-metimath
Created September 23, 2024 15:04
Show Gist options
  • Save shivaprasad-metimath/6441895ebdab44ecb19fe7bd27e43593 to your computer and use it in GitHub Desktop.
Save shivaprasad-metimath/6441895ebdab44ecb19fe7bd27e43593 to your computer and use it in GitHub Desktop.
CRAYSAT-1900
sat bootprep with input yaml file supporting both iSCSI and DVS has been tested on gamora:
(63d6d9983af4) sat-container:/sat/share # sat --loglevel debug bootprep run --vars-file "session_vars.yaml" --format json --skip-existing-configs --skip-existing-images --overwrite-templates --bos-version v2 .bootprep-csm-1.6.0-alpha.63/just-sessiontemplate-mod.yaml
INFO: Validating given input file .bootprep-csm-1.6.0-alpha.63/just-sessiontemplate-mod.yaml
INFO: Input file successfully validated against schema
DEBUG: Loaded auth token from /root/.config/sat/tokens/api_gw_service_nmn_local.ssiadmin.json.
DEBUG: Couldn't load the in-cluster config: Service host/port is not set. (proceeding under the assumption that the config should be loaded from the kubeconfig file)
INFO: Nothing to create in collection of CFS configurations
DEBUG: Given input file did not define any images, so skipping validation.
INFO: Given input did not define any IMS images
DEBUG: Issuing GET request to URL 'https://api-gw-service-nmn.local/apis/cfs/v2/configurations/uan-24.3.1'
DEBUG: Received response to GET request to URL 'https://api-gw-service-nmn.local/apis/cfs/v2/configurations/uan-24.3.1' with status code: '200': OK
DEBUG: Issuing GET request to URL 'https://api-gw-service-nmn.local/apis/ims/v3/images'
DEBUG: Received response to GET request to URL 'https://api-gw-service-nmn.local/apis/ims/v3/images' with status code: '200': OK
DEBUG: Issuing GET request to URL 'https://api-gw-service-nmn.local/apis/cfs/v2/configurations/uan-24.3.1'
DEBUG: Received response to GET request to URL 'https://api-gw-service-nmn.local/apis/cfs/v2/configurations/uan-24.3.1' with status code: '200': OK
DEBUG: Issuing GET request to URL 'https://api-gw-service-nmn.local/apis/cfs/v2/configurations/uan-24.3.1'
DEBUG: Received response to GET request to URL 'https://api-gw-service-nmn.local/apis/cfs/v2/configurations/uan-24.3.1' with status code: '200': OK
DEBUG: Issuing GET request to URL 'https://api-gw-service-nmn.local/apis/bos/v2/sessiontemplates'
DEBUG: Received response to GET request to URL 'https://api-gw-service-nmn.local/apis/bos/v2/sessiontemplates' with status code: '200': OK
INFO: 1 BOS session template already exists with the name compute-iscsi-test.gamora.na and will be overwritten.
INFO: 1 BOS session template already exists with the name uan-iscsi-test.gamora.na and will be overwritten.
INFO: 1 BOS session template already exists with the name compute-dvs-test.gamora.na and will be overwritten.
INFO: Creating 3 BOS session templates
INFO: Creating BOS session template at index 0 with name=compute-iscsi-test.gamora.na
below is boot_sets data:
{'compute': {'arch': 'X86', 'kernel_parameters': 'spire_join_token=${SPIRE_JOIN_TOKEN}', 'node_roles_groups': ['Application_UAN'], 'rootfs_provider': 'sbps', 'rootfs_provider_passthrough': 'sbps:v1:iqn.2023-06.csm.iscsi:_sbps-hsn._tcp.{{default.suffix}}.{{default.system_name}}.{{default.site_domain}}:300'}}
api data: {'cfs': {'configuration': 'uan-24.3.1'}, 'enable_cfs': True, 'name': 'compute-iscsi-test.gamora.na', 'boot_sets': {'compute': {'rootfs_provider': 'sbps', 'rootfs_provider_passthrough': 'sbps:v1:iqn.2023-06.csm.iscsi:_sbps-hsn._tcp.{{default.suffix}}.{{default.system_name}}.{{default.site_domain}}:300', 'etag': '61f3dce6c5abd8651e2f4de4f2bd5abd', 'path': 's3://boot-images/9a3106ec-bd6a-4dc8-a69f-0fcaee6f6e15/manifest.json', 'type': 's3', 'arch': 'X86', 'kernel_parameters': 'spire_join_token=${SPIRE_JOIN_TOKEN}', 'node_roles_groups': ['Application_UAN']}}}
booo {'compute': {'arch': 'X86', 'kernel_parameters': 'spire_join_token=${SPIRE_JOIN_TOKEN}', 'node_roles_groups': ['Application_UAN'], 'rootfs_provider': 'sbps', 'rootfs_provider_passthrough': 'sbps:v1:iqn.2023-06.csm.iscsi:_sbps-hsn._tcp.{{default.suffix}}.{{default.system_name}}.{{default.site_domain}}:300'}}
rootfsvalue:: sbps:v1:iqn.2023-06.csm.iscsi:_sbps-hsn._tcp.{{default.suffix}}.{{default.system_name}}.{{default.site_domain}}:300
api data after rootfs_assign: {'cfs': {'configuration': 'uan-24.3.1'}, 'enable_cfs': True, 'name': 'compute-iscsi-test.gamora.na', 'boot_sets': {'compute': {'rootfs_provider': 'sbps', 'rootfs_provider_passthrough': 'sbps:v1:iqn.2023-06.csm.iscsi:_sbps-hsn._tcp.tds.gamora.hpc.amslabs.hpecorp.net:300', 'etag': '61f3dce6c5abd8651e2f4de4f2bd5abd', 'path': 's3://boot-images/9a3106ec-bd6a-4dc8-a69f-0fcaee6f6e15/manifest.json', 'type': 's3', 'arch': 'X86', 'kernel_parameters': 'spire_join_token=${SPIRE_JOIN_TOKEN}', 'node_roles_groups': ['Application_UAN']}}}
DEBUG: Issuing PUT request to URL 'https://api-gw-service-nmn.local/apis/bos/v2/sessiontemplates/compute-iscsi-test.gamora.na'
DEBUG: Received response to PUT request to URL 'https://api-gw-service-nmn.local/apis/bos/v2/sessiontemplates/compute-iscsi-test.gamora.na' with status code: '200': OK
INFO: Successfully created BOS session template at index 0 with name=compute-iscsi-test.gamora.na
INFO: Creating BOS session template at index 1 with name=uan-iscsi-test.gamora.na
below is boot_sets data:
{'uan': {'arch': 'X86', 'kernel_parameters': 'spire_join_token=${SPIRE_JOIN_TOKEN}', 'node_roles_groups': ['Application_UAN'], 'rootfs_provider': 'sbps', 'rootfs_provider_passthrough': 'sbps:v1:iqn.2023-06.csm.iscsi:_sbps-hsn._tcp.{{default.suffix}}.{{default.system_name}}.{{default.site_domain}}:300'}}
api data: {'cfs': {'configuration': 'uan-24.3.1'}, 'enable_cfs': True, 'name': 'uan-iscsi-test.gamora.na', 'boot_sets': {'uan': {'rootfs_provider': 'sbps', 'rootfs_provider_passthrough': 'sbps:v1:iqn.2023-06.csm.iscsi:_sbps-hsn._tcp.{{default.suffix}}.{{default.system_name}}.{{default.site_domain}}:300', 'etag': '61f3dce6c5abd8651e2f4de4f2bd5abd', 'path': 's3://boot-images/9a3106ec-bd6a-4dc8-a69f-0fcaee6f6e15/manifest.json', 'type': 's3', 'arch': 'X86', 'kernel_parameters': 'spire_join_token=${SPIRE_JOIN_TOKEN}', 'node_roles_groups': ['Application_UAN']}}}
booo {'uan': {'arch': 'X86', 'kernel_parameters': 'spire_join_token=${SPIRE_JOIN_TOKEN}', 'node_roles_groups': ['Application_UAN'], 'rootfs_provider': 'sbps', 'rootfs_provider_passthrough': 'sbps:v1:iqn.2023-06.csm.iscsi:_sbps-hsn._tcp.{{default.suffix}}.{{default.system_name}}.{{default.site_domain}}:300'}}
rootfsvalue:: sbps:v1:iqn.2023-06.csm.iscsi:_sbps-hsn._tcp.{{default.suffix}}.{{default.system_name}}.{{default.site_domain}}:300
api data after rootfs_assign: {'cfs': {'configuration': 'uan-24.3.1'}, 'enable_cfs': True, 'name': 'uan-iscsi-test.gamora.na', 'boot_sets': {'uan': {'rootfs_provider': 'sbps', 'rootfs_provider_passthrough': 'sbps:v1:iqn.2023-06.csm.iscsi:_sbps-hsn._tcp.tds.gamora.hpc.amslabs.hpecorp.net:300', 'etag': '61f3dce6c5abd8651e2f4de4f2bd5abd', 'path': 's3://boot-images/9a3106ec-bd6a-4dc8-a69f-0fcaee6f6e15/manifest.json', 'type': 's3', 'arch': 'X86', 'kernel_parameters': 'spire_join_token=${SPIRE_JOIN_TOKEN}', 'node_roles_groups': ['Application_UAN']}}}
DEBUG: Issuing PUT request to URL 'https://api-gw-service-nmn.local/apis/bos/v2/sessiontemplates/uan-iscsi-test.gamora.na'
DEBUG: Received response to PUT request to URL 'https://api-gw-service-nmn.local/apis/bos/v2/sessiontemplates/uan-iscsi-test.gamora.na' with status code: '200': OK
INFO: Successfully created BOS session template at index 1 with name=uan-iscsi-test.gamora.na
INFO: Creating BOS session template at index 2 with name=compute-dvs-test.gamora.na
below is boot_sets data:
{'compute': {'arch': 'X86', 'kernel_parameters': 'spire_join_token=${SPIRE_JOIN_TOKEN}', 'node_roles_groups': ['Application_UAN'], 'rootfs_provider': 'cpss3', 'rootfs_provider_passthrough': 'dvs:api-gw-service-nmn.local:300:hsn0,nmn0:0'}}
api data: {'cfs': {'configuration': 'uan-24.3.1'}, 'enable_cfs': True, 'name': 'compute-dvs-test.gamora.na', 'boot_sets': {'compute': {'rootfs_provider': 'cpss3', 'rootfs_provider_passthrough': 'dvs:api-gw-service-nmn.local:300:hsn0,nmn0:0', 'etag': '61f3dce6c5abd8651e2f4de4f2bd5abd', 'path': 's3://boot-images/9a3106ec-bd6a-4dc8-a69f-0fcaee6f6e15/manifest.json', 'type': 's3', 'arch': 'X86', 'kernel_parameters': 'spire_join_token=${SPIRE_JOIN_TOKEN}', 'node_roles_groups': ['Application_UAN']}}}
booo {'compute': {'arch': 'X86', 'kernel_parameters': 'spire_join_token=${SPIRE_JOIN_TOKEN}', 'node_roles_groups': ['Application_UAN'], 'rootfs_provider': 'cpss3', 'rootfs_provider_passthrough': 'dvs:api-gw-service-nmn.local:300:hsn0,nmn0:0'}}
rootfsvalue:: dvs:api-gw-service-nmn.local:300:hsn0,nmn0:0
api data after rootfs_assign: {'cfs': {'configuration': 'uan-24.3.1'}, 'enable_cfs': True, 'name': 'compute-dvs-test.gamora.na', 'boot_sets': {'compute': {'rootfs_provider': 'cpss3', 'rootfs_provider_passthrough': 'dvs:api-gw-service-nmn.local:300:hsn0,nmn0:0', 'etag': '61f3dce6c5abd8651e2f4de4f2bd5abd', 'path': 's3://boot-images/9a3106ec-bd6a-4dc8-a69f-0fcaee6f6e15/manifest.json', 'type': 's3', 'arch': 'X86', 'kernel_parameters': 'spire_join_token=${SPIRE_JOIN_TOKEN}', 'node_roles_groups': ['Application_UAN']}}}
DEBUG: Issuing PUT request to URL 'https://api-gw-service-nmn.local/apis/bos/v2/sessiontemplates/compute-dvs-test.gamora.na'
DEBUG: Received response to PUT request to URL 'https://api-gw-service-nmn.local/apis/bos/v2/sessiontemplates/compute-dvs-test.gamora.na' with status code: '200': OK
INFO: Successfully created BOS session template at index 2 with name=compute-dvs-test.gamora.na
{
"session_templates": [
{
"name": "compute-iscsi-test.gamora.na",
"configuration": "uan-24.3.1"
},
{
"name": "uan-iscsi-test.gamora.na",
"configuration": "uan-24.3.1"
},
{
"name": "compute-dvs-test.gamora.na",
"configuration": "uan-24.3.1"
}
]
}
session_templates describe:
ncn-m001:~ # cray bos sessiontemplates describe compute-iscsi-test.gamora.na
enable_cfs = true
name = "compute-iscsi-test.gamora.na"
tenant = ""
[cfs]
configuration = "uan-24.3.1"
[boot_sets.compute]
arch = "X86"
etag = "61f3dce6c5abd8651e2f4de4f2bd5abd"
kernel_parameters = "spire_join_token=${SPIRE_JOIN_TOKEN}"
node_roles_groups = [ "Application_UAN",]
path = "s3://boot-images/9a3106ec-bd6a-4dc8-a69f-0fcaee6f6e15/manifest.json"
rootfs_provider = "sbps"
rootfs_provider_passthrough = "sbps:v1:iqn.2023-06.csm.iscsi:_sbps-hsn._tcp.tds.gamora.hpc.amslabs.hpecorp.net:300"
type = "s3"
ncn-m001:~ # cray bos sessiontemplates describe uan-iscsi-test.gamora.na
enable_cfs = true
name = "uan-iscsi-test.gamora.na"
tenant = ""
[cfs]
configuration = "uan-24.3.1"
[boot_sets.uan]
arch = "X86"
etag = "61f3dce6c5abd8651e2f4de4f2bd5abd"
kernel_parameters = "spire_join_token=${SPIRE_JOIN_TOKEN}"
node_roles_groups = [ "Application_UAN",]
path = "s3://boot-images/9a3106ec-bd6a-4dc8-a69f-0fcaee6f6e15/manifest.json"
rootfs_provider = "sbps"
rootfs_provider_passthrough = "sbps:v1:iqn.2023-06.csm.iscsi:_sbps-hsn._tcp.tds.gamora.hpc.amslabs.hpecorp.net:300"
type = "s3"
ncn-m001:~ # cray bos sessiontemplates describe compute-dvs-test.gamora.na
enable_cfs = true
name = "compute-dvs-test.gamora.na"
tenant = ""
[cfs]
configuration = "uan-24.3.1"
[boot_sets.compute]
arch = "X86"
etag = "61f3dce6c5abd8651e2f4de4f2bd5abd"
kernel_parameters = "spire_join_token=${SPIRE_JOIN_TOKEN}"
node_roles_groups = [ "Application_UAN",]
path = "s3://boot-images/9a3106ec-bd6a-4dc8-a69f-0fcaee6f6e15/manifest.json"
rootfs_provider = "cpss3"
rootfs_provider_passthrough = "dvs:api-gw-service-nmn.local:300:hsn0,nmn0:0"
type = "s3"
ncn-m001:~ #
input yaml file:
ncn-m001:/etc/cray/upgrade/csm/csm-1.6.0-alpha.63/media # cat .bootprep-csm-1.6.0-alpha.63/just-sessiontemplate-mod.yaml
# (C) Copyright 2022-2023 Hewlett Packard Enterprise Development LP
---
schema_version: 1.0.2
session_templates:
- name: "compute-iscsi-test.{{default.system_name}}.na"
image:
ims:
name: uan-uss-1.1.0-135-csm-1.5.x86_64-csm-1.6.0-alpha.63.2
configuration: "{{default.note}}uan-{{recipe.version}}"
bos_parameters:
boot_sets:
compute:
arch: X86
kernel_parameters: spire_join_token=${SPIRE_JOIN_TOKEN}
node_roles_groups:
- Application_UAN
rootfs_provider: "sbps"
rootfs_provider_passthrough: "sbps:v1:iqn.2023-06.csm.iscsi:_sbps-hsn._tcp.{{default.suffix}}.{{default.system_name}}.{{default.site_domain}}:300"
# Note: For SBPS, the parameters 'my-system' and 'my-site-domain' in the
# rootfs_provider_passthrough string need to be customized for the site.
# For information about finding these two parameters see the boot_orchestration document,
# Create_a_Session_Template_to_Boot_Compute_Nodes_with_SBPS.md.
# The relevant section is "Boot set `rootfs_provider_passthrough` parameters".
- name: "uan-iscsi-test.{{default.system_name}}.na"
image:
ims:
name: uan-uss-1.1.0-135-csm-1.5.x86_64-csm-1.6.0-alpha.63.2
configuration: "{{default.note}}uan-{{recipe.version}}"
bos_parameters:
boot_sets:
uan:
arch: X86
kernel_parameters: spire_join_token=${SPIRE_JOIN_TOKEN}
node_roles_groups:
- Application_UAN
rootfs_provider: "sbps"
rootfs_provider_passthrough: "sbps:v1:iqn.2023-06.csm.iscsi:_sbps-hsn._tcp.{{default.suffix}}.{{default.system_name}}.{{default.site_domain}}:300"
# Note: For SBPS, the parameters 'my-system' and 'my-site-domain' in the
# rootfs_provider_passthrough string need to be customized for the site.
# For information about finding these two parameters see the boot_orchestration document,
# Create_a_Session_Template_to_Boot_Compute_Nodes_with_SBPS.md.
# The relevant section is "Boot set `rootfs_provider_passthrough` parameters".
- name: "compute-dvs-test.{{default.system_name}}.na"
image:
ims:
name: uan-uss-1.1.0-135-csm-1.5.x86_64-csm-1.6.0-alpha.63.2
configuration: "{{default.note}}uan-{{recipe.version}}"
bos_parameters:
boot_sets:
compute:
arch: X86
kernel_parameters: spire_join_token=${SPIRE_JOIN_TOKEN}
node_roles_groups:
- Application_UAN
rootfs_provider: "cpss3"
rootfs_provider_passthrough: "dvs:api-gw-service-nmn.local:300:hsn0,nmn0:0"
# Note: For SBPS, the parameters 'my-system' and 'my-site-domain' in the
# rootfs_provider_passthrough string need to be customized for the site.
# For information about finding these two parameters see the boot_orchestration document,
# Create_a_Session_Template_to_Boot_Compute_Nodes_with_SBPS.md.
# The relevant section is "Boot set `rootfs_provider_passthrough` parameters".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment