Skip to content

Fix broken DNS in arcus CI #202

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

Merged
merged 5 commits into from
Aug 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
19 changes: 15 additions & 4 deletions .github/workflows/stackhpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
TF_VAR_cluster_name: ci${{ github.run_id }}
if: ${{ always() && steps.provision.outcome == 'failure' && contains('not enough hosts available', steps.provision_failure.messages) }}

- name: Directly configure cluster and build compute, login and control images
- name: Directly configure cluster and build compute
# see pre-hook for the image build
run: |
. venv/bin/activate
Expand Down Expand Up @@ -131,9 +131,20 @@ jobs:
(echo $statuscode | grep "200 OK") || (echo $statuscode && exit 1)
env:
TEST_USER_PASSWORD: ${{ secrets.TEST_USER_PASSWORD }}

- name: Test reimage of login and compute nodes
# TODO: test control node reimage

- name: Build packer images
run: |
. venv/bin/activate
. environments/${{ matrix.cloud }}/activate
echo test_user_password: "$TEST_USER_PASSWORD" > $APPLIANCES_ENVIRONMENT_ROOT/inventory/group_vars/basic_users/defaults.yml
cd packer/
PACKER_LOG=1 packer build -on-error=ask -var-file=$PKR_VAR_environment_root/builder.pkrvars.hcl openstack.pkr.hcl
env:
OS_CLOUD: openstack
ANSIBLE_FORCE_COLOR: True
TEST_USER_PASSWORD: ${{ secrets.TEST_USER_PASSWORD }}

- name: Test reimage of nodes
run: |
. venv/bin/activate
. environments/${{ matrix.cloud }}/activate
Expand Down
2 changes: 2 additions & 0 deletions ansible/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
# Need to change working directory otherwise we try to switch back to non-existent directory.
become_flags: '-i'
become: true
- name: Reset ssh connection to allow user changes to affect ansible_user
meta: reset_connection

- hosts: selinux
gather_facts: false
Expand Down
2 changes: 1 addition & 1 deletion environments/arcus/builder.pkrvars.hcl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
flavor = "vm.alaska.cpu.general.small"
networks = ["a262aabd-e6bf-4440-a155-13dbc1b5db0e"] # WCDC-iLab-60
source_image_name = "openhpc-220526-1354.qcow2"
source_image_name = "openhpc-220808-1510.qcow2"
ssh_keypair_name = "slurm-app-ci"
security_groups = ["default", "SSH"]
ssh_bastion_host = "128.232.222.183"
Expand Down
19 changes: 0 additions & 19 deletions environments/arcus/hooks/pre.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
- hosts: localhost
become: false
tags: build
tasks:
- name: Ensure secrets generated
include_role:
name: passwords

- name: Build packer images
shell:
cmd: |
cd packer
PACKER_LOG=1 packer build -on-error=ask -var-file=$PKR_VAR_environment_root/builder.pkrvars.hcl openstack.pkr.hcl
chdir: "{{ lookup('env', 'APPLIANCES_REPO_ROOT') }}"
when: "'builder' not in group_names" # avoid recursion!
register: packer_run
async: 2700 # 45 minutes
poll: 0

- hosts: all
become: true
tags: etc_hosts
Expand Down
6 changes: 3 additions & 3 deletions environments/arcus/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ module "cluster" {
key_pair = "slurm-app-ci"
control_node = {
flavor: "vm.alaska.cpu.general.small"
image: "openhpc-220526-1354.qcow2"
image: "openhpc-220808-1510.qcow2"
}
login_nodes = {
login-0: {
flavor: "vm.alaska.cpu.general.small"
image: "openhpc-220526-1354.qcow2"
image: "openhpc-220808-1510.qcow2"
}
}
compute_types = {
small: {
flavor: "vm.alaska.cpu.general.small"
image: "openhpc-220526-1354.qcow2"
image: "openhpc-220808-1510.qcow2"
}
}
compute_nodes = {
Expand Down
19 changes: 0 additions & 19 deletions environments/smslabs/hooks/pre.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
- hosts: localhost
become: false
tags: build
tasks:
- name: Ensure secrets generated
include_role:
name: passwords

- name: Build packer images
shell:
cmd: |
cd packer
PACKER_LOG=1 packer build -on-error=ask -var-file=$PKR_VAR_environment_root/builder.pkrvars.hcl openstack.pkr.hcl
chdir: "{{ lookup('env', 'APPLIANCES_REPO_ROOT') }}"
when: "'builder' not in group_names" # avoid recursion!
register: packer_run
async: 2700 # 45 minutes
poll: 0

- hosts: all
become: true
tags: etc_hosts
Expand Down