updated templates and scripts for Airship 1.3
[yaml_builds.git] / site_type / sriov-a13 / templates / networks / common-addresses.j2
@@ -21,10 +21,25 @@ data:
     # bond and VLAN number specified in networks/physical/networks.yaml for the Calico
     # network. E.g. VLAN 22 for the calico network as a member of bond0, you
     # would set "interface=bond0.22" as shown here.
-    ip_autodetection_method: interface=bond0.22
+    ip_autodetection_method: interface={{yaml.networks.ksn.interface}}
     etcd:
       # etcd service IP address
       service_ip: 10.96.232.136
+    ip_rule:
+      gateway: {{yaml.networks.ksn.gateway }}
+    bgp:
+      ipv4:
+        public_service_cidr: {{yaml.networks.ksn.additional_cidrs[0]}}
+        ingress_vip: {{yaml.networks.ksn.ingress_vip}}
+{% if ('peers' in yaml.networks.ksn and yaml.networks.ksn.peers is not none and yaml.networks.ksn.peers is iterable ) %}
+        peers:
+{% for peer in yaml.networks.ksn.peers %}
+          - {{peer.ip}}
+{% endfor %}
+{% endif %}
+  vip:
+    ingress_vip: '{{yaml.networks.host.ranges.static.end}}/32'
+    maas_vip: '{{yaml.networks.host.ranges.static.end}}/32'
 
   dns:
     # Kubernetes cluster domain. Do not change. This is internal to the cluster.
@@ -34,16 +49,16 @@ data:
     # List of upstream DNS forwards. Verify you can reach them from your
     # environment. If so, you should not need to change them.
     upstream_servers:
-      - 8.8.8.8
-      - 8.8.4.4
-      - 208.67.222.222
+{% for server in yaml.dns.upstream_servers %}
+      - {{server}}
+{% endfor %}
     # Repeat the same values as above, but formatted as a common separated
     # string
-    upstream_servers_joined: 8.8.8.8,8.8.4.4,208.67.222.222
+    upstream_servers_joined: '{{yaml.dns.upstream_servers|batch(2)|first|join(',')}}'
     # NEWSITE-CHANGEME: FQDN for ingress (i.e. "publicly facing" access point)
     # Choose FQDN according to the ingress/public FQDN naming conventions at
     # the top of this document.
-    ingress_domain: airship-seaworthy.atlantafoundry.com
+    ingress_domain: {{yaml.dns.ingress_domain}}
 
   genesis:
     # NEWSITE-CHANGEME: Update with the hostname for the node which will take on
@@ -51,25 +66,25 @@ data:
     # networks/physical/networks.yaml
     # NOTE: Ensure that the genesis node is manually configured with this
     # hostname before running `genesis.sh` on the node.
-    hostname: cab23-r720-11
+    hostname: {{yaml.genesis.name}}
     # NEWSITE-CHANGEME: Calico IP of the Genesis node. Use the "start" value for
     # the calico network defined in networks/physical/networks.yaml for this IP.
-    ip: 10.23.22.11
+    ip: {{yaml.genesis.ksn}}
 
   bootstrap:
     # NEWSITE-CHANGEME: Update with the "start" value/IP of the static range
     # defined for the pxe network in networks/physical/networks.yaml
-    ip: 10.23.20.11
+    ip: {{yaml.genesis.pxe}}
 
   kubernetes:
     # K8s API service IP
-    api_service_ip: 10.96.0.1
+    api_service_ip: {{yaml.kubernetes.api_service_ip}}
     # etcd service IP
-    etcd_service_ip: 10.96.0.2
+    etcd_service_ip: {{yaml.kubernetes.etcd_service_ip}}
     # k8s pod CIDR (network which pod traffic will traverse)
-    pod_cidr: 10.97.0.0/16
+    pod_cidr: {{yaml.kubernetes.pod_cidr}}
     # k8s service CIDR (network which k8s API traffic will traverse)
-    service_cidr: 10.96.0.0/16
+    service_cidr: {{yaml.kubernetes.service_cidr}}
     # misc k8s port settings
     apiserver_port: 6443
     haproxy_port: 6553
@@ -84,9 +99,9 @@ data:
   # control plane servers. Ensure that this matches the nodes with the 'masters'
   # tags applied in baremetal/nodes.yaml
   masters:
-    - hostname: cab23-r720-12
-    - hostname: cab23-r720-13
-    - hostname: cab23-r720-14
+{% for master in yaml.masters %}
+    - hostname: {{master.name}}
+{% endfor %}
 
   # NEWSITE-CHANGEME: Environment proxy information.
   # NOTE: Reference Airship sites do not deploy behind a proxy, so this proxy section
@@ -103,8 +118,6 @@ data:
     drydock_api: 30000
     maas_api: 30001
     maas_proxy: 31800  # hardcoded in MAAS
-    shipyard_api: 30003
-    airflow_web: 30004
 
   ntp:
     # comma separated NTP server list. Verify that these upstream NTP servers are
@@ -136,22 +149,22 @@ data:
     ceph:
       # NEWSITE-CHANGEME: CIDRs for Ceph. Update to match the network CIDR
       # used for the `storage` network in networks/physical/networks.yaml
-      public_cidr: '10.23.23.0/24'
-      cluster_cidr: '10.23.23.0/24'
+      public_cidr: '{{yaml.networks.storage.cidr}}'
+      cluster_cidr: '{{yaml.networks.storage.cidr}}'
 
   neutron:
     # NEWSITE-CHANGEME: Overlay network for VM traffic. Ensure the bond name and
     # VLAN number are consistent with what's defined for the bond and the overlay
     # network in networks/physical/networks.yaml
-    tunnel_device: 'bond0.24'
+    tunnel_device: '{{yaml.networks.neutron.interface}}'
     # bond which the overlay is a member of. Ensure the bond name is consistent
     # with the bond assigned to the overlay network in
     # networks/physical/networks.yaml
-    external_iface: 'bond0'
+    external_iface: '{{yaml.networks.primary}}'
 
   openvswitch:
     # bond which the overlay is a member of. Ensure the bond name is consistent
     # with the bond assigned to the overlay network in
     # networks/physical/networks.yaml
-    external_iface: 'bond0'
+    external_iface: '{{yaml.networks.primary}}'
 ...