Automated indexer deployment with API endpoint under same domain#40
Automated indexer deployment with API endpoint under same domain#40
Conversation
| environment: [dev, staging, testnet, prod] | ||
| environment: ${{ matrix.environment }} | ||
| env: | ||
| STATE_BUCKET: aztec-token-sale-terraform-state |
There was a problem hiding this comment.
may aswell be staking dashboard no?
prolly a good thing that this doesnt write to the same folder as the terraform managed bucket
There was a problem hiding this comment.
The terraform has historically used aztec-token-sale-terraform-state so leaving this as is for now. We can move the state if needed to a new name
| name = "AWSManagedRulesBotControlRuleSet" | ||
| vendor_name = "AWS" | ||
|
|
||
| # Optionally exclude a URI prefix (e.g. /api/) from bot evaluation |
There was a problem hiding this comment.
not sure we need this if the rule has been disabled
There was a problem hiding this comment.
This is to allow teams to use the API programatically, without this it acts finicky when using curl or in code. Even with User-Agent set
staking-dashboard/terraform/main.tf
Outdated
| # MIGRATION from single indexerOrigin: temporarily comment out the | ||
| # lifecycle block, apply, then uncomment. This lets Terraform replace | ||
| # the old single origin with the red/green origins + origin group. | ||
| # lifecycle { |
There was a problem hiding this comment.
i think you might want to uncomment this - everything this runs it will bring the order back to what is defined here, not what is overwritten in the cli?
| origin_id = "indexerOriginGroup" | ||
|
|
||
| failover_criteria { | ||
| status_codes = [502, 503, 504] |
There was a problem hiding this comment.
something to look out here for
- even when the primary is switched, it will not respect app versions, might end up flopping between two different app versionos
There was a problem hiding this comment.
Agreed, kept that in mind, but felt like separate PR / issue.
I'll make a separate issue for this, which can also include versioning the APIs |
Summary
How it works
Setup
Run
scripts/init-deployment-state.sh <environment> <live_color>once per environment to create the S3 state file before using the blue-green workflow.