Skip to content

teopeurt/kontact

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Micronaut 4.0.3 Documentation


Document

Source

Handler

Handler: io.micronaut.function.aws.proxy.payload1.ApiGatewayProxyRequestEventFunction

AWS Lambda Handler

Deployment with GraalVM

If you want to deploy to AWS Lambda as a GraalVM native image, run:

./gradlew buildNativeLambda -Pmicronaut.runtime=lambda

This will build the GraalVM native image inside a docker container and generate the function.zip ready for the deployment.

Push GraalVM Native Image To Docker Registry Workflow

Workflow file: .github/workflows/graalvm.yml

Workflow description

For pushes to the master branch, the workflow will:

  1. Setup the build environment with respect to the selected java/graalvm version.
  2. Login to docker registry based on provided configuration.
  3. Build, tag and push Docker image with Micronaut application to the Docker container image.

Dependencies on other GitHub Actions

  • Docker login(docker/login)
  • Setup GraalVM(DeLaGuardo/setup-graalvm)

Setup

Add the following GitHub secrets:

Name Description
DOCKER_USERNAME Username for Docker registry authentication.
DOCKER_PASSWORD Docker registry password.
DOCKER_REPOSITORY_PATH Path to the docker image repository inside the registry, e.g. for the image foo/bar/micronaut:0.1 it is foo/bar.
DOCKER_REGISTRY_URL Docker registry url.

Configuration examples

Specifics on how to configure public cloud docker registries like DockerHub, Google Container Registry (GCR), AWS Container Registry (ECR), Oracle Cloud Infrastructure Registry (OCIR) and many more can be found in docker/login-action documentation.

DockerHub

  • DOCKER_USERNAME - DockerHub username
  • DOCKER_PASSWORD - DockerHub password or personal access token
  • DOCKER_REPOSITORY_PATH - DockerHub organization or the username in case of personal registry
  • DOCKER_REGISTRY_URL - No need to configure for DockerHub

See docker/login-action for DockerHub

Google Container Registry (GCR)

Create service account with permission to edit GCR or use predefined Storage Admin role.

  • DOCKER_USERNAME - set exactly to _json_key
  • DOCKER_PASSWORD - content of the service account json key file
  • DOCKER_REPOSITORY_PATH - <project-id>/foo
  • DOCKER_REGISTRY_URL - gcr.io

See docker/login-action for GCR

AWS Elastic Container Registry (ECR)

Create IAM user with permission to push to ECR (or use AmazonEC2ContainerRegistryFullAccess role).

  • DOCKER_USERNAME - access key ID
  • DOCKER_PASSWORD - secret access key
  • DOCKER_REPOSITORY_PATH - no need to set
  • DOCKER_REGISTRY_URL - set to <aws-account-number>.dkr.ecr.<region>.amazonaws.com

See docker/login-action for ECR

Oracle Infrastructure Cloud Registry (OCIR)

Create auth token for authentication.

  • DOCKER_USERNAME - username in format <tenancy>/<username>
  • DOCKER_PASSWORD - account auth token
  • DOCKER_REPOSITORY_PATH - <tenancy>/<registry>/foo
  • DOCKER_REGISTRY_URL - set to <region>.ocir.io

See docker/login-action for OCIR

Requisites

How to deploy

Generate the deployable artifact

./gradlew :app:buildNativeLambda
./gradlew test

Deploy

The infra/cdk.json file tells the CDK Toolkit how to execute your app.

cd infra cdk synth - emits the synthesized CloudFormation template cdk deploy - deploy this stack to your default AWS account/region cd ..

Other useful commands:

cdk diff - compare deployed stack with current state cdk docs- open CDK documentation

Cleanup

cd infra
cdk destroy
cd ..

Feature aws-lambda documentation

Feature jmx documentation

Feature tracing-opentelemetry-annotations documentation

Feature kafka documentation

Feature kubernetes documentation

Feature aws-v2-sdk documentation

Feature dynamodb documentation

Feature awaitility documentation

Feature aws-lambda-custom-runtime documentation

Feature github-workflow-ci documentation

Feature tracing-opentelemetry-http documentation

Feature ksp documentation

Feature security-jwt documentation

Feature validation documentation

Feature management documentation

Feature aws-parameter-store documentation

Feature aws-codebuild-workflow-ci documentation

Feature email-javamail documentation

Feature control-panel documentation

Feature security-oauth2 documentation

Feature email-amazon-ses documentation

Feature object-storage-aws documentation

Feature openapi documentation

Feature testcontainers documentation

Feature flyway documentation

Feature aws-lambda-events-serde documentation

Feature object-storage-local documentation

Feature tracing-opentelemetry-exporter-otlp documentation

Feature http-client documentation

Feature cache-caffeine documentation

Feature micronaut-aot documentation

Feature tracing-opentelemetry-xray documentation

Feature serialization-jackson documentation

Feature aws-cdk documentation

Feature amazon-api-gateway-http documentation

Feature graphql documentation

Feature localstack documentation

Feature github-workflow-graal-docker-registry documentation

About

Micronaut Kontact Application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published