Skip to content

Commit 78c65e5

Browse files
authored
Merge branch 'main' into fix/multi-images
2 parents 3c8cdb3 + 6f6ed2b commit 78c65e5

File tree

17 files changed

+58
-81
lines changed

17 files changed

+58
-81
lines changed

ansible/fatimage.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@
5252
become: yes
5353
gather_facts: no
5454
tasks:
55-
# - import_playbook: slurm.yml
55+
# - import_playbook: slurm.yml:
56+
- name: Setup DB
57+
include_role:
58+
name: mysql
59+
tasks_from: install.yml
5660
- name: OpenHPC
5761
import_role:
5862
name: stackhpc.openhpc
@@ -77,10 +81,10 @@
7781
name: opensearch
7882
tasks_from: install.yml
7983
become: true
80-
81-
# opensearch - containerised, nothing to do
8284
# slurm_stats - nothing to do
83-
# filebeat - containerised - nothing to do
85+
- import_role:
86+
name: filebeat
87+
tasks_from: install.yml
8488

8589
- import_role:
8690
# can't only run cloudalchemy.node_exporter/tasks/install.yml as needs vars from preflight.yml and triggers service start

ansible/monitoring.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,12 @@
2626
# Collection currently requires root for all tasks.
2727
become: true
2828

29-
- name: Setup filebeat
29+
- name: Deploy filebeat
3030
hosts: filebeat
3131
tags: filebeat
3232
tasks:
3333
- import_role:
3434
name: filebeat
35-
tasks_from: config.yml
36-
tags: config
37-
38-
- import_role:
39-
name: filebeat
40-
tasks_from: deploy.yml
41-
tags: deploy
4235

4336
- name: Deploy node_exporter
4437
hosts: node_exporter

ansible/roles/filebeat/tasks/deploy.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
- name: Create systemd unit file
3+
template:
4+
dest: /etc/systemd/system/filebeat.service
5+
src: filebeat.service.j2
6+
become: true
7+
register: _filebeat_unit
8+
9+
- name: Pull container image
10+
containers.podman.podman_image:
11+
name: "docker.elastic.co/beats/filebeat-oss"
12+
tag: "{{ filebeat_version }}"
13+
become_user: "{{ filebeat_podman_user }}"
14+
15+
- name: Reload filebeat unit file
16+
command: systemctl daemon-reload
17+
when: _filebeat_unit.changed

ansible/roles/filebeat/tasks/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- import_tasks: install.yml
2+
- import_tasks: runtime.yml

ansible/roles/filebeat/tasks/post.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

ansible/roles/filebeat/tasks/config.yml renamed to ansible/roles/filebeat/tasks/runtime.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,13 @@
2727
mode: 0600
2828
notify: Restart filebeat container
2929
become: true
30+
31+
- name: Flush handlers
32+
meta: flush_handlers
33+
34+
- name: Ensure filebeat service state
35+
systemd:
36+
name: filebeat.service
37+
state: started
38+
enabled: true
39+
become: true

ansible/roles/mysql/tasks/install.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@
88
dest: /etc/systemd/system/mysql.service
99
src: mysql.service.j2
1010
register: _mysql_unitfile
11+
12+
- name: Pull container image
13+
containers.podman.podman_image:
14+
name: "mysql"
15+
tag: "{{ mysql_tag }}"
16+
become_user: "{{ mysql_podman_user }}"

ansible/roles/opensearch/tasks/install.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
src: opensearch.service.j2
1515
register: _opensearch_unit
1616

17+
- name: Pull container image
18+
containers.podman.podman_image:
19+
name: "opensearchproject/opensearch"
20+
tag: "{{ opensearch_version }}"
21+
become_user: "{{ opensearch_podman_user }}"
22+
1723
- name: Reload opensearch unit file
1824
command: systemctl daemon-reload
1925
when: _opensearch_unit.changed

ansible/roles/opensearch/tasks/runtime.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,6 @@
7474
notify: Restart opensearch service
7575
become: true
7676

77-
- name: Pull container
78-
containers.podman.podman_image:
79-
name: "opensearchproject/opensearch:{{ opensearch_version }}"
80-
become_user: "{{ opensearch_podman_user }}"
81-
8277
- name: Flush handlers
8378
meta: flush_handlers
8479

