Skip to content

Commit

Permalink
update CI workflow for ansible-driven TF
Browse files Browse the repository at this point in the history
  • Loading branch information
sjpb committed Dec 1, 2022
1 parent be7b812 commit 487813d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/stackhpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
env:
ANSIBLE_FORCE_COLOR: True
OS_CLOUD: openstack
TF_VAR_cluster_name: ci${{ github.run_id }}
CI_CLUSTER_NAME: ci${{ github.run_id }}
steps:
- uses: actions/checkout@v2

Expand All @@ -42,9 +42,9 @@ jobs:
- name: Install terraform
uses: hashicorp/setup-terraform@v1

- name: Initialise terraform
run: terraform init
working-directory: ${{ github.workspace }}/environments/${{ matrix.cloud }}/terraform
# - name: Initialise terraform
# run: terraform init
# working-directory: ${{ github.workspace }}/environments/${{ matrix.cloud }}/terraform

- name: Write clouds.yaml
run: |
Expand All @@ -63,13 +63,12 @@ jobs:
env:
TESTUSER_PASSWORD: ${{ secrets.TEST_USER_PASSWORD }}

- name: Provision servers
- name: Provision cluster
id: provision_servers
run: |
. venv/bin/activate
. environments/${{ matrix.cloud }}/activate
cd $APPLIANCES_ENVIRONMENT_ROOT/terraform
terraform apply -auto-approve
ansible-playbook ansible/adhoc/provision.yml
- name: Get server provisioning failure messages
id: provision_failure
Expand Down
2 changes: 1 addition & 1 deletion environments/arcus/inventory/cluster.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
all:
vars:
# required:
cluster_name: "{{ lookup('env', 'CI_CLUSTER_NAME'}}"
cluster_name: "{{ lookup('env', 'CI_CLUSTER_NAME') }}"
image_name: openhpc-221118-1422.qcow2 # https://github.com/stackhpc/slurm_image_builder/pull/12
flavor: vm.alaska.cpu.general.small
key_pair: slurm-app-ci
Expand Down

0 comments on commit 487813d

Please sign in to comment.