* Updated the kickstart template/script to now add the local striker to the installed system's dnf repo list.

* Fixed a bug in the tftp templates where the os_type was statically set to 'rhel8'.

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 5 years ago
parent c2ef156e2d
commit 2f81275551
  1. 25
      html/skins/alteeve/pxe.txt
  2. 23
      notes
  3. 1
      share/words.xml
  4. 29
      tools/striker-manage-install-target

@ -226,6 +226,9 @@ cat << EOF > /mnt/sysimage/etc/NetworkManager/dispatcher.d/ifup-local
EOF EOF
chmod +x /mnt/sysimage/etc/NetworkManager/dispatcher.d/ifup-local chmod +x /mnt/sysimage/etc/NetworkManager/dispatcher.d/ifup-local
cat << EOF > /mnt/sysimage/#!variable!repo_file!#
#!variable!repo_body!#
EOF
%end %end
@ -802,41 +805,41 @@ menu label #!string!message_0084!#
TEXT HELP TEXT HELP
#!string!message_0085!# #!string!message_0085!#
ENDTEXT ENDTEXT
kernel rhel8/vmlinuz kernel #!data!host_os::os_type!#/vmlinuz
# NOTE: add ' rd.debug' below for debugging # NOTE: add ' rd.debug' below for debugging
append initrd=rhel8/initrd.img root=live:#!variable!base_url!#/os/images/install.img inst.stage2=#!variable!base_url!#/os/ ip=dhcp inst.ks=#!variable!base_url!#/kickstart/striker.ks inst.gpt inst.sshd append initrd=#!data!host_os::os_type!#/initrd.img root=live:#!variable!base_url!#/os/images/install.img inst.stage2=#!variable!base_url!#/os/ ip=dhcp inst.ks=#!variable!base_url!#/kickstart/striker.ks inst.gpt inst.sshd
label node label node
menu label #!string!message_0086!# menu label #!string!message_0086!#
TEXT HELP TEXT HELP
#!string!message_0087!# #!string!message_0087!#
ENDTEXT ENDTEXT
kernel rhel8/vmlinuz kernel #!data!host_os::os_type!#/vmlinuz
append initrd=rhel8/initrd.img root=live:#!variable!base_url!#/os/images/install.img inst.stage2=#!variable!base_url!#/os/ ip=dhcp inst.ks=#!variable!base_url!#/kickstart/node.ks inst.gpt inst.sshd append initrd=#!data!host_os::os_type!#/initrd.img root=live:#!variable!base_url!#/os/images/install.img inst.stage2=#!variable!base_url!#/os/ ip=dhcp inst.ks=#!variable!base_url!#/kickstart/node.ks inst.gpt inst.sshd
label node label node
menu label #!string!message_0088!# menu label #!string!message_0088!#
TEXT HELP TEXT HELP
#!string!message_0089!# #!string!message_0089!#
ENDTEXT ENDTEXT
kernel rhel8/vmlinuz kernel #!data!host_os::os_type!#/vmlinuz
append initrd=rhel8/initrd.img root=live:#!variable!base_url!#/os/images/install.img inst.stage2=#!variable!base_url!#/os/ ip=dhcp inst.ks=#!variable!base_url!#/kickstart/dr.ks inst.gpt inst.sshd append initrd=#!data!host_os::os_type!#/initrd.img root=live:#!variable!base_url!#/os/images/install.img inst.stage2=#!variable!base_url!#/os/ ip=dhcp inst.ks=#!variable!base_url!#/kickstart/dr.ks inst.gpt inst.sshd
label rescue label rescue
menu label #!string!message_0090!# menu label #!string!message_0090!#
TEXT HELP TEXT HELP
#!string!message_0091!# #!string!message_0091!#
ENDTEXT ENDTEXT
kernel rhel8/vmlinuz kernel #!data!host_os::os_type!#/vmlinuz
append initrd=rhel8/initrd.img ip=dhcp root=live:#!variable!base_url!#/LiveOS/squashfs.img rescue inst.repo=#!variable!base_url!#/os/ ip=dhcp inst.sshd append initrd=#!data!host_os::os_type!#/initrd.img ip=dhcp root=live:#!variable!base_url!#/LiveOS/squashfs.img rescue inst.repo=#!variable!base_url!#/os/ ip=dhcp inst.sshd
label rhel8 label #!data!host_os::os_type!#
menu label #!string!message_0092!# menu label #!string!message_0092!#
TEXT HELP TEXT HELP
#!string!message_0093!# #!string!message_0093!#
ENDTEXT ENDTEXT
kernel rhel8/vmlinuz kernel #!data!host_os::os_type!#/vmlinuz
append initrd=rhel8/initrd.img root=live:#!variable!base_url!#/images/install.img inst.repo=#!variable!base_url!#/os/ ip=dhcp inst.gpt inst.sshd append initrd=#!data!host_os::os_type!#/initrd.img root=live:#!variable!base_url!#/images/install.img inst.repo=#!variable!base_url!#/os/ ip=dhcp inst.gpt inst.sshd
label next label next
menu default menu default