ansible/roles/podman/tasks/config.yml

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -34,52 +34,3 @@
3434
with_items: "{{ podman_users }}"
3535
register: podman_user_info
3636
become: yes
37-
38-
- name: Define tmp directories on tmpfs
39-
blockinfile:
40-
path: /etc/tmpfiles.d/podman.conf
41-
create: yes
42-
block: |
43-
d {{ podman_tmp_dir_root }}/{{ item.name }}/libpod/tmp 0755 {{ item.name }} {{ item.name }}
44-
Z {{ podman_tmp_dir_root }}/{{ item.name }} 0755 {{ item.name }} {{ item.name }}
45-
become: yes
46-
loop: "{{ podman_users }}"
47-
register: podman_tmp_dirs
48-
49-
- name: Create tmp directories
50-
command: systemd-tmpfiles --create
51-
become: true
52-
when: podman_tmp_dirs.results | selectattr('changed') | list | length > 0 # when: any changed
53-
54-
- name: Create podman configuration directories
55-
file:
56-
path: "{{ item.home }}/.config/containers/"
57-
state: directory
58-
owner: "{{ item.name }}"
59-
group: "{{ item.name }}"
60-
become: yes
61-
loop: "{{ podman_user_info.results }}"
62-
63-
- name: Set podman to use temp directories
64-
community.general.ini_file:
65-
path: "{{ item.home }}/.config/containers/containers.conf"
66-
section: engine
67-
option: tmp_dir
68-
value: '"{{ podman_tmp_dir_root }}/{{ item.name }}/libpod/tmp"'
69-
owner: "{{ item.name }}"
70-
group: "{{ item.name }}"
71-
create: yes
72-
loop: "{{ podman_user_info.results }}"
73-
become: yes
74-
register: podman_tmp
75-
76-
- name: Reset podman database
77-
# otherwise old config overrides!
78-
command:
79-
cmd: podman system reset --force
80-
become: yes
81-
become_user: "{{ item.item.name }}"
82-
when: item.changed
83-
loop: "{{ podman_tmp.results }}"
84-
loop_control:
85-
label: "{{ item.item.name }}"
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
flavor = "vm.ska.cpu.general.small"
22
use_blockstorage_volume = true
3-
volume_size = 10 # GB
3+
volume_size = 12 # GB. Compatible with SMS-lab's general.v1.tiny
44
image_disk_format = "qcow2"
55
networks = ["4b6b2722-ee5b-40ec-8e52-a6610e14cc51"] # portal-internal (DNS broken on ilab-60)
66
source_image_name = "openhpc-230804-1754-80b8d714" # https://github.com/stackhpc/ansible-slurm-appliance/pull/298
77
fatimage_source_image_name = "Rocky-8-GenericCloud-Base-8.9-20231119.0.x86_64.qcow2"
88
ssh_keypair_name = "slurm-app-ci"
99
ssh_private_key_file = "~/.ssh/id_rsa"
1010
security_groups = ["default", "SSH"]
11-
ssh_bastion_host = "128.232.222.183"
12-
ssh_bastion_username = "slurm-app-ci"
11+
floating_ip_network = "CUDN-Internet" # Use FIP to avoid docker ratelimits on portal-internal outbound IP
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#update_enable: false # Can uncomment for speed debugging non-update related build issues

environments/.stackhpc/terraform/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ variable "cluster_name" {
1313
variable "cluster_image" {
1414
description = "single image for all cluster nodes - a convenience for CI"
1515
type = string
16-
default = "openhpc-240102-1025-e533fd70" # https://github.com/stackhpc/ansible-slurm-appliance/pull/346
16+
default = "openhpc-240116-1156-aa8dba7d" # https://github.com/stackhpc/ansible-slurm-appliance/pull/351
1717
# default = "Rocky-8-GenericCloud-Base-8.9-20231119.0.x86_64.qcow2"
1818
}
1919

environments/common/inventory/group_vars/builder/defaults.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# NOTE: Might be better of as extra vars or in a builder specific inventory as
33
# as dependent on alphabetical ordering of groups, so if these variables are
44
# defined elsewhere the group that is ordered lower will determine the values.
5+
update_enable: true
56
openhpc_slurm_service_started: false
67
nfs_client_mnt_state: present
78
block_devices_partition_state: skip

packer/openhpc_extravars.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
update_enable: true
1+
workaround_ansible_issue_61497: yes # extravars files can't be empty

packer/openstack.pkr.hcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ variable "image_visibility" {
9292

9393
variable "ssh_bastion_host" {
9494
type = string
95-
default = ""
95+
default = null
9696
}
9797

9898
variable "ssh_bastion_username" {
9999
type = string
100-
default = ""
100+
default = null
101101
}
102102

103103
variable "ssh_bastion_private_key_file" {

0 commit comments

Comments
 (0)