update serverrc template for new yaml format
[yaml_builds.git] / tools / j2 / serverrc.j2
1 ##############################################################################
2 # Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.        #
3 #                                                                            #
4 # Licensed under the Apache License, Version 2.0 (the "License"); you may    #
5 # not use this file except in compliance with the License.                   #
6 #                                                                            #
7 # You may obtain a copy of the License at                                    #
8 #       http://www.apache.org/licenses/LICENSE-2.0                           #
9 #                                                                            #
10 # Unless required by applicable law or agreed to in writing, software        #
11 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT  #
12 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.           #
13 # See the License for the specific language governing permissions and        #
14 # limitations under the License.                                             #
15 ##############################################################################
16
17 # Add proxy settings if required for your environment
18 # export http_proxy=http://your.proxy.com:8080/
19 # export https_proxy=http://your.proxy.com:8080/
20 #
21
22 # host name for server
23 SRV_NAME={{yaml.genesis.name}}
24
25 # server oem - Dell or HPE (case sensitive)
26 SRV_OEM={{yaml.genesis.oem}}
27
28 # out of band interface information for server (idrac/ilo/etc)
29 SRV_OOB_IP={{yaml.genesis.oob}}
30 SRV_OOB_USR={{yaml.ipmi_admin.username}}
31 SRV_OOB_PWD={{yaml.ipmi_admin.password}}
32
33 # mac address of server to be used during the build - not required for Dell servers
34 {% if 'genesis.mac_address' in yaml %}
35 SRV_MAC={{yaml.genesis.mac_address}}
36 {% endif %}
37
38 # name of network interface used during build when ipxe.efi is booted and when os is booted
39 # ipxe numbers ports from 0-n in pci bus order.
40 # the netx value will depend on how many nics are in the server
41 # and which pci device number is assigned to the slot
42 SRV_IPXE_INF={{yaml.networks.pxe.inf}}
43
44 # the build interface is the nic used by the Ubuntu installed to load the OS
45 SRV_BLD_INF={{yaml.networks.slaves[0].name}}
46
47 # the boot device is the device name on which the OS will be loaded
48 SRV_BOOT_DEVICE={{yaml.disks[0].name}}
49 SRV_CEPH_DEVICE={{yaml.disks[1].name}}
50
51 # ipxe script to use - based on the os version and kernel to install
52 # valid options are script-hwe-16.04.6-amd64.ipxe or script-16.04.6-amd64.ipxe
53 SRV_BLD_SCRIPT=script-hwe-16.04.6-amd64.ipxe
54
55 # template xml file to set bios and raid configuration settings
56 SRV_BIOS_TEMPLATE={% if 'bios_template' in yaml.genesis %}{{yaml.genesis.bios_template}}
57                   {% else %}{{yaml.hardware.bios_template}}
58                   {% endif %}
59 SRV_BOOT_TEMPLATE={% if 'boot_template' in yaml.genesis %}{{yaml.genesis.boot_template}}
60                   {% else %}{{yaml.hardware.boot_template}}
61                   {% endif %}
62 SRV_HTTP_BOOT_DEV={% if 'http_boot_device' in yaml.genesis %}{{yaml.genesis.http_boot_device}}
63                   {% else %}{{yaml.hardware.http_boot_device}}
64                   {% endif %}
65
66 # tempalte to run to configure OS after first boot
67 # current options are: firstboot.sh.template, firstboot-genesis.sh.tempate or firstboot-airship-iab.sh.template
68 SRV_FIRSTBOOT_TEMPLATE=firstboot-genesis.sh.template
69
70 # VLAN to use during build and for final network configuration
71 SRV_VLAN={{yaml.networks.host.vlan}}
72 SRV_STORAGE_VLAN={{yaml.networks.storage.vlan}}
73 SRV_CALICO_VLAN={{yaml.networks.ksn.vlan}}
74 SRV_NEUTRON_VLAN={{yaml.networks.neutron.vlan}}
75 SRV_PXE_INF={{yaml.networks.pxe.interface}}
76
77 # basic network information for dhcp config and final server network settings
78 SRV_MTU=9000
79 SRV_IP={{yaml.genesis.host}}
80 SRV_STORAGE_IP={{yaml.genesis.storage}}
81 SRV_CALICO_IP={{yaml.genesis.ksn}}
82 SRV_NEUTRON_IP={{yaml.genesis.neutron}}
83 SRV_PXE_IP={{yaml.genesis.pxe}}
84 SRV_SUBNET={{yaml.networks.host.subnet}}
85 SRV_NETMASK={{yaml.networks.host.netmask}}
86 SRV_GATEWAY={{yaml.networks.host.routes.gateway}}
87 SRV_DNS="{% if 'dns' in yaml.networks.host %}{{yaml.networks.host.dns.servers}}{% else %}{{yaml.dns.upstream_servers|join(' ')}}{% endif %}"
88 SRV_DOMAIN={% if 'dns' in yaml.networks.pxe and 'domain' in yaml.networks.pxe.dns %}{{yaml.networks.pxe.dns.domain}}
89            {% else %}{{yaml.dns.server_domain}}
90            {% endif %}
91 SRV_DNSSEARCH={% if 'dns' in yaml.networks.pxe and 'domain' in yaml.networks.pxe.dns %}{{yaml.networks.pxe.dns.domain}}
92               {% else %}{{yaml.dns.server_domain}}
93               {% endif %}
94 SRV_NTP=ntp.ubuntu.org
95
96 # root password for server being built
97 SRV_PWD={{yaml.genesis.root_password}}
98
99 # network bond information
100 SRV_BOND={{yaml.networks.primary}}
101 {% for slave in yaml.networks.slaves %}
102 SRV_SLAVE{{loop.index}}={{slave.name}}
103 {% endfor %}
104