-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f23e8c
commit 1c17bcd
Showing
21,799 changed files
with
3,111,669 additions
and
586 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
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,41 @@ | ||
package airhacks.alb.boundary; | ||
|
||
import java.util.List; | ||
|
||
import airhacks.alb.control.Alb; | ||
import airhacks.alb.control.PublicVPC; | ||
import airhacks.lambda.control.QuarkusLambda; | ||
import software.amazon.awscdk.CfnOutput; | ||
import software.amazon.awscdk.Stack; | ||
import software.amazon.awscdk.services.elasticloadbalancingv2.AddApplicationTargetsProps; | ||
import software.amazon.awscdk.services.elasticloadbalancingv2.BaseApplicationListenerProps; | ||
import software.amazon.awscdk.services.elasticloadbalancingv2.HealthCheck; | ||
import software.amazon.awscdk.services.elasticloadbalancingv2.targets.LambdaTarget; | ||
import software.constructs.Construct; | ||
|
||
public class LambdaAlbStack extends Stack { | ||
|
||
static String FUNCTION_NAME = "airhacks_lambda_gretings_boundary_Greetings"; | ||
|
||
public LambdaAlbStack(Construct scope, String id) { | ||
super(scope, id + "-alb-stack"); | ||
|
||
var quarkuLambda = new QuarkusLambda(this, FUNCTION_NAME); | ||
var publicVPCConstruct = new PublicVPC(this); | ||
var publicVPC = publicVPCConstruct.getVpc(); | ||
var alb = new Alb(this, publicVPC, "AirhacksLambdaLB"); | ||
|
||
var function = quarkuLambda.getFunction(); | ||
var lambdaTarget = new LambdaTarget(function); | ||
|
||
var loadBalancer = alb.getApplicationLoadBalancer(); | ||
var listener = loadBalancer.addListener("Http", BaseApplicationListenerProps.builder().port(80).build()); | ||
|
||
listener.addTargets("Lambda", AddApplicationTargetsProps.builder().targets(List.of(lambdaTarget)) | ||
.healthCheck(HealthCheck.builder().enabled(true).build()).build()); | ||
CfnOutput.Builder.create(this, "FunctionARN").value(function.getFunctionArn()).build(); | ||
var url = loadBalancer.getLoadBalancerDnsName(); | ||
CfnOutput.Builder.create(this, "LoadBalancerDNSName").value(url).build(); | ||
CfnOutput.Builder.create(this, "LoadBalancerCurlOutput").value("curl -i http://" + url + "/hello").build(); | ||
} | ||
} |
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,2 @@ | ||
/bin/ | ||
cdk.out/ |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/sh | ||
set -e | ||
echo "building functions" | ||
cd lambda && mvn clean package | ||
cd instrument-lambda && mvn clean package | ||
echo "building CDK" | ||
cd ../cdk && mvn clean package && cdk deploy | ||
cd ../instrument-cdk && mvn clean package && cdk deploy |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/sh | ||
set -e | ||
echo "building functions" | ||
cd lambda && mvn clean package | ||
cd instrument-lambda && mvn clean package | ||
echo "building CDK" | ||
cd ../cdk && mvn clean package && cdk deploy --all --require-approval=never | ||
cd ../instrument-cdk && mvn clean package && cdk deploy --all --require-approval=never |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
47 changes: 0 additions & 47 deletions
47
instrument-aws/cdk/src/main/java/airhacks/alb/boundary/LambdaAlbStack.java
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
instrument-aws/cdk/src/main/java/airhacks/apigateway/boundary/LambdaApiGatewayStack.java
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
instrument-aws/cdk/src/main/java/airhacks/functionurl/boundary/FunctionURLStack.java
This file was deleted.
Oops, something went wrong.
79 changes: 0 additions & 79 deletions
79
instrument-aws/cdk/src/main/java/airhacks/lambda/control/QuarkusLambda.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.