Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static void init(String username, String password, List<String> nodes) th
SshUtil.username = username;
SshUtil.password = password;
client = SshClient.setUpDefaultClient();
if (password != null && !Objects.equals(password, "")){
if (password != null && !Objects.equals(password, "")) {
client.addPasswordIdentity(password);
}
client.start();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package io.openchaos.common.utils;

import org.junit.Ignore;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;

import static org.junit.Assert.*;

@Ignore("Requires external SSH host; not part of automated test suite")
public class SshUtilTest {
static String user = "root";
static String password = "Yigeyy00";
Expand Down
25 changes: 19 additions & 6 deletions docker/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Based on the deprecated `https://github.com/tutumcloud/tutum-debian`
FROM debian:stretch
FROM debian:sid

# Set noninteractive to avoid tz/locale prompts
ENV DEBIAN_FRONTEND=noninteractive

# Install packages
RUN apt-get update && \
Expand All @@ -8,10 +11,20 @@ RUN apt-get update && \
openssh-server \
openjdk-8-jdk \
pwgen \
locales \
&& \
mkdir -p /var/run/sshd && \
sed -i "s/UsePrivilegeSeparation.*/UsePrivilegeSeparation no/g" /etc/ssh/sshd_config && \
sed -i "s/PermitRootLogin without-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
mkdir -p /var/run/sshd && \
sed -i "s/UsePrivilegeSeparation.*/UsePrivilegeSeparation no/g" /etc/ssh/sshd_config && \
sed -i "s/PermitRootLogin without-password/PermitRootLogin yes/g" /etc/ssh/sshd_config && \
# Configure UTF-8 locale
sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen en_US.UTF-8 && \
update-locale LANG=en_US.UTF-8

# Make sure locale is exported in all shells
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8

ENV AUTHORIZED_KEYS **None**

Expand All @@ -27,8 +40,8 @@ RUN apt-get update && apt-get install -y maven
RUN apt-get install -y \
sudo net-tools wget \
curl vim man faketime unzip less \
iptables iputils-ping logrotate && \
apt-get remove -y --purge --auto-remove systemd
iptables iputils-ping logrotate
# apt-get remove -y --purge --auto-remove systemd

EXPOSE 22
CMD ["/run.sh"]
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void start() {
try {
//Start broker
log.info("Node {} start broker...", node);
SshUtil.execCommandInDir(node, installDir, String.format("nohup sh bin/kafka-server-start.sh '%s' > broker.log 2>&1 &"
SshUtil.execCommandInDir(node, installDir, String.format("nohup bash bin/kafka-server-start.sh '%s' > broker.log 2>&1 &"
, configureFilePath));
} catch (Exception e) {
log.error("Node {} start kafka node failed", node, e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void start() {
try {
//Start zookeeper
log.info("Node {} start zookeeper...", node);
SshUtil.execCommandInDir(node, installDir, String.format("nohup sh bin/zookeeper-server-start.sh '%s' > zookeeper.log 2>&1 &"
SshUtil.execCommandInDir(node, installDir, String.format("nohup bash bin/zookeeper-server-start.sh '%s' > zookeeper.log 2>&1 &"
, configureFilePath));
} catch (Exception e) {
log.error("Node {} start zookeeper node failed", node, e);
Expand Down
18 changes: 11 additions & 7 deletions driver-rabbitmq/rabbitmq.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,23 @@ endToEndLatencyCheck: true

# Nodes for broker
nodes: # replace with ip or domain name, such as 192.168.0.2
- acloud
- n1
- n2
- n3
- n4
- n5

# RabbitMQ configuration
rabbitmqVersion: 3.8.35
installDir: /usr/local/rabbitmq-server-3.8.35 # you could set existent location for RabbitMQ
configureFilePath: /usr/local/rabbitmq-server-3.8.35/etc
rabbitmqVersion: 4.2.3
installDir: /usr/local/rabbitmq-server-4.2.3 # you could set existent location for RabbitMQ
configureFilePath: /usr/local/rabbitmq-server-4.2.3/etc

# RabbitMQ client configuration. Please add user root with password root
user: root
password: root

# RabbitMQ broker configuration
haMode : classic
haMode : classic # classic or quorum
haParms :
totalNodes : 3
nodes : 3
totalNodes : 5
nodes : 5
Loading