Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:
options:
- warm-staging
- forge-production
- forge-test

permissions:
id-token: write # This is required for requesting the JWT
Expand All @@ -44,7 +45,7 @@ jobs:
cloudflare-zone-id: ${{ secrets.WARM_STAGING_CLOUDFLARE_ZONE_ID }}
cloudflare-api-token: ${{ secrets.WARM_STAGING_CLOUDFLARE_API_TOKEN }}

# apply prod on successful release, plan otherwise
# apply prod and test on successful release, plan otherwise
forge-production:
uses: ./.github/workflows/terraform.yml
with:
Expand All @@ -62,3 +63,21 @@ jobs:
egress-tracking-service-proof: ${{ secrets.FORGE_PROD_EGRESS_TRACKING_SERVICE_PROOF }}
cloudflare-zone-id: ${{ secrets.FORGE_PROD_CLOUDFLARE_ZONE_ID }}
cloudflare-api-token: ${{ secrets.FORGE_PROD_CLOUDFLARE_API_TOKEN }}

forge-test:
uses: ./.github/workflows/terraform.yml
with:
env: forge-test
workspace: forge-test
network: test
did: did:web:registrar.test.storacha.network
apply: ${{ (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'forge-test') }}
secrets:
aws-account-id: ${{ secrets.FORGE_TEST_AWS_ACCOUNT_ID }}
aws-region: ${{ secrets.FORGE_TEST_AWS_REGION }}
region: ${{ secrets.FORGE_TEST_AWS_REGION }}
private-key: ${{ secrets.FORGE_TEST_PRIVATE_KEY }}
indexing-service-proof: ${{ secrets.FORGE_TEST_INDEXING_SERVICE_PROOF }}
egress-tracking-service-proof: ${{ secrets.FORGE_TEST_EGRESS_TRACKING_SERVICE_PROOF }}
cloudflare-zone-id: ${{ secrets.FORGE_TEST_CLOUDFLARE_ZONE_ID }}
cloudflare-api-token: ${{ secrets.FORGE_TEST_CLOUDFLARE_API_TOKEN }}
3 changes: 2 additions & 1 deletion .storoku.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
],
"networks": [
"warm",
"forge"
"forge",
"test"
],
"writeToContainer": false
}
14 changes: 14 additions & 0 deletions deploy/.env.production.local.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ if [ "$TF_WORKSPACE" == "forge-prod" ]; then
REGISTRAR_CONTRACT_SERVICE_CONTRACT_ADDRESS="0x56e53c5e7F27504b810494cc3b88b2aa0645a839"
REGISTRAR_CONTRACT_PAYMENTS_CONTRACT_ADDRESS="0x23b1e018F08BB982348b15a86ee926eEBf7F4DAa"
REGISTRAR_CONTRACT_TRANSACTOR_CHAIN_ID=314
elif [ "$TF_WORKSPACE" == "forge-test" ]; then
REGISTRAR_STORE_REGION="us-west-2"
REGISTRAR_STORE_PROVIDERINFO_TABLE_NAME="forge-test-w3infra-storage-provider"
REGISTRAR_STORE_PROVIDERWEIGHT=0

REGISTRAR_DELEGATOR_INDEXING_SERVICE_WEB_DID="did:web:indexer.test.storacha.network"
REGISTRAR_DELEGATOR_EGRESS_TRACKING_SERVICE_DID="did:web:etracker.test.storacha.network"
REGISTRAR_DELEGATOR_UPLOAD_SERVICE_DID="did:web:up.test.storacha.network"

REGISTRAR_CONTRACT_CHAIN_CLIENT_ENDPOINT="https://api.calibration.node.glif.io/rpc/v1"
REGISTRAR_CONTRACT_REGISTRY_CONTRACT_ADDRESS="0x6A96aaB210B75ee733f0A291B5D8d4A053643979"
REGISTRAR_CONTRACT_SERVICE_CONTRACT_ADDRESS="0x0c6875983B20901a7C3c86871f43FdEE77946424"
REGISTRAR_CONTRACT_PAYMENTS_CONTRACT_ADDRESS="0x09a0fDc2723fAd1A7b8e3e00eE5DF73841df55a0"
REGISTRAR_CONTRACT_TRANSACTOR_CHAIN_ID=314159
else
REGISTRAR_STORE_REGION="us-east-2"
REGISTRAR_STORE_PROVIDERINFO_TABLE_NAME="staging-warm-upload-api-storage-provider"
Expand Down
70 changes: 34 additions & 36 deletions deploy/app/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions deploy/app/external.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
locals {
providerinfo_table_name = "${terraform.workspace == "forge-prod" ? "forge-prod-upload-api-storage-provider" : "staging-warm-upload-api-storage-provider"}"
providerinfo_table_region = "${terraform.workspace == "forge-prod" ? "us-west-2" : "us-east-2"}"
providerinfo_table_name = "${terraform.workspace == "forge-test" ? "forge-test-w3infra-storage-provider" : (terraform.workspace == "forge-prod" ? "forge-prod-upload-api-storage-provider" : "staging-warm-upload-api-storage-provider")}"
providerinfo_table_region = "${(terraform.workspace == "forge-test" || terraform.workspace == "forge-prod") ? "us-west-2" : "us-east-2"}"
}

provider "aws" {
Expand Down
2 changes: 1 addition & 1 deletion deploy/app/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ provider "aws" {


module "app" {
source = "github.com/storacha/storoku//app?ref=v0.6.1"
source = "github.com/storacha/storoku//app?ref=v0.6.2"
private_key = var.private_key
private_key_env_var = "REGISTRAR_DELEGATOR_KEY"
principal_mapping = var.principal_mapping
Expand Down
87 changes: 43 additions & 44 deletions deploy/shared/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions deploy/shared/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ provider "aws" {
}

module "shared" {
source = "github.com/storacha/storoku//shared?ref=v0.6.1"
source = "github.com/storacha/storoku//shared?ref=v0.6.2"
providers = {
aws = aws
aws.dev = aws.dev
}
create_db = false
caches = []
networks = ["warm","forge",]
networks = ["warm","forge","test"]
app = var.app
create_shared_dev_resources = var.create_shared_dev_resources
zone_id = var.cloudflare_zone_id
Expand Down
Loading