Skip to content

Commit

Permalink
Merge pull request #11 from vshn/PUPPET-205/add-support-for-bundled-p…
Browse files Browse the repository at this point in the history
…roducts

Add support for bundled profiles
  • Loading branch information
andrekeller authored Feb 28, 2024
2 parents c3e9eef + 787cfc6 commit bc9b84a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docs/modules/ROOT/pages/explanations/metered_billing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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-...',
Expand All @@ -45,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:
Expand Down

0 comments on commit bc9b84a

Please sign in to comment.