Skip to content

Commit

Permalink
modify fatimage workflow and .stackhpc packer config to use CI_CLOUD
Browse files Browse the repository at this point in the history
  • Loading branch information
sjpb committed Aug 4, 2023
1 parent e6645fd commit 80b8d71
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/fatimage.yml
Expand Up @@ -4,26 +4,26 @@ on:
workflow_dispatch:
jobs:
openstack:
name: openstack-build-arcus
name: openstack-imagebuild
concurrency: ${{ github.ref }} # to branch/PR
runs-on: ubuntu-20.04
env:
ANSIBLE_FORCE_COLOR: True
OS_CLOUD: openstack
CI_CLOUD: ${{ vars.CI_CLOUD }}
steps:
- uses: actions/checkout@v2

- name: Setup ssh
run: |
set -x
mkdir ~/.ssh
echo "${arcus_SSH_KEY}" > ~/.ssh/id_rsa
echo "${{ secrets[format('{0}_SSH_KEY', vars.CI_CLOUD)] }}" > ~/.ssh/id_rsa
chmod 0600 ~/.ssh/id_rsa
env:
arcus_SSH_KEY: ${{ secrets.ARCUS_SSH_KEY }}
shell: bash

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

- name: Install ansible etc
Expand All @@ -32,11 +32,9 @@ jobs:
- name: Write clouds.yaml
run: |
mkdir -p ~/.config/openstack/
echo "${arcus_CLOUDS_YAML}" > ~/.config/openstack/clouds.yaml
echo "${{ secrets[format('{0}_CLOUDS_YAML', vars.CI_CLOUD)] }}" > ~/.config/openstack/clouds.yaml
shell: bash
env:
arcus_CLOUDS_YAML: ${{ secrets.ARCUS_CLOUDS_YAML }}


- name: Setup environment
run: |
. venv/bin/activate
Expand All @@ -49,7 +47,7 @@ jobs:
. environments/.stackhpc/activate
cd packer/
packer init .
PACKER_LOG=1 packer build -only openstack.openhpc -on-error=ask -var-file=$PKR_VAR_environment_root/builder.pkrvars.hcl openstack.pkr.hcl
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
- name: Get created image name from manifest
id: manifest
Expand Down
File renamed without changes.
9 changes: 9 additions & 0 deletions environments/.stackhpc/SMS.pkrvars.hcl
@@ -0,0 +1,9 @@
flavor = "general.v1.tiny"
networks = ["26023e3d-bc8e-459c-8def-dbd47ab01756"] # stackhpc-ipv4-geneve
source_image_name = "openhpc-230503-0944-bf8c3f63" # https://github.com/stackhpc/ansible-slurm-appliance/pull/252
fatimage_source_image_name = "Rocky-8-GenericCloud-8.6.20220702.0.x86_64.qcow2"
ssh_keypair_name = "slurm-app-ci"
ssh_private_key_file = "~/.ssh/id_rsa"
security_groups = ["default", "SSH"]
ssh_bastion_host = "185.45.78.150"
ssh_bastion_username = "steveb"

0 comments on commit 80b8d71

Please sign in to comment.