Commit ecf5edea authored by Daniel Seybold's avatar Daniel Seybold

removed deprecated maki-manager from source code and build entities

parent 4e6dbcb6
Pipeline #92910 passed with stage
in 21 minutes and 54 seconds
......@@ -63,9 +63,6 @@ RUN cd /opt/evaluation-orchestrator/lib/workload-API-client ; mvn clean install
RUN cd /opt/evaluation-orchestrator/lib/ ; git clone https://omi-gitlab.e-technik.uni-ulm.de/mowgli/dbms-catalogue-client.git
RUN cd /opt/evaluation-orchestrator/lib/dbms-catalogue-client ; mvn clean install -DskipTests
# Download and build maki-manager-client
RUN cd /opt/evaluation-orchestrator/lib/ ; git clone https://omi-gitlab.e-technik.uni-ulm.de/mowgli/maki-manager-client
RUN cd /opt/evaluation-orchestrator/lib/maki-manager-client ; mvn clean install -DskipTests
# install maven deps
RUN cd /opt/evaluation-orchestrator/ ; mvn clean install
......
......@@ -20,7 +20,6 @@ Install required software:
- Maven
- [Workload-API-client](https://omi-gitlab.e-technik.uni-ulm.de/mowgli/workload-API-client)
- [DBMS-Catalogue-client](https://omi-gitlab.e-technik.uni-ulm.de/mowgli/dbms-catalogue-client)
- [Maki-Manager-client](https://omi-gitlab.e-technik.uni-ulm.de/mowgli/maki-manager-client)
Add the endpoints of the required services in the properties file:
......
......@@ -184,12 +184,6 @@
<version>1.0.0</version>
</dependency>
<!-- MakiExecutor Manager client -->
<dependency>
<groupId>de.uulm.omi.mowgli.maki</groupId>
<artifactId>maki-manager-client</artifactId>
<version>1.0.0</version>
</dependency>
<!-- Cloudiator dependencies -->
......
package de.uulm.omi.evaluation.jungle;
import com.google.common.io.CharStreams;
import com.jcraft.jsch.ChannelExec;
import com.jcraft.jsch.JSch;
import com.jcraft.jsch.JSchException;
import com.jcraft.jsch.Session;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Created by Daniel Seybold on 21.08.2019.
*/
public class MakiExecutor {
private static final Logger LOGGER = LoggerFactory.getLogger(MakiExecutor.class);
private static String MAKI_SECRET = "TopSecret";
private static String USER = "ubuntu";
private static int PORT = 22;
private Session makiSession;
public MakiExecutor(String privateKey, String publicKey, String enpoint){
JSch jsch = new JSch();
try {
jsch.addIdentity("maki_rsa", privateKey.getBytes(), publicKey.getBytes(), MAKI_SECRET.getBytes());
makiSession = jsch.getSession(USER, enpoint, PORT);
makiSession.setConfig("StrictHostKeyChecking", "no");
makiSession.connect();
LOGGER.debug("MakiExecutor session connected!");
} catch (JSchException e) {
LOGGER.error("Error while adding identity!" , e);
}
}
public String execute(String command){
String result = null;
ChannelExec channel = null;
try {
channel = (ChannelExec) makiSession.openChannel("exec");
channel.setInputStream(null);
InputStream output = channel.getInputStream();
channel.setErrStream(System.err);
channel.setCommand(command);
channel.connect();
result = CharStreams.toString(new InputStreamReader(output));
channel.disconnect();
LOGGER.debug("The remote clusterState command is: " + result);
} catch (JSchException e) {
LOGGER.error("Error while executing ssh command!", e);
} catch (IOException e) {
LOGGER.error("Error while reading ssh result!", e);
}
return result;
}
public void close(){
makiSession.disconnect();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment