Commit 47330f29 authored by Rita Sousa's avatar Rita Sousa
Browse files

Updated README and startFakeWorkers script

parent 619cce17
......@@ -86,6 +86,11 @@ Start the dataClay, destroying any dataClay instance that could be active.
docker-compose -f master-dataclay.yml -f backend-dataclay.yml down -v --remove-orphans
```
You can also run the following to clean up a little (you won't lose anything important on your machine):
```
sudo rm /opt/dataclay/* -rf | docker rm $(docker ps -a -q -f status=exited) | docker rmi $(docker images -a -q -f dangling=true) | docker rm -f $(docker ps -aqf "ancestor=elasticeuh2020/fakeworkers")
```
If this Node is the **"master"** node, run:
```
docker-compose -f master-dataclay.yml up --build
......
......@@ -13,7 +13,10 @@
<Logger name="app.DataclayWritingManager" level="info" additivity="false">
<AppenderRef ref="Console"/>
</Logger>
<Logger name="app.Utils" level="info" additivity="false">
<Logger name="app.Utils" level="debug" additivity="false">
<AppenderRef ref="Console"/>
</Logger>
<Logger name="app.ResourceManager" level="debug" additivity="false">
<AppenderRef ref="Console"/>
</Logger>
<Root level="info">
......
......@@ -55,7 +55,7 @@ public class NFRTool {
private static float cpuThreshold;
private static float energyThreshold;
private static final Logger logger = LogManager.getLogger(NFRTool.class.getName());
private static final Logger logger = LogManager.getLogger("NFRTool");
/**
* Retrieves app's usage.
......
#!/bin/sh
if [ "$(docker images -q elasticeuh2020/fakeworkers 2> /dev/null)" = "" ]; then
docker pull elasticeuh2020/fakeworkers
http_response=$(curl -o /dev/null -s -w "%{http_code}\n" --unix-socket /var/run/docker.sock http://localhost/images/elasticeuh2020/fakeworkers/json)
if [ $http_response = "404" ]; then
echo !!!ERROR!!! elasticeuh2020/fakeworkers does not exist!
http_responsee=$(curl -o /dev/null -s -w "%{http_code}\n" -X POST -H "Content-Type: application/json" --unix-socket /var/run/docker.sock http://localhost/images/create?fromImage=elasticeuh2020/fakeworkers&tag=latest)
if [ "$http_responsee" = "404" ] || [ $http_responsee = "500" ]; then
echo !!!ERROR!!! Something went wrong while pulling elasticeuh2020/fakeworkers $http_responsee
else
echo Pulled elasticeuh2020/fakeworkers
fi
fi
containerJson=$(curl --unix-socket /var/run/docker.sock -H "Content-Type: application/json" -d '{"Image": "elasticeuh2020/fakeworkers", "Env": ["FAKE_WORKER=3"] }' -X POST http://localhost/containers/create)
......
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