Closed Masber closed 8 months ago
@miguelgila it is not clear to me how the session vars is generated or from where it comes from, is this the schema of this file fixed?
the template has this field csm_diags.version
which does not exists in the sessions var
This particular vars file seems to have been taken from another place in CSM, it lists all the components of what I think is one of their recipes. We can simplify/clean it as much as we want, the only vars needed are what's in the sat yaml file.
Please note that not all the fields in the sat file are templatable, for example the ims recipe or image name. Which is sub-optimal as one would want to have the sat file clean and use vars everywhere. Maybe this is something we can do in manta?
@Masber this is a more realistic variables file:
---
base_image: "gracehopper-base-cscs-uss-1.0.0-58-csm-1.5.aarch64-shs-2.1.1-64-cos-3.0-aarch64-compute-image-20"
default:
network_type: cassini
note: 'santis'
suffix: 23.11.0-beta.5-9
wlm: slurm
working_branch: "cscs-23.07.0"
slingshot:
version: 2.1.1-894
slingshot-host-software:
version: 2.1.1-64-cos-3.0-aarch64
working_branch: cscs-23.07.0
sma:
version: 1.9.5
uan:
version: 2.7.1
working_branch: cscs-23.07.0
uss:
version: 1.0.0-58-csm-1.5
working_branch: cscs-23.07.0-no-nvhpc
As you can see some of those fields have been copied from the same location as the previous one, but other ones like base_image
are completely arbitrary and created by us.
example of a SAT template file:
❯ cat sat-file/sat_file-zinal-cta-client-template.yaml
configurations:
- name: "{{ config.name }}-{{ config.version }}"
layers:
- name: ss11
playbook: shs_cassini_install.yml
git:
url: https://api-gw-service-nmn.local/vcs/cray/slingshot-host-software-config-management.git
branch: integration
- name: cos
playbook: site.yml
product:
name: cos
version: 2.3.101
branch: integration
- name: cscs
playbook: site.yml
git:
url: https://api-gw-service-nmn.local/vcs/cray/cscs-config-management.git
branch: cscs-23.06.0
- name: nomad-orchestrator
playbook: site-client.yml
git:
url: https://api-gw-service-nmn.local/vcs/cray/nomad_orchestrator.git
branch: main
images:
- name: zinal-nomad-{{ image.version }}
ims:
is_recipe: false
id: 4bf91021-8d99-4adf-945f-46de2ff50a3d
configuration: "{{ config.name }}-{{ config.version }}"
configuration_group_names:
- Compute
- "{{ hsm.group_name }}"
session_templates:
- name: "{{ bos_st.name }}"
image: zinal-image-v0.5
configuration: "{{ config.name }}-{{ config.version }}"
bos_parameters:
boot_sets:
compute:
kernel_parameters: ip=dhcp quiet spire_join_token=${SPIRE_JOIN_TOKEN}
node_groups:
- "{{ hsm.group_name }}"
And the values file:
❯ cat sat-file/sat_file-zinal-cta-client-values.yaml
---
hsm:
group_name: "zinal_cta"
config:
name: "test-config"
version: "v1.0.0"
image:
version: "v1.0.5"
bos_st:
name: "deploy-cluster-action"
version: "v1.0"
And the result rendered file:
manta a cluster -f sat-file/sat_file-zinal-cta-client-template.yaml -V sat-file/sat_file-zinal-cta-client-values.yaml`
DEBUG SAT file rendered:
:configurations:
- name: "test-config-v1.0.0"
layers:
- name: ss11
playbook: shs_cassini_install.yml
git:
url: https://api-gw-service-nmn.local/vcs/cray/slingshot-host-software-config-management.git
branch: integration
- name: cos
playbook: site.yml
product:
name: cos
version: 2.3.101
branch: integration
- name: cscs
playbook: site.yml
git:
url: https://api-gw-service-nmn.local/vcs/cray/cscs-config-management.git
branch: cscs-23.06.0
- name: nomad-orchestrator
playbook: site-client.yml
git:
url: https://api-gw-service-nmn.local/vcs/cray/nomad_orchestrator.git
branch: main
images:
- name: zinal-nomad-v1.0.5
ims:
is_recipe: false
id: 4bf91021-8d99-4adf-945f-46de2ff50a3d
configuration: "test-config-v1.0.0"
configuration_group_names:
- Compute
- "zinal_cta"
session_templates:
- name: "deploy-cluster-action"
image: zinal-image-v0.5
configuration: "test-config-v1.0.0"
bos_parameters:
boot_sets:
compute:
kernel_parameters: ip=dhcp quiet spire_join_token=${SPIRE_JOIN_TOKEN}
node_groups:
- "zinal_cta"
implemented in version v1.22.9
SAT file to deploy clusters is currently a static file and we would like to add support so we could use a jinja2 template features. An example would be something like:
With SAT file being:
And session vars file being: