From 07f4e6531023cbf742e7d187c6a0ee0800b64e01 Mon Sep 17 00:00:00 2001 From: "Stefan K. Berg" Date: Thu, 10 Sep 2015 14:46:28 +0200 Subject: Refactoring build system to support Fuel 6.1 As Fuel 6.1 has changed both Debian package handling (fetching repositories from Internet) as well as Puppet packaging, the support for patching these has been disabled. The pre-deploy logic of Fuel has been removed together with a number of patches applied on top of a Fuel build, among them fixes for NTP, DNS and /etc/hosts injection. Instead, when changed default behavior is required, this will be introduced as Fuel plugins which more cleanly integrates into the Fuel system, and also decouples additional functionality from the ISO build stage. Signed-off-by: Stefan K. Berg --- .../puppet/modules/opnfv/manifests/resolver.pp | 73 ---------------------- .../puppet/modules/opnfv/templates/resolv.conf.erb | 15 ----- 2 files changed, 88 deletions(-) delete mode 100644 fuel/build/f_resolvconf/puppet/modules/opnfv/manifests/resolver.pp delete mode 100644 fuel/build/f_resolvconf/puppet/modules/opnfv/templates/resolv.conf.erb (limited to 'fuel/build/f_resolvconf/puppet') diff --git a/fuel/build/f_resolvconf/puppet/modules/opnfv/manifests/resolver.pp b/fuel/build/f_resolvconf/puppet/modules/opnfv/manifests/resolver.pp deleted file mode 100644 index 44f36a2..0000000 --- a/fuel/build/f_resolvconf/puppet/modules/opnfv/manifests/resolver.pp +++ /dev/null @@ -1,73 +0,0 @@ -############################################################################## -# Copyright (c) 2015 Ericsson AB and others. -# stefan.k.berg@ericsson.com -# jonas.bjurel@ericsson.com -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -# Class: opnfv::resolver -# -# Add resolver content passed through astute.yaml into resolv.conf -# depending on the role -# -# Suitable yaml content: -# -# opnfv: -# dns: -# compute: -# - 100.100.100.2 -# - 100.100.100.3 -# controller: -# - 100.100.100.102 -# - 100.100.100.104 -# -# -# -# - -class opnfv::resolver() -{ - if $::fuel_settings['role'] { - if $::fuel_settings['role'] == 'primary-controller' { - $role = 'controller' - } else { - $role = $::fuel_settings['role'] - } - - if ($::fuel_settings['opnfv'] - and $::fuel_settings['opnfv']['dns'] - and $::fuel_settings['opnfv']['dns'][$role]) { - $nameservers=$::fuel_settings['opnfv']['dns'][$role] - - file { '/etc/resolv.conf': - owner => root, - group => root, - mode => '0644', - content => template('opnfv/resolv.conf.erb'), - } - - # /etc/resolv.conf is re-generated at each boot by resolvconf, so we - # need to store there as well. - - case $::operatingsystem { - 'ubuntu': { - file { '/etc/resolvconf/resolv.conf.d/head': - owner => root, - group => root, - mode => '0644', - content => template('opnfv/resolv.conf.erb'), - } - } - 'centos': { - exec { 'for file in ifcfg-eth*; do grep -q -F "PEERDNS=" $file || echo "PEERDNS=no" >> $file; done ': - provider => 'shell', - cwd => '/etc/sysconfig/network-scripts', - } - } - } - } - } -} diff --git a/fuel/build/f_resolvconf/puppet/modules/opnfv/templates/resolv.conf.erb b/fuel/build/f_resolvconf/puppet/modules/opnfv/templates/resolv.conf.erb deleted file mode 100644 index 7a29dca..0000000 --- a/fuel/build/f_resolvconf/puppet/modules/opnfv/templates/resolv.conf.erb +++ /dev/null @@ -1,15 +0,0 @@ -############################################################################## -# Copyright (c) 2015 Ericsson AB and others. -# stefan.k.berg@ericsson.com -# jonas.bjurel@ericsson.com -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) -# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN -# Modified by OPNFV. -<% @nameservers.each do |ns| %>nameserver <%= ns %> -<% end -%> -- cgit 1.2.3-korg