Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs with sequence diagrams for operations #456

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions docs/sequence.md
Original file line number Diff line number Diff line change
@@ -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
sjpb marked this conversation as resolved.
Show resolved Hide resolved
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
sjpb marked this conversation as resolved.
Show resolved Hide resolved
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
sjpb marked this conversation as resolved.
Show resolved Hide resolved
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