Skip to content

Commit

Permalink
Add diagram of installer-based provisioning with PXE boot
Browse files Browse the repository at this point in the history
  • Loading branch information
Lennonka committed Oct 21, 2024
1 parent a7306d3 commit ac64275
Show file tree
Hide file tree
Showing 7 changed files with 154 additions and 0 deletions.
48 changes: 48 additions & 0 deletions guides/image-sources/foreman.pstyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
' Foreman style for PlantUML diagrams
' This style was created for sequence diagrams and may be incomplete.

skinparam RoundCorner 8
skinparam Shadowing false

' #ffcc32 Foreman yellow
' #025d8c Foreman blue

skinparam sequence {
ArrowColor #025d8c
LifeLineBorderColor #ecf4f8
LifeLineBorderThickness 32
DividerBorderColor #025d8c
DividerFontColor #025d8c
group {
TitleFontColor #025d8c
BorderColor #d2e4ed
FontColor #025d8c
}
groupHeader {
BackgroundColor #d2e4ed
FontColor #025d8c
}
}

skinparam Actor {
BackgroundColor #025d8c
BorderColor #025d8c
FontColor #025d8c
}

skinparam Participant {
BackgroundColor #025d8c
BorderColor #025d8c
FontColor White
}

skinparam Note {
BackgroundColor #d2e4ed
BorderColor #025d8c
FontColor #025d8c
}

' Puppet enabled=1, disabled=0
!$puppet = 1

autonumber
17 changes: 17 additions & 0 deletions guides/image-sources/prov-create-host-pxe.iuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
User -> Foreman : Create host
Foreman -> Proxy : Request a free IP address
Proxy -> DHCP : Search for a free IP address in DHCP
DHCP -> Proxy : Return the free IP address
Proxy -> Foreman : Pass the free IP address
group Templates [*PXE* installer boot]
Foreman -> Proxy : Render boot-loader configuration files
end
Proxy -> TFTP : Deploy boot-loader configuration files\nto ""/var/lib/tftpboot""
Foreman -> Proxy : Command to download installer kernel\nand initial RAM disk
Proxy -> TFTP : Download kernel and initial RAM disk
Foreman -> Proxy : Request DHCP reservation
Proxy -> DHCP : Create DHCP reservation
Foreman -> Proxy : Create DNS records
Proxy -> DNS : Forward DNS records
Proxy -> Foreman : Report status of TFTP, DHCP & DNS
Foreman -> User : Host is created\n(build mode enabled)
4 changes: 4 additions & 0 deletions guides/image-sources/prov-first-local-boot-pxe.iuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Host -> DHCP : Request reserved IP address and DHCP options
Host -> TFTP : Download boot loader
TFTP -> Host : Provide MAC-based configuration for boot loader
Host -> Host : Boot from HDD
8 changes: 8 additions & 0 deletions guides/image-sources/prov-initial-configuration.iuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
!if ($puppet)
opt when Puppet enabled
Host -> Host : Install Puppet agent
Host -> Puppet : Send certificate signing request
Puppet -> Host : Send certificate (if allowed to)
end
!endif
Host -> Host : Configure, for example:\n- Subscription Manager\n- Remote execution\n- Run Ansible roles
6 changes: 6 additions & 0 deletions guides/image-sources/prov-installation-media.iuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
loop
Host -> Foreman : Request installation media
Foreman -> Proxy : Request installation media
Proxy -> Foreman : Provide installation media
Foreman -> Host : Provide installation media
end
61 changes: 61 additions & 0 deletions guides/image-sources/provisioning-installer-pxeboot.plantuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
@startuml

!include foreman.pstyle

title Installer-based provisioning with PXE boot on bare metal

actor User
participant "Provisioned\nHost" as Host
participant "Foreman" as Foreman
participant "Foreman\nProxy" as Proxy
'participant "Pulp\n(Katello)" as Pulp
participant TFTP
participant DHCP
participant DNS
!if ($puppet)
participant "Puppet\nserver" as Puppet
!endif

note over Host : Powered off

== Create host in Foreman ==

!include prov-create-host-pxe.iuml

== Boot into installer ==

User -> Host : Power on the machine
Host -> DHCP : Request reserved IP and DHCP options
Host -> TFTP : Download boot loader
Host -> Host : Load the boot loader
Host -> TFTP : Get MAC-based configuration for boot loader
Host -> TFTP : Download installer kernel and initial RAM disk
Host -> Host : Load the installer
Host -> Proxy : Request installer configuration
group Template [Provision]
Proxy -> Proxy : Render installer configuration
end
Proxy -> Host : Provide installer configuration, such as a Kickstart file
!include prov-installation-media.iuml
note over Host : Operating system installed
!include prov-initial-configuration.iuml
Host -> Foreman : Call home\n(disables build mode)
group Templates [*PXE* local boot]
Foreman -> Proxy : Render boot-loader configuration files
end
Proxy -> TFTP : Deploy boot-loader configuration files\nto ""/var/lib/tftpboot""
Host -> Host : Reboot

== First local boot ==

!include prov-first-local-boot-pxe.iuml

!if ($puppet)
== First Puppet run ==

!include puppet-run.iuml
!endif

note over Host : In operation

@enduml
10 changes: 10 additions & 0 deletions guides/image-sources/puppet-run.iuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
opt when Puppet enabled
Host -> Puppet : Send facts
Host -> Puppet : Request catalog
Puppet -> Foreman : Forward facts
Puppet -> Foreman : Request external node classification
Puppet -> Host : Respond with requested catalog
Host -> Host : Run catalog
Host -> Puppet : Send report
Puppet -> Foreman : Forward report
end

0 comments on commit ac64275

Please sign in to comment.