23
notes

@ -42,6 +42,29 @@ DOCS; -
==== ====
dnf download --source awscli booth booth-arbitrator booth-core booth-site booth-test corosync corosync-qdevice corosync-qnetd corosynclib-devel fence-agents-aliyun fence-agents-aws fence-agents-azure-arm fence-agents-gce libknet1 \
libknet1-compress-bzip2-plugin libknet1-compress-lz4-plugin libknet1-compress-lzma-plugin libknet1-compress-lzo2-plugin libknet1-compress-plugins-all libknet1-compress-zlib-plugin libknet1-crypto-nss-plugin \
libknet1-crypto-openssl-plugin libknet1-crypto-plugins-all libknet1-plugins-all pacemaker pacemaker-cli pacemaker-cts pacemaker-doc pacemaker-libs-devel pacemaker-nagios-plugins-metadata pacemaker-remote \
pcs pcs-snmp python3-azure-sdk python3-boto3 python3-botocore python3-fasteners python3-gflags python3-google-api-client python3-httplib2 python3-oauth2client python3-s3transfer python3-uritemplate \
resource-agents resource-agents-aliyun resource-agents-gcp
rpm -Uvh python-s3transfer-0.1.13-1.el8.src.rpm python-oauth2client-4.1.2-6.el8.src.rpm booth-1.0-5.f2d38ce.git.el8.src.rpm google-api-python-client-1.6.5-3.el8.src.rpm python-boto3-1.6.1-2.el8.src.rpm python-httplib2-0.10.3-4.el8.src.rpm python-botocore-1.9.1-2.el8.src.rpm corosync-qdevice-3.0.0-2.el8.src.rpm python-uritemplate-3.0.0-3.el8.src.rpm python3-azure-sdk-4.0.0-9.el8.src.rpm awscli-1.14.50-5.el8.src.rpm python-gflags-2.0-15.el8ost.src.rpm resource-agents-4.1.1-33.el8.src.rpm python-fasteners-0.14.1-15.el8ost.src.rpm pcs-0.10.2-4.el8.src.rpm fence-agents-4.2.1-30.el8_1.1.src.rpm
rpmbuild -ba python-s3transfer.spec python-oauth2client.spec booth.spec google-api-python-client.spec python-boto3.spec python-httplib2.spec python-botocore.spec corosync-qdevice.spec python-uritemplate.spec python3-azure-sdk.spec \
awscli.spec python-gflags.spec resource-agents.spec python-fasteners.spec pcs.spec fence-agents.spec
The key packages which are needed are:
corosync
corosynclib-devel
pacemaker
pacemaker-cli
pacemaker-doc
pacemaker-libs-devel
pcs
resource-agents
Network planning; Network planning;
10.x.y.z / 255.255.0.0 10.x.y.z / 255.255.0.0

