diff options
author | agardner <agardner@linuxfoundation.org> | 2017-04-26 13:48:59 +0200 |
---|---|---|
committer | agardner <agardner@linuxfoundation.org> | 2017-04-27 15:02:17 +0200 |
commit | 605523f4809302feea325eedb24755c4b943a661 (patch) | |
tree | 8990e0434e2a0987c01277e3e0af48af44d3f9f6 /installers/joid | |
parent | 96333a991d30582aab727269e2024e7c2b9b9f19 (diff) |
Takes a template file and feeds it values
Values come from a pod config file.
This is just an example, only ipmi_ips are templated at this time.
eg: address: {{ config['global_details']['ipmi_ips'][0] }}
test like this:
./utils/generate_config.py -y labs/intel/pod5/pod.yaml -j
installers/joid/labconfig.jinja2
releng should have a new job, validate-templates
that looks for
pattern: 'utils/generate_config.yml'
pattern: '**/*.jinja2'
and tests that templating does not error.
Change-Id: I7f781abb702afcfccf7ed17674378cffe4a7177d
Signed-off-by: agardner <agardner@linuxfoundation.org>
Diffstat (limited to 'installers/joid')
-rw-r--r-- | installers/joid/labconfig.jinja2 | 190 |
1 files changed, 190 insertions, 0 deletions
diff --git a/installers/joid/labconfig.jinja2 b/installers/joid/labconfig.jinja2 new file mode 100644 index 0000000..9e95730 --- /dev/null +++ b/installers/joid/labconfig.jinja2 @@ -0,0 +1,190 @@ +lab: + location: intel + racks: + - rack: pod5 + nodes: + - name: rack-5-m1 + architecture: x86_64 + roles: [network,control] + nics: + - ifname: enp4s0f3 + spaces: [admin] + mac: ["00:1E:67:CF:BB:54"] + - ifname: ens785f0 + spaces: [data] + mac: ["90:E2:BA:85:4E:2C"] + - ifname: ens785f1.504 + spaces: [public] + mac: ["90:E2:BA:85:4E:2D"] + - ifname: ens785f0.505 + spaces: [floating] + mac: ["90:E2:BA:85:4E:2C"] + - ifname: ens785f1 + spaces: [storage] + mac: ["90:E2:BA:85:4E:2D"] + power: + type: ipmi + address: {{ config['global_details']['ipmi_ips'][0] }} + user: root + pass: root + - name: rack-5-m2 + architecture: x86_64 + roles: [compute,control,storage] + nics: + - ifname: enp4s0f3 + spaces: [admin] + mac: ["00:1E:67:CF:B8:93"] + - ifname: ens785f0 + spaces: [data] + mac: ["90:E2:BA:84:08:B8"] + - ifname: ens785f1.504 + spaces: [public] + mac: ["90:E2:BA:84:08:B9"] + - ifname: ens785f0.505 + spaces: [floating] + mac: ["90:E2:BA:85:4E:2C"] + - ifname: ens785f1 + spaces: [storage] + mac: ["90:E2:BA:85:4E:2D"] + power: + type: ipmi + address: {{ config['global_details']['ipmi_ips'][1] }} + user: root + pass: root + - name: rack-5-m3 + architecture: x86_64 + roles: [compute,control,storage] + nics: + - ifname: enp4s0f3 + spaces: [admin] + mac: ["00:1E:67:E0:08:7F"] + - ifname: ens785f0 + spaces: [data] + mac: ["90:E2:BA:84:07:0D"] + - ifname: ens785f1.504 + spaces: [public] + mac: ["90:E2:BA:84:07:0E"] + - ifname: ens785f0.505 + spaces: [floating] + mac: ["90:E2:BA:85:4E:2C"] + - ifname: ens785f1 + spaces: [storage] + mac: ["90:E2:BA:85:4E:2D"] + power: + type: ipmi + address: {{ config['global_details']['ipmi_ips'][2] }} + user: root + pass: root + - name: rack-5-m4 + architecture: x86_64 + roles: [compute,storage] + nics: + - ifname: enp4s0f3 + spaces: [admin] + mac: ["00:1E:67:E0:08:B1"] + - ifname: ens785f0 + spaces: [data] + mac: ["90:E2:BA:83:FD:80"] + - ifname: ens785f1.504 + spaces: [public] + mac: ["90:E2:BA:83:FD:81"] + - ifname: ens785f0.505 + spaces: [floating] + mac: ["90:E2:BA:85:4E:2C"] + - ifname: ens785f1 + spaces: [storage] + mac: ["90:E2:BA:85:4E:2D"] + power: + type: ipmi + address: {{ config['global_details']['ipmi_ips'][3] }} + user: root + pass: root + - name: rack-5-m5 + architecture: x86_64 + roles: [compute,storage] + nics: + - ifname: enp4s0f3 + spaces: [admin] + mac: ["00:1E:67:E0:0A:4B"] + - ifname: ens785f0 + spaces: [data] + mac: ["90:E2:BA:75:22:74"] + - ifname: ens785f1.504 + spaces: [public] + mac: ["90:E2:BA:75:22:75"] + - ifname: ens785f0.505 + spaces: [floating] + mac: ["90:E2:BA:85:4E:2C"] + - ifname: ens785f1 + spaces: [storage] + mac: ["90:E2:BA:85:4E:2D"] + power: + type: ipmi + address: {{ config['global_details']['ipmi_ips'][4] }} + user: root + pass: root +# - name: rack-5-m6 +# architecture: x86_64 +# roles: [compute,storage] +# nics: +# - ifname: enp4s0f3 +# spaces: [admin] +# mac: ["98:4F:EE:10:03:43"] +# - ifname: ens785f0 +# spaces: [data] +# mac: ["00:1E:67:9C:3E:54"] +# - ifname: ens785f1.504 +# spaces: [public] +# mac: ["00:1E:67:9C:3E:55"] +# power: +# type: ipmi + address: {{ config['global_details']['ipmi_ips'][5] }} +# user: root +# pass: root + floating-ip-range: 10.5.15.6,10.5.15.250,10.5.15.1,10.5.15.0/24 + ext-port: "ens785f0.505" + dns: 8.8.8.8 + osdomainname: +opnfv: + release: c + distro: trusty + type: nonha + openstack: liberty + sdncontroller: + - type: nosdn + storage: + - type: ceph + disk: /dev/sdb + feature: odl_l2 + spaces: + - type: admin + bridge: brAdm + cidr: 10.5.1.0/24 + gateway: 10.5.1.1 + vlan: + - type: data + bridge: brData + cidr: 10.5.12.0/24 + gateway: + vlan: + - type: storage + bridge: brStor + cidr: 10.5.13.0/24 + gateway: + vlan: + - type: public + bridge: brMgmt + cidr: 10.5.14.0/24 + gateway: + vlan: 504 + - type: floating + bridge: brPublic + cidr: 10.5.15.0/24 + gateway: + vlan: 505 + - type: external + bridge: brExt + cidr: + gateway: + ipaddress: 10.2.117.92 + vlan: |