Skip to content

Commit 49b084d

Browse files
authored
Mount EFS to /restate-data (#49)
1 parent 001dccf commit 49b084d

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

lib/restate-constructs/fargate-restate-deployment.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -206,15 +206,15 @@ export class FargateRestateDeployment extends Construct implements IRestateEnvir
206206
streamPrefix: "restate",
207207
}),
208208
environment: {
209-
RESTATE_OBSERVABILITY__LOG__FORMAT: "Json",
210-
// RUST_LOG: "warn,restate=info",
209+
RESTATE_LOG_FORMAT: "json",
210+
RESTATE_NODE_NAME: "fargate",
211211
},
212212
command: props.command,
213213
startTimeout: cdk.Duration.seconds(20),
214214
stopTimeout: cdk.Duration.seconds(20),
215215
});
216216
restate.addMountPoints({
217-
containerPath: "/target",
217+
containerPath: "/restate-data",
218218
readOnly: false,
219219
sourceVolume: "restateStore",
220220
});
@@ -265,9 +265,10 @@ export class FargateRestateDeployment extends Construct implements IRestateEnvir
265265
containerPort: RESTATE_INGRESS_PORT,
266266
}),
267267
],
268+
port: RESTATE_INGRESS_PORT,
268269
protocol: elb2.ApplicationProtocol.HTTP,
269270
healthCheck: {
270-
path: "/grpc.health.v1.Health/Check",
271+
path: "/restate/health",
271272
interval: cdk.Duration.seconds(5),
272273
healthyThresholdCount: 3,
273274
unhealthyThresholdCount: 3,
@@ -289,6 +290,7 @@ export class FargateRestateDeployment extends Construct implements IRestateEnvir
289290
containerPort: RESTATE_ADMIN_PORT,
290291
}),
291292
],
293+
port: RESTATE_ADMIN_PORT,
292294
protocol: elb2.ApplicationProtocol.HTTP,
293295
healthCheck: {
294296
path: "/health",

lib/restate-constructs/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*/
1111

1212
export * from "./service-deployer";
13+
export * from "./fargate-restate-deployment";
1314
export * from "./restate-environment";
1415
export * from "./restate-cloud-environment";
1516
export * from "./deployments-common";

test/__snapshots__/restate-constructs.test.ts.snap

+8-6
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,10 @@ exports[`Restate constructs [Experimental] Create a self-hosted Restate environm
130130
Properties:
131131
ContainerDefinitions:
132132
- Environment:
133-
- Name: RESTATE_OBSERVABILITY__LOG__FORMAT
134-
Value: Json
133+
- Name: RESTATE_LOG_FORMAT
134+
Value: json
135+
- Name: RESTATE_NODE_NAME
136+
Value: fargate
135137
Essential: true
136138
Image: Any<Object>
137139
LogConfiguration:
@@ -142,7 +144,7 @@ exports[`Restate constructs [Experimental] Create a self-hosted Restate environm
142144
awslogs-stream-prefix: restate
143145
awslogs-region: region
144146
MountPoints:
145-
- ContainerPath: /target
147+
- ContainerPath: /restate-data
146148
ReadOnly: false
147149
SourceVolume: restateStore
148150
Name: restate-runtime
@@ -424,10 +426,10 @@ exports[`Restate constructs [Experimental] Create a self-hosted Restate environm
424426
Type: 'AWS::ElasticLoadBalancingV2::TargetGroup'
425427
Properties:
426428
HealthCheckIntervalSeconds: 5
427-
HealthCheckPath: /grpc.health.v1.Health/Check
429+
HealthCheckPath: /restate/health
428430
HealthCheckTimeoutSeconds: 2
429431
HealthyThresholdCount: 3
430-
Port: 80
432+
Port: 8080
431433
Protocol: HTTP
432434
TargetGroupAttributes:
433435
- Key: deregistration_delay.timeout_seconds
@@ -458,7 +460,7 @@ exports[`Restate constructs [Experimental] Create a self-hosted Restate environm
458460
HealthCheckPath: /health
459461
HealthCheckTimeoutSeconds: 2
460462
HealthyThresholdCount: 3
461-
Port: 80
463+
Port: 9070
462464
Protocol: HTTP
463465
TargetGroupAttributes:
464466
- Key: deregistration_delay.timeout_seconds

0 commit comments

Comments
 (0)