Repository: jonbrouse/docker-ice
Branch: master
Commit: 211c2e8c8a32
Files: 14
Total size: 32.6 KB
Directory structure:
gitextract_gkw22rhq/
├── .gitignore
├── .travis/
│ └── publish.sh
├── .travis.yml
├── LICENSE
├── README.md
├── docker-compose-template.yml
├── ice/
│ ├── Dockerfile
│ └── assets/
│ └── sample.properties
├── init/
│ └── ice.conf
├── kubernetes/
│ └── deploy/
│ ├── configmap-ice.yaml
│ ├── configmap-nginx.yaml
│ ├── deployment.yaml
│ └── service.yml
└── nginx/
└── assets/
└── default.conf
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
ice/assets/ice.properties
docker-compose.yml
================================================
FILE: .travis/publish.sh
================================================
#!/bin/bash
timestamp() {
echo $(date +%b\ %d\ %T) $*
}
configure_git() {
timestamp Setting up git config...
git config --global push.default matching
git config --global user.email "jbrouse19@gmail.com"
git config --global user.name "Jon Brouse"
git remote rm origin
git remote add origin https://$GH_TOKEN@github.com/jonbrouse/docker-ice.git > /dev/null 2>&1
}
update_ice_version() {
timestamp Updating Dockerfile and committing...
sed -i "/ENV\ ICE_VERSION/c\ENV\ ICE_VERSION\ $NEW_VERSION" ice/Dockerfile
git commit ice/Dockerfile -m "Updated Ice version to $NEW_VERSION"
}
update_master() {
timestamp Committing to master...
git checkout -b temp
git branch -f master temp
git push origin master
}
create_new_tag() {
timestamp Creating release tag...
git tag -m "New version of ICE" "$NEW_VERSION.0"
git push --quiet --set-upstream origin
git push --tags
}
configure_git
update_ice_version
update_master
create_new_tag
================================================
FILE: .travis.yml
================================================
script:
- .travis/publish.sh
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: README.md
================================================
# Ice, Ice Baby
This project leverages Docker to create images that run [Teevity's AWS Usage tool, Ice](https://github.com/Teevity/ice) (formerly Netflix Ice). From [Teevity's Ice repository](https://github.com/Teevity/ice) introduction:
> Ice provides a birds-eye view of our large and complex cloud landscape
> from a usage and cost perspective. Cloud resources are dynamically
> provisioned by dozens of service teams within the organization and any
> static snapshot of resource allocation has limited value. The ability
> to trend usage patterns on a global scale, yet decompose them down to
> a region, availability zone, or service team provides incredible
> flexibility. Ice allows us to quantify our AWS footprint and to make
> educated decisions regarding reservation purchases and reallocation of
> resources.
>
> Ice is a Grails project. It consists of three parts: processor, reader
> and UI. Processor processes the Amazon detailed billing file into data
> readable by reader. Reader reads data generated by processor and
> renders them to UI. UI queries reader and renders interactive graphs
> and tables in the browser.
More information and screenshots can be found on the [project's git page](https://github.com/Teevity/ice).
## What is this repository?
This repository seeks to ease the installation and configuration of Ice. In addition to the application container, this repository configures a nginx proxy which also helps fix URI issues I had when accessing Ice directly. After following these directions you should be able to connect to your server's IP address or FQDN over port 80 and access the Ice application. Additionally, I've supplied an Upstart job script you can leverge to start your containers on boot.
# Getting Started
## Prerequisites
- [Docker](https://docs.docker.com/installation/) and [Docker Compose](https://docs.docker.com/compose/install/) installed.
- Sign up for Amazon's programmatic billing access [here](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/detailed-billing-reports.html) to receive detailed billing(hourly) reports. Verify you receive monthly billing file in the following format:
```<accountid>-aws-billing-detailed-line-items-<year>-<month>.csv.zip```
## Docker Setup
- Create the docker-compose file: `cp docker-compose-template.yml docker-compose.yml`
- Open docker-compose.yml and configure the Timezone as well as add the AWS Access Key ID and Secret Key that has access to the s3 billing bucket: `vi docker-compose.yml`
ice:
build: ice
command: |
-Djava.net.preferIPv4Stack=true
-Djava.net.preferIPv4Addresses
-Duser.timezone=<Your Timezone ie America/New_York>
-Dice.s3AccessKeyId=<s3AccessKeyId>
-Dice.s3SecretKey=<s3SecretKeyId>
- Create the configuration file that will be mounted to the container: `cp ice/assets/sample.properties ice/assets/ice.properties`
- Open ice.properties and configure a basic setup by updating the following: `vi ice/assets/ice.properties`
# s3 bucket name where the billing files are
ice.billing_s3bucketname=
# location for the billing bucket
ice.billing_s3bucketregion=
# Your company name
ice.companyName=
# s3 bucket name where Ice can store output files
ice.work_s3bucketname=
# Your AWS account number. You can also replace "production" with your own identifier
ice.account.production=
More information on the configurations can be found on the [project's git page](https://github.com/Teevity/ice).
## Docker Compose
- When you have completed the previous steps, issue `docker-compose up` This will start the containers in the forground so you can see if there are any errors.
- Once everything looks good and you can access the UI issue `docker-compose up -d` to run the containers in the background.
## Base Docker Containers
- The nginx container is pulled from the [official nginx Docker Hub repository](https://registry.hub.docker.com/_/nginx/).
- The Ice container's base image is the [openjdk Java 7 image](https://hub.docker.com/_/openjdk/).
# Upstart Job
I've included an Upstart job in the `init` directory of this repository. This will allow you to start the containers with `start ice` and stop them by running `stop ice`. This will also start your containers at boot.
1. Copy `init/ice.conf` to your host's `/etc/init/` directory
2. Edit the the job `vi /etc/init/ice.conf` and change the path to the docker-compose file
pre-start exec /usr/local/bin/docker-compose -f /path/to/your/docker-compose.yml up -d
post-stop exec /usr/local/bin/docker-compose -f /path/to/your/docker-compose.yml stop
4. Reload the job controller `initctl reload-configuration`
# Notes
## Highstock.js
The version of highstock.js is locked at 4.2.1 due to a breaking change in newer versions.
## OutOfMemory Exception
To adjust the memory allocation, add the following line to the `docker-compose.yml` file:
```
...
environment:
- GRAILS_OPTS=-server -Xmx4G -Xms1G -Dfile.encoding=UTF-8
...
```
## Docker Run Command
To launch just the Ice container via the `docker run` command, issue the following:
```
docker run -v `pwd`/ice/assets/ice.properties:/opt/ice/src/java/ice.properties \
-e GRAILS_OPTS="-server -Xms2g -Xmx2g -server" \
jonbrouse/ice \
-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses -Duser.timezone=America/New_York -Dice.s3AccessKeyId=XXXXXXXXXXXXX -Dice.s3SecretKey=XXXXXXXXX run-app
```
## Kubernetes deployment on AWS
To deploy ice to a kubernetes cluster running on AWS
1. Update [configmap-ice.yaml](./kubernetes/deploy/configmap-ice.yaml) `ice.companyName=`, `ice.billing_s3bucketname=<your-s3-detailed-billing-bucket-here>`, `ice.work_s3bucketname=<your-s3-ice-work-bucket-here>`
2. Update [deployment.yaml](./kubernetes/deploy/deployment.yaml) with `-Duser.timezone=<Your Timezone ie America/New_York>`,`- -Dice.s3AccessKeyId=<s3AccessKeyId>`, `- -Dice.s3SecretKey=<s3SecretKeyId>`
3. Deploy `kubectl apply -f ./kubernetes/deploy/`
> Make sure to replace the placeholders excluding the \<angle brackets\>
================================================
FILE: docker-compose-template.yml
================================================
version: '3'
services:
ice:
build: ice
hostname: ice
image: jonbrouse/ice:latest
command: |
-Djava.net.preferIPv4Stack=true
-Djava.net.preferIPv4Addresses
-Duser.timezone=<Your Timezone ie America/New_York>
-Dice.s3AccessKeyId=<s3AccessKeyId>
-Dice.s3SecretKey=<s3SecretKeyId>
run-app
volumes:
- ./ice/assets/ice.properties:/opt/ice/src/java/ice.properties
nginx:
hostname: nginx
image: nginx:1.13.3-alpine
ports:
- "80:80"
links:
- ice:ice
volumes:
- ./nginx/assets/default.conf:/etc/nginx/conf.d/default.conf
================================================
FILE: ice/Dockerfile
================================================
FROM openjdk:alpine
MAINTAINER Jon Brouse @jonbrouse
ENV INSTALL_DIR /opt/ice
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/
ARG JAVA_OPTS
WORKDIR ${HOME_DIR}/.grails/wrapper/${GRAILS_VERSION}
# Install required software
RUN apk add --no-cache bash curl unzip && \
curl -O http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-${GRAILS_VERSION}.zip && \
unzip grails-${GRAILS_VERSION}.zip && \
rm -rf grails-${GRAILS_VERSION}.zip
WORKDIR ${INSTALL_DIR}
# Ice setup
RUN mkdir /mnt/ice_processor /mnt/ice_reader && \
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
EXPOSE 8080
ENTRYPOINT ["/opt/ice/grailsw"]
CMD []
================================================
FILE: ice/assets/sample.properties
================================================
# Some configuration need some value passed into them.
# Do not remove or comment out configurations that have ','
# Set to true to start processor
ice.processor=true
# Set to true to start reader/UI
ice.reader=true
# s3 bucket to store output files. AWS Credentials must have read/write access to the bucket
ice.work_s3bucketname=<work-s3-bucket-name>
# Region where the work bucket is located
ice.work_s3bucketregion=<work-s3-bucket-region>
# Prefix of Ice output files
ice.work_s3bucketprefix=work/
# Number of worker threads for CUR processing and reader REST api services (default is 5)
ice.numthreads=5
########################
# Reader configuration #
########################
# Set to false to run aggregation only daily, weekly, monthly.
# Allows reader to run with much less memory
ice.hourlyData=true
# Enable tag coverage metrics: none, basic, withUserTags - uses more memory
# must have at least the coverage specified generated by the processor
ice.tagCoverage=none
# 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
# 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
# Monthly data cache size for Ice reader
ice.monthlycachesize=12
# A short alert or notice to place in the header of the dashboard pages
ice.notice=
###########################
# 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
# Month to start processing billing files (YYYY-MM)
ice.startMonth=2017-06
# Local directory for Ice processor (the directory must exist.)
ice.processor.localDir=/mnt/ice_processor
# Set to true to start reservation capacity poller
ice.reservationCapacityPoller=false
# 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=
# 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 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
# 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.
# These values can be pulled from the account tag "IceExternalId"
#ice.owneraccount.account1.externalId=
#ice.owneraccount.account2.externalId=
#ice.owneraccount.account5.externalId=
================================================
FILE: init/ice.conf
================================================
description "Ice and Nginx containers"
author "Jon Brouse @jonbrouse github/jonbrouse"
start on (filesystem and started docker)
stop on runlevel [!2345]
pre-start exec /usr/local/bin/docker-compose -f /path/to/your/docker-compose.yml up -d
post-stop exec /usr/local/bin/docker-compose -f /path/to/your/docker-compose.yml stop
================================================
FILE: kubernetes/deploy/configmap-ice.yaml
================================================
---
apiVersion: v1
kind: ConfigMap
metadata:
name: ice
data:
ice.properties: |
ice.processor=true
ice.reader=true
ice.reservationCapacityPoller=false
ice.reservationPeriod=oneyear
ice.reservationUtilization=HEAVY
ice.highstockUrl=https://code.highcharts.com/stock/4.2.1/highstock.js
ice.urlPrefix=
ice.fromEmail=
ice.ondemandCostAlertThreshold=250
ice.ondemandCostAlertEmails=
ice.billing_s3bucketname=<your-s3-detailed-billing-bucket-here>
ice.billing_s3bucketregion=
ice.billing_s3bucketprefix=,
ice.startmillis=1364774400000
ice.companyName=
ice.work_s3bucketname=<your-s3-ice-work-bucket-here>
ice.work_s3bucketprefix=ice/
ice.processor.localDir=/mnt/ice_processor
ice.reader.localDir=/mnt/ice_reader
ice.monthlycachesize=12
ice.owneraccount.account1.role=ice
ice.owneraccount.account1.externalId=
================================================
FILE: kubernetes/deploy/configmap-nginx.yaml
================================================
---
apiVersion: v1
kind: ConfigMap
metadata:
name: ice-nginx
data:
default.conf: |
server {
listen 80;
location = / {
rewrite ^ /ice/dashboard/summary permanent;
}
location = /ice/ {
rewrite ^ /ice/dashboard/summary permanent;
}
location = /ice/dashboard/ {
rewrite ^ /ice/dashboard/summary permanent;
}
location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8080/;
}
location /ice/dashboard/summary {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8080/ice/dashboard/summary;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
================================================
FILE: kubernetes/deploy/deployment.yaml
================================================
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ice
spec:
selector:
matchLabels:
app: ice
replicas: 1
strategy:
type: Recreate
template:
metadata:
labels:
app: ice
spec:
volumes:
- name: nginx-vol
configMap:
name: ice-nginx
- name: ice-vol
configMap:
name: ice
terminationGracePeriodSeconds: 10
containers:
- name: nginx
image: nginx:1.13.3-alpine
ports:
- containerPort: 80
imagePullPolicy: IfNotPresent
resources:
limits:
memory: "256Mi"
cpu: "150m"
volumeMounts:
- mountPath: /etc/nginx/conf.d/
name: nginx-vol
- name: ice
image: jonbrouse/ice:latest
ports:
- containerPort: 8080
imagePullPolicy: IfNotPresent
env:
- GRAILS_OPTS=-server -Xmx2G -Xms1G -Dfile.encoding=UTF-8
command:
- /opt/ice/grailsw
- -Djava.net.preferIPv4Stack=true
- -Djava.net.preferIPv4Addresses
- -Duser.timezone=<Your Timezone ie America/New_York>
- -Dice.s3AccessKeyId=<s3AccessKeyId>
- -Dice.s3SecretKey=<s3SecretKeyId>
- run-app
resources:
limits:
memory: "2048Mi"
cpu: "500m"
volumeMounts:
- mountPath: /opt/ice/src/java/ice.properties
subPath: ice.properties
name: ice-vol
restartPolicy: Always
================================================
FILE: kubernetes/deploy/service.yml
================================================
---
apiVersion: v1
kind: Service
metadata:
name: ice
annotations:
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0
kubernetes.io/service-name: internal
spec:
type: LoadBalancer
ports:
- name: http
port: 80
protocol: TCP
targetPort: 80
selector:
app: ice
================================================
FILE: nginx/assets/default.conf
================================================
server {
listen 80;
location = / {
rewrite ^ /ice/dashboard/summary permanent;
}
location = /ice/ {
rewrite ^ /ice/dashboard/summary permanent;
}
location = /ice/dashboard/ {
rewrite ^ /ice/dashboard/summary permanent;
}
location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://ice:8080/;
}
location /ice/dashboard/summary {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://ice:8080/ice/dashboard/summary;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
gitextract_gkw22rhq/
├── .gitignore
├── .travis/
│ └── publish.sh
├── .travis.yml
├── LICENSE
├── README.md
├── docker-compose-template.yml
├── ice/
│ ├── Dockerfile
│ └── assets/
│ └── sample.properties
├── init/
│ └── ice.conf
├── kubernetes/
│ └── deploy/
│ ├── configmap-ice.yaml
│ ├── configmap-nginx.yaml
│ ├── deployment.yaml
│ └── service.yml
└── nginx/
└── assets/
└── default.conf
Condensed preview — 14 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (35K chars).
[
{
"path": ".gitignore",
"chars": 45,
"preview": "ice/assets/ice.properties\ndocker-compose.yml\n"
},
{
"path": ".travis/publish.sh",
"chars": 965,
"preview": "#!/bin/bash\n\ntimestamp() {\n echo $(date +%b\\ %d\\ %T) $*\n}\n\nconfigure_git() {\n timestamp Setting up git config...\n git"
},
{
"path": ".travis.yml",
"chars": 31,
"preview": "script:\n - .travis/publish.sh\n"
},
{
"path": "LICENSE",
"chars": 11325,
"preview": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licens"
},
{
"path": "README.md",
"chars": 6200,
"preview": "# Ice, Ice Baby \n\nThis project leverages Docker to create images that run [Teevity's AWS Usage tool, Ice](https://github"
},
{
"path": "docker-compose-template.yml",
"chars": 615,
"preview": "version: '3'\nservices:\n ice:\n build: ice\n hostname: ice\n image: jonbrouse/ice:latest\n command: |\n -Dja"
},
{
"path": "ice/Dockerfile",
"chars": 1064,
"preview": "FROM openjdk:alpine\nMAINTAINER Jon Brouse @jonbrouse\n\nENV INSTALL_DIR /opt/ice\nENV HOME_DIR /root\nENV GRAILS_VERSION 2.4"
},
{
"path": "ice/assets/sample.properties",
"chars": 7987,
"preview": "# Some configuration need some value passed into them.\n# Do not remove or comment out configurations that have ',' \n\n# S"
},
{
"path": "init/ice.conf",
"chars": 329,
"preview": "description \"Ice and Nginx containers\"\nauthor \"Jon Brouse @jonbrouse github/jonbrouse\"\n\nstart on (filesystem and started"
},
{
"path": "kubernetes/deploy/configmap-ice.yaml",
"chars": 893,
"preview": "---\napiVersion: v1\nkind: ConfigMap\nmetadata:\n name: ice\ndata:\n ice.properties: |\n ice.processor=true\n ice.reader"
},
{
"path": "kubernetes/deploy/configmap-nginx.yaml",
"chars": 1036,
"preview": "---\napiVersion: v1\nkind: ConfigMap\nmetadata:\n name: ice-nginx\ndata:\n default.conf: |\n server {\n listen 8"
},
{
"path": "kubernetes/deploy/deployment.yaml",
"chars": 1637,
"preview": "---\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: ice\nspec:\n selector:\n matchLabels:\n app: ice\n repli"
},
{
"path": "kubernetes/deploy/service.yml",
"chars": 385,
"preview": "---\napiVersion: v1\nkind: Service\nmetadata:\n name: ice\n annotations:\n service.beta.kubernetes.io/aws-load-balancer-b"
},
{
"path": "nginx/assets/default.conf",
"chars": 881,
"preview": "server {\n listen 80;\n\n location = / {\n\trewrite ^ /ice/dashboard/summary permanent;\n }\n\n location = /ic"
}
]
About this extraction
This page contains the full source code of the jonbrouse/docker-ice GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 14 files (32.6 KB), approximately 8.1k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.