Skip to content

Commit 87af20c

Browse files
committed
Merge branch 'main' into feat/freeipa-nocontainer
2 parents ddcff02 + ae1c4d9 commit 87af20c

File tree

14 files changed

+81
-40
lines changed

14 files changed

+81
-40
lines changed

.github/workflows/fatimage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
. environments/.stackhpc/activate
4848
cd packer/
4949
packer init .
50-
PACKER_LOG=1 packer build -only openstack.openhpc -on-error=ask -var-file=$PKR_VAR_environment_root/${{ vars.CI_CLOUD }}.pkrvars.hcl openstack.pkr.hcl
50+
PACKER_LOG=1 packer build -only openstack.openhpc -on-error=${{ vars.PACKER_ON_ERROR }} -var-file=$PKR_VAR_environment_root/${{ vars.CI_CLOUD }}.pkrvars.hcl openstack.pkr.hcl
5151
5252
- name: Get created image name from manifest
5353
id: manifest

ansible/ci/retrieve_inventory.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
gather_facts: no
88
vars:
99
cluster_prefix: "{{ undef(hint='cluster_prefix must be defined') }}" # e.g. ci4005969475
10-
cluster_network: WCDC-iLab-60
10+
ci_vars_file: "{{ appliances_environment_root + '/terraform/' + lookup('env', 'CI_CLOUD') }}.tfvars"
11+
cluster_network: "{{ lookup('ansible.builtin.ini', 'cluster_net', file=ci_vars_file, type='properties') | trim('\"') }}"
1112
tasks:
1213
- name: Get control host IP
1314
set_fact:

ansible/extras.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
import_role:
1919
name: eessi
2020

21-
- hosts: cuda
21+
- name: Setup CUDA
22+
hosts: cuda
2223
become: yes
2324
gather_facts: no
2425
tags: cuda

ansible/roles/mysql/tasks/configure.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
community.mysql.mysql_info:
2222
login_user: root
2323
login_password: "{{ mysql_root_password }}"
24-
# no_log: true # TODO: FIXME
24+
no_log: "{{ no_log | default(true) }}"
2525
register: _mysql_info
2626
until: "'version' in _mysql_info"
2727
retries: 90

dev/delete-cluster.py

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env python
2+
3+
"""
4+
Delete infrastructure for a cluster without using Terraform. Useful for CI clusters.
5+
6+
Usage:
7+
delete-cluster.py PREFIX
8+
9+
Where PREFIX is the string at the start of the resource's names.
10+
It will list matching resources and prompt to confirm deletion.
11+
"""
12+
13+
import sys, json, subprocess, pprint
14+
15+
16+
CLUSTER_RESOURCES = ['server', 'port', 'volume']
17+
18+
def delete_cluster(cluster_prefix):
19+
to_delete = {}
20+
for resource_type in CLUSTER_RESOURCES:
21+
to_delete[resource_type] = []
22+
resource_list = subprocess.run(f'openstack {resource_type} list --format json', stdout=subprocess.PIPE, shell=True)
23+
resources = json.loads(resource_list.stdout)
24+
for item in resources:
25+
try:
26+
if item['Name'] is not None and item['Name'].startswith(cluster_prefix):
27+
print(resource_type, item['Name'], item['ID'])
28+
to_delete[resource_type].append(item)
29+
except:
30+
print(resource_type, item)
31+
raise
32+
if input('Delete these (y/n)?:') == 'y':
33+
for resource_type in CLUSTER_RESOURCES:
34+
items = [v['ID'] for v in to_delete[resource_type]]
35+
if items:
36+
# delete all resources of each type in a single call for speed:
37+
subprocess.run(f"openstack {resource_type} delete {' '.join(items)}", stdout=subprocess.PIPE, shell=True)
38+
print(f'Deleted {len(items)} {resource_type}s')
39+
else:
40+
print('Cancelled - no resources deleted')
41+
42+
if __name__ == '__main__':
43+
if len(sys.argv) != 2:
44+
print('ERROR: Incorrect argument(s).\n' + __doc__)
45+
exit(1)
46+
delete_cluster(sys.argv[1])

dev/setup-env.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#!/bin/bash
22

3-
/usr/bin/python3.8 -m venv venv # use `sudo yum install python38` on Rocky Linux 8 to install this
3+
if [[ ! -d "venv" ]]; then
4+
/usr/bin/python3.8 -m venv venv # use `sudo yum install python38` on Rocky Linux 8 to install this
5+
fi
46
. venv/bin/activate
57
pip install -U pip
68
pip install -r requirements.txt
79
ansible --version
8-
# Install ansible dependencies ...
9-
ansible-galaxy role install -r requirements.yml -p ansible/roles
10-
ansible-galaxy collection install -r requirements.yml -p ansible/collections
10+
# Install or update ansible dependencies ...
11+
ansible-galaxy role install -fr requirements.yml -p ansible/roles
12+
ansible-galaxy collection install -fr requirements.yml -p ansible/collections

