-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #251 from helium/feat/cloudfront-prod
Adding cloudfront config to prod
- Loading branch information
Showing
6 changed files
with
84 additions
and
6 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
.github/workflows/web-prod-metadata-cloudfront-invalidation-action.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Invalidate CloudFront Distribution | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'manifests/web-cluster/prod/helium/metadata.yaml' | ||
|
||
jobs: | ||
cloudfront-invalidation: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Invalidate CloudFront distribution | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_WEB_PROD_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_WEB_PROD_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-1 | ||
|
||
- name: Create CloudFront Invalidation | ||
run: | | ||
DISTRIBUTION_ID=${{ secrets.AWS_WEB_PROD_CLOUDFRONT_DISTRIBUTION_ID }} | ||
aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths "/*" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
name: entity-invalidator | ||
namespace: helium | ||
spec: | ||
schedule: "0 2 * * *" | ||
concurrencyPolicy: "Forbid" | ||
successfulJobsHistoryLimit: 3 | ||
failedJobsHistoryLimit: 3 | ||
jobTemplate: | ||
spec: | ||
backoffLimit: 10 | ||
template: | ||
metadata: | ||
labels: | ||
app: 'entity-invalidator' | ||
security-group: public-rds-access | ||
spec: | ||
restartPolicy: OnFailure | ||
serviceAccountName: invalidation-role | ||
containers: | ||
- name: entity-invalidator | ||
image: public.ecr.aws/v0j6k5v6/entity-invalidator:0.0.4 | ||
imagePullPolicy: IfNotPresent | ||
env: | ||
- name: PGHOST | ||
value: monitoring-rds-read-replica.cbhihwhsofyu.us-west-2.rds.amazonaws.com | ||
- name: PGPORT | ||
value: "5432" | ||
- name: PGUSER | ||
value: monitoring | ||
- name: AWS_REGION | ||
value: us-west-2 | ||
- name: PGDATABASE | ||
value: monitoring | ||
- name: PGSSLMODE | ||
value: no-verify | ||
- name: CLOUDFRONT_DISTRIBUTION | ||
value: EO5ODEGCJ6FK | ||
- name: DOMAIN | ||
value: entities.nft.helium.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters