Skip to content

Commit

Permalink
Add diagram of image-based provisioning with finish
Browse files Browse the repository at this point in the history
  • Loading branch information
Lennonka committed Sep 20, 2024
1 parent 702aa1d commit eecfeae
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 = 0

autonumber
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 -> Puppet : sends CSR
Puppet -> Host : sends certificate (if allowed to)
end
!else
note over Host : initial host configuration\n- remote execution,\n- signs Puppet client cert,\n- runs Ansible roles,\n- etc.
!endif
47 changes: 47 additions & 0 deletions guides/image-sources/provisioning-image-finish.plantuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
@startuml

!include foreman.pstyle

title Image-based provisioning with Finish script configuration

actor User
participant "Provisioned\nInstance" as Host
participant "Foreman" as Foreman
participant "Foreman\nProxy" as Proxy
participant "Infrastructure\nCloud" as Cloud
participant DNS
!if ($puppet)
participant "Puppet\nserver" as Puppet
!endif

note over Foreman : has an image with credentials\ndefined in compute resource

== Create host in Foreman ==

User -> Foreman : clicks on **Create Host**
User -> Foreman : selects cloud resource, the image and submits
group Template [Finish]
Foreman -> Proxy : renders the Finish script
end
Foreman -> Cloud : creates new instance
Cloud -> Foreman : reports IP address
Foreman -> Proxy : creates DNS records
Proxy -> DNS : forwards DNS records
Foreman -> Cloud : starts the instance
note over Host : boots up
Foreman -> Host : executes Finish script via SSH

== Finish script ==

!include prov-initial-configuration.iuml
Host -> Foreman : calls home\n(disables build mode)

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

!include puppet-run.iuml
!endif

note over Host : in operation

@enduml
8 changes: 8 additions & 0 deletions guides/image-sources/puppet-run.iuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Host -> Puppet : sends facts
Host -> Puppet : requests catalog
Puppet -> Foreman : forwards facts
Puppet -> Foreman : requests ENC
Puppet -> Host : responds with requested catalog
note over Host : runs catalog
Host -> Puppet : sends report
Puppet -> Foreman : forwards report

0 comments on commit eecfeae

Please sign in to comment.