Skip to content

Commit 11d9268

Browse files
authored
Merge branch 'main' into feat/ephemeral-ssh-keys
2 parents cca26dd + aa63d7e commit 11d9268

File tree

8 files changed

+41
-48
lines changed

8 files changed

+41
-48
lines changed

.github/workflows/stackhpc.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,24 +66,13 @@ jobs:
6666
cd $APPLIANCES_ENVIRONMENT_ROOT/terraform
6767
terraform apply -auto-approve
6868
69-
- name: Get server provisioning failure messages
70-
id: provision_failure
71-
run: |
72-
. venv/bin/activate
73-
. environments/.stackhpc/activate
74-
cd $APPLIANCES_ENVIRONMENT_ROOT/terraform
75-
TF_FAIL_MSGS="$(../../skeleton/\{\{cookiecutter.environment\}\}/terraform/getfaults.py $PWD)"
76-
echo TF failure messages: $TF_FAIL_MSGS
77-
echo "::set-output name=messages::${TF_FAIL_MSGS}"
78-
if: always() && steps.provision_servers.outcome == 'failure'
79-
8069
- name: Delete infrastructure if failed due to lack of hosts
8170
run: |
8271
. venv/bin/activate
8372
. environments/.stackhpc/activate
8473
cd $APPLIANCES_ENVIRONMENT_ROOT/terraform
8574
terraform destroy -auto-approve
86-
if: ${{ always() && steps.provision_servers.outcome == 'failure' && contains(steps.provision_failure.messages, 'not enough hosts available') }}
75+
if: ${{ steps.provision_servers.outcome == 'failure' }}
8776

8877
- name: Configure cluster
8978
run: |

ansible/roles/filebeat/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
#filebeat_config_path: undefined # REQUIRED. Path to filebeat.yml configuration file template
44
filebeat_podman_user: "{{ ansible_user }}" # User that runs the filebeat container
55
filebeat_version: 7.12.1 # latest usable with opensearch - see https://opensearch.org/docs/2.4/tools/index/#compatibility-matrix-for-beats
6+
filebeat_debug: false

ansible/roles/opensearch/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ opensearch_data_path: /usr/share/opensearch/data
99
opensearch_state: started # will be restarted if required
1010
opensearch_systemd_service_enabled: true
1111
opensearch_certs_duration: "{{ 365 * 10 }}" # days validity for self-signed certs
12+
opensearch_debug: false

ansible/roles/opensearch/templates/opensearch.yml.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ plugins.security.system_indices.enabled: true
3232

3333
# Fake version for filebeat: https://opensearch.org/docs/2.4/tools/index/#agents-and-ingestion-tools
3434
compatibility.override_main_response_version: true
35+
36+
{% if opensearch_debug | default(false) | bool %}logger.level: debug{% endif %}

ansible/roles/proxy/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# proxy_http_proxy:
22
proxy_https_proxy: "{{ proxy_http_proxy }}"
3-
proxy_no_proxy: "{{ (groups['all'] + hostvars.values() | map(attribute='ansible_host')) | sort | join(',') }}"
3+
proxy_no_proxy: "{{ (['localhost', '127.0.0.1'] + groups['all'] + hostvars.values() | map(attribute='ansible_host')) | sort | join(',') }}"
44
proxy_dnf: true
55
proxy_systemd: true

environments/common/files/filebeat/filebeat.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,5 @@ output.elasticsearch:
5454
ssl.verification_mode: none
5555
username: "admin"
5656
password: "{{ vault_elasticsearch_admin_password }}"
57+
58+
{% if filebeat_debug | default(false) | bool %}logging.level: debug{% endif %}

environments/skeleton/{{cookiecutter.environment}}/terraform/getfaults.py

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

packer/openstack.pkr.hcl

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,37 @@ variable "floating_ip_network" {
102102
default = null
103103
}
104104

105+
variable "manifest_output_path" {
106+
type = string
107+
default = "packer-manifest.json"
108+
}
109+
110+
variable "use_blockstorage_volume" {
111+
type = bool
112+
default = false
113+
}
114+
115+
variable "volume_size" {
116+
type = number
117+
default = null # When not specified use the size of the builder instance root disk
118+
}
119+
120+
variable "image_disk_format" {
121+
type = string
122+
default = null # When not specified use the image default
123+
}
124+
125+
variable "metadata" {
126+
type = map(string)
127+
default = {}
128+
}
129+
105130
source "openstack" "openhpc" {
106131
flavor = "${var.flavor}"
132+
volume_size = "${var.volume_size}"
133+
use_blockstorage_volume = "${var.use_blockstorage_volume}"
134+
image_disk_format = "${var.image_disk_format}"
135+
metadata = "${var.metadata}"
107136
networks = "${var.networks}"
108137
ssh_username = "${var.ssh_username}"
109138
ssh_timeout = "20m"
@@ -122,7 +151,7 @@ build {
122151
name = "compute"
123152
source_image = "${var.source_image}"
124153
source_image_name = "${var.source_image_name}" # NB: must already exist in OpenStack
125-
image_name = "ohpc-${source.name}-${local.timestamp}-${substr(local.git_commit, 0, 8)}.qcow2" # also provides a unique legal instance hostname (in case of parallel packer builds)
154+
image_name = "ohpc-${source.name}-${local.timestamp}-${substr(local.git_commit, 0, 8)}" # also provides a unique legal instance hostname (in case of parallel packer builds)
126155
}
127156

128157
provisioner "ansible" {
@@ -134,6 +163,7 @@ build {
134163
}
135164

136165
post-processor "manifest" {
166+
output = "${var.manifest_output_path}"
137167
custom_data = {
138168
source = "${source.name}"
139169
}
@@ -146,7 +176,7 @@ build {
146176
floating_ip_network = "${var.floating_ip_network}"
147177
source_image = "${var.fatimage_source_image}"
148178
source_image_name = "${var.fatimage_source_image_name}" # NB: must already exist in OpenStack
149-
image_name = "${source.name}-${local.timestamp}-${substr(local.git_commit, 0, 8)}.qcow2" # similar to name from slurm_image_builder
179+
image_name = "${source.name}-${local.timestamp}-${substr(local.git_commit, 0, 8)}" # similar to name from slurm_image_builder
150180
}
151181

152182
provisioner "ansible" {
@@ -158,6 +188,7 @@ build {
158188
}
159189

160190
post-processor "manifest" {
191+
output = "${var.manifest_output_path}"
161192
custom_data = {
162193
source = "${source.name}"
163194
}

0 commit comments

Comments
 (0)