environments/.stackhpc/ARCUS.pkrvars.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ volume_size = 10 # GB
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
7-
fatimage_source_image_name = "Rocky-8-GenericCloud-8.6.20220702.0.x86_64.qcow2"
7+
fatimage_source_image_name = "Rocky-8-GenericCloud-Base-8.8-20230518.0.x86_64.qcow2"
88
ssh_keypair_name = "slurm-app-ci"
99
ssh_private_key_file = "~/.ssh/id_rsa"
1010
security_groups = ["default", "SSH"]

environments/.stackhpc/SMS.pkrvars.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
flavor = "general.v1.tiny"
22
networks = ["26023e3d-bc8e-459c-8def-dbd47ab01756"] # stackhpc-ipv4-geneve
33
source_image_name = "openhpc-230503-0944-bf8c3f63" # https://github.com/stackhpc/ansible-slurm-appliance/pull/252
4-
fatimage_source_image_name = "Rocky-8-GenericCloud-8.6.20220702.0.x86_64.qcow2"
4+
fatimage_source_image_name = "Rocky-8-GenericCloud-Base-8.8-20230518.0.x86_64.qcow2"
55
ssh_keypair_name = "slurm-app-ci"
66
ssh_private_key_file = "~/.ssh/id_rsa"
77
security_groups = ["default", "SSH"]

environments/.stackhpc/ansible.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
any_errors_fatal = True
33
stdout_callback = debug
44
stderr_callback = debug
5+
callbacks_enabled = ansible.posix.profile_tasks
56
gathering = smart
67
forks = 30
78
host_key_checking = False
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
- hosts: podman:!builder
2+
become: yes
3+
gather_facts: false
4+
tags: podman
5+
tasks:
6+
- name: Configure container image registry for unqualified searches to avoid docker.io ratelimits
7+
copy:
8+
dest: /etc/containers/registries.conf.d/003-arcus-unqualfied-overrides.conf
9+
content: |
10+
unqualified-search-registries = ['{{ podman_registry_address | split('/') | first }}', 'registry.access.redhat.com', 'registry.redhat.io', 'docker.io']
11+
12+
[[registry]]
13+
prefix = "{{ podman_registry_address }}"
14+
location = "{{ podman_registry_address }}"
15+
insecure = true
16+
when: "ci_cloud == 'ARCUS'"

environments/.stackhpc/hooks/post.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

environments/.stackhpc/hooks/pre.yml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,8 @@
1010
mode: 0400
1111
owner: root
1212
group: root
13-
no_log: true
13+
no_log: "{{ no_log | default(true) }}"
1414
loop:
1515
- "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}/inventory/hosts"
1616
- "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}/inventory/group_vars/all/secrets.yml"
1717
- "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}/inventory/group_vars/all/test_user.yml"
18-
19-
- hosts: all:!builder
20-
become: yes
21-
gather_facts: false
22-
tags: podman
23-
tasks:
24-
- name: Configure container image registry for unqualified searches to avoid docker.io ratelimits
25-
copy:
26-
dest: /etc/containers/registries.conf.d/003-arcus-unqualfied-overrides.conf
27-
content: |
28-
unqualified-search-registries = ['{{ podman_registry_address | split('/') | first }}', 'registry.access.redhat.com', 'registry.redhat.io', 'docker.io']
29-
30-
[[registry]]
31-
prefix = "{{ podman_registry_address }}"
32-
location = "{{ podman_registry_address }}"
33-
insecure = true
34-
when: "ci_cloud == 'ARCUS'"

environments/.stackhpc/terraform/main.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ 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-231020-1357-b5d8b056" # https://github.com/stackhpc/ansible-slurm-appliance/pull/320
17-
# default = "Rocky-8-GenericCloud-Base-8.7-20221130.0.x86_64.qcow2"
18-
# default = "Rocky-8-GenericCloud-8.6.20220702.0.x86_64.qcow2"
16+
default = "openhpc-231027-0916-893570de" # https://github.com/stackhpc/ansible-slurm-appliance/pull/324
17+
# default = "Rocky-8-GenericCloud-Base-8.8-20230518.0.x86_64.qcow2"
1918
}
2019

2120
variable "cluster_net" {}

requirements.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ roles:
33
- src: stackhpc.nfs
44
version: v22.9.1
55
- src: https://github.com/stackhpc/ansible-role-openhpc.git
6-
version: v0.20.0 # Allow multiple empty partitions by @sjpb in #156
6+
version: v0.23.0 # https://github.com/stackhpc/ansible-role-openhpc/pull/165
77
name: stackhpc.openhpc
88
- src: https://github.com/stackhpc/ansible-node-exporter.git
99
version: feature/no-install

0 commit comments

Comments
 (0)