fcaa3e180278f4d016576132c4236368c55d3b05
[yaml_builds.git] / site_type / ovsdpdk / templates / profiles / host / compute-r01.j2
1 ---
2 ##############################################################################
3 # Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.        #
4 #                                                                            #
5 # Licensed under the Apache License, Version 2.0 (the "License"); you may    #
6 # not use this file except in compliance with the License.                   #
7 #                                                                            #
8 # You may obtain a copy of the License at                                    #
9 #       http://www.apache.org/licenses/LICENSE-2.0                           #
10 #                                                                            #
11 # Unless required by applicable law or agreed to in writing, software        #
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT  #
13 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.           #
14 # See the License for the specific language governing permissions and        #
15 # limitations under the License.                                             #
16 ##############################################################################
17
18 schema: drydock/HostProfile/v1
19 metadata:
20   schema: metadata/Document/v1
21   name: ComputePlane
22   storagePolicy: cleartext
23   labels:
24     hosttype: ComputePlane
25   layeringDefinition:
26     abstract: false
27     layer: site
28   substitutions:
29     - dest:
30         path: .oob.credential
31       src:
32         schema: deckhand/Passphrase/v1
33         name: ipmi_admin_password
34         path: .
35 data:
36   hardware_profile: DELL_HP_Generic
37   oob:
38     type: 'ipmi'
39     network: 'oob'
40     account: '{{yaml.ipmi_admin.username}}'
41   primary_network: 'oam'
42   hardware_profile: DELL_HP_Generic
43   interfaces:
44     pxe:
45       device_link: pxe
46       slaves:
47         - '{{yaml.networks.pxe.interface}}'
48       networks:
49         - 'pxe'
50     bond0:
51       device_link: bond0
52       slaves:
53 {% for slave in yaml.networks.slaves %}
54         - '{{ slave.name }}'
55 {% endfor %}
56       networks:
57         - 'oam'
58         - 'storage'
59         - 'overlay'
60         - 'calico'
61     p1p1:
62       slaves:
63         - 'sriov_nic01'
64       sriov:
65         vf_count: 32 # Currently ignored
66         trustedmode: false
67     p3p2:
68       slaves:
69         - 'sriov_nic02'
70       sriov:
71         vf_count: 32 # Currently ignored
72         trustedmode: false
73   storage:
74     physical_devices:
75 {% for disk in yaml.disks_compute %}
76       {{disk.name}}:
77       {% if 'labels' in disk %}
78         labels:
79         {% for key, value in disk.labels.items() %}
80           {{key}}: '{{value}}'
81         {% endfor %}
82       {% endif %}
83         partitions:
84        {% for p in disk.partitions %}
85           - name: '{{p.name}}'
86             size: '{{p.size}}'
87             filesystem:
88               mountpoint: '{{p.mountpoint}}'
89               fstype: 'ext4'
90               mount_options: 'defaults'
91       {% endfor %}
92 {% endfor %}
93   platform:
94     image: 'xenial'
95     kernel: 'hwe-16.04'
96     kernel_params:
97 {% if 'platform' in yaml and 'kernel_params' in yaml.platform %}
98 {% for key, value in yaml.platform.kernel_params.items() %}
99       {{key}}: '{{value}}'
100 {% endfor %}
101 {% else %}
102       console: 'ttyS1,115200n8'
103       intel_iommu: 'on'
104       iommu: 'pt'
105       amd_iommu: 'on'
106       transparent_hugepage: 'never'
107 {% endif %}
108 {% if 'platform' in yaml and 'vcpu_pin_set' in yaml.platform %}
109       isolcpus: '{{yaml.platform.vcpu_pin_set}}'
110 {% endif %}
111   metadata:
112     owner_data:
113       openstack-nova-compute: enabled
114       openvswitch: enabled
115       openstack-libvirt: kernel
116       sriov: enabled
117       beta.kubernetes.io/fluentd-ds-ready: 'true'
118 ...