Minimize element usage

Further reduces reliance on elements and moves more logic to puppet.
With this patch, the list of elements being used in the undercloud is
quite small and much easier to reason about logically.

This patch depends on a packaging update for instack-undercloud:
https://review.rdoproject.org/r/#/c/1074/

blueprint undercloud-elements
Change-Id: If6036e9eb68e0af1e1989918d310c8ddf57b9622
This commit is contained in:
James Slagle 2016-05-11 10:31:21 -04:00
parent 478f09b0a1
commit 7301b39d28
14 changed files with 29 additions and 99 deletions

View File

@ -6,8 +6,7 @@ set -o pipefail
mkdir -p /etc/httpd/conf.d
sudo cp -r $(dirname $0)/ipxe-vhost.template /etc/httpd/conf.d/10-ipxe_vhost.conf
os-svc-enable -n apache2
os-svc-restart -n apache2 || true
systemctl restart httpd || :
[ -x /usr/sbin/semanage ] || exit 0

View File

@ -1,4 +0,0 @@
This element will override the behavior from the pip-and-virtualenv element
from tripleo-image-elements so that python-pip and python-virtualenv are never
installed.

View File

@ -1 +0,0 @@
pip-and-virtualenv

View File

@ -1,12 +0,0 @@
#!/bin/bash
set -eux
# Ironic conductor requires that we run install.d/69-ironic-tftp-support
# from the tripleo-image-element ironic-conductor element. This is actually
# a big gap in functionaliity for the ironic puppet module. Since we still have
# to include the ironic-conductor element here, but the package is not yet
# installed, we must pre-create the ironic user
if ! id ironic; then
useradd ironic
fi

View File

@ -333,6 +333,7 @@ if $step == 2 {
replace => false,
content => 'dhcp-match=ipxe,175';
}
Package['openstack-ironic-common'] -> File['dnsmasq-ironic.conf']
class { '::neutron::agents::dhcp':
dnsmasq_config_file => '/etc/dnsmasq-ironic.conf',

View File

@ -1,5 +0,0 @@
#!/bin/bash
set -eux
setenforce 0

View File

@ -1,5 +0,0 @@
#!/bin/bash
set -eux
set -o pipefail
echo 'systemd'

View File

@ -1,11 +0,0 @@
if $(grep -Eqs 'Red Hat Enterprise Linux' /etc/redhat-release); then
export DISTRO_NAME=rhel7
elif $(grep -Eqs 'CentOS' /etc/redhat-release); then
export DISTRO_NAME=centos7
elif $(grep -Eqs 'Fedora' /etc/redhat-release); then
export DISTRO_NAME=fedora
else
echo "Could not detect distritubion from /etc/redhat-release!"
exit 1
fi

View File

@ -1,7 +0,0 @@
#!/bin/bash
set -eux
set -o pipefail
# svc-map expects this directory to exist
sudo mkdir -p $TMP_MOUNT_PATH/tmp

View File

@ -1,5 +0,0 @@
#!/bin/bash
set -eux
sudo cp $(dirname $0)/../bin/* /usr/local/bin/

View File

@ -1,10 +0,0 @@
#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
sed -i '/secure_path/ s/$/:\/usr\/local\/bin/' /etc/sudoers

View File

@ -2,9 +2,7 @@
{
"name": "Installation",
"element": [
"base",
"yum",
"redhat-common",
"install-types",
"undercloud-install",
"enable-packages-install",
"element-manifest",
@ -15,28 +13,23 @@
"extra-data",
"pre-install",
"install",
"post-install",
"finalise"
"post-install"
],
"exclude-element": [
"pip-and-virtualenv",
"ironic",
"openstack-clients",
"os-collect-config",
"selinux"
"svc-map",
"pip-manifest",
"package-installs",
"pkg-map",
"puppet",
"cache-url",
"dib-python",
"os-svc-install",
"install-bin"
],
"blacklist": [
"10-cloud-init",
"50-store-build-settings",
"99-dkms",
"99-up-to-date",
"01-yum-keepcache",
"05-fstab-rootfs-label",
"15-fedora-remove-grub",
"15-remove-grub",
"00-load-selinux-policy",
"00-install-and-load-selinux-policy",
"00-rhel-registration"
"99-refresh-completed"
]
}
]

View File

@ -2,9 +2,7 @@
{
"name": "Installation",
"element": [
"base",
"yum",
"redhat-common",
"install-types",
"undercloud-install",
"enable-packages-install",
"element-manifest",
@ -15,27 +13,23 @@
"extra-data",
"pre-install",
"install",
"post-install",
"finalise"
"post-install"
],
"exclude-element": [
"pip-and-virtualenv",
"ironic",
"os-collect-config",
"openstack-clients"
"svc-map",
"pip-manifest",
"package-installs",
"pkg-map",
"puppet",
"cache-url",
"dib-python",
"os-svc-install",
"install-bin"
],
"blacklist": [
"10-cloud-init",
"50-store-build-settings",
"99-dkms",
"99-up-to-date",
"01-yum-keepcache",
"05-fstab-rootfs-label",
"15-fedora-remove-grub",
"15-remove-grub",
"00-load-selinux-policy",
"00-install-and-load-selinux-policy",
"00-rhel-registration"
"99-refresh-completed"
]
}
]

View File

@ -4,3 +4,6 @@ oslo.config
psutil>=1.1.1,<2.0.0
netaddr>=0.7.12,!=0.7.16
pystache
os-cloud-config
os-refresh-config
os-apply-config