aboutsummaryrefslogtreecommitdiffstats
path: root/patches/fuel-library
diff options
context:
space:
mode:
authorMatei Valeanu <Matei.Valeanu@enea.com>2016-09-26 18:37:00 +0200
committerMatei Valeanu <Matei.Valeanu@enea.com>2016-09-27 16:58:31 +0200
commitcc19a840d7bd6826ffaf3a2bf8e84d492dacc4c9 (patch)
treecb14149b9830d31642ffe50f3871a9ed0f5e91ef /patches/fuel-library
parent8b49fe2f475a1c63e67ef43ece55f98bef2d8645 (diff)
Add grub template to cobbler for MAC-files
Change-Id: I9812066f2954cc02a49bfa19dbe9fc74b055e78d Signed-off-by: Matei Valeanu <Matei.Valeanu@enea.com>
Diffstat (limited to 'patches/fuel-library')
-rw-r--r--patches/fuel-library/0001-Add-arm64-templates-to-cobbler-and-nailgun.patch67
1 files changed, 47 insertions, 20 deletions
diff --git a/patches/fuel-library/0001-Add-arm64-templates-to-cobbler-and-nailgun.patch b/patches/fuel-library/0001-Add-arm64-templates-to-cobbler-and-nailgun.patch
index 244dedee..963356b2 100644
--- a/patches/fuel-library/0001-Add-arm64-templates-to-cobbler-and-nailgun.patch
+++ b/patches/fuel-library/0001-Add-arm64-templates-to-cobbler-and-nailgun.patch
@@ -5,27 +5,37 @@ Subject: [PATCH] Add arm64 templates to cobbler and nailgun
Add grub template import to cobbler server manifest
Add arm64 templates to cobbler and nailgun
+
+[Matei Valeanu] Add grub template to cobbler for MAC-files
+Limitation: grub2 needs to be installed directly on the
+root (/) of a device or partition, as the MAC-files will
+search for /grub/grub.cfg on the available partitions
+
+Signed-off-by: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
+Signed-off-by: Matei Valeanu <Matei.Valeanu@enea.com>
---
- deployment/puppet/cobbler/manifests/server.pp | 27 +++++++++++++++
+ deployment/puppet/cobbler/manifests/server.pp | 36 ++++++++++++++++++++++
.../puppet/cobbler/templates/dnsmasq.template.erb | 2 ++
.../cobbler/templates/efidefault.template.erb | 5 +++
- .../cobbler/templates/grubprofile.template.erb | 12 +++++++
- .../cobbler/templates/grubsystem.template.erb | 16 +++++++++
+ .../cobbler/templates/grublocal.template.erb | 2 ++
+ .../cobbler/templates/grubprofile.template.erb | 12 ++++++++
+ .../cobbler/templates/grubsystem.template.erb | 16 ++++++++++
.../templates/preseed/ubuntu-1404.preseed.erb | 2 ++
- .../puppet/fuel/manifests/auxiliaryrepos.pp | 12 ++++---
- deployment/puppet/fuel/manifests/cobbler.pp | 38 +++++++++++++++++-----
+ deployment/puppet/fuel/manifests/auxiliaryrepos.pp | 12 +++++---
+ deployment/puppet/fuel/manifests/cobbler.pp | 36 +++++++++++++++++-----
.../puppet/fuel/manifests/cobbler/preseed.pp | 13 ++++++++
- 9 files changed, 115 insertions(+), 12 deletions(-)
+ 10 files changed, 125 insertions(+), 11 deletions(-)
create mode 100644 deployment/puppet/cobbler/templates/efidefault.template.erb
+ create mode 100644 deployment/puppet/cobbler/templates/grublocal.template.erb
create mode 100644 deployment/puppet/cobbler/templates/grubprofile.template.erb
create mode 100644 deployment/puppet/cobbler/templates/grubsystem.template.erb
create mode 100644 deployment/puppet/fuel/manifests/cobbler/preseed.pp
diff --git a/deployment/puppet/cobbler/manifests/server.pp b/deployment/puppet/cobbler/manifests/server.pp
-index bdb1ae7..0523404 100644
+index 891dff7..52936d5 100644
--- a/deployment/puppet/cobbler/manifests/server.pp
+++ b/deployment/puppet/cobbler/manifests/server.pp
-@@ -288,6 +288,33 @@ class cobbler::server (
+@@ -297,6 +297,42 @@ class cobbler::server (
notify => [Service[$cobbler_service], Exec['cobbler_sync']],
}
@@ -56,14 +66,23 @@ index bdb1ae7..0523404 100644
+ notify => [Service[$cobbler_service], Exec['cobbler_sync']],
+ }
+
++ file { '/etc/cobbler/pxe/grublocal.template':
++ content => template('cobbler/grublocal.template.erb'),
++ owner => 'root',
++ group => 'root',
++ mode => '0644',
++ require => Package[$cobbler::packages::cobbler_package],
++ notify => [Service[$cobbler_service], Exec['cobbler_sync']],
++ }
++
exec { '/var/lib/tftpboot/chain.c32':
command => 'cp /usr/share/syslinux/chain.c32 /var/lib/tftpboot/chain.c32',
unless => 'test -e /var/lib/tftpboot/chain.c32',
diff --git a/deployment/puppet/cobbler/templates/dnsmasq.template.erb b/deployment/puppet/cobbler/templates/dnsmasq.template.erb
-index 3a96ac1..8d3e753 100644
+index d70f8de..98278e9 100644
--- a/deployment/puppet/cobbler/templates/dnsmasq.template.erb
+++ b/deployment/puppet/cobbler/templates/dnsmasq.template.erb
-@@ -33,5 +33,7 @@ dhcp-no-override
+@@ -41,5 +41,7 @@ dhcp-no-override
# by assigning IPs one by one instead of using hash algorithm.
dhcp-sequential-ip
@@ -82,6 +101,14 @@ index 0000000..af09eb8
+tr -s ipxe_mac ':' '-' $net_default_mac
+
+$grub_menu_items
+diff --git a/deployment/puppet/cobbler/templates/grublocal.template.erb b/deployment/puppet/cobbler/templates/grublocal.template.erb
+new file mode 100644
+index 0000000..e16c27d
+--- /dev/null
++++ b/deployment/puppet/cobbler/templates/grublocal.template.erb
+@@ -0,0 +1,2 @@
++search --file --no-floppy --set grub_install_device /grub/grub.cfg
++configfile ($grub_install_device)/grub/grub.cfg
diff --git a/deployment/puppet/cobbler/templates/grubprofile.template.erb b/deployment/puppet/cobbler/templates/grubprofile.template.erb
new file mode 100644
index 0000000..eb7557c
@@ -123,7 +150,7 @@ index 0000000..9a191bc
+ echo 'Booting bootstrap image ...'
+}
diff --git a/deployment/puppet/cobbler/templates/preseed/ubuntu-1404.preseed.erb b/deployment/puppet/cobbler/templates/preseed/ubuntu-1404.preseed.erb
-index fd6dda3..65c6c69 100644
+index 6762153..25f8067 100644
--- a/deployment/puppet/cobbler/templates/preseed/ubuntu-1404.preseed.erb
+++ b/deployment/puppet/cobbler/templates/preseed/ubuntu-1404.preseed.erb
@@ -66,9 +66,11 @@ d-i apt-setup/mirror/error select Retry
@@ -139,10 +166,10 @@ index fd6dda3..65c6c69 100644
# You can choose to install restricted and universe software, or to install
# software from the backports repository.
diff --git a/deployment/puppet/fuel/manifests/auxiliaryrepos.pp b/deployment/puppet/fuel/manifests/auxiliaryrepos.pp
-index 41a2570..720943d 100644
+index 493ffc6..909fc92 100644
--- a/deployment/puppet/fuel/manifests/auxiliaryrepos.pp
+++ b/deployment/puppet/fuel/manifests/auxiliaryrepos.pp
-@@ -48,17 +48,21 @@ class nailgun::auxiliaryrepos(
+@@ -53,17 +53,21 @@ class fuel::auxiliaryrepos(
exec { 'create_ubuntu_repo_dirs':
path => '/bin:/sbin:/usr/bin:/usr/sbin',
@@ -169,10 +196,10 @@ index 41a2570..720943d 100644
file { $release_files:
diff --git a/deployment/puppet/fuel/manifests/cobbler.pp b/deployment/puppet/fuel/manifests/cobbler.pp
-index a11498c..95a9497 100644
+index b403733..c89027d 100644
--- a/deployment/puppet/fuel/manifests/cobbler.pp
+++ b/deployment/puppet/fuel/manifests/cobbler.pp
-@@ -133,12 +133,9 @@ class nailgun::cobbler(
+@@ -114,12 +114,9 @@ class fuel::cobbler(
require => Class['::cobbler::server'],
}
@@ -188,10 +215,10 @@ index a11498c..95a9497 100644
} ->
cobbler_distro { 'ubuntu_1404_x86_64':
-@@ -151,6 +148,21 @@ class nailgun::cobbler(
+@@ -132,6 +129,21 @@ class fuel::cobbler(
require => Class['::cobbler::server'],
}
-
+
+ fuel::cobbler::preseed { 'ubuntu_1404_arm64.preseed':
+ path => '/var/lib/cobbler/kickstarts/ubuntu-arm64.preseed',
+ arch => "arm64",
@@ -210,7 +237,7 @@ index a11498c..95a9497 100644
cobbler_profile { 'centos-x86_64':
kickstart => '/var/lib/cobbler/kickstarts/centos-x86_64.ks',
kopts => 'biosdevname=0 sshd=1 dhcptimeout=120',
-@@ -171,6 +183,16 @@ class nailgun::cobbler(
+@@ -152,6 +164,16 @@ class fuel::cobbler(
require => Cobbler_distro['ubuntu_1404_x86_64'],
}
@@ -227,7 +254,7 @@ index a11498c..95a9497 100644
cobbler_distro { 'ubuntu_bootstrap':
kernel => "${bootstrap_path}/vmlinuz",
initrd => "${bootstrap_path}/initrd.img",
-@@ -205,7 +227,7 @@ class nailgun::cobbler(
+@@ -166,7 +188,7 @@ class fuel::cobbler(
distro => 'ubuntu_bootstrap',
menu => true,
kickstart => '',
@@ -238,7 +265,7 @@ index a11498c..95a9497 100644
require => Cobbler_distro['ubuntu_bootstrap'],
diff --git a/deployment/puppet/fuel/manifests/cobbler/preseed.pp b/deployment/puppet/fuel/manifests/cobbler/preseed.pp
new file mode 100644
-index 0000000..93c71ba
+index 0000000..7e1bee9
--- /dev/null
+++ b/deployment/puppet/fuel/manifests/cobbler/preseed.pp
@@ -0,0 +1,13 @@