<commit_before>set -x

CHROMA_MANAGER=${CHROMA_MANAGER:='hydra-2-selenium-chroma-manager-1'}

echo "Beginning installation and setup on $CHROMA_MANAGER..."

# Remove old files from previous run
ssh $CHROMA_MANAGER "rm -rvf ~/mock_agent/*"
ssh $CHROMA_MANAGER "rm -rvf ~/requirements.txt"
ssh $CHROMA_MANAGER "rm -rvf ~/rpms/*"
ssh $CHROMA_MANAGER "mkdir -p ~/rpms/"

# Copy rpms to each of the machines
scp $(ls ~/selenium/rpms/arch\=x86_64\,distro\=el6/dist/chroma-manager-*| grep -v integration-tests) $CHROMA_MANAGER:~/rpms/
scp ~/selenium/requirements.txt $CHROMA_MANAGER:~
scp -r ~/selenium/mock_agent $CHROMA_MANAGER:~

# Install and setup chroma manager
ssh $CHROMA_MANAGER <<"EOF"
set -x

chroma-config stop
logrotate -fv /etc/logrotate.d/chroma-manager

yum remove -y chroma-manager*
rm -rf /usr/share/chroma-manager/
rm -f /usr/bin/chroma*
echo "drop database chroma; create database chroma;" | mysql -u root

source ~/.bash_profile<commit_msg>Selenium install script needs to reset postgresql db.<commit_after>set -x

CHROMA_MANAGER=${CHROMA_MANAGER:='hydra-2-selenium-chroma-manager-1'}

echo "Beginning installation and setup on $CHROMA_MANAGER..."

# Remove old files from previous run
ssh $CHROMA_MANAGER "rm -rvf ~/mock_agent/*"
ssh $CHROMA_MANAGER "rm -rvf ~/requirements.txt"
ssh $CHROMA_MANAGER "rm -rvf ~/rpms/*"
ssh $CHROMA_MANAGER "mkdir -p ~/rpms/"

# Copy rpms to each of the machines
scp $(ls ~/selenium/rpms/arch\=x86_64\,distro\=el6/dist/chroma-manager-*| grep -v integration-tests) $CHROMA_MANAGER:~/rpms/
scp ~/selenium/requirements.txt $CHROMA_MANAGER:~
scp -r ~/selenium/mock_agent $CHROMA_MANAGER:~

# Install and setup chroma manager
ssh $CHROMA_MANAGER <<"EOF"
set -x

chroma-config stop
logrotate -fv /etc/logrotate.d/chroma-manager

yum remove -y chroma-manager*
rm -rf /usr/share/chroma-manager/
rm -f /usr/bin/chroma*
echo "drop database chroma; create database chroma;" | mysql -u root
service postgresql stop
rm -fr /var/lib/pgsql/data/*

source ~/.bash_profile
{'fraction_non_alphanumeric': 0.1359320339830085, 'fraction_numerical': 0.0069965017491254375, 'mean_word_length': 4.576601671309192, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7593107', 'n_tokens_mistral': 851, 'n_tokens_neox': 802, 'n_words': 200}