Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WFNEWS-1993 #1817

Merged
merged 4 commits into from
Apr 22, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
},

"mapServices": {
"openmapsBaseUrl": "https://test.openmaps.gov.bc.ca/geo/pub/ows",
"openmapsBaseUrl": "https://maps.dev.bcwildfireservices.com/geo/pub/ows",
"#openmapsBaseUrl": "https://openmaps.gov.bc.ca/geo/pub/ows",
"drivebcBaseUrl": "https://dev-maps.th.gov.bc.ca/geoV05/ows",
"#wfnews": "http://localhost:1338",
Expand Down
2 changes: 1 addition & 1 deletion client/wfnews-war/src/main/angular/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<link rel="apple-touch-icon" href="assets/icons/icon-128x128.png">
<meta name="theme-color" content="#1976d2">

<link rel="preconnect" href="https://test.openmaps.gov.bc.ca">
<link rel="preconnect" href="https://maps.dev.bcwildfireservices.com">
<link rel="preconnect" href="https://openmaps.gov.bc.ca">
<link rel="preconnect" href="https://www2.gov.bc.ca">
<link rel="preconnect" href="https://spt.apps.gov.bc.ca">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ check.token.url=checkToken.jsp
drivebc.url=https://dev-maps.th.gov.bc.ca/geoV05/ows
googlePlayUrl=https://play.google.com/store/apps/details?id=ca.bc.gov.WildfireInformation&hl=en_CA&gl=US
openmaps.internal.url=https://openmaps.gov.bc.ca/geo/pub/ows
openmaps.url=https://test.openmaps.gov.bc.ca/geo/pub/ows
openmaps.url=https://maps.dev.bcwildfireservices.com/geo/pub/ows
pointid.url=https://bcwsapi.nrs.gov.bc.ca/wfss-pointid-api
project.acronym=WFNEWS
siteminder.url.prefix=https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi?returl=
Expand Down
2 changes: 1 addition & 1 deletion client/wfnews-war/src/main/resources/static.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
application.version=${project.version}
build.number=1
project.acronym=WFNEWS
openmaps.url=https://test.openmaps.gov.bc.ca/geo/pub/ows
openmaps.url=https://maps.dev.bcwildfireservices.com/geo/pub/ows
openmaps.internal.url=https://openmaps.gov.bc.ca/geo/pub/ows
drivebc.url=https://dev-maps.th.gov.bc.ca/geoV05/ows
siteminder.url.prefix=https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi?returl=
Expand Down
53 changes: 0 additions & 53 deletions lambda/README.md

This file was deleted.

7 changes: 6 additions & 1 deletion lambda/cache-invalidator/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,17 @@ Resources:
Properties:
Path: /wfnews-cache-invalidator
Method: get
ScheduleEvent:
Type: Schedule
Properties:
Schedule: rate(5 minute)
Input: '{"source": "scheduled"}'

Outputs:
# ServerlessRestApi is an implicit API created out of Events key under Serverless::Function
# Find out more about other implicit resources you can reference within SAM
# https://github.com/awslabs/serverless-application-model/blob/master/docs/internals/generated_resources.rst#api
HelloWorldApi:
WFNEWSCacheInvalidatorApi:
Description: "Perimeter Monitor function"
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/wfnews-cache-invalidator/"
WFNEWSCacheInvalidatorFunction:
Expand Down
3 changes: 2 additions & 1 deletion lambda/cache-invalidator/wfnews-cache-invalidator/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const AWS = require('aws-sdk');

const distributionIds = ['ID1', 'ID2', 'ID3']; // fetch from app config. openmaps/agol sources only?
const distributionIdsString = process.env.MAPS_CLOUDFRONT_DISTRIBUTION_IDS;
const distributionIds = distributionIdsString.split(',');

/**
*
Expand Down
1 change: 1 addition & 0 deletions terraform/lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ resource "aws_lambda_function" "wfnews-cache-invalidator" {
variables = {
S3_BUCKET = aws_s3_bucket.wfnews-monitor-queue-bucket.id
SECRET_NAME = var.SECRET_NAME
DISTRIBUTION_IDS = var.MAPS_CLOUDFRONT_DISTRIBUTION_IDS
}
}
vpc_config {
Expand Down
5 changes: 5 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,11 @@ variable "LAMBDA_LAYER_KEY" {
default = ""
}

variable "MAPS_CLOUDFRONT_DISTRIBUTION_IDS" {
type = string
default = ""
}



variable "UNIQUE_DEPLOY_ID" {
Expand Down
Loading