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
4 changes: 1 addition & 3 deletions infrastructure/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"DATAMANAGER_BASE_URL", datamanager_service.statuses[0].url
)

predicitonengine_service = create_service(
predictionengine_service = create_service(
"predictionengine", envs=[DATAMANAGER_BASE_URL]
)

Expand All @@ -44,8 +44,6 @@
ALPACA_API_KEY_ID,
ALPACA_API_SECRET_KEY,
DATAMANAGER_BASE_URL,
# MINIMUM_PORTFOLIO_TICKERS, # 20
# MAXIMUM_PORTFOLIO_TICKERS, # 20
],
)

Expand Down
9 changes: 9 additions & 0 deletions infrastructure/buckets.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,12 @@
location=project.REGION,
uniform_bucket_level_access=True,
)

storage.BucketIAMMember(
"platform-write-access",
bucket=production_data_bucket.name,
role="roles/storage.objectCreator",
member=project.platform_service_account.email.apply(
lambda e: f"serviceAccount:{e}"
),
)
14 changes: 14 additions & 0 deletions infrastructure/ping.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
let headers = [Authorization $"Bearer (gcloud auth print-identity-token)"]
let services = gcloud run services list --format=json
| from json
| get status.address.url
| each {|url|
{
service: ($url | split row "https://" | get 1 | split row "-" | get 0)
url: $url
}
}

let datamanager_url = ($services | where service == "datamanager" | get url.0)

http get --full --headers $headers $"($datamanager_url)/health"