This repository contains the source code for a plugin designed to extend the functionality of the Carbon Aware SDK. This plugin is specifically designed for use with the Impact Framework, to easily interface with carbon intensity data providers (in particular WattTime and electricity maps).
The plugin leverages the capabilities of the SDK to provide carbon-aware computations, enabling users to make more environmentally friendly choices in their computational workloads.
The plan is to have multiple plugins to cover more capabilities from the SDK, notably:
- best location: better fit for scheduling (currently covered by this repo)
- carbon intensity: to calculate the carbon intensity of your software (not started yet)
To get started with this plugin, you'll need to install it and integrate it with your instance of the Impact Framework. Detailed instructions for installation and setup are provided in the Installation section.
Follow the steps below to install the plugin:
- Clone this repository to your local machine.
- Navigate to the cloned repository and run
npm i
to install the necessary dependencies. - Run
npx ts-node driver/driver.ts
to test the plugin.
Note that this repo defaults to using the following test instance of the SDK at: https://carbon-aware-api.azurewebsites.net/swagger/index.html (at the time of writing this uses a test account for WattTime and should only be used for punctual testing). Make sure to update it accordingly to your needs for regular use or other scenarios.
For more detailed instructions for integrating the plugin with the Impact Framework please checkout the official documentation as well as the provided tests and Github Action workflow.
In order to run a local version of the SDK please follow instructions on the getting started documentation at https://carbon-aware-sdk.greensoftware.foundation/ and remember to update the base url
of your newly hosted API when calling the plug in.