Skip to content

Commit

Permalink
using gcp resource matching for local make customer (project-koku#3899)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcouzens authored Sep 27, 2022
1 parent 2812e27 commit 0aca264
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dev/scripts/load_test_customer_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ build_gcp_data() {
log-info "Building OpenShift on ${_source_name} report data..."
nise_report ocp --static-report-file "$YAML_PATH/ocp_on_gcp/rendered_ocp_static_data.yml" --ocp-cluster-id test-ocp-gcp-cluster --insights-upload "$NISE_DATA_PATH/pvc_dir/insights_local"
nise_report gcp --static-report-file "$YAML_PATH/gcp/rendered_gcp_static_data.yml" --gcp-bucket-name "$NISE_DATA_PATH/local_providers/gcp_local"
nise_report gcp --static-report-file "$YAML_PATH/ocp_on_gcp/rendered_gcp_static_data.yml" --gcp-bucket-name "$NISE_DATA_PATH/local_providers/gcp_local_0"
nise_report gcp --static-report-file "$YAML_PATH/ocp_on_gcp/rendered_gcp_static_data.yml" --gcp-bucket-name "$NISE_DATA_PATH/local_providers/gcp_local_0 -r"

log-info "Cleanup ${_source_name} rendered YAML files..."
cleanup_rendered_files "${_rendered_yaml_files[@]}"
Expand Down
40 changes: 39 additions & 1 deletion dev/scripts/nise_ymls/ocp_on_gcp/gcp_static_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,45 @@ generators:
currency: USD
instance_type: m2-megamem-416
location.region: australia-southeast1-a
labels: [{"environment": "clyde", "app":"winter", "version":"green", "kubernetes-io-cluster-test-ocp-gcp-cluster": "owned"}]
resource.name: projects/nise-populator/instances/gcp_compute1
resource.global_name: //compute.googleapis.com/projects/nise-populator/zones/australia-southeast1-a/instances/3447398860992947181
labels: [{"environment": "clyde", "app":"winter", "version":"green", "kubernetes-io-cluster-c32se93c-73z3-3s3d-cs23-d3245sj45349": "owned"}]
- ComputeEngineGenerator:
start_date: {{start_date}}
end_date: {{end_date}}
price: 2
usage.amount_in_pricing_units: 1
usage.pricing_unit: hour
currency: USD
instance_type: m2-megamem-416
location.region: australia-southeast1-a
resource.name: projects/nise-populator/instances/gcp_compute2
resource.global_name: //compute.googleapis.com/projects/nise-populator/zones/australia-southeast1-a/instances/3447398860992947182
labels: [{"environment": "clyde", "app":"winter", "version":"green", "kubernetes-io-cluster-c32se93c-73z3-3s3d-cs23-d3245sj45349": "owned"}]
- ComputeEngineGenerator:
start_date: {{start_date}}
end_date: {{end_date}}
price: 2
usage.amount_in_pricing_units: 1
usage.pricing_unit: hour
currency: USD
instance_type: m2-megamem-416
location.region: australia-southeast1-a
resource.name: projects/nise-populator/instances/gcp_compute3
resource.global_name: //compute.googleapis.com/projects/nise-populator/zones/australia-southeast1-a/instances/3447398860992947183
labels: [{"environment": "clyde", "app":"winter", "version":"green", "kubernetes-io-cluster-c32se93c-73z3-3s3d-cs23-d3245sj45349": "owned"}]
- ComputeEngineGenerator:
start_date: {{start_date}}
end_date: {{end_date}}
price: 2
usage.amount_in_pricing_units: 1
usage.pricing_unit: hour
currency: USD
instance_type: m2-megamem-416
location.region: australia-southeast1-a
resource.name: projects/nise-populator/instances/gcp_master
resource.global_name: //compute.googleapis.com/projects/nise-populator/zones/australia-southeast1-a/instances/3447398860992947184
labels: [{"environment": "clyde", "app":"winter", "version":"green", "kubernetes-io-cluster-c32se93c-73z3-3s3d-cs23-d3245sj45349": "owned"}]
- CloudStorageGenerator:
start_date: {{start_date}}
end_date: {{end_date}}
Expand Down
2 changes: 1 addition & 1 deletion dev/scripts/test_customer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ customer:
billing_source:
data_source:
dataset: 'example-dataset-name'
table_id: 'example-table-id'
table_id: 'example-resource-table-id'
local_dir: '/tmp/gcp_local_bucket'
- ocp_on_gcp_source:
source_name: Test OCP on GCP
Expand Down

0 comments on commit 0aca264

Please sign in to comment.