apiVersion: dataplane.openstack.org/v1beta1
kind: OpenStackDataPlaneNodeSet
metadata:
  name: ctl0-computes-zone0
  namespace: openstack
spec:
  preProvisioned: false
  env:
    - name: ANSIBLE_FORCE_COLOR
      value: "True"
  services:
  - bootstrap
  - configure-network
  - validate-network
  - install-os
  - configure-os
  - ssh-known-hosts
  - run-os
  - reboot-os
  - install-certs
  - ceph-client
  - ovn
  - neutron-metadata
  - libvirt
  - nova-ceph
  - telemetry
  baremetalSetTemplate:
    bmhLabelSelector:
      app: ctl-zone0
    ctlplaneInterface: enp2s0
    ctlplaneVlan: 110
    passwordSecret:
      name: osp-ng-noderootpass
      namespace: openstack
    deploymentSSHSecret: edpm-ssh-key
    bmhNamespace: openstack
    cloudUserName: gil
  nodes:
    ctl0-compute0:
      hostName: ctl0-compute0
  networkAttachments:
    - ctlplane-maz0
    - ctlplane-maz1
    - ctlplane-maz2
  nodeTemplate:
    extraMounts:
    - extraVolType: Ceph
      volumes:
      - name: ceph
        secret:
          secretName: ceph-conf-files
      mounts:
      - name: ceph
        mountPath: "/etc/ceph"
        readOnly: true
    networks:
      - name: ctlplane
        subnetName: subnet1
        defaultRoute: true
      - name: internalapi
        subnetName: subnet1
      - name: storage
        subnetName: subnet1
      - name: tenant
        subnetName: subnet1
      - name: external
        subnetName: subnet1
    ansibleSSHPrivateKeySecret: edpm-ssh-key
    managementNetwork: ctlplane
    ansible:
      ansibleUser: gil
      ansiblePort: 22
      ansibleVars:
        edpm_bootstrap_command: |
          echo "192.168.150.20  bastion-ocp4.demo.lab.com" >> /etc/hosts

          echo 'W3JoZWw5LWZkcF0KbmFtZT1yaGVsOS1mZHAKYmFzZXVybD1odHRwOi8vMTkyLjE2OC4xMDIuNjYvZmFzdC1kYXRhcGF0aC1mb3ItcmhlbC05LXg4Nl82NC1ycG1zCmdwZ2NoZWNrPTAKZW5hYmxlZD0xCgpbcmhjZXBoLTgtdG9vbHNdCm5hbWU9cmhjZXBoNy10b29scwpiYXNldXJsPWh0dHA6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0gxVDhubGRrSUY5dktFYld1U2tOTldONEdJSy9Ud3hOUU9EckVrbmdKbHEKdjBmNVJwZ3MxTGI2bURZc01FWWpGMFMwbmZ1RFRoOC8xMEtCSnZINnhMTWdTQ1VibmJENmZwL1h3N2tER0FUYQpZMit1S3pBVnZORGxoTjE3ZWVRbU1JQTlLazdPQ29ZQW9jSDJjRG50UjZzYVpQamFXbmNkM0xwbjhCVm1QZXR1ClYrU1laQmhJWnMzcXRuU2pueXhsZm1wV3dsbjJQTHNQUUtTN0E3YlpjZ3FiQmpBPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==' | base64 -d  > /etc/pki/ca-trust/source/anchors/bastion-ocp4.demo.lab.com.crt
          update-ca-trust
          mkdir -p /root/.docker
          echo '{"auths":{"bastion-ocp4.demo.lab.com":{"auth": "YWRtaW46cGFzc3dvcmQ="}}}' > /root/.docker/config.json
          echo 'dW5xdWFsaWZpZWQtc2VhcmNoLXJlZ2lzdHJpZXMgPSBbInJlZ2lzdHJ5LmFjY2Vzcy5yZWRoYXQuY29tIiwgImRvY2tlci5pbyJdCltbcmVnaXN0cnldXQogICBwcmVmaXggPSAiIgogICBsb2NhdGlvbiA9ICJxdWF5LmlvIgogICBtaXJyb3ItYnktZGlnZXN0LW9ubHkgPSBmYWxzZQogICBbW3JlZ2lzdHJ5Lm1pcnJvcl1dCiAgIGxvY2F0aW9uID0gImJhc3Rpb24tb2NwNC5kZW1vLmxhYi5jb20vYWRtaW4iCltbcmVnaXN0cnldXQogICBwcmVmaXggPSAiIgogICBsb2NhdGlvbiA9ICJxdWF5LmlvL29wZW5zaGlmdC1yZWxlYXNlLWRldi9vY3AtcmVsZWFzZSIKICAgbWlycm9yLWJ5LWRpZ2VzdC1vbmx5ID0gdHJ1ZQogICBbW3JlZ2lzdHJ5Lm1pcnJvcl1dCiAgIGxvY2F0aW9uID0gImJhc3Rpb24tb2NwNC5kZW1vLmxhYi5jb20vYWRtaW4vb2NwNCIKW1tyZWdpc3RyeV1dCiAgIHByZWZpeCA9ICIiCiAgIGxvY2F0aW9uID0gInF1YXkuaW8vb3BlbnNoaWZ0LXJlbGVhc2UtZGV2L29jcC12NC4wLWFydC1kZXYiCiAgIG1pcnJvci1ieS1kaWdlc3Qtb25seSA9IHRydWUKICAgW1tyZWdpc3RyeS5taXJyb3JdXQogICBsb2NhdGlvbiA9ICJiYXN0aW9uLW9jcDQuZGVtby5sYWIuY29tL2FkbWluL29jcDQiCltbcmVnaXN0cnldXQogICBwcmVmaXggPSAiIgogICBsb2NhdGlvbiA9ICJyZWdpc3RyeS5yZWRoYXQuaW8iCiAgIG1pcnJvci1ieS1kaWdlc3Qtb25seSA9IGZhbHNlCiAgIFtbcmVnaXN0cnkubWlycm9yXV0KICAgbG9jYXRpb24gPSAiYmFzdGlvbi1vY3A0LmRlbW8ubGFiLmNvbS9hZG1pbiIKW1tyZWdpc3RyeV1dCiAgIHByZWZpeCA9ICIiCiAgIGxvY2F0aW9uID0gInJlZ2lzdHJ5LmNvbm5lY3QucmVkaGF0LmNvbSIKICAgbWlycm9yLWJ5LWRpZ2VzdC1vbmx5ID0gZmFsc2UKICAgW1tyZWdpc3RyeS5taXJyb3JdXQogICBsb2NhdGlvbiA9ICJiYXN0aW9uLW9jcDQuZGVtby5sYWIuY29tL2FkbWluIgpbW3JlZ2lzdHJ5XV0KICAgcHJlZml4ID0gIiIKICAgbG9jYXRpb24gPSAiZ2NyLmlvL2t1YmVidWlsZGVyIgogICBtaXJyb3ItYnktZGlnZXN0LW9ubHkgPSBmYWxzZQogICBbW3JlZ2lzdHJ5Lm1pcnJvcl1dCiAgIGxvY2F0aW9uID0gImJhc3Rpb24tb2NwNC5kZW1vLmxhYi5jb20vYWRtaW4va3ViZWJ1aWxkZXIiCg==' | base64 -d > /etc/containers/registries.conf.d/000-registries.conf
          rm -f /etc/containers/policy.json
          echo 'ewogICAgImRlZmF1bHQiOiBbCiAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJpbnNlY3VyZUFjY2VwdEFueXRoaW5nIgogICAgICAgIH0KICAgIF0sCiAgICAidHJhbnNwb3J0cyI6IHsKICAgICAgICAiZG9ja2VyIjogewoJICAgICJyZWdpc3RyeS5hY2Nlc3MucmVkaGF0LmNvbSI6IFsKCQl7CgkJICAgICJ0eXBlIjogImluc2VjdXJlQWNjZXB0QW55dGhpbmciCgkJfQoJICAgIF0sCgkgICAgInJlZ2lzdHJ5LnJlZGhhdC5pbyI6IFsKCQl7CgkJICAgICJ0eXBlIjogImluc2VjdXJlQWNjZXB0QW55dGhpbmciCgkJfQoJICAgIF0KCX0sCiAgICAgICAgImRvY2tlci1kYWVtb24iOiB7CgkgICAgIiI6IFsKCQl7CgkJICAgICJ0eXBlIjogImluc2VjdXJlQWNjZXB0QW55dGhpbmciCgkJfQoJICAgIF0KCX0KICAgIH0KfQo=' | base64 -d > /etc/containers/policy.json
          #registry_url: "bastion-ocp4.demo.lab.com/admin/rhoso-beta"
          #image_tag: "18.0"
        edpm_enable_chassis_gw: "true"
        edpm_bootstrap_release_version_package: "rhoso-release"
        service_net_map:
          nova_api_network: internalapi
          nova_libvirt_network: internalapi
        timesync_ntp_servers:
          - hostname: 192.168.102.66
        edpm_network_config_hide_sensitive_logs: false
        edpm_network_config_nmstate: false
        edpm_network_config_template: |
          ---
          network_config:
          - type: ovs_bridge
            name: br-ahalan
            mtu: 1500
            use_dhcp: false
            members:
            - type: interface
              name: nic2
              mtu: 1500
              primary: true
            - type: vlan
              mtu: 1400
              vlan_id: 110
              addresses:
              - ip_netmask:
                  {{ ctlplane_ip }}/24
              routes: [{'ip_netmask': '0.0.0.0/0', 'next_hop': '192.168.110.254'}]
            - type: vlan
              mtu: 1400
              vlan_id: 120
              addresses:
              - ip_netmask:
                  {{ internalapi_ip }}/24
              routes:
                - ip_netmask: 192.168.120.0/24
                  next_hop: 192.168.120.254
                - ip_netmask: 192.168.121.0/24
                  next_hop: 192.168.120.254
                - ip_netmask: 192.168.122.0/24
                  next_hop: 192.168.120.254
            - type: vlan
              mtu: 1400
              vlan_id: 201
              addresses:
              - ip_netmask:
                  {{ storage_ip }}/24
              routes:
                - ip_netmask: 192.168.201.0/24
                  next_hop: 192.168.201.254
                - ip_netmask: 192.168.202.0/24
                  next_hop: 192.168.201.254
                - ip_netmask: 192.168.203.0/24
                  next_hop: 192.168.201.254
            - type: vlan
              mtu: 1400
              vlan_id: 220
              addresses:
              - ip_netmask:
                  {{ tenant_ip }}/24
              routes:
                - ip_netmask: 192.168.222.0/24
                  next_hop: 192.168.220.254
                - ip_netmask: 192.168.221.0/24
                  next_hop: 192.168.220.254
                - ip_netmask: 192.168.220.0/24
                  next_hop: 192.168.220.254
          - type: ovs_bridge
            name: br-ex
            mtu: 1500
            use_dhcp: false
            dns_servers: []
            addresses:
            - ip_netmask:
                {{ external_ip }}/24
            routes: [{'ip_netmask': '192.168.150.0/24', 'next_hop': '192.168.150.254'}]
            domain: demo.lab.com
            members:
            - type: interface
              name: nic3
              mtu: 1500
              primary: true
        role_networks:
        - InternalApi
        - Storage
        - Tenant
        - External  
        networks_lower:
          External: external
          InternalApi: internalapi
          Storage: storage
          Tenant: tenant
        # edpm_nodes_validation
        edpm_nodes_validation_validate_controllers_icmp: false
        edpm_nodes_validation_validate_gateway_icmp: false
        ctlplane_dns_nameservers:
        - 192.168.110.80
        dns_search_domains: demo.lab.com
        gather_facts: false
        enable_debug: false
        # edpm firewall, change the allowed CIDR if needed
        edpm_sshd_configure_firewall: true
        edpm_sshd_allowed_ranges:
        - 192.168.110.0/24
        - 192.168.111.0/24
        - 192.168.112.0/24
        - 192.168.150.0/24
        # SELinux module
        edpm_selinux_mode: enforcing
