-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Testing directory Added testing directory and test suite(basic) * Update testing-deploy-openstack.yaml Configuring to run after images are pushed to QUAY * Update env.yaml.example typo fix * Update doit.sh fix paths * Update doit.sh Need to auto accept ssh keys * path corrections and typos Lots of path corrections to make it work as a workflow * Update deploy.yaml Added health checks * Update deploy.yaml whitespace cleanup * fixes for pre-commit fixing problems with pre-commit * Pre commit fixes * Update doit.sh * Update doit.sh * Update testing-deploy-openstack.yaml changed image to latest
Showing
10 changed files
with
680 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Migrate Images to GHCR | ||
name: Migrate Images to QUAY | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: testing-openstack-deploy | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- Migrate Images to QUAY | ||
types: | ||
- completed | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python environment | ||
run: sudo apt-get update && sudo apt-get install -y python3-pip | ||
|
||
- name: Install requirements | ||
run: pip3 install -r testing/requirements.txt | ||
|
||
- name: Create OpenStack config directory | ||
run: mkdir -p ~/.config/openstack | ||
|
||
- name: Retrieve clouds.yaml from GitHub secrets | ||
env: | ||
CLOUDS_YAML: ${{ secrets.CLOUDS_YAML }} | ||
run: | | ||
echo "$CLOUDS_YAML" > ~/.config/openstack/clouds.yaml | ||
- name: Retrieve env.yaml from GitHub secrets | ||
env: | ||
ENV_YAML: ${{ secrets.ENV_YAML }} | ||
run: | | ||
echo "$ENV_YAML" > ~/env.yaml | ||
- name: Run deployment script | ||
run: bash testing/doit.sh | ||
|
||
- name: Cleanup | ||
if: always() | ||
run: bash testing/cleanup.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
heat_template_version: wallaby | ||
|
||
description: Build genestack for testing | ||
|
||
parameters: | ||
in_net: | ||
type: string | ||
description: Internal network name | ||
|
||
ext_net: | ||
type: string | ||
description: External network for floating IP | ||
|
||
image_name: | ||
type: string | ||
description: Image name for the VMs | ||
|
||
key_pair: | ||
type: string | ||
description: Key pair name for the VMs | ||
default: "genestack-keypair" | ||
|
||
flavor_name: | ||
type: string | ||
description: Flavor name for the VMs | ||
|
||
security_group: | ||
type: string | ||
description: Security group for the VMs | ||
|
||
name1: | ||
type: string | ||
description: Name of first machine | ||
default: "controller1" | ||
|
||
name2: | ||
type: string | ||
description: Name of second machine | ||
default: "controller2" | ||
|
||
name3: | ||
type: string | ||
description: Name of third machine | ||
default: "controller3" | ||
|
||
resources: | ||
genestack_keypair: | ||
type: OS::Nova::KeyPair | ||
properties: | ||
name: "genestack-keypair" | ||
public_key: { get_file: ./key.pub } | ||
|
||
genestack_machine1: | ||
type: OS::Heat::Stack | ||
properties: | ||
template: { get_file: single.yaml } | ||
parameters: | ||
internal: {get_param: in_net } | ||
external: {get_param: ext_net } | ||
image: {get_param: image_name } | ||
flavor: {get_param: flavor_name } | ||
keys: { get_resource: genestack_keypair } | ||
sec_group: {get_param: security_group } | ||
name: {get_param: name1 } | ||
|
||
genestack_machine2: | ||
type: OS::Heat::Stack | ||
properties: | ||
template: { get_file: single.yaml } | ||
parameters: | ||
internal: {get_param: in_net } | ||
external: {get_param: ext_net } | ||
image: {get_param: image_name } | ||
flavor: {get_param: flavor_name } | ||
keys: { get_resource: genestack_keypair } | ||
sec_group: {get_param: security_group } | ||
name: {get_param: name2 } | ||
|
||
genestack_machine3: | ||
type: OS::Heat::Stack | ||
properties: | ||
template: { get_file: single.yaml } | ||
parameters: | ||
internal: {get_param: in_net } | ||
external: {get_param: ext_net } | ||
image: {get_param: image_name } | ||
flavor: {get_param: flavor_name } | ||
keys: { get_resource: genestack_keypair } | ||
sec_group: {get_param: security_group } | ||
name: {get_param: name3 } | ||
|
||
outputs: | ||
all_out: | ||
description: ip addresses of the 3 machines | ||
value: | ||
- { get_attr: [genestack_machine1, outputs, vm_ip] } | ||
- { get_attr: [genestack_machine2, outputs, vm_ip] } | ||
- { get_attr: [genestack_machine3, outputs, vm_ip] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
cd testing || exit | ||
rm ./key* | ||
rm ./inventory.yaml | ||
yes y | openstack --os-cloud default stack delete testing |
Oops, something went wrong.