Skip to content

Commit

Permalink
Add IaC (terraform) for STACKIT and helm chart for YATT
Browse files Browse the repository at this point in the history
  • Loading branch information
larsduelfer committed Aug 18, 2024
1 parent ffd02b8 commit 94db51b
Show file tree
Hide file tree
Showing 242 changed files with 3,447 additions and 165 deletions.
6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions .idea/runConfigurations/CompanyApplication.xml

This file was deleted.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/Company_Service.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/runConfigurations/Frontend_New.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions .idea/runConfigurations/GraphQL_API.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/Project_Service.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions .idea/runConfigurations/RSocket_API.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/User_Service.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/runConfigurations/User_Service2.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions .idea/runConfigurations/gRPC_API.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion axonserver/config/axonserver.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
axoniq:
axonserver:
hostname: axonserver
hostname: axonserver
standalone: true
8 changes: 4 additions & 4 deletions backend/apis/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ group = "${group}.apis"
dependencies {
api(project(":services:common:api"))
api(project(":services:common:auditing"))
api(project(":services:company:api"))
api(project(":services:project:api"))
api(project(":services:user:api"))
api(project(":services:company:company-api"))
api(project(":services:project:project-api"))
api(project(":services:user:user-api"))

implementation("org.axonframework:axon-spring-boot-starter")
implementation("org.axonframework:axon-spring-boot-starter")
implementation("org.axonframework.extensions.kotlin:axon-kotlin")
implementation("org.springframework.boot:spring-boot-starter-oauth2-resource-server")
implementation("org.springframework.boot:spring-boot-starter-security")
Expand Down
7 changes: 7 additions & 0 deletions backend/apis/graphql/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM gcr.io/distroless/java17-debian12
ARG JAR_FILE=build/libs/*.jar
COPY ${JAR_FILE} graphql.jar
#User nonroot (ID 65532) is a user created by distroless images
#See https://github.com/GoogleContainerTools/distroless/issues/235
USER 65532
CMD ["/graphql.jar"]
15 changes: 2 additions & 13 deletions backend/apis/graphql/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
plugins {
id("yatt.kotlin-conventions")
id("io.spring.dependency-management")
kotlin("plugin.spring")
id("yatt.api-conventions")
}

group = "${group}.apis"

dependencies {
api(project(":apis:common"))

implementation("io.opentracing.contrib:opentracing-spring-jaeger-cloud-starter")
implementation("io.projectreactor.kotlin:reactor-kotlin-extensions:1.1.5")
implementation("org.axonframework:axon-spring-boot-starter")
implementation("org.axonframework.extensions.kotlin:axon-kotlin")
implementation("org.axonframework.extensions.tracing:axon-tracing-spring-boot-starter")

implementation("org.springframework.boot:spring-boot-starter-graphql")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-websocket")
implementation("org.springframework.boot:spring-boot-starter-oauth2-resource-server")

testImplementation("org.springframework.boot:spring-boot-starter-test")
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.springframework.web.filter.CorsFilter
class CorsConfig {

@Bean
fun corsFilter(@Value("\${app.cors.allowed-origins}") allowedOrigins: List<String>?) =
fun corsFilter(@Value("\${yatt.cors.origins}") allowedOrigins: List<String>?) =
CorsFilter(
UrlBasedCorsConfigurationSource().apply {
this.registerCorsConfiguration(
Expand Down
17 changes: 11 additions & 6 deletions backend/apis/graphql/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
yatt:
cors:
origins: http://localhost:3000
jwt:
issuer:
uri: http://localhost:8999/realms/eventsourcing-with-axon
jwks:
uri: http://localhost:8999/realms/eventsourcing-with-axon/protocol/openid-connect/certs

spring:
application:
name: graphql-api
Expand All @@ -16,15 +25,11 @@ spring:
oauth2:
resourceserver:
jwt:
issuer-uri: http://localhost:8999/realms/eventsourcing-with-axon

issuer-uri: ${yatt.jwt.issuer.uri}
jwk-set-uri: ${yatt.jwt.jwks.uri}
server:
port: 8088

app:
cors:
allowed-origins: http://localhost:3000

logging:
level:
ROOT: warn
Expand Down
10 changes: 1 addition & 9 deletions backend/apis/grpc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
plugins {
id("com.google.protobuf") version "0.8.18"
id("yatt.kotlin-conventions")
id("io.spring.dependency-management")
kotlin("plugin.spring")
id("yatt.api-conventions")
}

group = "${group}.apis"

dependencies {
api(project(":apis:common"))
api(project(":apis:grpc-lib"))

implementation("io.projectreactor:reactor-core")
implementation("jakarta.annotation:jakarta.annotation-api:2.0.0")

implementation("net.devh:grpc-spring-boot-starter:2.13.1.RELEASE")
implementation("org.axonframework:axon-spring-boot-starter")
implementation("org.axonframework.extensions.kotlin:axon-kotlin")
implementation("org.springframework.boot:spring-boot-starter-oauth2-resource-server")
implementation("org.springframework.boot:spring-boot-starter-security")
}
5 changes: 5 additions & 0 deletions backend/apis/grpc/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
axon:
extension:
tracing:
enabled: false

spring:
application:
name: grpc-api
Expand Down
7 changes: 7 additions & 0 deletions backend/apis/rest/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM gcr.io/distroless/java17-debian12
ARG JAR_FILE=build/libs/*.jar
COPY ${JAR_FILE} rest.jar
#User nonroot (ID 65532) is a user created by distroless images
#See https://github.com/GoogleContainerTools/distroless/issues/235
USER 65532
CMD ["/rest.jar"]
16 changes: 1 addition & 15 deletions backend/apis/rest/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,24 +1,10 @@
plugins {
id("yatt.kotlin-conventions")
id("io.spring.dependency-management")
kotlin("plugin.spring")
id("yatt.api-conventions")
}

group = "${group}.apis"

dependencies {
api(project(":apis:common"))

implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("io.opentracing.contrib:opentracing-spring-jaeger-web-starter")
implementation("io.projectreactor:reactor-core")
implementation("org.axonframework:axon-spring-boot-starter")
implementation("org.axonframework.extensions.kotlin:axon-kotlin")
implementation("org.axonframework.extensions.tracing:axon-tracing-spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-oauth2-resource-server")

testImplementation("org.axonframework:axon-test")
testImplementation("org.springframework.boot:spring-boot-starter-test")
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import org.springframework.web.filter.CorsFilter
@Configuration
class CorsConfig {
@Bean
fun corsFilter(@Value("\${app.cors.allowed-origins}") allowedOrigins: List<String>?) =
fun corsFilter(@Value("\${yatt.cors.origins}") allowedOrigins: List<String>?) =
CorsFilter(
UrlBasedCorsConfigurationSource().apply {
this.registerCorsConfiguration(
Expand Down
17 changes: 11 additions & 6 deletions backend/apis/rest/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
yatt:
cors:
origins: http://localhost:3000
jwt:
issuer:
uri: http://localhost:8999/realms/eventsourcing-with-axon
jwks:
uri: http://localhost:8999/realms/eventsourcing-with-axon/protocol/openid-connect/certs

spring:
application:
name: rest-api
Expand All @@ -8,12 +17,8 @@ spring:
oauth2:
resourceserver:
jwt:
issuer-uri: http://localhost:8999/realms/eventsourcing-with-axon
jwk-set-uri: http://localhost:8999/realms/eventsourcing-with-axon/protocol/openid-connect/certs

app:
cors:
allowed-origins: http://localhost:3000
issuer-uri: ${yatt.jwt.issuer.uri}
jwk-set-uri: ${yatt.jwt.jwks.uri}

logging:
level:
Expand Down
14 changes: 1 addition & 13 deletions backend/apis/rsocket/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,33 +1,21 @@
plugins {
id("yatt.kotlin-conventions")
id("io.spring.dependency-management")
id("yatt.api-conventions")
id("com.google.osdetector") version "1.7.0"
kotlin("plugin.spring")
}

group = "${group}.apis"

dependencies {
api(project(":apis:common"))

if (osdetector.arch.equals("aarch_64")) {
implementation("io.netty:netty-all")
}

implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("io.projectreactor:reactor-core")
implementation("io.projectreactor.kotlin:reactor-kotlin-extensions")
implementation("org.axonframework:axon-spring-boot-starter")
implementation("org.axonframework.extensions.kotlin:axon-kotlin")
implementation("org.axonframework.extensions.reactor:axon-reactor-spring-boot-starter")
implementation("org.axonframework.extensions.tracing:axon-tracing-spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-oauth2-resource-server")
implementation("org.springframework.boot:spring-boot-starter-rsocket")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("org.springframework.security:spring-security-messaging")
implementation("org.springframework.security:spring-security-rsocket")

testImplementation("org.axonframework:axon-test")
testImplementation("org.springframework.boot:spring-boot-starter-test")
}
Loading

0 comments on commit 94db51b

Please sign in to comment.