From 23d55c794f26538cc42a7f02719344ba698ec7f8 Mon Sep 17 00:00:00 2001 From: Steve Brasier Date: Thu, 17 Oct 2024 13:48:32 +0000 Subject: [PATCH 1/5] add sequence docs --- docs/sequence.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 docs/sequence.md diff --git a/docs/sequence.md b/docs/sequence.md new file mode 100644 index 000000000..7c8b2ddb6 --- /dev/null +++ b/docs/sequence.md @@ -0,0 +1,54 @@ +# Slurm Appliance Sequences + + + +## Image build + +This sequence applies to both "fatimage" builds (usually only done in StackHPC CI) and "extra" builds. The differences are: +- Which image the build VM uses, i.e. the starting image: A genericcloud image for fatimage builds or a fatimages build for an extra build. +- Which inventory groups the build VM is added to. + +Note that ansible-init does not run during an image build. It is disabled via a metadata flag. + +```mermaid +sequenceDiagram + participant ansible as Ansible Deploy Host + participant cloud as Cloud + note over ansible: $ packer build ... + ansible->>cloud: Create VM + create participant packer as Build VM + cloud->>packer: Create VM + note over packer: Boot + ansible->>packer: Wait for ssh connection + ansible->>packer: Run ansible/fatimage.yml playbook + ansible->>packer: Shutdown + ansible->>cloud: Create image from Build VM root disk + destroy packer + note over cloud: Image openhpc-... created + +``` + +## Cluster Creation + +```mermaid +sequenceDiagram + participant ansible as Ansible Deploy Host + participant cloud as Cloud + note over ansible: $ ansible-playbook ansible/adhoc/generate-passwords.yml + ansible->>ansible: Template secrets to inventory group_vars + note over ansible: $ tofu apply .... + ansible->>cloud: Create infra + create participant nodes as Cluster Instances + cloud->>nodes: Create instances + note over nodes: Boot + rect rgb(204, 232, 252) + note over nodes: ansible-init + nodes->>cloud: Query metadata + cloud->>nodes: Metadata sent + nodes->>nodes: Start k3s + end + note over ansible: $ ansible-playbook ansible/site.yml + ansible->>nodes: Wait for ansible-init completion + ansible->>nodes: Ansible tasks + note over nodes: All services running + From 01dcdbaa29602f9f78958c5b0444d53c17ceb57b Mon Sep 17 00:00:00 2001 From: Steve Brasier <33413598+sjpb@users.noreply.github.com> Date: Wed, 30 Oct 2024 13:28:08 +0000 Subject: [PATCH 2/5] Update docs/sequence.md Co-authored-by: wtripp180901 <78219569+wtripp180901@users.noreply.github.com> --- docs/sequence.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/sequence.md b/docs/sequence.md index 7c8b2ddb6..2e9d76a4b 100644 --- a/docs/sequence.md +++ b/docs/sequence.md @@ -19,6 +19,9 @@ sequenceDiagram create participant packer as Build VM cloud->>packer: Create VM note over packer: Boot + packer->>cloud: Query metadata + cloud->>packer: Metadata sent + packer->>packer: Skip ansible-init ansible->>packer: Wait for ssh connection ansible->>packer: Run ansible/fatimage.yml playbook ansible->>packer: Shutdown From 5e6f477a72c024a049e6e01c32b0dcb1954adbd4 Mon Sep 17 00:00:00 2001 From: Steve Brasier <33413598+sjpb@users.noreply.github.com> Date: Wed, 30 Oct 2024 13:28:16 +0000 Subject: [PATCH 3/5] Update docs/sequence.md Co-authored-by: wtripp180901 <78219569+wtripp180901@users.noreply.github.com> --- docs/sequence.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sequence.md b/docs/sequence.md index 2e9d76a4b..634ad1285 100644 --- a/docs/sequence.md +++ b/docs/sequence.md @@ -38,7 +38,7 @@ sequenceDiagram participant ansible as Ansible Deploy Host participant cloud as Cloud note over ansible: $ ansible-playbook ansible/adhoc/generate-passwords.yml - ansible->>ansible: Template secrets to inventory group_vars + ansible->>ansible: Template secrets to inventory group_vars and tofu metadata note over ansible: $ tofu apply .... ansible->>cloud: Create infra create participant nodes as Cluster Instances From b46e9f0762f59f3a4f8c0f1a0af244f2919b7cee Mon Sep 17 00:00:00 2001 From: Steve Brasier <33413598+sjpb@users.noreply.github.com> Date: Wed, 30 Oct 2024 13:28:23 +0000 Subject: [PATCH 4/5] Update docs/sequence.md Co-authored-by: wtripp180901 <78219569+wtripp180901@users.noreply.github.com> --- docs/sequence.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sequence.md b/docs/sequence.md index 634ad1285..abf00b07e 100644 --- a/docs/sequence.md +++ b/docs/sequence.md @@ -48,7 +48,7 @@ sequenceDiagram note over nodes: ansible-init nodes->>cloud: Query metadata cloud->>nodes: Metadata sent - nodes->>nodes: Start k3s + nodes->>nodes: Start k3s and connect to its peers end note over ansible: $ ansible-playbook ansible/site.yml ansible->>nodes: Wait for ansible-init completion From 4a664a40a0cc3198ecc17dba06b7a6d3ff48b78f Mon Sep 17 00:00:00 2001 From: wtripp180901 <78219569+wtripp180901@users.noreply.github.com> Date: Thu, 9 Jan 2025 15:37:05 +0000 Subject: [PATCH 5/5] Added release train to sequence diagram --- docs/sequence.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/sequence.md b/docs/sequence.md index abf00b07e..a4e66186f 100644 --- a/docs/sequence.md +++ b/docs/sequence.md @@ -14,6 +14,14 @@ Note that ansible-init does not run during an image build. It is disabled via a sequenceDiagram participant ansible as Ansible Deploy Host participant cloud as Cloud + ansible->>cloud: Create VM + create participant pulp as Local Pulp Server + cloud->>pulp: Create VM + ansible->>pulp: Run ansible/adhoc/deploy-pulp.yml + note over pulp: Pulp server installed & configured + ansible->>pulp: Run ansible/adhoc/sync-pulp.yml # needs to point at ark too somehow + participant ark as Ark + ark-->>pulp: Sync repos note over ansible: $ packer build ... ansible->>cloud: Create VM create participant packer as Build VM @@ -23,8 +31,14 @@ sequenceDiagram cloud->>packer: Metadata sent packer->>packer: Skip ansible-init ansible->>packer: Wait for ssh connection - ansible->>packer: Run ansible/fatimage.yml playbook + rect rgb(204, 232, 252) + note right of ansible: fatimage.yml + ansible->>packer: Overwrite repo files with Pulp repos and update + packer->>pulp: dnf update + pulp-->>packer: Package updates + ansible->>packer: Perform installation tasks ansible->>packer: Shutdown + end ansible->>cloud: Create image from Build VM root disk destroy packer note over cloud: Image openhpc-... created