aboutsummaryrefslogtreecommitdiff
path: root/lava_scheduler_app/tests/device-types/x86.jinja2
blob: 7dfa5560d81f66d33a70fe4df3612d81ba266267 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{% extends 'base.jinja2' %}

# in milliseconds
{% set boot_character_delay = boot_character_delay | default(500) %}
{% set boot_interface = boot_interface | default('net0') %}
{% block body %}
device_type: x86

{% set console_device = console_device | default('ttyS0') %}
{% set baud_rate = baud_rate | default(115200) %}

{# allow job context override - use a different variable name, undefined if not in job context #}
{% set base_kernel_args = extra_kernel_args | default(base_kernel_args) %}

actions:
  deploy:
    methods:
      tftp:
      ssh:
        options:
{{ ssh_options }}
        host: '{{ ssh_host|default('') }}'
        user: {{ ssh_user|default('root') }}
        port: {{ ssh_port|default(22) }}
        identity_file: {{ ssh_identity_file }}
  boot:
    connections:
      serial:
    methods:
      ssh:
      ipxe:
        parameters:
          bootloader_prompt: {{ bootloader_prompt|default('iPXE>') }}
          use_bootscript: {{ use_bootscript|default(False)}}
          lava_mac: {{ lava_mac_address|default('00:90:05:af:00:7d') }}
        nfs:
          commands:
          - dhcp {{ boot_interface }}
          - set console console={{ console_device }},{{ baud_rate }}n8 lava_mac={LAVA_MAC}
          - "set extraargs root=/dev/nfs rw {{ base_nfsroot_args }} {{ base_kernel_args }} {{ base_ip_args }}"
          - kernel tftp://{SERVER_IP}/{KERNEL} ${extraargs} ${console}
          - initrd tftp://{SERVER_IP}/{RAMDISK}
          - boot
        ramdisk:
          commands:
          - dhcp {{ boot_interface }}
          - set console console={{ console_device }},{{ baud_rate }}n8 lava_mac={LAVA_MAC}
          - set extraargs {{ base_kernel_args }} {{ base_ip_args }}
          - kernel tftp://{SERVER_IP}/{KERNEL} ${extraargs} ${console}
          - initrd tftp://{SERVER_IP}/{RAMDISK}
          - boot
{% endblock body %}

{% block timeouts %}
timeouts:
  actions:
    bootloader-retry:
      minutes: 2
    bootloader-interrupt:
      minutes: 5
    bootloader-commands:
      minutes: 5
  connections:
    bootloader-retry:
      minutes: 2
    bootloader-interrupt:
      minutes: 5
    bootloader-commands:
      minutes: 5
{% endblock timeouts %}