55387a5bbd22f2e54d4004d6b2629469b32d2c1f
[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     dpdk:
62       device_link: dpdk
63       slaves:
64         - '{{yaml.networks.vxlan.interface}}'
65       networks:
66         - dpdk
67   storage:
68     physical_devices:
69 {% for disk in yaml.disks_compute %}
70       {{disk.name}}:
71       {% if 'labels' in disk %}
72         labels:
73         {% for key, value in disk.labels.items() %}
74           {{key}}: '{{value}}'
75         {% endfor %}
76       {% endif %}
77         partitions:
78        {% for p in disk.partitions %}
79           - name: '{{p.name}}'
80             size: '{{p.size}}'
81             filesystem:
82               mountpoint: '{{p.mountpoint}}'
83               fstype: 'ext4'
84               mount_options: 'defaults'
85       {% endfor %}
86 {% endfor %}
87   platform:
88     image: 'xenial'
89     kernel: 'hwe-16.04'
90     kernel_params:
91 {% if 'platform' in yaml and 'kernel_params' in yaml.platform %}
92 {% for key, value in yaml.platform.kernel_params.items() %}
93       {{key}}: '{{value}}'
94 {% endfor %}
95 {% else %}
96       console: 'ttyS1,115200n8'
97       intel_iommu: 'on'
98       iommu: 'pt'
99       amd_iommu: 'on'
100       transparent_hugepage: 'never'
101 {% endif %}
102 {% if 'platform' in yaml and 'vcpu_pin_set' in yaml.platform %}
103       isolcpus: '{{yaml.platform.vcpu_pin_set}}'
104 {% endif %}
105   metadata:
106     owner_data:
107       openstack-nova-compute: enabled
108       openvswitch: enabled
109       openstack-libvirt: kernel
110       sriov: enabled
111       beta.kubernetes.io/fluentd-ds-ready: 'true'
112 ...