From 995bc370aeb99d343f2bd5afabdc18fee82bd413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Keller?= Date: Tue, 30 Jan 2024 09:51:16 +0100 Subject: [PATCH 1/2] Add reasoning to how reporting is handled --- docs/modules/ROOT/pages/explanations/metered_billing.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/modules/ROOT/pages/explanations/metered_billing.adoc b/docs/modules/ROOT/pages/explanations/metered_billing.adoc index 611ef59..15b1ba9 100644 --- a/docs/modules/ROOT/pages/explanations/metered_billing.adoc +++ b/docs/modules/ROOT/pages/explanations/metered_billing.adoc @@ -27,6 +27,9 @@ profile_example ( ..., ){ + # in the profile, only suppress reporting if it is set to false explicitly, + # otherwise rely on the the global reporting configuration evaluated in the + # billing define type if $billing_reporting or $billing_reporting =~ Undef { billing { "${trusted['certname']}-${title}": product_id => 'managed-service-...', From 787cfc66af81b6db0168fbd17ffd5e8e8e09dd38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Keller?= Date: Tue, 20 Feb 2024 18:30:52 +0100 Subject: [PATCH 2/2] Add information regarding bundled profiles --- .../pages/explanations/metered_billing.adoc | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/modules/ROOT/pages/explanations/metered_billing.adoc b/docs/modules/ROOT/pages/explanations/metered_billing.adoc index 15b1ba9..59db71c 100644 --- a/docs/modules/ROOT/pages/explanations/metered_billing.adoc +++ b/docs/modules/ROOT/pages/explanations/metered_billing.adoc @@ -48,6 +48,31 @@ profile_example ( - Set the `product_id` to the corresponding `Metered Billing ID` of the product in https://central.vshn.ch/[Odoo] ==== +==== Product bundles + +Some Puppet profiles may bundle multiple profiles, meaning a puppet profile may replace other +profiles from a billing point of view. + +Such profiles may be passed to `bundled_products` of the billing type: +[source,puppet] +-- +billing { "${trusted['certname']}-${title}": + product_id => 'managed-service-graylog', + bundled_products => [ + 'managed-service-elasticsearch', + 'managed-service-mongodb', + 'managed-service-nginx', + ], + ... +} +-- + +[NOTE] +==== +- Products listed as `bundled_products` won't be reported to metered billing + for the node. +==== + === Set billing information in Hiera For a resource to be processed in the metered billing, it needs to know to what sales order it should be reported. The `sales_order_id` needs to be configured in hiera: