Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge "Update Ironic Inspector for Metal Deployments"
- Loading branch information
Showing
9 changed files
with
123 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
# Copyright 2021, Rackspace US, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
- name: Copy in dhcp config file | ||
template: | ||
src: "dhcpd.conf.j2" | ||
dest: "/etc/dhcp/dhcpd.conf" | ||
notify: | ||
- Restart isc-dhcp-server | ||
|
||
- name: Copy in dnsmasq config file | ||
template: | ||
src: "dnsmasq.conf.j2" | ||
dest: "/etc/ironic-inspector/inspector-dnsmasq.conf" | ||
owner: "{{ ironic_system_user_name }}" | ||
group: "{{ ironic_system_group_name }}" | ||
mode: "0640" | ||
notify: | ||
- Restart ironic-inspector-dnsmasq | ||
|
||
- name: Create directories | ||
file: | ||
path: "{{ item }}" | ||
state: directory | ||
owner: "{{ ironic_system_user_name }}" | ||
group: "{{ ironic_system_group_name }}" | ||
mode: "0755" | ||
with_items: | ||
- /etc/ironic-inspector/dhcp-hostsdir | ||
- /var/lib/ironic-inspector/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
port=15553 | ||
bind-interfaces | ||
interface={{ ironic_inspector_dhcp_interface }} | ||
listen-address={{ ironic_inspector_dhcp_address }} | ||
dhcp-range={{ ironic_inspector_dhcp_pool_range | regex_replace(' ', ',') }} | ||
tftp-root={{ ironic_inspector_tftpboot_dir }} | ||
dhcp-option=3,{{ ironic_inspector_dhcp_gateway }} | ||
dhcp-option=6,{{ ironic_inspector_dhcp_nameservers }} | ||
dhcp-match=ipxe,175 | ||
dhcp-match=set:efi,option:client-arch,7 | ||
listen-address={{ ironic_inspector_dhcp_address }} | ||
dhcp-match=set:efi,option:client-arch,9 | ||
dhcp-match=set:efi,option:client-arch,11 | ||
# OLD, but keep | ||
#dhcp-boot=pxelinux.0,localhost.localdomain,{{ ironic_tftp_server_address }} | ||
# Client is already running iPXE; move to next stage of chainloading | ||
dhcp-boot=tag:ipxe,{{ ironic_http_url }}/inspector.ipxe | ||
# Client is PXE booting over EFI without iPXE ROM, | ||
# send EFI version of iPXE chainloader | ||
dhcp-boot=tag:efi,tag:!ipxe,ipxe.efi | ||
dhcp-boot=pxelinux.0,localhost.localdomain,{{ ironic_tftp_server_address }} | ||
conf-dir=/etc/dnsmasq.d/,*.conf | ||
dhcp-hostsdir=/etc/dnsmasq.d/dhcp-hostsdir | ||
# Client is running PXE over BIOS; send BIOS version of iPXE chainloader | ||
dhcp-boot=undionly.kpxe,localhost.localdomain,{{ ironic_tftp_server_address }} | ||
dhcp-hostsdir=/etc/ironic-inspector/dhcp-hostsdir | ||
dhcp-leasefile=/var/lib/ironic-inspector/inspector-dnsmasq.leases | ||
dhcp-sequential-ip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!ipxe | ||
|
||
:retry_dhcp | ||
dhcp || goto retry_dhcp | ||
|
||
:retry_boot | ||
imgfree | ||
kernel --timeout 30000 {{ ironic_http_url }}/{{ ironic_inspector_ipa_kernel_name }} ipa-inspection-callback-url={{ ironic_inspector_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ ironic_inspector_service_port }}/v1/continue systemd.journald.forward_to_console=yes BOOTIF=${mac} initrd={{ ironic_inspector_ipa_initrd_name }} || goto retry_boot | ||
initrd --timeout 30000 {{ ironic_http_url }}/{{ ironic_inspector_ipa_initrd_name }} || goto retry_boot | ||
boot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters