Skip to content

Commit

Permalink
added issuer-service launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger committed Jan 17, 2025
1 parent f73a831 commit 0c5a5e3
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 2 deletions.
27 changes: 26 additions & 1 deletion .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Run Javadoc
run: ./gradlew javadoc

Verify-Launcher:
Verify-Identityhub-Launcher:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -63,6 +63,31 @@ jobs:
container-name: identity-hub
timeout: 60

Verify-Issuer-Service-Launcher:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: eclipse-edc/.github/.github/actions/setup-build@main

- name: 'Build launcher'
run: ./gradlew :launcher:issuer-service:shadowJar

- name: 'Build Docker image'
run: docker build -t issuer-service ./launcher/issuer-service

- name: 'Start Identity Hub'
run: |
docker run -d --rm --name issuer-service \
-e "EDC_STS_ACCOUNT_API_URL=https://sts.com" \
-e "EDC_STS_ACCOUNTS_API_AUTH_HEADER_VALUE=auth-header" \
issuer-service:latest
- name: 'Wait for Issuer-Service to be healthy'
uses: raschmitt/wait-for-healthy-container@v1
with:
container-name: issuer-service
timeout: 60

Test:
permissions:
checks: write
Expand Down
1 change: 0 additions & 1 deletion launcher/identityhub/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ HEALTHCHECK --interval=5s --timeout=5s --retries=10 CMD curl --fail http://local
# Use "exec" for graceful termination (SIGINT) to reach JVM.
# ARG can not be used in ENTRYPOINT so storing value in an ENV variable
ENV ENV_JVM_ARGS=$JVM_ARGS
ENV ENV_APPINSIGHTS_AGENT_VERSION=$APPINSIGHTS_AGENT_VERSION
ENTRYPOINT [ "sh", "-c", "exec java $ENV_JVM_ARGS -jar identity-hub.jar"]
25 changes: 25 additions & 0 deletions launcher/issuer-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -buster is required to have apt available
FROM openjdk:17-slim-buster

# Optional JVM arguments, such as memory settings
ARG JVM_ARGS=""

RUN apt update \
&& apt install -y curl \
&& rm -rf /var/cache/apt/archives /var/lib/apt/lists

WORKDIR /app

COPY ./build/libs/issuer-service.jar /app

EXPOSE 8188

ENV WEB_HTTP_PORT="8181"
ENV WEB_HTTP_PATH="/api"

HEALTHCHECK --interval=5s --timeout=5s --retries=10 CMD curl --fail http://localhost:8181/api/check/health

# Use "exec" for graceful termination (SIGINT) to reach JVM.
# ARG can not be used in ENTRYPOINT so storing value in an ENV variable
ENV ENV_JVM_ARGS=$JVM_ARGS
ENTRYPOINT [ "sh", "-c", "exec java $ENV_JVM_ARGS -jar issuer-service.jar"]
37 changes: 37 additions & 0 deletions launcher/issuer-service/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright (c) 2022 Microsoft Corporation
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Amadeus - initial API and implementation
*
*/

plugins {
`java-library`
id("application")
alias(libs.plugins.shadow)
}

dependencies {
runtimeOnly(project(":dist:bom:issuerservice-bom"))
}

application {
mainClass.set("org.eclipse.edc.boot.system.runtime.BaseRuntime")
}

tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
exclude("**/pom.properties", "**/pom.xm")
mergeServiceFiles()
archiveFileName.set("issuer-service.jar")
}

edcBuild {
publish.set(false)
}
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ include(":extensions:api:identity-api:validators:verifiable-credential-validator

// other modules
include(":launcher:identityhub")
include(":launcher:issuer-service")

include(":version-catalog")
// test modules
Expand Down

0 comments on commit 0c5a5e3

Please sign in to comment.