claudia

package module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

README

Claudia

Claudia is a cost and usage analytics solution that provides insights into your AWS cloud spending.

Claudia Screenshot

Build Instructions

Build Requirements
  • docker
  • python
  • awscli (if publishing docs or building AMI)
Build Container
./build.py
Build Docs
./build.py -c docs

Optionally publish the docs to S3 bucket. Requires your profile has write permissions to the ax-public bucket.

./build.py -c docs --publish
Build AMI

The AMI build process uses packer to create new AMI.

./build.py --all --aws-profile <profile_name>

Run Instructions

Running Locally

After building the the container, run:

docker-compose up

Visit https://localhost to access the app.

Running in debug mode
docker-compose -f docker-compose-debug.yml up

Debug mode will:

  • Enable InfluxDB's admin interface
  • Expose the following ports:
    • Postgres 5432
    • InfluxDB 8086
    • InfluxDB admin UI 8086
    • ingestd 8081
    • claudiad 80/443
  • Leave the claudia container running in the event that the process dies, for the purpose of bashing into the container to restart the process manually or inspect any files.
Running in development mode
docker-compose -f docker-compose-dev.yml up

Development mode starts only the postgres and influxdb containers and exposes their ports. This mode allows you to run ingestd and claudiad manually (e.g. go run) and connect to localhost IP addresses.

To run ingestd manually, and connect it to the localhost postgres and influxdb:

USERDB_HOST=localhost:5432 POSTGRES_DB=userdb POSTGRES_PASSWORD=my-secret-pw go run ingestd/main.go run --reportDir /tmp/claudia --costdb http://localhost:8086

To run claudiad manually, connect it to the localhost postgres, influxdb, and ingestd, while also disabling SSL and running it on a different port (8080):

USERDB_HOST=localhost:5432 POSTGRES_DB=userdb POSTGRES_PASSWORD=my-secret-pw go run claudiad/main.go --costdbURL http://localhost:8086 --ingestdURL http://localhost:8081 --assets ./ui/dist/ --insecure --port 8080

Editing Documentation

The documentation site is built using MkDocs, a static site generator that creates static documentation from markdown files.

Requirements
pip install mkdocs mkdocs-bootswatch
Editing and previewing changes

Run mkdocs server and visit http://localhost:8000 to preview your changes.

mkdocs serve

Edit mkdocs.yml to change layout, headers, theme and other global settings. Edit markdown files under the docs directory to update and add new content.

Documentation

Overview

Copyright 2017 Applatix, Inc.

Copyright 2017 Applatix, Inc.

Index

Constants

View Source
const (
	ServiceAWSS3              = "AWS S3"
	ServiceAWSEC2Instance     = "AWS EC2 Instance"
	ServiceAWSMarketplace     = "AWS Marketplace"
	ServiceAWSEBSVolume       = "AWS EBS Volume"
	ServiceAWSCloudWatch      = "AWS CloudWatch"
	ServiceAWSCloudFront      = "AWS CloudFront"
	ServiceAWSEC2DataTransfer = "AWS EC2 Data Transfer"
)

Specially treated services

View Source
const (
	AWSMarketplaceAccountID = "679593333241"
)

Application constants

Variables

View Source
var (
	ApplicationPort                 = 443
	ApplicationDir                  = "/var/lib/claudia"
	ApplicationAdminUsername        = "admin"
	ApplicationAdminDefaultPassword = "password"
	IngestdURL                      = "http://ingestd:8081"
	IngestdPort                     = 8081
	IngestdWorkers                  = 2
	IngestdBatchInterval            = 5000
	IngestStatusMeasurementName     = "ingest_status"
	IngestdWriteRetryDelay          = []time.Duration{10 * time.Second, 20 * time.Second, 40 * time.Second, 60 * time.Second, 120 * time.Second}
	CostDatabaseURL                 = "http://costdb:8086"
	CostDatabaseName                = "cost_usage"
	ReportDefaultRetentionDays      = 365
)

Application configuration settings

View Source
var (
	Version        = "unknown"
	Revision       = "unknown"
	FullVersion    = fmt.Sprintf("%s-%s", Version, Revision)
	BuildDate      = "unknown"
	DisplayVersion = fmt.Sprintf("%s (Build Date: %s)", FullVersion, BuildDate)
)

Version information set by link flags during build

Functions

This section is empty.

Types

type ReportStatus

type ReportStatus string

ReportStatus is the status of a report. One of: "processing", "error", "current"

const (
	ReportStatusCurrent    ReportStatus = "current"
	ReportStatusError      ReportStatus = "error"
	ReportStatusProcessing ReportStatus = "processing"
)

Valid report statuses

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL