elasticsearch-secure/setup_data_generation.sh

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