<commit_before>#!/bin/bash
#
# Setup the the box. This runs as root

apt-get -y update
apt-get -y install curl
apt-get -y install git
apt-get -y install apt-file
apt-file update
apt-get -y install software-properties-common

apt-get -y install vim htop multitail sysstat nmap tcpdump python-dev

apt-get -y update
apt-get -y upgrade

ulimit -n 65536
echo "* soft nofile 65536" >> /etc/security/limits.conf
echo "* hard nofile 65536" >> /etc/security/limits.conf

apt-add-repository ppa:webupd8team/java -y && apt-get update
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
apt-get install -y oracle-java8-installer

curl -s https://packagecloud.io/install/repositories/zetaops/riak/script.deb.sh |sudo bash
apt-get install riak=2.1.1-1

sed -i "s/search = off/search = on/" /etc/riak/riak.conf
sed -i "s/anti_entropy = active/anti_entropy = passive/" /etc/riak/riak.conf
sed -i "s/storage_backend = bitcask/storage_backend = multi/" /etc/riak/riak.conf

echo "multi_backend.bitcask_mult.storage_backend = bitcask
multi_backend.bitcask_mult.bitcask.data_root = /var/lib/riak/bitcask_mult

multi_backend.leveldb_mult.storage_backend = leveldb
multi_backend.leveldb_mult.leveldb.data_root = /var/lib/riak/leveldb_mult

multi_backend.default = bitcask_mult" >> /etc/riak/riak.conf

service riak restart

apt-get install -y libssl-dev
apt-get install -y libffi-dev


apt-get install -y redis-server

apt-get install -y  apt-transport-https
curl -s https://zato.io/repo/zato-0CBD7F72.pgp.asc | sudo apt-key add -
apt-add-repository https://zato.io/repo/stable/2.0/ubuntu
apt-get update
apt-get install -y zato

sudo su - zato sh -c "
mkdir ~/ulakbus;

# Create a new zato project named ulakbus
zato quickstart create ~/ulakbus sqlite localhost 6379 --kvdb_password='' --verbose;

# Change password of zato admin to new one.(Password = <PASSWORD>)
echo 'command=update_password
path=/opt/zato/ulakbus/web-admin
store_config=True
username=admin
password=<PASSWORD>' > ~/ulakbus/zatopw.conf

zato from-config ~/ulakbus/zatopw.conf
"

apt-get install -y virtualenvwrapper

mkdir /app
/usr/sbin/useradd --home-dir /app --shell /bin/bash --comment 'ulakbus operations' ulakbus
chown ulakbus:ulakbus /app -Rf

#Add ulakbus user to sudoers
adduser ulakbus sudo

sudo su - ulakbus sh -c "
cd ~

virtualenv --no-site-packages ulakbusenv
source env/bin/activate

pip install --upgrade pip
pip install ipython

# install pyoko
git clone https://github.com/zetaops/pyoko.git

# install zengine
git clone https://github.com/zetaops/zengine.git

# install ulakbus
git clone https://github.com/zetaops/ulakbus.git

easy_install --always-unzip ulakbus

cd  ~/ulakbusenv/lib/python2.7/site-packages/
rm -rf Ulakbus*.egg zengine*.egg Pyoko*.egg

# To use pyoko, ulakbus, zengine
ln -s ~/pyoko/pyoko ~/ulakbusenv/lib/python2.7/site-packages/
ln -s ~/ulakbus/ulakbus ~/ulakbusenv/lib/python2.7/site-packages/
ln -s ~/zengine/zengine ~/ulakbusenv/lib/python2.7/site-packages/

# Necessary to use riak from zato user<commit_msg>added env-vars.txt to virtualenv's activate script<commit_after>#!/bin/bash
#
# Setup the the box. This runs as root

apt-get -y update
apt-get -y install curl
apt-get -y install git
apt-get -y install apt-file
apt-file update
apt-get -y install software-properties-common

