Skip to content

Latest commit

 

History

History
113 lines (110 loc) · 4.43 KB

File metadata and controls

113 lines (110 loc) · 4.43 KB

Example OpenStackDataPlaneNodeSet CR for bare metal nodes

The following example OpenStackDataPlaneNodeSet CR creates a set of generic Compute nodes with some node-specific configuration.

apiVersion: dataplane.openstack.org/v1beta1
kind: OpenStackDataPlaneNodeSet
metadata:
  name: openstack-edpm-ipam
  namespace: openstack
spec:
  baremetalSetTemplate: #(1)
    bmhLabelSelector:
      app: openstack
    cloudUserName: cloud-admin
    ctlplaneInterface: enp1s0
  env: #(2)
    - name: ANSIBLE_FORCE_COLOR
      value: "True"
  networkAttachments: #(3)
    - ctlplane
  nodeTemplate: #(4)
    ansible:
      ansibleUser: cloud-admin #(5)
      ansibleVars: #(6)
        edpm_network_config_template: | #(7)
          ---
          {% set mtu_list = [ctlplane_mtu] %}
          {% for network in nodeset_networks %}
          {% set _ = mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) %}
          {%- endfor %}
          {% set min_viable_mtu = mtu_list | max %}
          network_config:
          - type: ovs_bridge
            name: {{ neutron_physical_bridge_name }}
            mtu: {{ min_viable_mtu }}
            use_dhcp: false
            dns_servers: {{ ctlplane_dns_nameservers }}
            domain: {{ dns_search_domains }}
            addresses:
            - ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }}
            routes: {{ ctlplane_host_routes }}
            members:
            - type: interface
              name: nic1
              mtu: {{ min_viable_mtu }}
              # force the MAC address of the bridge to this interface
              primary: true
          {% for network in nodeset_networks %}
            - type: vlan
              mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
              vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
              addresses:
              - ip_netmask:
                  {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
              routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
          {% endfor %}
        edpm_nodes_validation_validate_controllers_icmp: false
        edpm_nodes_validation_validate_gateway_icmp: false
        edpm_sshd_allowed_ranges:
          - 192.168.111.0/24
        enable_debug: false
        gather_facts: false
        neutron_physical_bridge_name: br-ex
        neutron_public_interface_name: eth0
    ansibleSSHPrivateKeySecret: dataplane-ansible-ssh-private-key-secret #(8)
    networks: #(9)
      - defaultRoute: true
        name: ctlplane
        subnetName: subnet1
      - name: internalapi
        subnetName: subnet1
      - name: storage
        subnetName: subnet1
      - name: tenant
        subnetName: subnet1
  nodes:
    edpm-compute-0: #(10)
      hostName: edpm-compute-0
  preProvisioned: false
  services: #(11)
    - redhat
    - bootstrap
    - download-cache
    - configure-network
    - validate-network
    - install-os
    - configure-os
    - ssh-known-hosts
    - run-os
    - reboot-os
    - install-certs
    - ovn
    - neutron-metadata
    - libvirt
    - nova
    - telemetry
  tlsEnabled: true
  1. Configure the bare metal template for bare metal nodes that must be provisioned when creating the resource.

  2. Optional: A list of environment variables to pass to the pod.

  3. The networks the ansibleee-runner connects to, specified as a list of netattach resource names.

  4. The common configuration to apply to all nodes in this set of nodes.

  5. The user associated with the secret you created in Creating the SSH key secrets.

  6. The Ansible variables that customize the set of nodes. For a complete list of Ansible variables, see https://openstack-k8s-operators.github.io/edpm-ansible/.

  7. The network configuration template to apply to nodes in the set. For sample templates, see https://github.com/openstack-k8s-operators/edpm-ansible/tree/main/roles/edpm_network_config/templates.

  8. The name of the secret that you created in Creating the SSH key secrets.

  9. Networks for the bare metal nodes.

  10. The node definition reference, for example, edpm-compute-0. Each node in the node set must have a node definition.

  11. The services that are deployed on the data plane nodes in this OpenStackDataPlaneNodeSet CR.