<commit_before>#!/bin/bash

# Read Password
echo -n "Password for mysql database:"
read -s MYSQLPW
echo

#check if this script is run as root
if [[ $USER != "root" ]]; then 
		echo "This script must be run as root!" 
		exit 1
fi 

#resolve public ip of host
local_address=$(dig +short myip.opendns.com @resolver1.opendns.com)

# generate a random application secret
SECRET=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)

#download the colosseum master repo 
git clone https://github.com/cloudiator/colosseum.git

#create config file
touch colosseum/conf/config.conf

echo "include \"application.conf\"" >>  colosseum/conf/config.conf
echo  echo "application.secret=\"$SECRET\"" >>  colosseum/conf/config.conf
echo "db.default.driver=org.mariadb.jdbc.Driver" >>  colosseum/conf/config.conf 
echo "db.default.url=\"mysql://root:$MYSQLPW@localhost/colosseum\"" >>  colosseum/conf/config.conf 

#start colosseum in a screen, requires etcd running on localhost, otherwise change the respective args
cd colosseum
screen -S colosseum -d -m ../activator-dist-1.3.6/activator -Dconfig.file=conf/config.conf -Dlca.client.config.registry=etcdregistry -Dlca.client.config.registry.etcd.hosts=${local_address} run
<commit_msg>fixed secret config option, prompt for nodegroup<commit_after>#!/bin/bash

# Read Password
echo -n "Password for mysql database:"
read -s MYSQLPW
echo

# Read Nodegroup
echo -n "NodeGroup (unique name for your cloudiator installation, should be dns compatible)"
read -s NODEGROUP
echo

#check if this script is run as root
if [[ $USER != "root" ]]; then 
		echo "This script must be run as root!" 
		exit 1
fi 

#resolve public ip of host
local_address=$(dig +short myip.opendns.com @resolver1.opendns.com)

# generate a random application secret
SECRET=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)

#download the colosseum master repo 
git clone https://github.com/cloudiator/colosseum.git

#create config file
touch colosseum/conf/config.conf

echo "include \"application.conf\"" >>  colosseum/conf/config.conf
echo "play.crypto.secret =\"$SECRET\"" >>  colosseum/conf/config.conf
echo "db.default.driver=org.mariadb.jdbc.Driver" >>  colosseum/conf/config.conf 
echo "db.default.url=\"mysql://root:$MYSQLPW@localhost/colosseum\"" >>  colosseum/conf/config.conf
echo "colosseum.nodegroup = \"$NODEGROUP\"" >> colosseum/conf/config.conf

#start colosseum in a screen, requires etcd running on localhost, otherwise change the respective args
cd colosseum
screen -S colosseum -d -m ../activator-dist-1.3.6/activator -Dconfig.file=conf/config.conf -Dlca.client.config.registry=etcdregistry -Dlca.client.config.registry.etcd.hosts=${local_address} run

{'fraction_non_alphanumeric': 0.12884116993706035, 'fraction_numerical': 0.0074046649389115145, 'mean_word_length': 4.393213572854291, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '908335', 'n_tokens_mistral': 975, 'n_tokens_neox': 910, 'n_words': 259}