A session template must be created before starting a session with the Boot Orchestration Service (BOS).
This page shows Cray CLI commands for managing BOS session templates. To find the API versions of any commands listed, add -vvv
to the end of the CLI command,
and the CLI will print the underlying call to the API in the output.
When creating a new BOS session template, it can be helpful to start with a framework and then edit it as needed.
(ncn-mw#
) Use the following command to retrieve the BOS session template framework:
cray bos v2 sessiontemplatetemplate list --format json
(ncn-mw#
) The following command takes a JSON input file that contains the information required to create a new BOS session template.
It reads it in and creates a BOS session template using the BOS API.
cray bos v2 sessiontemplates create --file <INPUT_FILE> <NEW_TEMPLATE_NAME>
The following is an example of an input file:
{
"enable_cfs": true,
"boot_sets": {
"boot_set1": {
"kernel_parameters": "console=ttyS0,115200 bad_page=panic crashkernel=360M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell k8s_gw=api-gwservice-nmn.local quiet turbo_boost_limit=999",
"rootfs_provider": "cpss3",
"node_list": [
"x3000c0s19b1n0"
],
"etag": "90b2466ae8081c9a604fd6121f4c08b7",
"path": "s3://boot-images/06901f40-f2a6-4a64-bc26-772a5cc9d321/manifest.json",
"rootfs_provider_passthrough": "dvs:api-gw-service-nmn.local:300:eth0",
"type": "s3"
}
},
"cfs": {
"configuration": "cfs-config"
}
}
(ncn-mw#
) List all session templates:
cray bos v2 sessiontemplates list --format json
Example output:
[
{
"boot_sets": {
"computes": {
"etag": "b0ace28163302e18b68cf04dd64f2e01",
"kernel_parameters": "console=ttyS0,115200 bad_page=panic crashkernel=360M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell k8s_gw=api-gw-service-nmn.local quiet turbo_boost_limit=999",
"node_roles_groups": [
"Compute"
],
"path": "s3://boot-images/ef97d3c4-6f10-4d58-b4aa-7b70fcaf41ba/manifest.json",
"rootfs_provider": "cpss3",
"rootfs_provider_passthrough": "dvs:api-gw-service-nmn.local:300:eth0",
"type": "s3"
}
},
"cfs": {
"configuration": "compute-configuration"
},
"description": "Template for booting compute nodes, generated by the installation",
"enable_cfs": true,
"name": "cle-1.2.0",
"tenant": null
}
]
(ncn-mw#
) View a session template:
cray bos v2 sessiontemplates describe <SESSION_TEMPLATE_NAME> --format json
Example output:
{
"boot_sets": {
"computes": {
"etag": "b0ace28163302e18b68cf04dd64f2e01",
"kernel_parameters": "console=ttyS0,115200 bad_page=panic crashkernel=360M hugepagelist=2m-2g intel_iommu=off intel_pstate=disable iommu=pt ip=dhcp numa_interleave_omit=headless numa_zonelist_order=node oops=panic pageblock_order=14 pcie_ports=native printk.synchronous=y rd.neednet=1 rd.retry=10 rd.shell k8s_gw=api-gw-service-nmn.local quiet turbo_boost_limit=999",
"node_roles_groups": [
"Compute"
],
"path": "s3://boot-images/ef97d3c4-6f10-4d58-b4aa-7b70fcaf41ba/manifest.json",
"rootfs_provider": "cpss3",
"rootfs_provider_passthrough": "dvs:api-gw-service-nmn.local:300:eth0",
"type": "s3"
}
},
"cfs": {
"configuration": "compute-configuration"
},
"description": "Template for booting compute nodes, generated by the installation",
"enable_cfs": true,
"name": "cle-1.2.0",
"tenant": null
}
(ncn-mw#
) Remove an existing session template with the following command:
cray bos v2 sessiontemplates delete <SESSION_TEMPLATE_NAME>
(ncn-mw#
) The following command takes a JSON input file that contains the information required to modify the BOS session template.
cray bos v2 sessiontemplates update --file <INPUT_FILE> <TEMPLATE_NAME>
The format of this input file is the same as the one used to Create a session template.
Note that due to a regression in CSM 1.6, this includes a requirement that the boot_sets
field be specified (even if no changes are being made to its contents).
This regression bug is corrected in CSM 1.7. In CSM 1.6, the workaround is to specify the current boot_set
contents in the input file.