Don't use os-cloud-config/common-venv elements
Moves the os-cloud-config installation to be handled by puppet instead of the element. Also removes usage of the common-venv element since it was only ever needed when installing other elements from source. In order to pass CI, the following commit was also cherry-picked then squashed into this commit: Don't use ironic-conductor element This removes usage of the ironic-conductor element in favor of using puppet instead. However, puppet-ironic does not yet have full support for configuring ipxe and tftp, so we still need to make use of 88-setup-ipxe and 69-ironic-tftp-support. Since those bash scripts need to run after puppet has installed all the needed packages, they are moved to be os-refresh-config scripts instead. This should be fine since those scripts are idempotent. blueprint undercloud-elements Change-Id: I9488cebbb479c269901e9b310a1208b6d5ed9e76 Closes-Bug: 1683390 (cherry picked from commit90bbff7e6e
) (cherry picked from commit7ea7d61285
)
This commit is contained in:
parent
01d40c094d
commit
a957f0e38d
|
@ -1,2 +0,0 @@
|
|||
httpd:
|
||||
ipxe-bootimgs:
|
|
@ -531,3 +531,5 @@ if str2bool(hiera('enable_monitoring', true)) {
|
|||
}
|
||||
Package['osops-tools-monitoring-oschecks'] -> Service['sensu-client']
|
||||
}
|
||||
|
||||
package{'ipxe-bootimgs': }
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
#!/bin/bash
|
||||
set -eux
|
||||
set -o pipefail
|
||||
|
||||
# setup tftp directory structure
|
||||
if [ -f /usr/lib/syslinux/pxelinux.0 ]; then
|
||||
# Ubuntu
|
||||
pxe_zero="/usr/lib/syslinux/pxelinux.0"
|
||||
elif [ -f /usr/share/syslinux/pxelinux.0 ]; then
|
||||
# Fedora/RHEL
|
||||
pxe_zero="/usr/share/syslinux/pxelinux.0"
|
||||
else
|
||||
echo "Failed to find pxelinux.0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# create tftpboot and cache directories
|
||||
install -d -m 0755 -o ironic -g ironic /tftpboot/pxelinux.cfg/
|
||||
install -o ironic -g ironic -m 744 $pxe_zero /tftpboot/pxelinux.0
|
||||
|
||||
# for newer syslinux versions we may need to copy in the library
|
||||
# modules as well (Fedora 21 for example)
|
||||
if [ -f /usr/share/syslinux/ldlinux.* ]; then
|
||||
# Fedora/RHEL
|
||||
cp /usr/share/syslinux/ldlinux.* /tftpboot
|
||||
fi
|
||||
|
||||
# Copy in the chain loader for full disk image booting.
|
||||
syslinux='/usr/share/syslinux'
|
||||
for f in chain.c32 libcom32.c32 libutil.c32; do
|
||||
if [ -f $syslinux/$f ]; then
|
||||
cp $syslinux/$f /tftpboot
|
||||
fi
|
||||
done
|
||||
|
||||
# Disable the tftp-hpa upstart job, we're using xinetd
|
||||
[ -f /etc/init/tftpd-hpa.conf ] && echo "manual" > /etc/init/tftpd-hpa.override
|
||||
|
||||
# Disable the tftpd-hpa SysV script for the same reason
|
||||
[ -f /etc/init.d/tftpd-hpa ] && update-rc.d -f tftpd-hpa disable
|
||||
|
||||
cat > /etc/xinetd.d/tftp << EOF
|
||||
service tftp
|
||||
{
|
||||
protocol = udp
|
||||
port = 69
|
||||
socket_type = dgram
|
||||
wait = yes
|
||||
user = root
|
||||
server = /usr/sbin/in.tftpd
|
||||
server_args = --map-file /tftpboot/map-file /tftpboot
|
||||
disable = no
|
||||
flags = IPv4
|
||||
}
|
||||
EOF
|
||||
|
||||
# Adds support for tftp requests that don't include the directory name.
|
||||
echo 'r ^([^/]) /tftpboot/\1' > /tftpboot/map-file
|
||||
|
||||
# ensure tftpboot dir and all files in it are owned by ironic user
|
||||
chown ironic:ironic -R /tftpboot
|
|
@ -8,13 +8,10 @@
|
|||
"redhat-common",
|
||||
"undercloud-install",
|
||||
"undercloud-stack-config",
|
||||
"common-venv",
|
||||
"undercloud-post-config",
|
||||
"undercloud-package-install",
|
||||
"element-manifest",
|
||||
"ironic-conductor",
|
||||
"ipxe",
|
||||
"os-cloud-config",
|
||||
"os-net-config",
|
||||
"puppet-stack-config",
|
||||
"selinux-permissive",
|
||||
|
|
|
@ -8,13 +8,10 @@
|
|||
"redhat-common",
|
||||
"undercloud-install",
|
||||
"undercloud-stack-config",
|
||||
"common-venv",
|
||||
"undercloud-post-config",
|
||||
"undercloud-package-install",
|
||||
"element-manifest",
|
||||
"ironic-conductor",
|
||||
"ipxe",
|
||||
"os-cloud-config",
|
||||
"os-net-config",
|
||||
"puppet-stack-config"
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue