Skip to content

Commit

Permalink
final touches :)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehearneRedHat committed Jun 26, 2024
1 parent 4969c46 commit e86b8cc
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/create-self-hosted-runner-ami.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Create Self Hosted Runner AMI

on:
push:
#paths:
#- self-hosted-runner.tf
paths:
- self-hosted-runner.tf

jobs:
create-self-hosted-runner-ami:
Expand Down
25 changes: 15 additions & 10 deletions .github/workflows/verify-dashboards-alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: Verify Dashboards and Alerts OK

on:
push:
# paths:
# # Dashboards
# - examples/dashboards/app_developer.json
# - examples/dashboards/business_user.json
# - examples/dashboards/platform_engineer.json
# # Alerts
# - examples/alerts/prometheusrules_policies_missing.yaml
# - examples/alerts/slo-availability.yaml
# - examples/alerts/slo-latency.yaml
paths:
# Dashboards
- examples/dashboards/app_developer.json
- examples/dashboards/business_user.json
- examples/dashboards/platform_engineer.json
# Alerts
- examples/alerts/prometheusrules_policies_missing.yaml
- examples/alerts/slo-availability.yaml
- examples/alerts/slo-latency.yaml
jobs:
deploy-register-self-runner:
runs-on: ubuntu-latest
Expand All @@ -20,7 +20,10 @@ jobs:
- uses: hashicorp/setup-terraform@v3

- name: Initialize Terraform Environment
run: terraform init
run: |
# Remove ami-self-hosted-runner.tf to prevent constant creation of AMIs
rm ami-self-hosted-runner.tf
terraform init
- name: Create PEM files
run: |
Expand Down Expand Up @@ -260,6 +263,8 @@ jobs:

- name: Initialize Terraform Environment
run: |
# Remove ami-self-hosted-runner.tf to prevent constant creation of AMIs
rm ami-self-hosted-runner.tf
terraform init
- name: Download statefile to teardown resources
Expand Down
8 changes: 5 additions & 3 deletions self-hosted-runner.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variable "aws_key_name" {
}

resource "aws_instance" "self_hosted_runner" {
ami = "ami-0776c814353b4814d" # change to ami-0776c814353b4814d when creating an AMI.
ami = "ami-055032149717ffb30" # change to ami-0776c814353b4814d when creating an AMI.
instance_type = "t2.xlarge"

root_block_device {
Expand All @@ -36,7 +36,9 @@ resource "aws_instance" "self_hosted_runner" {
// Security Group for SSH, HTTP, and HTTPS access
security_groups = ["ssh-http-https-access"]

user_data = <<-EOL
# Uncomment when creating an AMI .

/* user_data = <<-EOL
#!/bin/bash
echo "Starting user_data script..."
sudo apt-get update -y
Expand All @@ -60,7 +62,7 @@ resource "aws_instance" "self_hosted_runner" {
sudo chmod 7777 kuadrant-operator/hack
echo "user_data script execution completed."
touch /tmp/user_data_done
EOL
EOL */
}


Expand Down

0 comments on commit e86b8cc

Please sign in to comment.