-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from overture-stack/rc/0.16.0
release 0.16.0 remove facebook remove stub commands dms ui branding image and text skip waiting ego ui container to stop pass sso providers to dms ui create assets directory in the wrapper script upgrade ego ui, ego, dms-ui, arranger
- Loading branch information
Showing
48 changed files
with
448 additions
and
312 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 0 additions & 49 deletions
49
src/main/java/bio/overture/dms/cli/command/cluster/ClusterApplyCommand.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 32 additions & 8 deletions
40
src/main/java/bio/overture/dms/cli/command/cluster/ClusterStartCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,49 @@ | ||
package bio.overture.dms.cli.command.cluster; | ||
|
||
import bio.overture.dms.cli.DmsConfigStore; | ||
import bio.overture.dms.cli.terminal.Terminal; | ||
import bio.overture.dms.cli.util.VersionProvider; | ||
import bio.overture.dms.compose.deployment.DmsComposeManager; | ||
import java.util.concurrent.Callable; | ||
import lombok.NonNull; | ||
import lombok.val; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Component; | ||
import picocli.CommandLine.Command; | ||
import picocli.CommandLine.Option; | ||
|
||
@Component | ||
@Command( | ||
name = "start", | ||
mixinStandardHelpOptions = true, | ||
versionProvider = VersionProvider.class, | ||
description = "Start an existing cluster") | ||
description = "Deploy a configuration to the cluster") | ||
public class ClusterStartCommand implements Callable<Integer> { | ||
|
||
@Option( | ||
names = {"--skip-ego-init"}, | ||
required = false, | ||
description = "Skip Ego initialization") | ||
private boolean skipEgoInit = false; | ||
private final Terminal t; | ||
private final DmsComposeManager dmsComposeManager; | ||
private final DmsConfigStore dmsConfigStore; | ||
|
||
@Autowired | ||
public ClusterStartCommand( | ||
@NonNull Terminal terminal, | ||
@NonNull DmsComposeManager dmsComposeManager, | ||
@NonNull DmsConfigStore dmsConfigStore) { | ||
this.dmsComposeManager = dmsComposeManager; | ||
this.t = terminal; | ||
this.dmsConfigStore = dmsConfigStore; | ||
} | ||
|
||
@Override | ||
public Integer call() throws Exception { | ||
return 0; | ||
val result = dmsConfigStore.findStoredConfig(); | ||
if (result.isPresent()) { | ||
t.printStatusLn("Starting deployment..."); | ||
dmsComposeManager.deploy(result.get()); | ||
t.printStatusLn("Deployment completed successfully"); | ||
return 0; | ||
} | ||
|
||
t.printErrorLn("Could not find DMS configuration: %s", dmsConfigStore.getDmsConfigFilePath()); | ||
return 1; | ||
} | ||
} |
40 changes: 38 additions & 2 deletions
40
src/main/java/bio/overture/dms/cli/command/cluster/ClusterStopCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,54 @@ | ||
package bio.overture.dms.cli.command.cluster; | ||
|
||
import bio.overture.dms.cli.DmsConfigStore; | ||
import bio.overture.dms.cli.terminal.Terminal; | ||
import bio.overture.dms.cli.util.VersionProvider; | ||
import java.util.concurrent.Callable; | ||
|
||
import bio.overture.dms.compose.deployment.DmsComposeManager; | ||
import lombok.Builder; | ||
import lombok.NonNull; | ||
import lombok.val; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Component; | ||
import picocli.CommandLine.Command; | ||
|
||
@Component | ||
@Command( | ||
name = "stop", | ||
mixinStandardHelpOptions = true, | ||
versionProvider = VersionProvider.class, | ||
description = "Stop a running cluster") | ||
description = "Stop a running cluster, without deleting data volumes") | ||
public class ClusterStopCommand implements Callable<Integer> { | ||
|
||
/** Dependencies */ | ||
private final Terminal t; | ||
|
||
private final DmsComposeManager dmsComposeManager; | ||
private final DmsConfigStore dmsConfigStore; | ||
|
||
@Builder | ||
@Autowired | ||
public ClusterStopCommand( | ||
@NonNull Terminal terminal, | ||
@NonNull DmsComposeManager dmsComposeManager, | ||
@NonNull DmsConfigStore dmsConfigStore) { | ||
this.t = terminal; | ||
this.dmsComposeManager = dmsComposeManager; | ||
this.dmsConfigStore = dmsConfigStore; | ||
} | ||
|
||
@Override | ||
public Integer call() throws Exception { | ||
return 0; | ||
val result = dmsConfigStore.findStoredConfig(); | ||
if (result.isPresent()) { | ||
t.printStatusLn( | ||
"Stopping cluster.."); | ||
dmsComposeManager.destroy(result.get(), false); | ||
t.printStatusLn("Finished stopping cluster"); | ||
return 0; | ||
} | ||
t.printErrorLn("Could not find DMS configuration: %s", dmsConfigStore.getDmsConfigFilePath()); | ||
return 1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/java/bio/overture/dms/cli/question/validation/EmailValidator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package bio.overture.dms.cli.question.validation; | ||
|
||
import java.util.List; | ||
import java.util.regex.Pattern; | ||
|
||
public class EmailValidator implements QuestionValidator<String> { | ||
|
||
public static final Pattern VALID_EMAIL_ADDRESS_REGEX = | ||
Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE); | ||
|
||
@Override | ||
public List<String> getErrorMessages(String val) { | ||
if (VALID_EMAIL_ADDRESS_REGEX.matcher(val).matches()) { | ||
return null; | ||
} | ||
return List.of("The provided value is not a valid email"); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/bio/overture/dms/cli/question/validation/FileValidator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package bio.overture.dms.cli.question.validation; | ||
|
||
import lombok.val; | ||
|
||
import java.io.File; | ||
import java.util.List; | ||
|
||
public class FileValidator implements QuestionValidator<String> { | ||
|
||
@Override | ||
public List<String> getErrorMessages(String path) { | ||
try { | ||
val fileExists = new File(path).exists(); | ||
if (fileExists) return null; | ||
return List.of("File not found"); | ||
} catch (Exception e) { | ||
return List.of("Couldn't check the provided file"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.