Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ public Create setAutoDelete(boolean autoDelete) {

private String getClusterUser() {
if (clusterUser == null) {
clusterUser = input("--cluster-user", "What is the cluster user?", "cluster-admin");
clusterUser = input("--cluster-user", "What is the cluster user?", ActiveMQDefaultConfiguration.getDefaultClusterUser());
}
return clusterUser;
}
Expand All @@ -451,7 +451,7 @@ protected void setClusterPassword(String clusterPassword) {

protected String getClusterPassword() {
if (clusterPassword == null) {
clusterPassword = inputPassword("--cluster-password", "What is the cluster password?", "password-admin");
clusterPassword = inputPassword("--cluster-password", "What is the cluster password?", ActiveMQDefaultConfiguration.getDefaultClusterPassword());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove the default argument on inputPassword, and throw an exception if not passed, and while in silent..

I have a branch with this suggestion:

https://github.com/clebertsuconic/artemis/tree/ARTEMIS-6037

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually already implemented that on my branch for ARTEMIS-6055. I'll close this PR and handle this as part of the general case for all passwords.

}
if (!PasswordMaskingUtil.isEncMasked(clusterPassword)) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ private static void createMirroredBackupServer(String serverName,
HelperCreate cliCreateServer = helperCreate();
cliCreateServer.setAllowAnonymous(true).setArtemisInstance(serverLocation);
cliCreateServer.setMessageLoadBalancing("ON_DEMAND");
cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", "--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", DC1_NODE);
cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", "--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", DC1_NODE, "--cluster-user", "my-cluster-user", "--cluster-password", "my-cluster-password");
cliCreateServer.setPortOffset(portOffset);
cliCreateServer.setClustered(true);
cliCreateServer.setReplicated(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ public static void createServers() throws Exception {

{
HelperCreate cliCreateServer = helperCreate();
cliCreateServer.setSharedStore(true).setBackup(false).setSharedStore(true).setDataFolder("./target/check-test/data").setFailoverOnShutdown(true).setStaticCluster("tcp://localhost:61716").setArtemisInstance(server0Location);
cliCreateServer.setSharedStore(true).setBackup(false).setSharedStore(true).setDataFolder("./target/check-test/data").setFailoverOnShutdown(true).setStaticCluster("tcp://localhost:61716").setArtemisInstance(server0Location).setArgs("--cluster-user", "my-cluster-user", "--cluster-password", "my-cluster-password");
cliCreateServer.createServer();
}

{
HelperCreate cliCreateServer = helperCreate();
cliCreateServer.setSharedStore(true).setBackup(true).setSharedStore(true).setDataFolder("./target/check-test/data").setFailoverOnShutdown(true).setStaticCluster("tcp://localhost:61616").setPortOffset(100).setArtemisInstance(server1Location);
cliCreateServer.setSharedStore(true).setBackup(true).setSharedStore(true).setDataFolder("./target/check-test/data").setFailoverOnShutdown(true).setStaticCluster("tcp://localhost:61616").setPortOffset(100).setArtemisInstance(server1Location).setArgs("--cluster-user", "my-cluster-user", "--cluster-password", "my-cluster-password");
cliCreateServer.createServer();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private static void createServer(String serverName, String connectionName, Strin
cliCreateServer.setClustered(true);
cliCreateServer.setNoWeb(true);
cliCreateServer.setStaticCluster(clusterURI);
cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", "--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", DC1_NODE_A);
cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", "--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", DC1_NODE_A, "--cluster-user", "my-cluster-user", "--cluster-password", "my-cluster-password");
cliCreateServer.addArgs("--addresses", "order");
cliCreateServer.addArgs("--queues", "myQueue");
cliCreateServer.setPortOffset(portOffset);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private static void createMirroredServer(boolean paging, String serverName,

HelperCreate cliCreateServer = helperCreate();
cliCreateServer.setAllowAnonymous(true).setArtemisInstance(serverLocation);
cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", "--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", DC1_NODE);
cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", "--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", DC1_NODE, "--cluster-user", "my-cluster-user", "--cluster-password", "my-cluster-password");
cliCreateServer.addArgs("--queues", QUEUE_NAME);
cliCreateServer.setPortOffset(portOffset);
if (replicated) {
Expand Down Expand Up @@ -234,7 +234,7 @@ private static void createMirroredBackupServer(boolean paging, String serverName
HelperCreate cliCreateServer = helperCreate();
cliCreateServer.setAllowAnonymous(true).setArtemisInstance(serverLocation);
cliCreateServer.setMessageLoadBalancing("ON_DEMAND");
cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", "--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", DC1_NODE);
cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", "--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--name", DC1_NODE, "--cluster-user", "my-cluster-user", "--cluster-password", "my-cluster-password");
cliCreateServer.setPortOffset(portOffset);
cliCreateServer.setClustered(true);
cliCreateServer.setReplicated(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static void createServers() throws Exception {

cliCreateServer.setMessageLoadBalancing("OFF_WITH_REDISTRIBUTION");
cliCreateServer.setStaticCluster(staticClusterURI);
cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", "--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1");
cliCreateServer.setArgs("--no-stomp-acceptor", "--no-hornetq-acceptor", "--no-mqtt-acceptor", "--no-amqp-acceptor", "--max-hops", "1", "--cluster-user", "my-cluster-user", "--cluster-password", "my-cluster-password");

cliCreateServer.createServer();

Expand Down