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

RELEASE 1801 1827 #2301

Merged
merged 22 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
034f2f2
fix(api): point API's getDocumentsFromFHIR to core's getDocuments
leite08 Jun 15, 2024
979f369
fix(api): point API's searchDocuments to core's searchDocuments
leite08 Jun 15, 2024
b5af7f7
refactor(core): return docRef w/ ID on search +
leite08 Jun 15, 2024
69d04c4
refactor(core): api to use Core's searchDocuments
leite08 Jun 15, 2024
c383685
build: update WH docs
leite08 Jun 15, 2024
def4f9c
fix(docs): typo on WH
leite08 Jun 17, 2024
4baa6ea
build: add wh types to start doc download, consolidated data and bulk…
leite08 Jun 18, 2024
4f7c54f
Merge pull request #2284 from metriport/1040-update-wh-docs
leite08 Jun 19, 2024
ce53590
Merge pull request #2282 from metriport/1827-doc-id
leite08 Jun 19, 2024
cfe5b26
refactor: use executeWithRetries and the net one throughout
leite08 Jun 15, 2024
ebcf17c
refactor: apply executeWithRetries to lower level funcitons +
leite08 Jun 18, 2024
556025f
refactor: apply executeWithRetries to missing lower level function
leite08 Jun 18, 2024
899a914
chore(release): publish
leite08 Jun 18, 2024
056427f
Merge pull request #2285 from metriport/1827-update-lambdas-to-retry
leite08 Jun 19, 2024
c72ffdf
fix(infra): 1/3 create ALB version of the API
leite08 Jun 19, 2024
5bd5ce6
fix(infra): 1/3 permissions to the ALB based fargate service
leite08 Jun 19, 2024
cfe3969
fix(infra): 1/3 add DB access to new ALB fargate service
leite08 Jun 19, 2024
3f316aa
fix(infra): 1/3 NLB pointing to ALB
leite08 Jun 19, 2024
e032d95
fix(infra): 1/3 use existing log on new ALB fargate
leite08 Jun 20, 2024
055dff2
Merge pull request #2303 from metriport/1040-alb-behind-api-nlb_1
leite08 Jun 20, 2024
dfddbbe
chore(release): publish
leite08 Jun 20, 2024
3aca99d
Merge pull request #2308 from metriport/1827-publish-npm-packages
leite08 Jun 20, 2024
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
Prev Previous commit
Next Next commit
fix(infra): 1/3 use existing log on new ALB fargate
Ref. metriport/metriport-internal#1040

Signed-off-by: Rafael Leite <[email protected]>
  • Loading branch information
leite08 committed Jun 20, 2024
commit e032d95694be6dda0ea4ab05db4117e2dd63ccb5
4 changes: 4 additions & 0 deletions packages/infra/config/env-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ type EnvConfigBase = {
alarmThresholds: RDSAlarmThresholds;
};
loadBalancerDnsName: string;
/**
* Introduced when we had to recreate the Fargate service, so we could keep using the existing log group.
*/
logArn: string;
apiGatewayUsagePlanId?: string; // optional since we need to create the stack first, then update this and redeploy
usageReportUrl?: string;
fhirServerUrl: string;
Expand Down
1 change: 1 addition & 0 deletions packages/infra/config/example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const config: EnvConfigNonSandbox = {
},
},
loadBalancerDnsName: "<your-load-balancer-dns-name>",
logArn: "<your-log-arn>",
fhirToMedicalLambda: {
nodeRuntimeArn: "arn:aws:lambda:<region>::runtime:<id>",
},
Expand Down
6 changes: 6 additions & 0 deletions packages/infra/lib/api-stack/api-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
import { AlbTarget } from "aws-cdk-lib/aws-elasticloadbalancingv2-targets";
import * as iam from "aws-cdk-lib/aws-iam";
import { IFunction as ILambda } from "aws-cdk-lib/aws-lambda";
import { LogGroup } from "aws-cdk-lib/aws-logs";
import * as rds from "aws-cdk-lib/aws-rds";
import * as r53 from "aws-cdk-lib/aws-route53";
import * as r53_targets from "aws-cdk-lib/aws-route53-targets";
Expand Down Expand Up @@ -128,6 +129,7 @@ export function createAPIService({
// Run some servers on fargate containers
const listenerPort = 80;
const containerPort = 8080;
const logGroup = LogGroup.fromLogGroupArn(stack, "ApiLogGroup", props.config.logArn);
// TODO RENAME to remove "Alb"
const fargateServiceAlb = new ecs_patterns.ApplicationLoadBalancedFargateService(
stack,
Expand All @@ -142,6 +144,10 @@ export function createAPIService({
image: ecs.ContainerImage.fromEcrRepository(ecrRepo, "latest"),
containerPort,
containerName: "API-Server",
logDriver: ecs.LogDrivers.awsLogs({
logGroup,
streamPrefix: "APIFargateService",
}),
secrets: {
DB_CREDS: ecs.Secret.fromSecretsManager(dbCredsSecret),
SEARCH_PASSWORD: ecs.Secret.fromSecretsManager(searchAuth.secret),
Expand Down
Loading