Manage a Session Template

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.

Session template framework

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

Create a session template

(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"
  }
}

List all session templates

(ncn-mw#) List all session templates:

cray bos v2 sessiontemplates list --format json

Example output:

[
  {
    "enable_cfs": true,
    "description": "Template for booting compute nodes, generated by the installation",
    "boot_sets": {
      "computes": {
        "rootfs_provider": "cpss3",
        "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"
        ],
        "etag": "b0ace28163302e18b68cf04dd64f2e01",
        "path": "s3://boot-images/ef97d3c4-6f10-4d58-b4aa-7b70fcaf41ba/manifest.json",
        "rootfs_provider_passthrough": "dvs:api-gw-service-nmn.local:300:eth0",
        "type": "s3"
      }
    },
    "name": "cle-1.2.0",
    "cfs": {
      "configuration": "compute-configuration"
    }
  }
]

View a session template

(ncn-mw#) View a session template:

cray bos v2 sessiontemplates describe <SESSION_TEMPLATE_NAME> --format json

Example output:

{
  "enable_cfs": true,
  "description": "Template for booting compute nodes, generated by the installation",
  "boot_sets": {
    "computes": {
      "rootfs_provider": "cpss3",
      "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"
      ],
      "etag": "b0ace28163302e18b68cf04dd64f2e01",
      "path": "s3://boot-images/ef97d3c4-6f10-4d58-b4aa-7b70fcaf41ba/manifest.json",
      "rootfs_provider_passthrough": "dvs:api-gw-service-nmn.local:300:eth0",
      "type": "s3"
    }
  },
  "name": "cle-1.2.0",
  "cfs": {
    "configuration": "compute-configuration"
  }
}

Delete a session template

(ncn-mw#) Remove an existing session template with the following command:

cray bos v2 sessiontemplates delete <SESSION_TEMPLATE_NAME>