feat(gcp): add label to instances for cost and logs grouping (#5693)
* feat(gcp): add label to instances for cost and logs grouping Previous behavior: We couldn't search GCP logs using the instance name if that instance was already deleted. And if we want to know how we're spending our budget its also difficult to know if specific tests or type of instances are the one responsible for a certain % of the costs Fixes #5153 Fixses #5543 Expected behavior: Be able to search logs using the test ID or at least the github reference, and be able to group GCP costs by labels Solution: - Add labels to instances * chore: add Network as a label * Revert "chore: add Network as a label" This reverts commit 146f747d501bec56380aeb630b5398eb9c94df37. * Update .github/workflows/zcashd-manual-deploy.yml Co-authored-by: teor <teor@riseup.net> Co-authored-by: teor <teor@riseup.net>
This commit is contained in:
parent
63124ba962
commit
c7745415b6
|
|
@ -129,6 +129,7 @@ jobs:
|
|||
--container-mount-disk=mount-path="/zebrad-cache",name=zebrad-cache-${{ env.GITHUB_SHA_SHORT }} \
|
||||
--machine-type ${{ env.MACHINE_TYPE }} \
|
||||
--scopes cloud-platform \
|
||||
--labels=app=zebrad,environment=prod,github_ref=${{ env.GITHUB_REF_SLUG_URL }} \
|
||||
--tags zebrad
|
||||
|
||||
# Check if our destination instance group exists already
|
||||
|
|
@ -209,4 +210,5 @@ jobs:
|
|||
--container-mount-disk=mount-path='/zebrad-cache' \
|
||||
--machine-type ${{ env.MACHINE_TYPE }} \
|
||||
--zone ${{ env.ZONE }} \
|
||||
--labels=app=zebrad,environment=qa,github_ref=${{ env.GITHUB_REF_SLUG_URL }} \
|
||||
--tags zebrad
|
||||
|
|
|
|||
|
|
@ -163,6 +163,7 @@ jobs:
|
|||
--scopes cloud-platform \
|
||||
--metadata=google-monitoring-enabled=TRUE,google-logging-enabled=TRUE \
|
||||
--metadata-from-file=startup-script=.github/workflows/scripts/gcp-vm-startup-script.sh \
|
||||
--labels=app=${{ inputs.app_name }},environment=test,github_ref=${{ env.GITHUB_REF_SLUG_URL }},test=${{ inputs.test_id }} \
|
||||
--tags ${{ inputs.app_name }} \
|
||||
--zone ${{ env.ZONE }}
|
||||
sleep 60
|
||||
|
|
@ -403,6 +404,7 @@ jobs:
|
|||
--scopes cloud-platform \
|
||||
--metadata=google-monitoring-enabled=TRUE,google-logging-enabled=TRUE \
|
||||
--metadata-from-file=startup-script=.github/workflows/scripts/gcp-vm-startup-script.sh \
|
||||
--labels=app=${{ inputs.app_name }},environment=test,github_ref=${{ env.GITHUB_REF_SLUG_URL }},test=${{ inputs.test_id }} \
|
||||
--tags ${{ inputs.app_name }} \
|
||||
--zone ${{ env.ZONE }}
|
||||
sleep 60
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ jobs:
|
|||
--machine-type ${{ env.MACHINE_TYPE }} \
|
||||
--service-account ${{ env.DEPLOY_SA }} \
|
||||
--scopes cloud-platform \
|
||||
--labels=app=zcashd,environment=prod,github_ref=${{ env.GITHUB_REF_SLUG_URL }} \
|
||||
--tags zcashd
|
||||
|
||||
# Check if our destination instance group exists already
|
||||
|
|
|
|||
Loading…
Reference in New Issue