@ -257,6 +257,7 @@ About to try to download aproximately: [#!variable!packages!#] packages needed t
<key name="message_0150">Set the new host name.</key> <key name="message_0150">Set the new host name.</key>
<key name="message_0151">This is a RHEL host and has not yet been subscribed, but there is no internet access detected. OS Updates likely won't work, nor will subscribing the system. These tasks will be deferred until later in the setup process.</key> <key name="message_0151">This is a RHEL host and has not yet been subscribed, but there is no internet access detected. OS Updates likely won't work, nor will subscribing the system. These tasks will be deferred until later in the setup process.</key>
<key name="message_0152">There is no internet access detected. OS Updates likely won't work and will be deferred until later in the setup process.</key> <key name="message_0152">There is no internet access detected. OS Updates likely won't work and will be deferred until later in the setup process.</key>
<key name="message_0153">Local repository</key>
<!-- Log entries --> <!-- Log entries -->
<key name="log_0001">Starting: [#!variable!program!#].</key> <key name="log_0001">Starting: [#!variable!program!#].</key>

@ -564,12 +564,39 @@ sub setup_boot_environment
print $anvil->Words->string({key => "message_0096", variables => { file => $anvil->data->{path}{configs}{pxe_default} }})."\n"; print $anvil->Words->string({key => "message_0096", variables => { file => $anvil->data->{path}{configs}{pxe_default} }})."\n";
} }
### TODO: Add repos for all known strikers
# Build the repository file body.
my $repo_file = "/etc/yum.repos.d/".$anvil->_short_host_name.".repo";
my $repo_body = "[".$anvil->_short_host_name."-repo]\n";
$repo_body .= "name=".$anvil->_host_name." #!string!message_0153!#\n";
# Add the IPs.
$anvil->Network->get_ips({});
my $first_line = 1;
foreach my $in_iface (sort {$a cmp $b} keys %{$anvil->data->{network}{'local'}{interface}})
{
my $ip = $anvil->data->{network}{'local'}{interface}{$in_iface}{ip};
if ($ip)
{
my $prefix = $first_line ? "baseurl=" : " ";
$first_line = 0;
$repo_body .= $prefix."http://".$ip."/".$anvil->data->{host_os}{os_type}."/".$anvil->data->{host_os}{os_arch}."/os/\n";
}
}
$repo_body .= "enabled=1\n";
$repo_body .= "gpgcheck=0\n";
$repo_body .= "skip_if_unavailable=1\n";
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => {
repo_file => $repo_file,
repo_body => $repo_body,
}});
### Generate kickstart files. ### Generate kickstart files.
my $progress = 10; my $progress = 10;
foreach my $type ("striker", "node", "dr") foreach my $type ("striker", "node", "dr")
{ {
$progress += 2; $progress += 2;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { type => $type, progress => $progress }}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { type => $type, progress => $progress }});
my $say_type = "#!string!message_0115!#"; my $say_type = "#!string!message_0115!#";
if ($type eq "node") if ($type eq "node")
{ {
@ -588,6 +615,8 @@ sub setup_boot_environment
keyboard => $anvil->data->{kickstart}{keyboard} ? $anvil->data->{kickstart}{keyboard} : $anvil->data->{defaults}{kickstart}{keyboard}, keyboard => $anvil->data->{kickstart}{keyboard} ? $anvil->data->{kickstart}{keyboard} : $anvil->data->{defaults}{kickstart}{keyboard},
timezone => $anvil->data->{kickstart}{timezone} ? $anvil->data->{kickstart}{timezone} : $anvil->data->{defaults}{kickstart}{timezone}, timezone => $anvil->data->{kickstart}{timezone} ? $anvil->data->{kickstart}{timezone} : $anvil->data->{defaults}{kickstart}{timezone},
password => $anvil->data->{kickstart}{password} ? $anvil->data->{kickstart}{password} : $anvil->data->{defaults}{kickstart}{password}, password => $anvil->data->{kickstart}{password} ? $anvil->data->{kickstart}{password} : $anvil->data->{defaults}{kickstart}{password},
repo_file => $repo_file,
repo_body => $repo_body,
debug => 0, # This isn't the same as the rest of our code, just '1' or '0'. debug => 0, # This isn't the same as the rest of our code, just '1' or '0'.
}}); }});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { kickstart_body => $kickstart_body }}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { kickstart_body => $kickstart_body }});

Loading…
Cancel
Save