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 --- .../f_ntp/puppet/modules/opnfv/manifests/ntp.pp | 80 ---------------------- .../modules/opnfv/templates/ntp.conf.compute.erb | 21 ------ .../opnfv/templates/ntp.conf.controller.erb | 21 ------ 3 files changed, 122 deletions(-) delete mode 100644 fuel/build/f_ntp/puppet/modules/opnfv/manifests/ntp.pp delete mode 100644 fuel/build/f_ntp/puppet/modules/opnfv/templates/ntp.conf.compute.erb delete mode 100644 fuel/build/f_ntp/puppet/modules/opnfv/templates/ntp.conf.controller.erb (limited to 'fuel/build/f_ntp/puppet') diff --git a/fuel/build/f_ntp/puppet/modules/opnfv/manifests/ntp.pp b/fuel/build/f_ntp/puppet/modules/opnfv/manifests/ntp.pp deleted file mode 100644 index c5dce1b..0000000 --- a/fuel/build/f_ntp/puppet/modules/opnfv/manifests/ntp.pp +++ /dev/null @@ -1,80 +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: Ntp -# -# Add Ntp content passed through astute.yaml into ntp.conf depending on the role -# -# Suitable yaml content: -# -# opnfv: -# ntp: -# controller: | -# line 1 -# line 2 -# compute: | -# line 1 -# line 2 -# -# -# -# - -class opnfv::ntp( - $file='/etc/ntp.conf' -) { - - case $::operatingsystem { - centos, redhat: { - $service_name = 'ntpd' - } - debian, ubuntu: { - $service_name = 'ntp' - } - } - - if $::fuel_settings['role'] { - if ($::fuel_settings['opnfv'] and - $::fuel_settings['opnfv']['ntp']) { - case $::fuel_settings['role'] { - /controller/: { - if $::fuel_settings['opnfv']['ntp']['controller'] { - $template = 'opnfv/ntp.conf.controller.erb' - $file_content = $::fuel_settings['opnfv']['ntp']['controller'] - } - } - /compute/: { - if $::fuel_settings['opnfv']['ntp']['compute'] { - $template = 'opnfv/ntp.conf.compute.erb' - $file_content = $::fuel_settings['opnfv']['ntp']['compute'] - } - } - } - } - } - - if $file_content { - package { 'ntp': - ensure => installed, - } - - file { $file: - content => template($template), - notify => Service['ntp'], - } - - service { 'ntp': - ensure => running, - name => $service_name, - enable => true, - require => [ Package['ntp'], File[$file]] - } - } -} diff --git a/fuel/build/f_ntp/puppet/modules/opnfv/templates/ntp.conf.compute.erb b/fuel/build/f_ntp/puppet/modules/opnfv/templates/ntp.conf.compute.erb deleted file mode 100644 index 37ecfd7..0000000 --- a/fuel/build/f_ntp/puppet/modules/opnfv/templates/ntp.conf.compute.erb +++ /dev/null @@ -1,21 +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 -############################################################################## - -tinker panic 0 -driftfile /var/lib/ntp/ntp.drift -statistics loopstats peerstats clockstats -filegen loopstats file loopstats type day enable -filegen peerstats file peerstats type day enable -filegen clockstats file clockstats type day enable -restrict -4 default kod notrap nomodify nopeer noquery -restrict -6 default kod notrap nomodify nopeer noquery -restrict 127.0.0.1 -restrict ::1 -<%= @file_content %> diff --git a/fuel/build/f_ntp/puppet/modules/opnfv/templates/ntp.conf.controller.erb b/fuel/build/f_ntp/puppet/modules/opnfv/templates/ntp.conf.controller.erb deleted file mode 100644 index 37ecfd7..0000000 --- a/fuel/build/f_ntp/puppet/modules/opnfv/templates/ntp.conf.controller.erb +++ /dev/null @@ -1,21 +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 -############################################################################## - -tinker panic 0 -driftfile /var/lib/ntp/ntp.drift -statistics loopstats peerstats clockstats -filegen loopstats file loopstats type day enable -filegen peerstats file peerstats type day enable -filegen clockstats file clockstats type day enable -restrict -4 default kod notrap nomodify nopeer noquery -restrict -6 default kod notrap nomodify nopeer noquery -restrict 127.0.0.1 -restrict ::1 -<%= @file_content %> -- cgit 1.2.3-korg