glennguzzo
ServiceNow Employee
ServiceNow Employee

Operating and managing a set of cloud applications, come with some great challenges:

  • Managing Cost of maintaining 2 sets of infrastructure through the migration (i.e. On premise and Cloud)
  • Managing cost of operating the Cloud
  • Manage standard 'patterns' for provisioning & change

These all form part of the shared responsibility model within the organisation.  Some of the personas that are interested in these challenges:

  • FinOps - require 'recent' visibility of what is being spent and recommendations on how they can reduce spend.
  • Cost Centre manager - require visibility of what is being consumed and proposed to be consumed, so they can make purchasing decisions.
  • Cloud Centre of Excellence (CCoE) - support standardisation & guardrails for the cloud.  They broker standard templates of 'as-a-service' solution/s so they can direct teams towards 'gold' standards and  support the organisation, in the ever changing world of cloud offerings.
  • Cloud consumers (including Technical service & Application Owners) - require quick & timely self-service access to stand up & manage their infrastructure & applications, without having to know everything.
  • Service Management - require the service transition to be managed & visibility of the service in the CMDB

 

These personas can be brought together in ServiceNow, with the following use cases (via Cloud Cost Management & Cloud Services Catalog)

  1. Displaying the price sheet of the intended offering when purchasing a new Service.   For example, displaying the Price, when requesting a 't2.small' in 'ap-southeast-2' running 'Windows' that will operate 10x5x5, and have attached storage 2 x gp3 disks of 1000GiB - this will cost AUD$11.16 monthly, and with attached storage, gp3 & 1000GB - this will cost ~AUD$154 per month. 
  2. Understanding the budget ceiling & current consumption for that specific Account, so that a Cost Center manager can make an approval once the request has been made.   For example, how will that $154 per month, impact a budget of $1000 a month, where current consumption is $800 a month during the middle of the month, and the forecast will be $1600 + $75 for the new EC2 instance with storage.
  3. How do we integrate the proposed provisioning into a Change management model, once the 'cost' has been approved?  i.e. is this a Production Service that has a specific maintenance period where we can perform the provisioning request within.

 

This article will go into more detail on point 1 above, and in further articles we will outline solutions for 2 & 3

 

Some quick screenshots on what the users see.

glennguzzo_5-1724638643955.png

 

glennguzzo_6-1724638643955.png

 

glennguzzo_7-1724638643955.png

 

 

Use Case # 1 - Price visibility at time of Provisioning a Day 1

 

Cloud Cost Management gathers the 4 pieces of data from Cloud Providers

 

glennguzzo_0-1724638431145.png

 

 

 

The price sheet from the Cloud provider, can be embedded into the Catalog item price engine & display, as part of the native Service Catalog options.

glennguzzo_1-1724638431145.png

 

 

The example that will be worked through below, come from the  CSC content pack (sn_itom_csc_cp) as part of the Cloud Services Catalog (sn_itom_csc).  The use case will be for AWS, however, a similar data structure exists for Azure & GCP.

 

Use case 1A : Instance Price details

 

Using example item, CSC AWS EC2 Linux VM

 

Step 1 - turn on Recurring price on the Catalog Item

Firstly, set the recurring price frequency to Monthly on the Catalog item.

 

Step 2 - populate Recurring price

Create a String field of length 100, on sn_cld_intg_aws_instance_price_detail, called 'u_recurring_price'.  Once the SKU is placed onto the Catalog item as a variable, directed by Client Script On Change, it will alter the price display of the Catalog.

 

To populate this field, this will occur once the Price sheet download job status changes to 'completed' or run Daily if catering for currency conversions (see below).

 

Then I created an Action that sets this field, taking the hourly rate, and multiplying by 730.5 (the average number of hours per month).   In addition, I converted into AUD from USD.

 

Step 3 - Add SKU to Catalog

Add the following Reference variable into the 'General Info' Variable set, called 'Instance Price Details' and make it read-only.  Set 'pricing_implications' to true.

 

In the same variable set, 'ScheduledProfile' set 'pricing_implications' to true.

 

Step 4 - Client script on Instance or OS

On Change of Instance type

On change of OS

 

Calls an Ajax Script Include 'GatherCloudPriceListAjax' and function 'gatherInstancePriceList' that retrieves the data based on the following diagram

glennguzzo_2-1724638431146.png

 

 

Step 5 - Schedule change

Client script - Trigger change on instance price details

 

Step 6 - Updating recurring price

Change the system property to true, glide.sc.use_custom_pricegenerator

 

The OOTB Script include 'CatalogRecurringPriceCalculator' is extended to gather the Multiplier from the Schedule Profile (sn_cmp_schedule_profile), to alter the price.  For example, a 10x5x5 (8x5 weekdays) has a multiplier of 0.26785714.  NB: the multiplier is set automatically on the record as part of CSC.

glennguzzo_3-1724638431146.png

 

 

Use Case 1B: Storage price details

 

Using example item, CSC AWS EC2 Windows with multiple disks

This will have all the instance details in Case 1A, and will be extended for Storage additional costs.

 

Step 1 - Storage Additional Cost

Create an additional variable called 'storage_additional_cost' that will be populated within the 'Provision' variable set, with 'pricing_implications' = true.

 

This will be populated by Client scripts described in

 

Step 2 - On change volume size & type

Calls an Ajax Script Include 'GatherCloudPriceListAjax' and function 'gatherStoragePriceList' that retrieves the data based on the following diagram, this appends to the 'storage_additional_cost' as there maybe disks that have been added - see Step 3.

 

glennguzzo_4-1724638431146.png

 

 

Step 3  - Gather additional disks

Add an OnLoad script that takes the parent form, that allows a multi-row variable set to trigger on change events.

this.cat_g_form = g_form;

  

Variable Set - Configure Storage - internal_name 'configure_storage_volume'

New variable 'storage_additional_cost_multiple'

 

Create on change script of volume and size that sets the variable, and triggers a change in Instance Price details, which triggers a recalculation, using the JSON in the multi-row variable set.

 

So with this in mind, we have addressed:

  • Visibility to the Cloud Consumer
  • This same visibility can translate into a budget assessment from the Cost Centre manager.  More in Use Case # 2 (link will be added here once the blog article is written)

#cloud cost management #cloud services catalog #better together

1 Comment