Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into multi_run
Browse files Browse the repository at this point in the history
  • Loading branch information
dvalinrh committed Feb 5, 2025
2 parents b5acd53 + fbeae84 commit 1e7e0a9
Show file tree
Hide file tree
Showing 35 changed files with 458 additions and 64 deletions.
14 changes: 14 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# The problem
Write a short summary about what the reported problem/enhancement is.

# Expected Behaviour
How should the program behave when it encounters
this issue?

# Actual Behaviour
Describe how the program currently behaves when it
encounters this issue.

# Screenshots or Relevant Logs
When applicable, attach a screenshot or relevant logs of
the issue.
16 changes: 16 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Description
What does this PR do? Give a short summary

# Before/After Comparison
Give some examples of the before/after behavior
of the program.

# Clerical Stuff
Mention the issue this PR works toward resolving. If the
PR completely solves the issue, use "This closes #x"
to close the issue out automatically.

Mention the JIRA ticket of the issue, this helps keep
everything together so we can find this PR easily.

Relates to JIRA: RPOPC-<TICKET_NUMBER>
20 changes: 20 additions & 0 deletions .github/workflows/check_review_label.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Verify group review

on:
pull_request:
types:
- opened
- labeled

env:
TARGET_LABEL: 'group_review_lgtm'

jobs:
check_review_label:
runs-on: ubuntu-latest
steps:
- run: echo "::error Missing review label" && exit 1
if: "!contains(github.event.pull_request.labels.*.name, env.TARGET_LABEL)"

- run: echo "Has review label"

58 changes: 58 additions & 0 deletions .github/workflows/issue_tagging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Update parent issue

permissions:
issues: write

env:
ISSUE_STATE: pr_inprogress
REMOVE_ISSUES: --remove-label pr_approved --remove-label pr_review --remove-label pr_inprogress
GH_TOKEN: ${{ github.token }}

on:
pull_request_target:
types:
- review_requested
pull_request_review:
types:
- submitted
jobs:
update_parent_issue:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Get PR number on issue type
if: github.event_name == 'pull_request_review'
run: echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> "$GITHUB_ENV"

- name: Get PR number on PR event
if: github.event_name == 'pull_request_target'
run: echo "PR_NUMBER=${{ github.event.number }}" >> "$GITHUB_ENV"

- name: Get parent issues
shell: bash
run: >
echo PARENT_ISSUES=$(
./ci/get_parent_issue.sh
$PR_NUMBER
) >> $GITHUB_ENV
- name: Fail when unable to find a parent issue
if: env.PARENT_ISSUES == ''
run: echo "Could not find a parent issue" && exit 1

- name: Get PR states
run: >
echo PR_STATUS=pr_$(
gh pr view $PR_NUMBER --json reviewRequests,latestReviews |
python ./ci/determine_status.py
) >> $GITHUB_ENV
- name: Set parent issues state
run: >
for issue in $PARENT_ISSUES; do
echo "Updating $issue to $PR_STATUS" &&
gh issue edit $issue $REMOVE_ISSUES &&
gh issue edit $issue --add-label=$PR_STATUS
done
29 changes: 29 additions & 0 deletions .github/workflows/verify_pr_requirements.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Verify PR has JIRA ticket and issue number

on:
pull_request:
types:
- opened
- edited
branches:
- main

permissions:
contents: read
pull-requests: write # Need write to make comments

jobs:
pr_issue_jira:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: redhat-performance/pr-requirements
path: pr-requirements
ref: v1.0.0
- uses: ./pr-requirements
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jira_ticket: true
jira_project: RPOPC
jira_url: https://issues.redhat.com
3 changes: 1 addition & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -224,5 +224,4 @@ systems:
tests: linpack
host_config: "m5.xlarge"


# ./burden --scenario aws_sample --test_def_dir https://git.com/user/zathras_config
# ./burden --scenario aws_sample --test_def_dir https://github.com/redhat-performance/zathras_test_configs
2 changes: 2 additions & 0 deletions ansible_roles/roles/azure_create/files/tf/main_net_p1.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ terraform {
}
provider "azurerm" {
features {}
subscription_id = var.az_subscription
}

# Define resource group
Expand Down Expand Up @@ -53,6 +54,7 @@ resource "azurerm_public_ip" "publicip" {
location = var.location
resource_group_name = azurerm_resource_group.resource_group.name
allocation_method = "Dynamic"
sku = "Basic"
}

# Create Network Security Group and rule
Expand Down
6 changes: 0 additions & 6 deletions ansible_roles/roles/azure_create/files/tf/main_net_p2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ resource "azurerm_linux_virtual_machine" "virtualmachine" {
storage_account_type = "Premium_LRS"
}

plan {
name = var.sku
product = var.offer
publisher = var.publisher
}

source_image_reference {
publisher = var.publisher
offer = var.offer
Expand Down
2 changes: 2 additions & 0 deletions ansible_roles/roles/azure_create/files/tf/main_no_net.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ terraform {
}
provider "azurerm" {
features {}
subscription_id = var.az_subscription
}

resource "azurerm_resource_group" "resource_group" {
Expand Down Expand Up @@ -41,6 +42,7 @@ resource "azurerm_public_ip" "publicip" {
location = var.location
resource_group_name = azurerm_resource_group.resource_group.name
allocation_method = "Dynamic"
sku = "Basic"
}

# Create Network Security Group and rule
Expand Down
5 changes: 5 additions & 0 deletions ansible_roles/roles/azure_create/files/tf/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ variable "vm_image" {
default = "RedHat:RHEL:8_4:8.4.2021081003"
}

variable "az_subscription" {
type = string
default = "none"
}

variable "publisher" {
type = string
default = "RedHat"
Expand Down
6 changes: 0 additions & 6 deletions ansible_roles/roles/azure_create/files/tf/vm_spot_set.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ resource "azurerm_linux_virtual_machine" "virtualmachine" {
storage_account_type = "Premium_LRS"
}

plan {
name = var.sku
product = var.offer
publisher = var.publisher
}

source_image_reference {
publisher = var.publisher
offer = var.offer
Expand Down
2 changes: 2 additions & 0 deletions ansible_roles/roles/azure_create/templates/tfvars.j2
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
resource_group = "{{ config_info.cloud_resource_group }}"

machine_type = "{{ config_info.host_or_cloud_inst }}"
location = "{{ config_info.cloud_region }}"

cloud_os_version = "{{ config_info.cloud_os_version }}"
cloud_placement = "{{ config_info.cloud_placement }}"
az_subscription = "{{ config_info.az_subscription }}"

run_label = "{{ config_info.user_running }}-{{ config_info.run_label | lower() | replace ('.','-',63) | replace('_','-',63) | replace('/','-')}}"

Expand Down
10 changes: 10 additions & 0 deletions ansible_roles/roles/log_and_terminate/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# tasks file for termination on failure

- name: First,log to the error log
cmd: "echo Fatal error: {{ exit_msg }} >> {{ working_dir }}/error_log"

- name: Aborting test
fail:
msg: "{{ exit_msg }}"

16 changes: 16 additions & 0 deletions ansible_roles/roles/ssh_key_exchange/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@
state: present
key: "{{ lookup('file','buffer/{{ ip_list[0] }}-id_rsa.pub')}}"

- name: Copy the key add to authorized_keys using Ansible module
delegate_to: "{{ ip_list[0] }}"
become: yes
authorized_key:
user: root
state: present
key: "{{ lookup('file','buffer/{{ ip_list[0] }}-id_rsa.pub')}}"

- name: Copy the key add to authorized_keys using Ansible module
delegate_to: "{{ ip_list[1] }}"
become: yes
authorized_key:
user: root
state: present
key: "{{ lookup('file','buffer/{{ ip_list[1] }}-id_rsa.pub')}}"

- name: Permit root login
delegate_to: "{{ item }}"
become: yes
Expand Down
8 changes: 5 additions & 3 deletions ansible_roles/roles/terminate_on_error/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
vars:
tf_dir: "tf"
when: config_info.cloud_terminate_instance == 1 and config_info.term_system == "yes"
- name: Aborting test
fail:
msg: "{{ exit_msg }}"
- name: Log failure
include_role:
name: log_and_terminate
vars:
exit_msg: "{{ exit_msg }}"
when: status.rc == 1

Loading

0 comments on commit 1e7e0a9

Please sign in to comment.