Skip to content

Commit 21b7081

Browse files
committed
Merge branch 'feature/k3s-ansible-init' of github.com:stackhpc/ansible-slurm-appliance into feature/k3s-ansible-init
2 parents d96eddd + 3f599c6 commit 21b7081

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

ansible/roles/cluster_infra/templates/resources.tf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ resource "terraform_data" "k3s_token" {
1515
input = "{{ k3s_token }}"
1616
lifecycle {
1717
ignore_changes = [
18-
input,
18+
input, # makes it a write-once value (set via Ansible)
1919
]
2020
}
2121
}

ansible/roles/k3s/tasks/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
path: /var/lib/rancher/k3s
66
register: stat_result
77

8-
- name: Download and air-gapped installation of k3s
8+
- name: Perform air-gapped installation of k3s
9+
# Using air-gapped install so containers are pre-installed to avoid rate-limiting from registries on cluster startup
910
when: not stat_result.stat.exists
1011
block:
1112

docs/k3s.README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Overview
22
A K3s cluster is deployed with the Slurm cluster. Both an agent and server instance of K3s is installed during image build and the correct service (determined by OpenStack metadata) will be
3-
enabled during boot. Nodes with the `k3s_server` metadata field defined will be configured as K3s agents (this field gives them the address of the server). The Slurm control node is currently configured as a server while all other nodes configured as agents. It should be noted that running multiple K3s servers isn't supported. Currently only the root user on the control node has
3+
enabled during boot. Nodes with the `k3s_server` metadata field defined will be configured as K3s agents (this field gives them the address of the server). The Slurm control node is currently configured as a server while all other nodes are configured as agents. Using multiple K3s servers isn't supported. Currently only the root user on the control node has
44
access to the Kubernetes API. The `k3s` role installs Helm for package management. K9s is also installed in the image and can be used by the root user.
55

66
# Idempotency

environments/.caas/hooks/pre.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# Generate k3s token
44
- name: Generate k3s token
5+
# NB: Although this generates a new token on each run, the actual token set in metadata is retrieved from a set-once tofu resource, hence only the first value ever generated is relevant.
56
hosts: openstack
67
tasks:
78
- ansible.builtin.set_fact:

environments/common/layouts/everything

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,6 @@ cluster
8787
openhpc
8888

8989
[k9s:children]
90+
# Hosts to install k9s on
9091
control
9192

0 commit comments

Comments
 (0)