Skip to content

Commit

Permalink
support dns
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Sep 20, 2024
1 parent 1f7de8b commit ce9a6a2
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 8 deletions.
4 changes: 4 additions & 0 deletions agent-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{% import 'static_network/config.j2' as static_network %}
{% set baremetal_prefix = baremetal_cidr.split('/')[1] %}
{% set baremetal_gateway = static_baremetal_gateway or baremetal_cidr|network_ip(1 if lab else -2) %}
{% if dns %}
{% set baremetal_dns = installer_ip %}
{% else %}
{% set baremetal_dns = static_baremetal_dns or baremetal_gateway %}
{% endif %}
{% set nic = 'ens192' if config_type == 'vsphere' else 'enp1s0' %}
{% set virtual_ctlplanes_nodes = [] %}
{% set virtual_workers_nodes = [] %}
Expand Down
5 changes: 5 additions & 0 deletions kcli_pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ exit 1
{% set baremetal_prefix = baremetal_cidr.split('/')[1] %}
{% endif %}

{% if dns and installer_ip == None %}
echo Deploying dns requires to set installer_ip
exit 1
{% endif %}

{% set virtual_ctlplanes_nodes = [] %}
{% set virtual_workers_nodes = [] %}
{% if virtual_ctlplanes %}
Expand Down
1 change: 1 addition & 0 deletions plans/kcli_plan_default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ prs: []
imagecontentsources: []
fips: false
cas: []
dns: false
nbde: false
ntp: false
ntp_server: 0.rhel.pool.ntp.org
Expand Down
3 changes: 3 additions & 0 deletions scripts/06_dns.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
yum -y install dnsmasq
cp /root/dnsmasq.conf /etc/dnsmasq.d/custom.conf
systemctl enable --now dnsmasq
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 13 additions & 8 deletions scripts/launch_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,19 @@ echo -e "${blue}************ RUNNING 05_ntp.sh ************${clear}"
/root/scripts/05_ntp.sh
{% endif %}

{% if dns %}
echo -e "${blue}************ RUNNING 06_dns.sh ************${clear}"
/root/scripts/06_dns.sh
{% endif %}

{% if deploy_openshift %}
echo -e "${blue}************ RUNNING 06_deploy_openshift.sh ************${clear}"
echo -e "${blue}************ RUNNING 07_deploy_openshift.sh ************${clear}"
export KUBECONFIG=/root/ocp/auth/kubeconfig
/root/scripts/06_deploy_openshift.sh
/root/scripts/07_deploy_openshift.sh

{% if nfs %}
echo -e "${blue}************ RUNNING 07_nfs.sh ************${clear}"
/root/scripts/07_nfs.sh
echo -e "${blue}************ RUNNING 08_nfs.sh ************${clear}"
/root/scripts/08_nfs.sh
{% endif %}

{% if imageregistry %}
Expand All @@ -76,12 +81,12 @@ echo -e "${blue}************ RUNNING 03_disconnected_olm.sh ************${clear}
/root/scripts/03_disconnected_olm.sh
{% endif %}

echo -e "${blue}************ RUNNING 08_post_install.sh ************${clear}"
/root/scripts/08_post_install.sh
echo -e "${blue}************ RUNNING 09_post_install.sh ************${clear}"
/root/scripts/09_post_install.sh

{% if apps %}
echo -e "${blue}************ RUNNING 09_apps.sh ************${clear}"
/root/scripts/09_apps.sh
echo -e "${blue}************ RUNNING 10_apps.sh ************${clear}"
/root/scripts/10_apps.sh
{% endif %}

touch /root/cluster_ready.txt
Expand Down
4 changes: 4 additions & 0 deletions ztp/scripts/siteconfig.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ spec:
{% set default_prefix = baremetal_cidr.split('/')[1] %}
{% set default_gateway = baremetal_cidr|network_ip(1 if lab else -2) %}
{% set baremetal_gateway = static_baremetal_gateway or default_gateway %}
{% if dns %}
{% set baremetal_dns = installer_ip %}
{% else %}
{% set baremetal_dns = static_baremetal_dns or baremetal_gateway %}
{% endif %}
{% if dualstack|default(False) %}
{% set machine_cidrs = machine_cidr_ipv4 + machine_cidr_ipv6 %}
{% set cluster_networks = [cluster_network_ipv4] + [cluster_network_ipv6] %}
Expand Down

0 comments on commit ce9a6a2

Please sign in to comment.