Commit 8923a65b authored by Rita Sousa's avatar Rita Sousa

Added dataclay submodule, removed code not needed and updated README

parent 036ff4e5
[submodule "dataclay"]
path = dataclay
url = https://gitlab.bsc.es/elastic-h2020/elastic-sa/nfr-tool/dataclay.git
......@@ -52,6 +52,7 @@ cd ..
```
to update some files with the necessary configurations to create the fake Workers.
Go to nfrtool-time-and-energy/ directory.
Start the dataClay, destroying any dataClay instance that could be active.
If this Node is the **"master"** node, run:
......@@ -68,7 +69,7 @@ docker-compose -f dataclay-backend-docker-compose.yml up --build
**NOTE:** dcinitializer should only start when all dataClay nodes are up!
Then start the Global Resource Manager and the NFR Tools on the different Nodes, executing:
Then start the Global Resource Manager, wait for the dcinitializer to finish, and start the NFR Tools on the different Nodes, executing:
```
docker-compose down -v
docker-compose up --build
......
<factorypath>
<factorypathentry kind="VARJAR" id="M2_REPO/es/bsc/compss/nfrtool-dataclay-stubs/2.0/nfrtool-dataclay-stubs-2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/es/bsc/dataclay/dataclay/2.1/dataclay-2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/es/bsc/dataclay/dataclay/2.5.1/dataclay-2.5.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/grpc/grpc-netty-shaded/1.25.0/grpc-netty-shaded-1.25.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/grpc/grpc-core/1.25.0/grpc-core-1.25.0.jar" enabled="true" runInBatchMode="false"/>
......@@ -24,14 +23,13 @@
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/api/grpc/proto-google-common-protos/1.12.0/proto-google-common-protos-1.12.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/grpc/grpc-protobuf-lite/1.25.0/grpc-protobuf-lite-1.25.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/grpc/grpc-stub/1.25.0/grpc-stub-1.25.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/postgresql/postgresql/9.4.1212/postgresql-9.4.1212.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm/7.2/asm-7.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm-commons/7.2/asm-commons-7.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm-analysis/7.2/asm-analysis-7.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm-tree/7.2/asm-tree-7.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm-analysis/7.2/asm-analysis-7.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm-util/7.2/asm-util-7.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-api/2.11.0/log4j-api-2.11.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-core/2.11.0/log4j-core-2.11.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-core/2.13.3/log4j-core-2.13.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-api/2.13.3/log4j-api-2.13.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.10.0/jackson-databind-2.10.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.10.0/jackson-annotations-2.10.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.10.0/jackson-core-2.10.0.jar" enabled="true" runInBatchMode="false"/>
......@@ -43,18 +41,11 @@
<factorypathentry kind="VARJAR" id="M2_REPO/org/xerial/sqlite-jdbc/3.21.0.1/sqlite-jdbc-3.21.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/persistence/javax.persistence-api/2.2/javax.persistence-api-2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/aspectj/aspectjrt/1.9.4/aspectjrt-1.9.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/aspectj/aspectjtools/1.9.4/aspectjtools-1.9.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/es/bsc/dataclay/extrae/3.6.1/extrae-3.6.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/reflections/reflections/0.9.11/reflections-0.9.11.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/javassist/javassist/3.21.0-GA/javassist-3.21.0-GA.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/ibm/wala/com.ibm.wala.shrike/1.5.0/com.ibm.wala.shrike-1.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/ibm/wala/com.ibm.wala.core/1.5.0/com.ibm.wala.core-1.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/ibm/wala/com.ibm.wala.cast/1.5.0/com.ibm.wala.cast-1.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/ibm/wala/com.ibm.wala.cast.java/1.5.0/com.ibm.wala.cast.java-1.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/ibm/wala/com.ibm.wala.util/1.5.0/com.ibm.wala.util-1.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/ibm/wala/com.ibm.wala.cast.java.ecj/1.5.0/com.ibm.wala.cast.java.ecj-1.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/eclipse/jdt/org.eclipse.jdt.core/3.10.0/org.eclipse.jdt.core-3.10.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/json/json/20190722/json-20190722.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/rabbitmq/amqp-client/5.10.0/amqp-client-5.10.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/eclipse/paho/org.eclipse.paho.client.mqttv3/1.2.0/org.eclipse.paho.client.mqttv3-1.2.0.jar" enabled="true" runInBatchMode="false"/>
</factorypath>
......@@ -18,10 +18,6 @@ ENV DC_SHARED_VOLUME=${DC_SHARED_VOLUME} \
STUBSPATH=${DEFAULT_STUBS_PATH} \
STUBS_JAR=${DEFAULT_STUBS_JAR}
#PIDS_TO_MONITOR=${PIDS_TO_MONITOR}
#sed '/ENV WORKING_DIR/s/$/\nARG PIDS_TO_MONITOR=123 456 678/' app/Dockerfile
#sed '3s/$/\nARG PIDS_TO_MONITOR=123 456 678/' app/Dockerfile
WORKDIR ${WORKING_DIR}
# Install maven:
......
Account=xavier-rit
Account=cister
Password=defaultPass
DataSets=defaultDS
DataSetForStore=defaultDS
......
......@@ -27,16 +27,5 @@ RUN gcc fakethreadworker.c -o fakeworker4 -lpthread
RUN [ "sh", "-c", "echo ${fakeWorker}" ]
CMD ["sh", "-c", "./fakeworker${fakeWorker}"]
#FROM alpine as build-env
#RUN apk add --no-cache build-base
#WORKDIR /app
#COPY . .
#RUN gcc -o fakeworker1 fakeworker.c
#FROM alpine
#COPY --from=build-env /app/fakeworker1 /app/fakeworker1
#
#WORKDIR /app
#CMD ["app/fakeworker1"]
......@@ -40,7 +40,6 @@ public class DataclayWritingManager implements Runnable{
private List<Worker> workerList;
private ActiveWorkersMap activeWorkers;
private List<String> idContainers;
//private static final String BASE_GET_URL = "http://192.168.60.68:5555/containers/";
private static final String BASE_GET_URL = "http://localhost/containers/";
private static final String USER_AGENT = "Mozilla/5.0";
......@@ -53,13 +52,9 @@ public class DataclayWritingManager implements Runnable{
public void run() {
while (!Thread.interrupted()) {
// Endpoint API: get /containers/{id}/stats
// stream=false: output once
//
Map<String, String> workersIpAndIdContainer = new HashMap<>();
try{
// TODO: Ter uma lista com os pids ativos e só quando houver alterações é que vamos bucar os IDs
for (Worker w : workerList) {
if (w.isActive()){
workersIpAndIdContainer.put(w.getIp(),"");
......
......@@ -29,7 +29,6 @@ import java.net.UnknownHostException;
import es.bsc.dataclay.api.DataClay;
import es.bsc.compss.nfr.model.*;
//import es.bsc.compss.nfr.model.ElasticSystem;
import es.bsc.dataclay.exceptions.metadataservice.ObjectNotRegisteredException;
import java.util.ArrayList;
......@@ -296,8 +295,7 @@ public class NFRTool {
String mode = null;
String localIP = null;
String version = "x86_64";
String URI_RABBITMQ = null;
energyThreshold = ENERGY_THRESHOLD;
energyThreshold = ENERGY_THRESHOLD;
cpuThreshold = CPU_THRESHOLD;
if (args.length < 1) {
......@@ -324,11 +322,6 @@ public class NFRTool {
String arg = args[argIndex++];
if (arg.equals("RABBITMQ_HOST")){
String value = System.getenv(arg);
System.out.println("CONSEGUI RECEBER O URI");
System.out.println(value);
}
if (arg.equals("--mode")) {
mode = args[argIndex++];
System.out.println("NFR Tool running in " + mode + " mode.");
......@@ -427,53 +420,12 @@ public class NFRTool {
metricsActiveWorkersList);
Thread dwmThread = new Thread(dataClayWritingManager, "Dataclay Writing Manager");
//rmThread.start();
tmThread.start();
emThread.start();
// awmThread.start();
//awmThread.start();
dwmThread.start();
/*Thread.sleep(7000);
app.setSecurity(false);
System.out.println("METI A APP NÃO SEGURA");
Thread.sleep(7000);
app.setSecurity(true);
System.out.println("METI A APP SEGURA");
Thread.sleep(10000);
app.setSecurity(false);
System.out.println("METI A APP NÃO SEGURA");
Thread.sleep(5000);
app.setSecurity(true);
System.out.println("METI A APP SEGURA");
Thread.sleep(10000);
app.setSecurity(false);
System.out.println("METI A APP NÃO SEGURA");
Thread.sleep(5000);
app.setSecurity(true);
System.out.println("METI A APP SEGURA");
Thread.sleep(20000);
app.setSecurity(false);
System.out.println("METI A APP NÃO SEGURA");
Thread.sleep(5000);
app.setSecurity(true);
System.out.println("METI A APP SEGURA");
*/
//rmThread.join();
tmThread.join();
tmThread.join();
emThread.join();
//awmThread.join();
dwmThread.join();
......@@ -492,33 +444,4 @@ public class NFRTool {
// Call this to shutdown all logging threads
System.exit(0);
}
private void checkCommandExecution(String command) {
int returnValue = -1;
try {
Process process = Runtime.getRuntime().exec(command);
process.waitFor();
returnValue = process.exitValue();
System.out.println(returnValue);
BufferedReader stdError = new BufferedReader(new
InputStreamReader(process.getErrorStream()));
System.out.println("Here is the standard output of the command:\n");
String s = null;
// Read any errors from the attempted command
System.out.println("Here is the standard error of the command (if any):\n");
while ((s = stdError.readLine()) != null) {
System.out.println(s);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
Subproject commit fcdaaf3068bb48e0a06215138f9b08b4e2637e7c
......@@ -14,7 +14,7 @@ services:
ports:
- "2127:2127"
environment:
- DATASERVICE_HOST=192.168.60.68
- DATASERVICE_HOST=192.168.60.18
- DATASERVICE_NAME=DS1
- DATASERVICE_JAVA_PORT_TCP=2127
- LOGICMODULE_PORT_TCP=11034
......
......@@ -29,7 +29,7 @@ services:
ports:
- "3127:3127"
environment:
- DATASERVICE_HOST=192.168.60.68
- DATASERVICE_HOST=192.168.60.18
- DATASERVICE_NAME=DS2
- DATASERVICE_JAVA_PORT_TCP=3127
- LOGICMODULE_PORT_TCP=11034
......
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