Skip to content

Commit

Permalink
AUSTA-164: Added step "Copy RPM CA Certificates from Drop In Directory".
Browse files Browse the repository at this point in the history
  • Loading branch information
Default User committed Aug 16, 2023
1 parent ebd8052 commit 76f27df
Show file tree
Hide file tree
Showing 14 changed files with 413 additions and 42 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ Deletes the build files and kickstart ISO group step.
| Target Server: Lin | Linux/Unix Node | `targetserverlin` | The target server is a generic placeholder, usually used for the server a script will run on.<br>For example, the server being built if the procedure is building a server. |
| Target Server: Linux TimeZone | Text | `targetserverlinuxtimezone` | Valid Linux timezones are listed in /usr/share/zoneinfo/posix and also at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.<br><br>Example: Australia/Brisbane |
| Target Subnet | Network IPv4 Subnet | `targetsubnet` | Subnet used by the target server. |
| RPM CA Certificate Drop In Directory | Text | `rpmcacertificatedropindirectory` | RPM CA Certificate drop In directory. Place all RPM CA certificates that you want to use here.<br><br>This is an absolute path to a folder. <br><br>If it does not exist or if it is empty, then it will not be used. |



Expand Down
86 changes: 82 additions & 4 deletions docs/Create-RHEL7-BIOS-Kickstart-ISO.html
Original file line number Diff line number Diff line change
Expand Up @@ -244,17 +244,25 @@ <h6 class="text-right">



<p class="text-muted pt-2">
<a href="#copyrpmcacertificatesfromdropindirectory">
<strong>Step 5 -</strong> Copy RPM CA Certificates from Drop In Directory
</a>
</p>



<p class="text-muted pt-2">
<a href="#createbiosbootiso">
<strong>Step 5 -</strong> Create BIOS Boot ISO
<strong>Step 6 -</strong> Create BIOS Boot ISO
</a>
</p>



<p class="text-muted pt-2">
<a href="#deletebuilddirectory">
<strong>Step 6 -</strong> Delete Build Directory
<strong>Step 7 -</strong> Delete Build Directory
</a>
</p>

Expand Down Expand Up @@ -606,10 +614,80 @@ <h3 id="deployrhel7bioskickstartconfig">



<div class="row pt-5">
<h3 id="copyrpmcacertificatesfromdropindirectory">
<a href="#copyrpmcacertificatesfromdropindirectory">
<strong>Step 5 -</strong> Copy RPM CA Certificates from Drop In Directory
</a>
</h3>
</div>

