Skip to content
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
2 changes: 2 additions & 0 deletions .github/workflows/stackhpc-all-in-one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ jobs:
run: |
cat << EOF > terraform.tfvars
ssh_public_key = "id_rsa.pub"
ssh_username = "${{ env.SSH_USERNAME }}"
aio_vm_interface = "${{ env.VM_INTERFACE }}"
aio_vm_name = "${{ env.VM_NAME }}"
aio_vm_image = "${{ env.VM_IMAGE }}"
Expand All @@ -99,6 +100,7 @@ jobs:
EOF
working-directory: ${{ github.workspace }}/terraform/aio
env:
SSH_USERNAME: "${{ inputs.os_distribution == 'ubuntu' && 'ubuntu' || 'cloud-user' }}"
VM_NAME: "skc-ci-aio-${{ inputs.neutron_plugin }}-${{ github.run_id }}"
VM_IMAGE: ${{ inputs.vm_image }}
VM_FLAVOR: ${{ inputs.vm_flavor }}
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/stackhpc-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,31 @@ jobs:
OS_CLOUD: sms-lab-release
secrets: inherit
if: github.repository == 'stackhpc/stackhpc-kayobe-config'

all-in-one-ubuntu-ovs:
name: aio (Ubuntu OVS)
needs:
- build-kayobe-image
uses: ./.github/workflows/stackhpc-all-in-one.yml
with:
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
os_distribution: ubuntu
neutron_plugin: ovs
vm_image: Ubuntu-20.04
OS_CLOUD: sms-lab-release
secrets: inherit
if: github.repository == 'stackhpc/stackhpc-kayobe-config'

all-in-one-ubuntu-ovn:
name: aio (Ubuntu OVN)
needs:
- build-kayobe-image
uses: ./.github/workflows/stackhpc-all-in-one.yml
with:
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
os_distribution: ubuntu
neutron_plugin: ovn
vm_image: Ubuntu-20.04
OS_CLOUD: sms-lab-release
secrets: inherit
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
2 changes: 1 addition & 1 deletion terraform/aio/templates/userdata.cfg.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runcmd:
# Configure SSH keys here, to avoid creating an ephemeral keypair.
# This means only the instance needs to be cleaned up if the destroy fails.
ssh_authorized_keys:
- ${ssh_public_key}
- ${ssh_public_key}

write_files:
# WORKAROUND: https://bugs.launchpad.net/kolla-ansible/+bug/1995409
Expand Down
16 changes: 16 additions & 0 deletions terraform/aio/vm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ variable "ssh_public_key" {
type = string
}

variable "ssh_username" {
type = string
}

variable "aio_vm_name" {
type = string
default = "kayobe-aio"
Expand Down Expand Up @@ -55,5 +59,17 @@ resource "openstack_compute_instance_v2" "kayobe-aio" {
destination_type = "volume"
delete_on_termination = true
}
}

# Wait for the instance to be accessible via SSH before progressing.
resource "null_resource" "kayobe-aio" {
provisioner "remote-exec" {
connection {
host = openstack_compute_instance_v2.kayobe-aio.access_ip_v4
user = var.ssh_username
private_key = file("id_rsa")
}

inline = ["echo 'connected!'"]
}
}