apt-get -y install vim htop multitail sysstat nmap tcpdump python-dev

apt-get -y update
apt-get -y upgrade

ulimit -n 65536
echo "* soft nofile 65536" >> /etc/security/limits.conf
echo "* hard nofile 65536" >> /etc/security/limits.conf

apt-add-repository ppa:webupd8team/java -y && apt-get update
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
apt-get install -y oracle-java8-installer

curl -s https://packagecloud.io/install/repositories/zetaops/riak/script.deb.sh |sudo bash
apt-get install riak=2.1.1-1

sed -i "s/search = off/search = on/" /etc/riak/riak.conf
sed -i "s/anti_entropy = active/anti_entropy = passive/" /etc/riak/riak.conf
sed -i "s/storage_backend = bitcask/storage_backend = multi/" /etc/riak/riak.conf

echo "multi_backend.bitcask_mult.storage_backend = bitcask
multi_backend.bitcask_mult.bitcask.data_root = /var/lib/riak/bitcask_mult

multi_backend.leveldb_mult.storage_backend = leveldb
multi_backend.leveldb_mult.leveldb.data_root = /var/lib/riak/leveldb_mult

multi_backend.default = bitcask_mult" >> /etc/riak/riak.conf

service riak restart

apt-get install -y libssl-dev
apt-get install -y libffi-dev


apt-get install -y redis-server

apt-get install -y  apt-transport-https
curl -s https://zato.io/repo/zato-0CBD7F72.pgp.asc | sudo apt-key add -
apt-add-repository https://zato.io/repo/stable/2.0/ubuntu
apt-get update
apt-get install -y zato

sudo su - zato sh -c "
mkdir ~/ulakbus;

# Create a new zato project named ulakbus
zato quickstart create ~/ulakbus sqlite localhost 6379 --kvdb_password='' --verbose;

# Change password of zato admin to new one.(Password = <PASSWORD>)
echo 'command=update_password
path=/opt/zato/ulakbus/web-admin
store_config=True
username=admin
password=<PASSWORD>' > ~/ulakbus/zatopw.conf

zato from-config ~/ulakbus/zatopw.conf
"

apt-get install -y virtualenvwrapper

mkdir /app
/usr/sbin/useradd --home-dir /app --shell /bin/bash --comment 'ulakbus operations' ulakbus
chown ulakbus:ulakbus /app -Rf

#Add ulakbus user to sudoers
adduser ulakbus sudo

sudo su - ulakbus sh -c "
cd ~

virtualenv --no-site-packages ulakbusenv
wget https://raw.githubusercontent.com/dyrnade/vagrantboxpacker/backup/scripts/env-vars.txt
cat env-vars.txt >> ulakbusenv/bin/activate
source ulakbusenv/bin/activate

pip install --upgrade pip
pip install ipython

# install pyoko
git clone https://github.com/zetaops/pyoko.git

# install zengine
git clone https://github.com/zetaops/zengine.git

# install ulakbus
git clone https://github.com/zetaops/ulakbus.git

easy_install --always-unzip ulakbus

cd  ~/ulakbusenv/lib/python2.7/site-packages/
rm -rf Ulakbus*.egg zengine*.egg Pyoko*.egg

# To use pyoko, ulakbus, zengine
ln -s ~/pyoko/pyoko ~/ulakbusenv/lib/python2.7/site-packages/
ln -s ~/ulakbus/ulakbus ~/ulakbusenv/lib/python2.7/site-packages/
ln -s ~/zengine/zengine ~/ulakbusenv/lib/python2.7/site-packages/

# Necessary to use riak from zato user
{'fraction_non_alphanumeric': 0.11952380952380952, 'fraction_numerical': 0.013333333333333334, 'mean_word_length': 4.004765687053217, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 23, 'https://': 13, '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': '6763838', 'n_tokens_mistral': 2438, 'n_tokens_neox': 2334, 'n_words': 571}