elasticsearch-secure/setup_data_generation.sh

raw link view readme
1 yum install epel-release -y
2 yum install python34 python-pip -y
3 pip install --upgrade pip
4 pip install --upgrade virtualenv
5 cd /srv
6 virtualenv -p python3 hamlet
7 cd hamlet
8 source bin/activate
9 mkdir content
10 cd content
11 pip install requests
12 wget https://linux.azure.david.betz.space/raw/mongodb/generate/hamlet_distinct.t
13 wget https://linux.azure.david.betz.space/raw/elasticsearch-secure/generate/hamlet.py
14 echo "to use:"
15 echo "cd /srv/hamlet"
16 echo "source bin/activate"
17 echo "cd content"
18 echo "python /srv/hamlet/content/hamlet.py"
19 echo "(use CTRL-C to cancel anytime)"
20 export PUBLIC_IP=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
21 echo curl \'"$PUBLIC_IP/librarygen/book/_search?q=*:*&pretty"\'
22