Skip to content

Commit e9e2023

Browse files
committed
ci: set up sys id and opamp settings
1 parent add2197 commit e9e2023

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

test/onhost-canaries/ansible/install_ac_with_basic_config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@
5454
config_path: "/etc/newrelic-agent-control/local-data/agent-control/local_config.yaml"
5555
update_config:
5656
fleet_control:
57+
auth_config:
58+
client_id: "{{ system_identity_client_id }}"
59+
private_key_path: "{{ agent_control_private_key }}"
60+
provider: local
61+
token_url: "{{ token_endpoint }}"
62+
endpoint: "{{ opamp_endpoint }}"
5763
fleet_id: "{{ fleet_id }}"
5864
log:
5965
level: debug

test/onhost-canaries/terraform/environments/production/inputs.tfvars

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ ec2_prefix = "onhost-canary-production"
22
inventory_output = "environments/production/inventory.production"
33
repository_endpoint = "http://nr-downloads-ohai-staging.s3-website-us-east-1.amazonaws.com/preview"
44
nr_region = "US"
5+
opamp_endpoint = "https://opamp.service.newrelic.com/v1/opamp"
6+
token_endpoint = "https://system-identity-oauth.service.newrelic.com/oauth2/token"
57
otlp_endpoint = "https://otlp.nr-data.net:4318"

test/onhost-canaries/terraform/environments/staging/inputs.tfvars

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ ec2_prefix = "onhost-canary-staging"
22
inventory_output = "environments/staging/inventory.staging"
33
repository_endpoint = "http://nr-downloads-ohai-testing.s3-website-us-east-1.amazonaws.com/preview"
44
nr_region = "Staging"
5+
opamp_endpoint = "https://opamp.staging-service.newrelic.com/v1/opamp"
6+
token_endpoint = "https://system-identity-oauth.staging-service.newrelic.com/oauth2/token"
57
otlp_endpoint = "https://staging-otlp.nr-data.net:4318"

test/onhost-canaries/terraform/main.tf

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ variable "otlp_endpoint" {
3838
type = string
3939
}
4040

41+
variable "opamp_endpoint" {
42+
description = "OpAMP endpoint for the region"
43+
type = string
44+
}
45+
46+
variable "token_endpoint" {
47+
description = "Token renewal endpoint for the region"
48+
type = string
49+
}
50+
4151
locals {
4252
ec2_instances = {
4353
"amd64:ubuntu22.04" = {
@@ -80,7 +90,7 @@ module "agent_control-canary-env-provisioner" {
8090
ssh_pub_key = "AAAAB3NzaC1yc2EAAAADAQABAAABAQDH9C7BS2XrtXGXFFyL0pNku/Hfy84RliqvYKpuslJFeUivf5QY6Ipi8yXfXn6TsRDbdxfGPi6oOR60Fa+4cJmCo6N5g57hBS6f2IdzQBNrZr7i1I/a3cFeK6XOc1G1tQaurx7Pu+qvACfJjLXKG66tHlaVhAHd/1l2FocgFNUDFFuKS3mnzt9hKys7sB4aO3O0OdohN/0NJC4ldV8/OmeXqqfkiPWcgPx3C8bYyXCX7QJNBHKrzbX1jW51Px7SIDWFDV6kxGwpQGGBMJg/k79gjjM+jhn4fg1/VP/Fx37mAnfLqpcTfiOkzSE80ORGefQ1XfGK/Dpa3ITrzRYW8xlR caos-dev-arm"
8191
inventory_template = "../ansible/inventory-template.tmpl"
8292
inventory_output = var.inventory_output
83-
ansible_playbook = "-e system_identity_client_id=${var.system_identity_client_id} -e nr_license_key=${var.license_key} -e repo_endpoint=${var.repository_endpoint} -e package_version=${var.package_version} -e fleet_id=${var.fleet_id} -e otlp_endpoint=${var.otlp_endpoint} -e infra_staging=${local.infra_staging} ../ansible/install_ac_with_basic_config.yml"
93+
ansible_playbook = "-e system_identity_client_id=${var.system_identity_client_id} -e nr_license_key=${var.license_key} -e repo_endpoint=${var.repository_endpoint} -e package_version=${var.package_version} -e fleet_id=${var.fleet_id} -e opamp_endpoint=${var.opamp_endpoint} -e token_endpoint=${var.token_endpoint} -e otlp_endpoint=${var.otlp_endpoint} -e infra_staging=${local.infra_staging} ../ansible/install_ac_with_basic_config.yml"
8494
ec2_otels = local.ec2_instances
8595
}
8696

0 commit comments

Comments
 (0)