You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2022/02/25 16:16:57 UTC
[incubator-streampipes] branch dev updated: [hotfix] Delay auto installation to make sure extensions service are running
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new 585ecf8 [hotfix] Delay auto installation to make sure extensions service are running
585ecf8 is described below
commit 585ecf88b967e65d8cdb8c00591ea04671630334
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Fri Feb 25 17:16:46 2022 +0100
[hotfix] Delay auto installation to make sure extensions service are running
---
.../streampipes/backend/StreamPipesBackendApplication.java | 11 +++++++++--
.../streampipes/manager/setup/InstallationConfiguration.java | 9 ++++++++-
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/streampipes-backend/src/main/java/org/apache/streampipes/backend/StreamPipesBackendApplication.java b/streampipes-backend/src/main/java/org/apache/streampipes/backend/StreamPipesBackendApplication.java
index 62a21ea..b711011 100644
--- a/streampipes-backend/src/main/java/org/apache/streampipes/backend/StreamPipesBackendApplication.java
+++ b/streampipes-backend/src/main/java/org/apache/streampipes/backend/StreamPipesBackendApplication.java
@@ -118,8 +118,15 @@ public class StreamPipesBackendApplication extends StreamPipesServiceBase {
LOG.info("We will perform the initial setup, grab some coffee and cross your fingers ;-)...");
BackendConfig.INSTANCE.updateSetupStatus(true);
- new AutoInstallation().startAutoInstallation();
- BackendConfig.INSTANCE.updateSetupStatus(false);
+ LOG.info("Auto-setup will start in 10 seconds to make sure extensions services are running...");
+ try {
+ TimeUnit.SECONDS.sleep(10);
+ LOG.info("Starting installation procedure");
+ new AutoInstallation().startAutoInstallation();
+ BackendConfig.INSTANCE.updateSetupStatus(false);
+ } catch (InterruptedException e) {
+ LOG.error("Ooops, something went wrong during the installation", e);
+ }
}
private void schedulePipelineStart(Pipeline pipeline, boolean restartOnReboot) {
diff --git a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/setup/InstallationConfiguration.java b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/setup/InstallationConfiguration.java
index b4549cd..7ada710 100644
--- a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/setup/InstallationConfiguration.java
+++ b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/setup/InstallationConfiguration.java
@@ -21,12 +21,16 @@ package org.apache.streampipes.manager.setup;
import org.apache.streampipes.manager.endpoint.EndpointFetcher;
import org.apache.streampipes.model.client.endpoint.ExtensionsServiceEndpoint;
import org.apache.streampipes.model.client.setup.InitialSettings;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.List;
public class InstallationConfiguration {
+ private static final Logger LOG = LoggerFactory.getLogger(InstallationConfiguration.class);
+
public static List<InstallationStep> getInstallationSteps(InitialSettings settings)
{
List<InstallationStep> steps = new ArrayList<>();
@@ -40,7 +44,10 @@ public class InstallationConfiguration {
settings.getInitialAdminUserSid()));
if (settings.getInstallPipelineElements()) {
- for(ExtensionsServiceEndpoint endpoint : new EndpointFetcher().getEndpoints()) {
+ List<ExtensionsServiceEndpoint> endpoints = new EndpointFetcher().getEndpoints();
+ LOG.info("Found {} endpoints from which we will install extensions.", endpoints.size());
+ LOG.info("Further available extensions can always be installed by navigating to the 'Install pipeline elements' view");
+ for (ExtensionsServiceEndpoint endpoint : endpoints) {
steps.add(new PipelineElementInstallationStep(endpoint, settings.getInitialAdminUserSid()));
}
}