Skip to content

Commit

Permalink
[CMTOOL-336] JBoss EAP XP5 Server Migration Support
Browse files Browse the repository at this point in the history
  • Loading branch information
emmartins committed Feb 2, 2024
1 parent 588bcfe commit 482b43b
Show file tree
Hide file tree
Showing 11 changed files with 154 additions and 125 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,19 @@ public interface JBossExtensionNames {
String METRICS = "org.wildfly.extension.metrics";
String MESSAGING = "org.jboss.as.messaging";
String MESSAGING_ACTIVEMQ = "org.wildfly.extension.messaging-activemq";
String MICROMETER = "org.wildfly.extension.micrometer";
String MICROPROFILE_CONFIG_SMALLRYE = "org.wildfly.extension.microprofile.config-smallrye";
String MICROPROFILE_FAULT_TOLERANCE_SMALLRYE = "org.wildfly.extension.microprofile.fault-tolerance-smallrye";
String MICROPROFILE_HEALTH_SMALLRYE = "org.wildfly.extension.microprofile.health-smallrye";
String MICROPROFILE_JWT_SMALLRYE = "org.wildfly.extension.microprofile.jwt-smallrye";
String MICROPROFILE_LRA_COORDINATOR = "org.wildfly.extension.microprofile.lra-coordinator";
String MICROPROFILE_LRA_PARTICIPANT = "org.wildfly.extension.microprofile.lra-participant";
String MICROPROFILE_METRICS_SMALLRYE = "org.wildfly.extension.microprofile.metrics-smallrye";
String MICROPROFILE_OPENAPI_SMALLRYE = "org.wildfly.extension.microprofile.openapi-smallrye";
String MICROPROFILE_OPENTRACING_SMALLRYE = "org.wildfly.extension.microprofile.opentracing-smallrye";
String MICROPROFILE_REACTIVE_MESSAGING_SMALLRYE = "org.wildfly.extension.microprofile.reactive-messaging-smallrye";
String MICROPROFILE_REACTIVE_STREAMS_OPERATORS_SMALLRYE = "org.wildfly.extension.microprofile.reactive-streams-operators-smallrye";
String MICROPROFILE_TELEMETRY = "org.wildfly.extension.microprofile.telemetry";
String MODCLUSTER = "org.jboss.as.modcluster";
String NAMING = "org.jboss.as.naming";
String OPENTELEMETRY = "org.wildfly.extension.opentelemetry";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,11 @@ public interface JBossExtensions {
.subsystem(JBossSubsystemNames.MESSAGING_ACTIVEMQ)
.build();

Extension MICROMETER = Extension.builder()
.module(JBossExtensionNames.MICROMETER)
.subsystem(Subsystem.builder().name(JBossSubsystemNames.MICROMETER).namespaceWithoutVersion("urn:wildfly:"+JBossSubsystemNames.MICROMETER))
.build();

Extension MICROPROFILE_CONFIG_SMALLRYE = Extension.builder()
.module(JBossExtensionNames.MICROPROFILE_CONFIG_SMALLRYE)
.subsystem(Subsystem.builder().name(JBossSubsystemNames.MICROPROFILE_CONFIG_SMALLRYE).namespaceWithoutVersion("urn:wildfly:"+JBossSubsystemNames.MICROPROFILE_CONFIG_SMALLRYE))
Expand All @@ -223,6 +228,16 @@ public interface JBossExtensions {
.subsystem(Subsystem.builder().name(JBossSubsystemNames.MICROPROFILE_JWT_SMALLRYE).namespaceWithoutVersion("urn:wildfly:"+JBossSubsystemNames.MICROPROFILE_JWT_SMALLRYE))
.build();

Extension MICROPROFILE_LRA_COORDINATOR = Extension.builder()
.module(JBossExtensionNames.MICROPROFILE_LRA_COORDINATOR)
.subsystem(Subsystem.builder().name(JBossSubsystemNames.MICROPROFILE_LRA_COORDINATOR).namespaceWithoutVersion("urn:wildfly:"+JBossSubsystemNames.MICROPROFILE_LRA_COORDINATOR))
.build();

Extension MICROPROFILE_LRA_PARTICIPANT = Extension.builder()
.module(JBossExtensionNames.MICROPROFILE_LRA_PARTICIPANT)
.subsystem(Subsystem.builder().name(JBossSubsystemNames.MICROPROFILE_LRA_PARTICIPANT).namespaceWithoutVersion("urn:wildfly:"+JBossSubsystemNames.MICROPROFILE_LRA_PARTICIPANT))
.build();

Extension MICROPROFILE_METRICS_SMALLRYE = Extension.builder()
.module(JBossExtensionNames.MICROPROFILE_METRICS_SMALLRYE)
.subsystem(Subsystem.builder().name(JBossSubsystemNames.MICROPROFILE_METRICS_SMALLRYE).namespaceWithoutVersion("urn:wildfly:"+JBossSubsystemNames.MICROPROFILE_METRICS_SMALLRYE))
Expand All @@ -248,6 +263,11 @@ public interface JBossExtensions {
.subsystem(Subsystem.builder().name(JBossSubsystemNames.MICROPROFILE_REACTIVE_STREAMS_OPERATORS_SMALLRYE).namespaceWithoutVersion("urn:wildfly:"+JBossSubsystemNames.MICROPROFILE_REACTIVE_STREAMS_OPERATORS_SMALLRYE))
.build();

Extension MICROPROFILE_TELEMETRY = Extension.builder()
.module(JBossExtensionNames.MICROPROFILE_TELEMETRY)
.subsystem(Subsystem.builder().name(JBossSubsystemNames.MICROPROFILE_TELEMETRY).namespaceWithoutVersion("urn:wildfly:"+JBossSubsystemNames.MICROPROFILE_TELEMETRY))
.build();

Extension MODCLUSTER = Extension.builder()
.module(JBossExtensionNames.MODCLUSTER)
.subsystem(JBossSubsystemNames.MODCLUSTER)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,20 @@ public interface JBossSubsystemNames {
String METRICS = "metrics";
String MESSAGING = "messaging";
String MESSAGING_ACTIVEMQ = "messaging-activemq";
String MICROMETER = "micrometer";
String MICROPROFILE_CONFIG_SMALLRYE = "microprofile-config-smallrye";
String MICROPROFILE_FAULT_TOLERANCE_SMALLRYE = "microprofile-fault-tolerance-smallrye";
String MICROPROFILE_HEALTH_SMALLRYE = "microprofile-health-smallrye";
String MICROPROFILE_JWT_SMALLRYE = "microprofile-jwt-smallrye";
String MICROPROFILE_LRA_COORDINATOR = "microprofile-lra-coordinator";
String MICROPROFILE_LRA_PARTICIPANT = "microprofile-lra-participant";
String MICROPROFILE_METRICS_SMALLRYE = "microprofile-metrics-smallrye";
String MICROPROFILE_OPENAPI_SMALLRYE = "microprofile-openapi-smallrye";
String MICROPROFILE_OPENTRACING_SMALLRYE = "microprofile-opentracing-smallrye";
String MICROPROFILE_REACTIVE_MESSAGING_SMALLRYE = "microprofile-reactive-messaging-smallrye";
String MICROPROFILE_REACTIVE_STREAMS_OPERATORS_SMALLRYE = "microprofile-reactive-streams-operators-smallrye";
String MICROPROFILE_TELEMETRY = "microprofile-telemetry";

String MODCLUSTER = "modcluster";
String NAMING = "naming";
String OPENTELEMETRY = "opentelemetry";
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@

import org.jboss.migration.eap.EAPXPServer7_4;
import org.jboss.migration.eap.EAPXPServerMigrationProvider8_0;
import org.jboss.migration.eap.task.hostexclude.EAP8_0AddHostExcludes;
import org.jboss.migration.eap.task.hostexclude.EAPXP8_0AddHostExcludes;
import org.jboss.migration.eap.task.subsystem.jgroups.EAP7_2ToEAP8_0UpdateJGroupsSubsystem;
import org.jboss.migration.eap.task.subsystem.metrics.MigrateMicroprofileMetricsSmallryeSubsystem;
import org.jboss.migration.eap.task.subsystem.opentracing.MigrateMicroprofileOpentracingSmallryeSubsystem;
import org.jboss.migration.wfly.task.paths.WildFly26_0MigrateReferencedPaths;
import org.jboss.migration.wfly.task.security.LegacySecurityConfigurationMigration;
import org.jboss.migration.wfly.task.subsystem.keycloak.MigrateKeycloakSubsystem;
Expand All @@ -29,6 +31,7 @@
import org.jboss.migration.wfly10.WildFlyServer10;
import org.jboss.migration.wfly10.WildFlyServerMigration10;
import org.jboss.migration.wfly10.config.task.module.MigrateReferencedModules;
import org.jboss.migration.wfly10.config.task.update.MigrateDeployments;
import org.jboss.migration.wfly10.config.task.update.RemoveUnsupportedExtensions;
import org.jboss.migration.wfly10.config.task.update.RemoveUnsupportedSubsystems;
import org.jboss.migration.wfly10.config.task.update.ServerUpdate;
Expand All @@ -51,14 +54,17 @@ public WildFlyServerMigration10 getServerMigration() {
.subtask(new RemoveUnsupportedSubsystems<>())
.subtask(new MigrateReferencedModules<>())
.subtask(new WildFly26_0MigrateReferencedPaths<>())
.subtask(legacySecurityConfigurationMigration.getRemoveLegacySecurityRealms())
.subtask(new WildFly26_0MigrateVault<>())
.subtask(new EAP7_2ToEAP8_0UpdateJGroupsSubsystem<>())
.subtask(legacySecurityConfigurationMigration.getRemoveLegacySecurityRealms())
.subtask(legacySecurityConfigurationMigration.getEnsureBasicElytronSubsystem())
.subtask(legacySecurityConfigurationMigration.getMigrateLegacySecurityRealmsToElytron())
.subtask(legacySecurityConfigurationMigration.getMigrateLegacySecurityDomainsToElytron())
.subtask(new MigratePicketLinkSubsystem<>())
.subtask(new MigrateKeycloakSubsystem<>())
.subtask(new MigrateMicroprofileMetricsSmallryeSubsystem<>())
.subtask(new MigrateMicroprofileOpentracingSmallryeSubsystem<>())
.subtask(new MigrateDeployments<>())
)
.domain(serverUpdateBuilders.domainBuilder()
.domainConfigurations(serverUpdateBuilders.domainConfigurationBuilder()
Expand All @@ -68,13 +74,17 @@ public WildFlyServerMigration10 getServerMigration() {
.subtask(new RemoveUnsupportedSubsystems<>())
.subtask(new MigrateReferencedModules<>())
.subtask(new WildFly26_0MigrateReferencedPaths<>())
.subtask(new EAP8_0AddHostExcludes<>())
.subtask(legacySecurityConfigurationMigration.getRemoveLegacySecurityRealms())
.subtask(new EAPXP8_0AddHostExcludes<>())
.subtask(new EAP7_2ToEAP8_0UpdateJGroupsSubsystem<>())
.subtask(legacySecurityConfigurationMigration.getEnsureBasicElytronSubsystem())
.subtask(legacySecurityConfigurationMigration.getMigrateLegacySecurityRealmsToElytron())
.subtask(legacySecurityConfigurationMigration.getMigrateLegacySecurityDomainsToElytron())
.subtask(new MigratePicketLinkSubsystem<>())
.subtask(new MigrateKeycloakSubsystem<>())
.subtask(new MigrateMicroprofileMetricsSmallryeSubsystem<>())
.subtask(new MigrateMicroprofileOpentracingSmallryeSubsystem<>())
.subtask(new MigrateDeployments<>())
)
.hostConfigurations(serverUpdateBuilders.hostConfigurationBuilder()
.subtask(new WildFly27_0MigrateJBossDomainProperties<>())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected Server constructServer(String migrationName, ProductInfo productInfo,
}

protected boolean isXp(Path baseDir) {
if (Files.exists(baseDir.resolve(".installation").resolve("jboss-eap-xp-4.0.conf"))) {
if (Files.exists(baseDir.resolve(".installation").resolve("jboss-eap-xp-5.0.conf"))) {
return true;
}
// fallback for internal XP builds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,21 @@ public class EAPXPServer8_0 extends WildFlyServer10 {

public static final Extensions EXTENSIONS = Extensions.builder()
.extensions(EAPServer8_0.EXTENSIONS)
.extension(JBossExtensions.MICROMETER)
.extension(JBossExtensions.MICROPROFILE_CONFIG_SMALLRYE)
.extension(JBossExtensions.MICROPROFILE_FAULT_TOLERANCE_SMALLRYE)
.extension(JBossExtensions.MICROPROFILE_HEALTH_SMALLRYE)
.extension(JBossExtensions.MICROPROFILE_JWT_SMALLRYE)
// workaround for issue with migrate ops
.extension(JBossExtensions.MICROPROFILE_METRICS_SMALLRYE)
.extension(JBossExtensions.MICROPROFILE_LRA_COORDINATOR)
.extension(JBossExtensions.MICROPROFILE_LRA_PARTICIPANT)
.extension(JBossExtensions.MICROPROFILE_OPENAPI_SMALLRYE)
.extension(JBossExtensions.MICROPROFILE_OPENTRACING_SMALLRYE)
.extension(JBossExtensions.MICROPROFILE_REACTIVE_MESSAGING_SMALLRYE)
.extension(JBossExtensions.MICROPROFILE_REACTIVE_STREAMS_OPERATORS_SMALLRYE)
.extension(JBossExtensions.MICROPROFILE_TELEMETRY)
.extension(JBossExtensions.OPENTELEMETRY)
.build();

public EAPXPServer8_0(String migrationName, ProductInfo productInfo, Path baseDir, MigrationEnvironment migrationEnvironment) {
Expand Down
Loading

0 comments on commit 482b43b

Please sign in to comment.