The CFG object is for accessing values either from the subhub/.env
file and|or superseded by env vars.
A value that is known to be set or have a default can be accessed:
CFG.SOME_VALUE
Otherwise the value can be accessed and given a default if it doesn't exist:
CFG("OTHER_VALUE", "SOME_DEFAULT")
These values can be enabled as an env var or listed in a .env
in the subhub/ directory.
The environment variables as read from the application, in alphabetical order are as follows:
Learn more.
This list of values provides SubHub with a way of identifying the originating sending system, this was developed as a way of pre-planning for future SubHub customers.
Learn more.
From reference 1,
Access keys consist of two parts: an access key ID (for example, AKIAIOSFODNN7EXAMPLE) and a secret access key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY). You use access keys to sign programmatic requests that you make to AWS if you use AWS CLI commands (using the SDKs) or using AWS API operations
Learn more.
From reference 1,
Amazon EC2 is hosted in multiple locations world-wide. These locations are composed of Regions and Availability Zones. Each Region is a separate geographic area. Each Region has multiple, isolated locations known as Availability Zones.
Learn more.
From reference 1,
Access keys consist of two parts: an access key ID (for example, AKIAIOSFODNN7EXAMPLE) and a secret access key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY). You use access keys to sign programmatic requests that you make to AWS if you use AWS CLI commands (using the SDKs) or using AWS API operations
Learn more.
Valid API Key issued to SubHub to authenticate in API calls to the Mozilla Basket service.
Learn more.
This is the branch name of the deployed code. Should be available locally as well as when deployed to AWS Lambda.
Learn more.
From reference 2,
When you set a logging level in Python using the standard module, you’re telling the library you want to handle all events from that level on up. If you set the log level to INFO, it will include NOTSET, DEBUG, and INFO messages.
Learn more.
This environment variable is used for the sub and hub applications for the curation of users that have
been deleted from the applications. It is defaulted if not specified. This is the common use case for
local testing with doit local
.
Learn more.
Ideally this would not be a human and done by a system such as a continuous deployment service such as TravisCI, CircleCI, or Jenkins.
Learn more.
The deployment environment is determined by the branch name:
- master:
prod
- stage/*:
stage
- qa/*:
qa
- *:
dev
There is a dev and fab environment available as well. The determination of how this works in those cases is left open for future refinement.
Learn more.
This configuration value is the fully qualified uniform resource locator (URL) for a dockerized instance of an API vending the AWS DynamDB interface.
Learn more.
This environment variable sets the name of the Amazon DynamoDB events table that is used by the hub
application. It is defaulted if not specified. This is the common use case for
local testing with doit local
.
Learn more.
Learn more.
API Key issued from Stripe to identify and validate calls originated from Stripe.
Learn more.
This value is used only when running the subhub
flask app locally. It is defaulted to port, 5000
.
Learn more.
Learn more.
Learn more.
Learn more.
Learn more.
API Key issued to SubHub customers to authenticate transactions incoming to SubHub.
Learn more.
List of Stripe webhook events that will be monitored by SubHub. To be monitored by SubHub, the event must be in this list otherwise it will not be listened for by hub.
Learn more.
This is a Boolean flag to indicate if profiling is enabled in the application.
Learn more.
This is the project's name, subhub
, as determined by the second part of the reposlug mozilla/subhub
.
Learn more.
This is the git remote origin URL of the repository that you are presently in.
Learn more.
This is the 40 digit sha1 commit hash for the deployed code. This is available in the git repo as well as when deployed to AWS Lambda.
Learn more.
Learn more.
Learn more.
Learn more.
Learn more.
This value is used for production deployments as well as testing (testing key).