@cloud-carbon-footprint/backstage-plugin-backend
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

cloud-carbon-footprint-backend

Configuration

CCF requires separate configuration for each cloud provider. It also requires specific permissions and billing exports to be configured.

The CCF docs are the source of truth for CCF configuration. This readme aims to guide users how to inject relevant configuration into Backstage using its static configuration mechanism.

To see data, set follow the setup for one or more of the cloud providers.

GCP

Follow the first three steps given here.

Then, put relevant values into the Backstage config (see the schema in ./config.d.ts). They will be injected into to CCF config.

Here is an example of the recommended billing-based approach with GCP:

# app-config.local.yaml
cloudCarbonFootprint:
  gcp:
    useBillingData: true
    billingProjectId: my-project
    billingProjectName: My Project
    bigQueryTable: billing_export_dataset.gcp_billing_export_v1_01B22A_05AA4C_87BDAC

AWS

Follow the first four steps given here

Then, put relevant values into the Backstage config (see the schema in ./config.d.ts). They will be injected into to CCF config.

Here is an example of the recommended billing-based approach with AWS:

# app-config.local.yaml
cloudCarbonFootprint:
  aws:
    useBillingData: true
    athenaDbName: athena-db
    athenaDbTable: billing export table
    athenaRegion: us-east-1
    athenaQueryResultLocation: s3://bucket
    billingAccountId: cool-account
    billingAccountName: Cool account, low emissions

Azure

Follow the first three steps given here

Then, put relevant values into the Backstage config (see the schema in ./config.d.ts). They will be injected into to CCF config.

Here is an example of the recommended billing-based approach with Azure:

# app-config.local.yaml
cloudCarbonFootprint:
  azure:
    useBillingData: true,
    clientId: client id,
    clientSecret: shhh,
    tenantId: tenant id,

Caching

See here for more detailed documentation on data persistence and caching.

To use MongoDB (recommended and supported caching mode), here is an example of the configuration:

# app-config.local.yaml
cloudCarbonFootprint:
  optional:
    cacheMode: MONGODB
  mongodb:
    mongodbUri: mongodb://localhost:27017
    mongodbCredentials: ~/keys/mongodb-certificate.pem

© 2022 Thoughtworks, Inc.

Package Sidebar

Install

npm i @cloud-carbon-footprint/backstage-plugin-backend

Weekly Downloads

121

Version

0.2.1

License

Apache-2.0

Unpacked Size

51.3 kB

Total Files

7

Last publish

Collaborators

  • 4upz-tw
  • ccasher