Skip to content

Commit 80b8d71

Browse files
committed
modify fatimage workflow and .stackhpc packer config to use CI_CLOUD
1 parent e6645fd commit 80b8d71

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

.github/workflows/fatimage.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@ on:
44
workflow_dispatch:
55
jobs:
66
openstack:
7-
name: openstack-build-arcus
7+
name: openstack-imagebuild
88
concurrency: ${{ github.ref }} # to branch/PR
99
runs-on: ubuntu-20.04
1010
env:
1111
ANSIBLE_FORCE_COLOR: True
1212
OS_CLOUD: openstack
13+
CI_CLOUD: ${{ vars.CI_CLOUD }}
1314
steps:
1415
- uses: actions/checkout@v2
1516

1617
- name: Setup ssh
1718
run: |
1819
set -x
1920
mkdir ~/.ssh
20-
echo "${arcus_SSH_KEY}" > ~/.ssh/id_rsa
21+
echo "${{ secrets[format('{0}_SSH_KEY', vars.CI_CLOUD)] }}" > ~/.ssh/id_rsa
2122
chmod 0600 ~/.ssh/id_rsa
22-
env:
23-
arcus_SSH_KEY: ${{ secrets.ARCUS_SSH_KEY }}
23+
shell: bash
2424

2525
- name: Add bastion's ssh key to known_hosts
26-
run: cat environments/.stackhpc/bastion_fingerprint >> ~/.ssh/known_hosts
26+
run: cat environments/.stackhpc/bastion_fingerprints >> ~/.ssh/known_hosts
2727
shell: bash
2828

2929
- name: Install ansible etc
@@ -32,11 +32,9 @@ jobs:
3232
- name: Write clouds.yaml
3333
run: |
3434
mkdir -p ~/.config/openstack/
35-
echo "${arcus_CLOUDS_YAML}" > ~/.config/openstack/clouds.yaml
35+
echo "${{ secrets[format('{0}_CLOUDS_YAML', vars.CI_CLOUD)] }}" > ~/.config/openstack/clouds.yaml
3636
shell: bash
37-
env:
38-
arcus_CLOUDS_YAML: ${{ secrets.ARCUS_CLOUDS_YAML }}
39-
37+
4038
- name: Setup environment
4139
run: |
4240
. venv/bin/activate
@@ -49,7 +47,7 @@ jobs:
4947
. environments/.stackhpc/activate
5048
cd packer/
5149
packer init .
52-
PACKER_LOG=1 packer build -only openstack.openhpc -on-error=ask -var-file=$PKR_VAR_environment_root/builder.pkrvars.hcl openstack.pkr.hcl
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
5351
5452
- name: Get created image name from manifest
5553
id: manifest
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
flavor = "general.v1.tiny"
2+
networks = ["26023e3d-bc8e-459c-8def-dbd47ab01756"] # stackhpc-ipv4-geneve
3+
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"
5+
ssh_keypair_name = "slurm-app-ci"
6+
ssh_private_key_file = "~/.ssh/id_rsa"
7+
security_groups = ["default", "SSH"]
8+
ssh_bastion_host = "185.45.78.150"
9+
ssh_bastion_username = "steveb"

0 commit comments

Comments
 (0)