Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
# source: nova04delta/edpm-nodeset-values/values.yaml.j2
{% set _ipv = cifmw_ci_gen_kustomize_values_ip_version_var_mapping %}
{% set instances_names = [] %}
{% set _original_nodeset = (original_content.data | default({})).nodeset | default({}) %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to have double default.

{% set _original_nodeset = (original_content.data.nodeset | default({}) %}

{% set _original_nodes = _original_nodeset.nodes | default({}) %}
{% set _original_services = _original_nodeset['services'] | default([]) %}
{% for _inst in cifmw_networking_env_definition.instances.keys() %}
{% if _inst.startswith('compute') %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: Cool!

{% set _ = instances_names.append(_inst) %}
{% endif %}
{% endfor %}
{% set inst_stop_idx = (instances_names | length) // 2 %}
{% set nodeset_one_instances = instances_names[:inst_stop_idx] %}
data:
baremetalSetTemplate:
provisioningInterface: null
ssh_keys:
authorized: {{ cifmw_ci_gen_kustomize_values_ssh_authorizedkeys | b64encode }}
private: {{ cifmw_ci_gen_kustomize_values_ssh_private_key | b64encode }}
public: {{ cifmw_ci_gen_kustomize_values_ssh_public_key | b64encode }}
nova:
migration:
ssh_keys:
private: {{ cifmw_ci_gen_kustomize_values_migration_priv_key | b64encode }}
public: {{ cifmw_ci_gen_kustomize_values_migration_pub_key | b64encode }}
nodeset:
ansible:
ansibleUser: "zuul"
ansibleVars:
edpm_fips_mode: "{{ 'enabled' if cifmw_fips_enabled|default(false)|bool else 'check' }}"
timesync_ntp_servers:
- hostname: "{{ cifmw_ci_gen_kustomize_values_ntp_srv | default('pool.ntp.org') }}"
edpm_bootstrap_command: |
# root CA
pushd /etc/pki/ca-trust/source/anchors/
curl -LOk {{ cifmw_install_ca_url }}
update-ca-trust
popd

# install rhos-release repos
dnf --nogpgcheck install -y {{ cifmw_repo_setup_rhos_release_rpm }}
rhos-release {{ cifmw_repo_setup_rhos_release_args }}

# see https://access.redhat.com/solutions/253273
dnf -y install conntrack-tools
edpm_network_config_os_net_config_mappings:
{% for instance in nodeset_one_instances %}
edpm-{{ instance }}:
{% if hostvars[instance] is defined %}
nic1: "{{ hostvars[instance][_ipv.ansible_default_ipvX].macaddress }}"
{% endif %}
nic2: "{{ cifmw_networking_env_definition.instances[instance].networks.ctlplane.mac_addr }}"
{% endfor %}
{% if cifmw_ci_gen_kustomize_values_sshd_ranges | default([]) | length > 0 %}
edpm_sshd_allowed_ranges:
{% for range in cifmw_ci_gen_kustomize_values_sshd_ranges %}
- "{{ range }}"
{% endfor %}
{% endif %}
nodes:
{% for instance in nodeset_one_instances %}
edpm-{{ instance }}:
hostName: {{ instance }}
networks:
{% for net in cifmw_networking_env_definition.instances[instance].networks.keys() %}
- name: {{ net }}
subnetName: subnet1
{% if net is match('ctlplane') %}
defaultRoute: true
{% endif %}
{% endfor %}
{% endfor %}
{% if ('repo-setup' not in _original_services) and
('repo-setup' in ci_gen_kustomize_edpm_nodeset_predeployed_services) %}
services:
- "repo-setup"
{% for svc in _original_services %}
- "{{ svc }}"
{% endfor %}
{% endif %}
baremetalhosts:
{% for host in cifmw_networking_env_definition.instances.keys() if host is match('^compute.*') %}
{% if cifmw_run_id is defined %}
{% set _host = host | replace('-' + cifmw_run_id, '') %}
{% else %}
{% set _host = host %}
{% endif %}
{{ _host }}:
bmc:
address: {{ cifmw_baremetal_hosts[host].connection }}
credentialsName: {{ _host }}-bmc-secret
bootMACAddress: {{ cifmw_baremetal_hosts[host].nics[0].mac }}
labels:
app: openstack
nodeset: {{ host | split('-') | first }}
name: {{ host }}
rootDeviceHints:
deviceName: /dev/sda
{% endfor %}