Deployment of billing components
In the fast-developing cloud computing era, enterprises need a flexible and accurate billing model to manage and optimise cloud resource expenditure. The platform provides self-developed metering and billing components to help you achieve refined resource management and cost control.
Pre-Deployment Information
-
BillingServer and BillingClient cooperate to complete the provision of the platform’s overall BillingServer component carries the BillingServer’s relevant data storage capabilities, and the BillingClient component carries the BillingServer’s relevant measurement collection and billing capabilities.
-
BillingServer relies on using ClickHouse as a data store,You can deploy the platform-provided Clickhouse log storage component , or you can deploy your own Clickhouse to interface with it. You can also deploy Clickhouse on your own to interface with it.
-
BillingClient component relies on the corresponding cluster being deployed Prometheus monitoring component, please ensure that this component has been deployed successfully in advance.
BillingServer
pre-conditions
BillingServer component relies on the use of ClickHouse as the data store, and you can deploy the platform-provided Clickhouse log storage component , or you can deploy your own Clickhouse to use against it.
procedure
-
In the left navigation bar, click Cluster Management > Cluster.
-
Click global cluster
-
Under the Plugins tab, click ! to the right of the Metering BillingServer plugin. > Deployment.
-
Refer to the following instructions to configure the relevant parameters.
Parameters Description Clickhouse address Configure the Clickhouse docking address. If you are using the Clickhouse log storage component deployed by the platform, you can log in to the cluster where the Clickhouse log storage component is deployed and execute the command: kubectl get feature log-center -o jsonpath='{.spec.accessInfo.clickhouse.address}'Clickhouse cluster name Cluster name of Clickhouse, Clickhouse built by the platform is replicated by default. Clickhouse Secret name Configure the Secret for the Clickhouse docking username password, which can be obtained with the following command if the Clickhouse log storage component is deployed by the platform: - Get username:
kubectl get secret -n cpaas-system clickhouse-basic-auth -o jsonpath={.data.username}|base64 -d - Get the password:
kubectl get secret -n cpaas-system clickhouse-basic-auth -o jsonpath={.data.password}|base64 -d
CPU unit price Set the CPU billing unit price, the platform will measure the billing according to the effective usage (core-hours), the effective usage is the larger value of Request and Usage in one hour. Memory unit price Set the memory billing unit price, the platform will measure the billing by the effective usage (core-hours), the effective usage is the larger value of Request and Usage in one hour. Storage unit price Set the storage billing unit price, the platform will measure the billing according to the request volume (GiB-hours), the request volume is the size of the storage space requested by PV. Currency Unit Select the currency unit to use when displaying fees. - Get username:
-
Click Deployment.
BillingClient
pre-conditions
- Metering BillingClient component relies on the corresponding cluster being deployed Prometheus monitoring component, please ensure that this component has been deployed successfully in advance.
procedure
-
In the left navigation bar, click Cluster Management > Cluster.
-
Click the cluster name of the BillingClient to be deployed.
-
Under the Plugins tab, click ! to the right of the BillingClient plugin. > Deployment.
-
Click Deployment.