Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #46 from jonbrouse/update-ice-source
Browse files Browse the repository at this point in the history
Update ice source
  • Loading branch information
jonbrouse authored Jan 14, 2020
2 parents 592fff2 + 9b51af3 commit 211c2e8
Show file tree
Hide file tree
Showing 2 changed files with 169 additions and 61 deletions.
9 changes: 6 additions & 3 deletions ice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ ENV HOME_DIR /root
ENV GRAILS_VERSION 2.4.4
ENV GRAILS_HOME ${HOME_DIR}/.grails/wrapper/${GRAILS_VERSION}/grails-${GRAILS_VERSION}
ENV PATH $PATH:${HOME_DIR}/.grails/wrapper/${GRAILS_VERSION}/grails-${GRAILS_VERSION}/bin/
ENV ICE_VERSION 1.1.2

ARG JAVA_OPTS

Expand All @@ -22,8 +21,12 @@ WORKDIR ${INSTALL_DIR}

# Ice setup
RUN mkdir /mnt/ice_processor /mnt/ice_reader && \
curl -fsSL https://github.com/Teevity/ice/archive/v${ICE_VERSION}.tar.gz | tar zx --strip-components=1 && \
grails ${JAVA_OPTS} wrapper && \
curl -fsSLO https://github.com/jimroth/ice/archive/master.zip && \
unzip master.zip && \
mv ice-master/* . && \
rm -rf master.zip ./ice-master

RUN grails ${JAVA_OPTS} wrapper && \
rm grails-app/i18n/messages.properties && \
sed -i -e '1i#!/bin/bash\' grailsw
Expand Down
221 changes: 163 additions & 58 deletions ice/assets/sample.properties
Original file line number Diff line number Diff line change
@@ -1,86 +1,191 @@
# Some configuration need some value passed into them.
# Do not remove or comment out configurations that have ','

# whether or not to start processor
# Set to true to start processor
ice.processor=true

# whether or not to start reader/UI
# Set to true to start reader/UI
ice.reader=true

# whether or not to start reservation capacity poller
ice.reservationCapacityPoller=false
# s3 bucket to store output files. AWS Credentials must have read/write access to the bucket
ice.work_s3bucketname=<work-s3-bucket-name>

# default reservation period, possible values are oneyear, threeyear
ice.reservationPeriod=threeyear
# default reservation utilization, possible values are LIGHT, MEDIUM, HEAVY. If you have both (LIGHT or MEDIUM) and HEAVY RIs, make sure you do not put HEAVY here.
ice.reservationUtilization=MEDIUM
# Region where the work bucket is located
ice.work_s3bucketregion=<work-s3-bucket-region>

# the highstock url; host it somewhere else and change this if you need HTTPS
ice.highstockUrl=https://code.highcharts.com/stock/4.2.1/highstock.js
# Prefix of Ice output files
ice.work_s3bucketprefix=work/

# url prefix, e.g. http://ice.netflix.com/. Will be used in alert emails.
ice.urlPrefix=
# Number of worker threads for CUR processing and reader REST api services (default is 5)
ice.numthreads=5

# from email address
ice.fromEmail=
########################
# Reader configuration #
########################
# Set to false to run aggregation only daily, weekly, monthly.
# Allows reader to run with much less memory
ice.hourlyData=true

# ec2 ondemand hourly cost threshold to send alert email. The alert email will be sent at most once per day.
ice.ondemandCostAlertThreshold=250
# Enable tag coverage metrics: none, basic, withUserTags - uses more memory
# must have at least the coverage specified generated by the processor
ice.tagCoverage=none

# ec2 ondemand hourly cost alert emails, separated by ","
ice.ondemandCostAlertEmails=
# The highstock url; host it somewhere else and change this if you need HTTPS
ice.highstockUrl=https://code.highcharts.com/stock/4.2.1/highstock.js

# modify the following 5 properties according to your billing files configuration. if you have multiple payer accounts, you will need to specify multiple values for each property.
# s3 bucket name where the billing files are. multiple bucket names are delimited by ",". Ice must have read access to billing s3 bucket.
ice.billing_s3bucketname=
# location for the billing bucket. It should be specified for buckets using v4 validation
ice.billing_s3bucketregion=
# prefix of the billing files. multiple prefixes are delimited by ","
ice.billing_s3bucketprefix=,
# specify your payer account id here if across-accounts IAM role access is used. multiple account ids are delimited by ",". "ice.billing_payerAccountId=,222222222222" means assumed role access is only used for the second bucket.
#ice.billing_payerAccountId=,123456789012
# specify the assumed role name here if you use IAM role access to read from billing s3 bucket. multiple role names are delimited by ",". "ice.billing_accessRoleName=,ice" means assumed role access is only used for the second bucket.
#ice.billing_accessRoleName=,ice
# specify external id here if it is used. multiple external ids are delimited by ",". if you don't use external id, you can leave this property unset.
#ice.billing_accessExternalId=
# Your company name to display in the UI
ice.companyName=<your company name>

# Local directory for Ice reader (directory must exist)
ice.reader.localDir=/mnt/ice_reader

# specify your custom tags here. Multiple tags are delimited by ",". If specified, BasicResourceService will be used to generate resource groups for you.
# PLEASE MAKE SURE you have limited number (e.g. < 100) of unique value combinations from your custom tags, otherwise Ice performance will be greatly affected.
#ice.customTags=tag1,tag2
# Monthly data cache size for Ice reader
ice.monthlycachesize=12

# start date in millis from when you want to start processing the billing files
ice.startmillis=1364774400000
# A short alert or notice to place in the header of the dashboard pages
ice.notice=

# you company name. it will be used by UI
ice.companyName=
###########################
# Processor configuration #
###########################
# If running in AWS, whether or not to only run a single processor pass
# will stop instance when done processing
ice.processOnce=false

# s3 bucket name where Ice can store output files. Ice must have read and write access to billing s3 bucket.
ice.work_s3bucketname=
# prefix of Ice output files
ice.work_s3bucketprefix=ice/
# Month to start processing billing files (YYYY-MM)
ice.startMonth=2017-06

# local directory for Ice processor. the directory must exist.
# Local directory for Ice processor (the directory must exist.)
ice.processor.localDir=/mnt/ice_processor

# local directory for Ice reader. the directory must exist.
ice.reader.localDir=/mnt/ice_reader
# Set to true to start reservation capacity poller
ice.reservationCapacityPoller=false

# monthly data cache size for Ice reader.
ice.monthlycachesize=12
# Set to true to break out family reservation usage as separate operation type
ice.breakoutFamilyReservationUsage=false

# Enable the creation of data files that can be imported into services (i.e. ElasticSearch)
# Multiple formats can be specified separated by ","
# - hourly - generate hourly newline delimited JSON records - one record per line
# - hourlyRI - generate hourly newline delimited JSON records with RI rates for product/operations that offer reserved instances
# - daily - generate daily newline delimited JSON records - one record per line
#
ice.writeJsonFiles=

# Enable tag coverage metrics (uses memory)
# - none
# - basic
# - withUserTags
ice.tagCoverage=none

# Default reservation period
# - oneyear
# - threeyear
ice.reservationPeriod=oneyear

# Default reservation utilization
# - HEAVY
# - PARTIAL
ice.reservationUtilization=PARTIAL

#########################
# Billing configuration #
#########################
# For multiple payer accounts and/or if you need both detailed billing and cost and usage reports supported
# you will need to specify multiple values for each property. Multiple are delimited by ",".

# s3 bucket where the billing files are. AWS Credentials must have read/write access to the bucket
ice.billing_s3bucketname=<billing-s3-bucket-name>

# Region where the billing s3 bucket is located (it should be specified for buckets using v4 validation)
ice.billing_s3bucketregion=us-east-1

# Prefix of the billing files
ice.billing_s3bucketprefix=,

# Your payer account id here
#ice.billing_payerAccountId=123456789012,234567890123
ice.billing_payerAccountId=,

# The assumed role name here if you use IAM role access to read from billing s3 bucket.
# - "ice.billing_accessRoleName=,ice" means assumed role access is only used for the second bucket.
#ice.billing_accessRoleName=,ice

# External id if you are using one if not you can leave this property unset.
#ice.billing_accessExternalId=

# change the follow account settings
# Root name for organization used in account parents path. If not set, a root name is not given. Most useful with multiple payer accounts.
#ice.rootName=Org1,Org2

#######################################################
# Kubernetes reports enable breakout of costs by tag. #
#######################################################
# Report config usage is the same as for billing reports above except in this case accountId is optional if cross-account access is not used
#ice.kubernetes_s3bucketname=kubernetes_s3bucketname1,kubernetes_s3bucketname2
#ice.kubernetes_s3bucketregion=eu-west-1,eu-central-1
#ice.kubernetes_s3bucketprefix=,
#ice.kubernetes_accountId=,123456789012
#ice.kubernetes_accessRoleName=,ice
#ice.kubernetes_accessExternalId=

# Set to true to use blended rates and cost
ice.use_blended=

# The month in which you switched from using detailed billing reports to cost and usage reports.
# - Format: YYYY-MM
# - Cannot be earlier than 2017-07
# - RDS instance reservation IDs aren't correct in the reports until 2017-10.
ice.costAndUsageStartDate=2017-10

# Controls when to switch to using NetUnblended values for rate and cost calculations.
# - Cannot be earlier than 2019-01
# - Setting this value will override the "use_blended" flag above
ice.costAndUsageNetUnblendedStartDate=2019-01

# If NetUnblended is being used, amortization of Upfront RI payments must also include the full EDP discount. Because ICE doesn't use the subscription fee lineitem
# to compute the upfront payments, we must specify discount rate that must be applied to the list price.
# If using CURs starting in 2019-01, the RI amortization and recurring fees are pulled from the DiscountedUsage line items.
# Prior to that, the costs are computed based on the price list data and the edpDiscounts values defined here.
# discount is specified by a comma separated set of start dates at percentage of the form yyyy_mm:%,yyyy_mm:%
ice.edpDiscounts=2019-01:5

# Specify your custom tags. Multiple tags are delimited by ",".
# - Limit the number of unique value combinations from your custom tags (< 100) otherwise Ice performance will be greatly affected.
# - This list should NOT include aliases that will be consolidated by the tagKey list below.
# - If specified, BasicResourceService will be used to generate resource groups for you.
ice.customTags=<custom-tag-1>.<custom-tag-2>

# Tags to include for code coverage dashboard
#ice.additionalTags=tag3

# The following settings are specified in the in the billing data folder as ice_config.json or ice_config.yaml
# - Tag name consolidation/aliasing
# - Tag value consolidation/aliasing
# - Kubernetes configuration
# See ice_config.sample for an example
#

# Account settings are pulled from the AWS Organizations Service, but can be overridden here for backward compatibility.
#
# change the follow account settings - these are automatically pulled from the organizations API
# an ICE-specific name can be applied by setting the tag "IceName"
#ice.account.account1=123456789011
#ice.account.account2=123456789012
#ice.account.account3=123456789013

# set reservation owner accounts. "ice.owneraccount.account2=account3,account4" means reservations in account2 can be shared by account3 and account4
# if reservation capacity poller is enabled, the poller will try to poll reservation capacity through ec2 API (desribeReservedInstances) for each reservation owner account.
#ice.owneraccount.account1=
#ice.owneraccount.account2=account3,account4
# set reservation owner accounts and the products for which they have reservations
# These can be pulled from the account tag "IceRiProducts". Product names are separated by '+' for tag values (e.g. "ec2+rds")
# possible values are ec2, rds, redshift, es, ec
#ice.owneraccount.account1=ec2,redshift,rds

# if reservation capacity poller needs to use IAM role to access ec2 API, set the assumed role here for each reservation owner account
ice.owneraccount.account1.role=ice
ice.owneraccount.account2.role=ice
ice.owneraccount.account5.role=ice
# These values can be pulled from the account tag "IceRole"
#ice.owneraccount.account1.role=ice
#ice.owneraccount.account2.role=ice
#ice.owneraccount.account5.role=ice

# if reservation capacity poller needs to use IAM role to access ec2 API and external id is used, set the external id here for each reservation owner account. otherwise you can leave it unset.
ice.owneraccount.account1.externalId=
ice.owneraccount.account2.externalId=
ice.owneraccount.account5.externalId=
# These values can be pulled from the account tag "IceExternalId"
#ice.owneraccount.account1.externalId=
#ice.owneraccount.account2.externalId=
#ice.owneraccount.account5.externalId=

0 comments on commit 211c2e8

Please sign in to comment.