<div class="row">
<div class="description col px-0">
<p>
<p>Copies any RPM CA Certificates from the drop in directory <code>{rpmCaCertificateDropInDirectory</code> to <code>{ksAttuneBaseDir}/build-{targetServer.fqn}/cacerts</code>.</p>
</p>
</div>
</div>
















<div class="row">
<p>
Execute the following script:
</p>
</div>
<div class="row">
<div class="col px-0">
<pre>
<code class="language-sql py-0">
if [ ! -d &quot;{rpmCaCertificateDropInDirectory}&quot; ]
then
echo &quot;{rpmCaCertificateDropInDirectory} does not exist, skipping.&quot;
else
cd &quot;{rpmCaCertificateDropInDirectory}&quot;

NUMBER_FILES=$(ls -1q | wc -l)
echo &quot;NUMBER_FILES=${NUMBER_FILES}&quot;

if [ &quot;${NUMBER_FILES}&quot; -eq &quot;0&quot; ]
then
echo &quot;No files in {rpmCaCertificateDropInDirectory}, skipping.&quot;
else
echo &quot;{rpmCaCertificateDropInDirectory} exists, copying it&#x27;s contents to {ksAttuneBaseDir}/build-{targetServer.fqn}/cacerts.&quot;
cp --verbose --recursive ./* &quot;{ksAttuneBaseDir}/build-{targetServer.fqn}/cacerts&quot;
fi
fi
</code>
</pre>
</div>
</div>









<div class="row pt-5">
<h3 id="createbiosbootiso">
<a href="#createbiosbootiso">
<strong>Step 5 -</strong> Create BIOS Boot ISO
<strong>Step 6 -</strong> Create BIOS Boot ISO
</a>
</h3>
</div>
Expand Down Expand Up @@ -667,7 +745,7 @@ <h3 id="createbiosbootiso">
<div class="row pt-5">
<h3 id="deletebuilddirectory">
<a href="#deletebuilddirectory">
<strong>Step 6 -</strong> Delete Build Directory
<strong>Step 7 -</strong> Delete Build Directory
</a>
</h3>
</div>
Expand Down
110 changes: 94 additions & 16 deletions docs/Create-RHEL7-UEFI-Kickstart-ISO.html
Original file line number Diff line number Diff line change
Expand Up @@ -244,49 +244,57 @@ <h6 class="text-right">



<p class="text-muted pt-2">
<a href="#copyrpmcacertificatesfromdropindirectory">
<strong>Step 5 -</strong> Copy RPM CA Certificates from Drop In Directory
</a>
</p>



<p class="text-muted pt-2">
<a href="#rhel7modifyefibootgrupcfginimagesefibootimg">
<strong>Step 5 -</strong> RHEL7 Modify EFI/BOOT/grup.cfg in images/efiboot.img
<strong>Step 6 -</strong> RHEL7 Modify EFI/BOOT/grup.cfg in images/efiboot.img
</a>
</p>



<p class="text-muted pt-2">
<a href="#createtemporarydirectoryforefibootimgmount">
<strong>Step 5.1 -</strong> Create Temporary Directory for efiboot.img Mount
<strong>Step 6.1 -</strong> Create Temporary Directory for efiboot.img Mount
</a>
</p>



<p class="text-muted pt-2">
<a href="#mountgrubcfginsideefibootimg">
<strong>Step 5.2 -</strong> Mount grub.cfg inside efiboot.img
<strong>Step 6.2 -</strong> Mount grub.cfg inside efiboot.img
</a>
</p>



<p class="text-muted pt-2">
<a href="#rhel7deploygrubcfginsideefibootimg">
<strong>Step 5.3 -</strong> RHEL7 Deploy grub.cfg inside efiboot.img
<strong>Step 6.3 -</strong> RHEL7 Deploy grub.cfg inside efiboot.img
</a>
</p>



<p class="text-muted pt-2">
<a href="#unmounttemporarydirectoryforefibootimgmount">
<strong>Step 5.4 -</strong> Unmount Temporary Directory for efiboot.img Mount
<strong>Step 6.4 -</strong> Unmount Temporary Directory for efiboot.img Mount
</a>
</p>



<p class="text-muted pt-2">
<a href="#deletetemporarydirectoryforefibootimg">
<strong>Step 5.5 -</strong> Delete Temporary Directory for efiboot.img
<strong>Step 6.5 -</strong> Delete Temporary Directory for efiboot.img
</a>
</p>

Expand All @@ -295,15 +303,15 @@ <h6 class="text-right">

<p class="text-muted pt-2">
<a href="#createuefibootiso">
<strong>Step 6 -</strong> Create UEFI Boot ISO
<strong>Step 7 -</strong> Create UEFI Boot ISO
</a>
</p>



<p class="text-muted pt-2">
<a href="#deletebuilddirectory">
<strong>Step 7 -</strong> Delete Build Directory
<strong>Step 8 -</strong> Delete Build Directory
</a>
</p>

Expand Down Expand Up @@ -655,10 +663,80 @@ <h3 id="deployrhel7uefikickstartconfig">



<div class="row pt-5">
<h3 id="copyrpmcacertificatesfromdropindirectory">
<a href="#copyrpmcacertificatesfromdropindirectory">
<strong>Step 5 -</strong> Copy RPM CA Certificates from Drop In Directory
</a>
</h3>
</div>

<div class="row">
<div class="description col px-0">
<p>
<p>Copies any RPM CA Certificates from the drop in directory <code>{rpmCaCertificateDropInDirectory</code> to <code>{ksAttuneBaseDir}/build-{targetServer.fqn}/cacerts</code>.</p>
</p>
</div>
</div>
















<div class="row">
<p>
Execute the following script:
</p>
</div>
<div class="row">
<div class="col px-0">
<pre>
<code class="language-sql py-0">
if [ ! -d &quot;{rpmCaCertificateDropInDirectory}&quot; ]
then
echo &quot;{rpmCaCertificateDropInDirectory} does not exist, skipping.&quot;
else
cd &quot;{rpmCaCertificateDropInDirectory}&quot;

NUMBER_FILES=$(ls -1q | wc -l)
echo &quot;NUMBER_FILES=${NUMBER_FILES}&quot;

if [ &quot;${NUMBER_FILES}&quot; -eq &quot;0&quot; ]
then
echo &quot;No files in {rpmCaCertificateDropInDirectory}, skipping.&quot;
else
echo &quot;{rpmCaCertificateDropInDirectory} exists, copying it&#x27;s contents to {ksAttuneBaseDir}/build-{targetServer.fqn}/cacerts.&quot;
cp --verbose --recursive ./* &quot;{ksAttuneBaseDir}/build-{targetServer.fqn}/cacerts&quot;
fi
fi
</code>
</pre>
</div>
</div>









<div class="row pt-5">
<h3 id="rhel7modifyefibootgrupcfginimagesefibootimg">
<a href="#rhel7modifyefibootgrupcfginimagesefibootimg">
<strong>Step 5 -</strong> RHEL7 Modify EFI/BOOT/grup.cfg in images/efiboot.img
<strong>Step 6 -</strong> RHEL7 Modify EFI/BOOT/grup.cfg in images/efiboot.img
</a>
</h3>
</div>
Expand Down Expand Up @@ -687,7 +765,7 @@ <h3 id="rhel7modifyefibootgrupcfginimagesefibootimg">
<div class="row pt-5">
<h4 id="createtemporarydirectoryforefibootimgmount">
<a href="#createtemporarydirectoryforefibootimgmount">
<strong>Step 5.1 -</strong> Create Temporary Directory for efiboot.img Mount
<strong>Step 6.1 -</strong> Create Temporary Directory for efiboot.img Mount
</a>
</h4>
</div>
Expand Down Expand Up @@ -742,7 +820,7 @@ <h4 id="createtemporarydirectoryforefibootimgmount">
<div class="row pt-5">
<h4 id="mountgrubcfginsideefibootimg">
<a href="#mountgrubcfginsideefibootimg">
<strong>Step 5.2 -</strong> Mount grub.cfg inside efiboot.img
<strong>Step 6.2 -</strong> Mount grub.cfg inside efiboot.img
</a>
</h4>
</div>
Expand Down Expand Up @@ -816,7 +894,7 @@ <h4 id="mountgrubcfginsideefibootimg">
<div class="row pt-5">
<h4 id="rhel7deploygrubcfginsideefibootimg">
<a href="#rhel7deploygrubcfginsideefibootimg">
<strong>Step 5.3 -</strong> RHEL7 Deploy grub.cfg inside efiboot.img
<strong>Step 6.3 -</strong> RHEL7 Deploy grub.cfg inside efiboot.img
</a>
</h4>
</div>
Expand Down Expand Up @@ -884,7 +962,7 @@ <h4 id="rhel7deploygrubcfginsideefibootimg">
<div class="row pt-5">
<h4 id="unmounttemporarydirectoryforefibootimgmount">
<a href="#unmounttemporarydirectoryforefibootimgmount">
<strong>Step 5.4 -</strong> Unmount Temporary Directory for efiboot.img Mount
<strong>Step 6.4 -</strong> Unmount Temporary Directory for efiboot.img Mount
</a>
</h4>
</div>
Expand Down Expand Up @@ -950,7 +1028,7 @@ <h4 id="unmounttemporarydirectoryforefibootimgmount">
<div class="row pt-5">
<h4 id="deletetemporarydirectoryforefibootimg">
<a href="#deletetemporarydirectoryforefibootimg">
<strong>Step 5.5 -</strong> Delete Temporary Directory for efiboot.img
<strong>Step 6.5 -</strong> Delete Temporary Directory for efiboot.img
</a>
</h4>
</div>
Expand Down Expand Up @@ -1017,7 +1095,7 @@ <h4 id="deletetemporarydirectoryforefibootimg">
<div class="row pt-5">
<h3 id="createuefibootiso">
<a href="#createuefibootiso">
<strong>Step 6 -</strong> Create UEFI Boot ISO
<strong>Step 7 -</strong> Create UEFI Boot ISO
</a>
</h3>
</div>
Expand Down Expand Up @@ -1077,7 +1155,7 @@ <h3 id="createuefibootiso">
<div class="row pt-5">
<h3 id="deletebuilddirectory">
<a href="#deletebuilddirectory">
<strong>Step 7 -</strong> Delete Build Directory
<strong>Step 8 -</strong> Delete Build Directory
</a>
</h3>
</div>
Expand Down
Loading

0 comments on commit 76f27df

Please sign in to comment.