From 8ec4bd7584ad67b4aebd2a88a1e33902923a5375 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 18 May 2022 13:36:14 +0200 Subject: refactor(web/ui): Remove module nesting in Quarkus extension This change updates the OpenDC web UI Quarkus extension to live completely in the `opendc-web` directory, as opposed to adding another level of nesting. This also allows us to properly name the artifacts of the Quarkus extension modules. --- opendc-web/opendc-web-api/build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'opendc-web/opendc-web-api/build.gradle.kts') diff --git a/opendc-web/opendc-web-api/build.gradle.kts b/opendc-web/opendc-web-api/build.gradle.kts index 5ef6009f..fe493f1d 100644 --- a/opendc-web/opendc-web-api/build.gradle.kts +++ b/opendc-web/opendc-web-api/build.gradle.kts @@ -31,8 +31,8 @@ dependencies { implementation(enforcedPlatform(libs.quarkus.bom)) implementation(projects.opendcWeb.opendcWebProto) - compileOnly(projects.opendcWeb.opendcWebUiQuarkus.deployment) /* Temporary fix for Quarkus/Gradle issues */ - implementation(projects.opendcWeb.opendcWebUiQuarkus.runtime) + compileOnly(projects.opendcWeb.opendcWebUiQuarkusDeployment) /* Temporary fix for Quarkus/Gradle issues */ + implementation(projects.opendcWeb.opendcWebUiQuarkus) implementation(libs.quarkus.kotlin) implementation(libs.quarkus.resteasy.core) -- cgit v1.2.3 From 1489eefa18a904976f5328294c299df4285bacb4 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 18 May 2022 14:01:38 +0200 Subject: feat(web/runner): Add Quarkus extension for OpenDC runner This change adds a Quarkus extension that hosts the OpenDC web runner for a (potentially local) OpenDC API instance. This functionality enables a simplified developer experience by allowing users to spawn the complete OpenDC stack with a single command. --- opendc-web/opendc-web-api/build.gradle.kts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'opendc-web/opendc-web-api/build.gradle.kts') diff --git a/opendc-web/opendc-web-api/build.gradle.kts b/opendc-web/opendc-web-api/build.gradle.kts index fe493f1d..a9392229 100644 --- a/opendc-web/opendc-web-api/build.gradle.kts +++ b/opendc-web/opendc-web-api/build.gradle.kts @@ -32,7 +32,9 @@ dependencies { implementation(projects.opendcWeb.opendcWebProto) compileOnly(projects.opendcWeb.opendcWebUiQuarkusDeployment) /* Temporary fix for Quarkus/Gradle issues */ + compileOnly(projects.opendcWeb.opendcWebRunnerQuarkusDeployment) implementation(projects.opendcWeb.opendcWebUiQuarkus) + implementation(projects.opendcWeb.opendcWebRunnerQuarkus) implementation(libs.quarkus.kotlin) implementation(libs.quarkus.resteasy.core) -- cgit v1.2.3 From fb88cf197d9fe814e9692e7dafdc0d31b940acbc Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 18 May 2022 16:30:41 +0200 Subject: feat(web/api): Add initial server distribution This change adds a distribution that contains the OpenDC web server implementation based on Quarkus. This distribution should be used by advanced users that whish to deploy a custom OpenDC instance. --- opendc-web/opendc-web-api/build.gradle.kts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'opendc-web/opendc-web-api/build.gradle.kts') diff --git a/opendc-web/opendc-web-api/build.gradle.kts b/opendc-web/opendc-web-api/build.gradle.kts index a9392229..89b8273c 100644 --- a/opendc-web/opendc-web-api/build.gradle.kts +++ b/opendc-web/opendc-web-api/build.gradle.kts @@ -25,6 +25,7 @@ description = "REST API for the OpenDC website" /* Build configuration */ plugins { `quarkus-conventions` + distribution } dependencies { @@ -58,3 +59,30 @@ dependencies { testImplementation(libs.quarkus.test.security) testImplementation(libs.quarkus.jdbc.h2) } + +val createStartScripts by tasks.creating(CreateStartScripts::class) { + applicationName = "opendc-server" + mainClass.set("io.quarkus.bootstrap.runner.QuarkusEntryPoint") + classpath = files("lib/quarkus-run.jar") + outputDir = project.buildDir.resolve("scripts") +} + +distributions { + create("server") { + distributionBaseName.set("opendc-server") + + contents { + from("../../LICENSE.txt") + from("config") { + into("config") + } + + from(createStartScripts) { + into("bin") + } + from(tasks.quarkusBuild) { + into("lib") + } + } + } +} -- cgit v1.2.3