docker-compose setup

Updated .gitignore to ignore test log dirs from project.

HOST_IP env var is used by entrypoint script to populate
the PCP config.
The entrypoint script does the following.
1. construct the PCP config file using the value of the env var
	HOST_IP.
2. run elektron by providing all the basic command-line options.

Added build and run instructions in the README. These include
instructions to run elektron on bare-metal or using docker-compose.
This commit is contained in:
Pradyumna Kaushik 2019-11-07 18:49:55 -05:00
parent e3caa90c31
commit df4952fc0d
5 changed files with 218 additions and 2 deletions

16
entrypoint.sh Executable file
View file

@ -0,0 +1,16 @@
#!/usr/bin/env bash
# Accessing host machine's ip address.
hostip=$HOST_IP
# setting up metrics to be monitored.
# creating PCP config with the cpu and memory usage metrics to be monitored.
cat >config <<EOL
${hostip}:kernel.all.cpu.user
${hostip}:kernel.all.cpu.sys
${hostip}:kernel.all.cpu.idle
${hostip}:mem.util.free
${hostip}:mem.util.used
EOL
./$ELEKTRON_EXECUTABLE_NAME -m $ELEKTRON_MESOS_MASTER_LOCATION -w $ELEKTRON_WORKLOAD -p $ELEKTRON_LOGDIR_PREFIX $@