Uploaded image for project: 'Cost Management'
  1. Cost Management
  2. COST-1447

Cluster to Node CPU Distribution

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Normal Normal
    • 2021Q3
    • None
    • API
    • False
    • False
    • Hide
      1) The node view and the cluster view total cost match.
      2) The cluster or node monthly rate can be edited and deleted with the supplementary & infrastructure cost being correctly updated.
      3)The provider map for the openshift pages are correctly updated to include the cpu distributed in the infrastructure and supplementary costs.
      4) Any open spec changes are recorded
      5) Tests
      Show
      1) The node view and the cluster view total cost match. 2) The cluster or node monthly rate can be edited and deleted with the supplementary & infrastructure cost being correctly updated. 3)The provider map for the openshift pages are correctly updated to include the cpu distributed in the infrastructure and supplementary costs. 4) Any open spec changes are recorded 5) Tests
    • COST-1020 - Cost distribution of node and cluster costs into projects
    • Undefined

      For when a node or cluster monthly cost is added, the user will need to choose between CPU or Memory for where the Monthly cost should be distributed. This issue is to handle the distributed cost for when the User chooses cpu which will be our new default.

      Python Changes Location
      We can lean on the upsert_monthly_cluster_cost_line_item method within the ocp_report_db_accessor.py to handle this. (We will also need to do this for tags).

      Database Changes

      We change the default value of the monthly_infrastructure_cost from a decimal to a json to match the infrastructure and supplementary cost.

      • Example of new infrastructure_monthly_cost & supplementary_monthly_cost: 
      • {"cpu": 0.000000}

      If the user chooses a cpu in the cost model then the cpu will be populated (the default for now is the cpu so we will tackle it first. We may want to add a field in the daily summary to mark wether the cpu or memory was chosen. Additionally, this json field can easily be expanded to include the pvc or memory distributed cost later. Plus, it makes it easier to delete a monthly rate, without having to edit the json for the infrastructure & supplementary costs.

      How do I figure out the cpu distributed cost? 

      • (node CPU capacity / cluster CPU capacity) x cluster cost

       

      Notes:

      • the current node monthly cost is being calculated in the no-node option. As a byproduct of this change, we may need to lose the no-node.

       

       

              myersco Cody Myers
              myersco Cody Myers
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: