Skip to content
Snippets Groups Projects
Commit 3ed6170b authored by Diego Alejandro Arias Rodriguez's avatar Diego Alejandro Arias Rodriguez
Browse files

trials views

parent 00f40c03
No related branches found
No related tags found
No related merge requests found
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
gather_facts: true gather_facts: true
roles: roles:
- role: openstack-run-script-cluster - role: openstack-run-script-cluster
- role: openstack-run-harvester
- role: openstack-run-views
- hosts: COUCHGROUP[1] - hosts: COUCHGROUP[1]
gather_facts: true gather_facts: true
......
#!/usr/bin/env bash #!/usr/bin/env bash
curl -X PUT http://172.26.130.79:5984/live_demo/_design/sports_by_city --data-binary @./sports_by_city.json
curl -X PUT http://172.26.130.79:5984/live_demo/_design/retweets_followers --data-binary @./retweets_followers.json curl -X PUT "http://$1:5984/live_demo2/_design/sports_by_city" --data-binary @./sports_by_city.json
curl -X PUT http://172.26.130.79:5984/live_demo/_design/replies --data-binary @./retweets_followers.json curl -X PUT "http://$1:5984/live_demo2/_design/retweets_followers" --data-binary @./retweets_followers.json
\ No newline at end of file curl -X PUT "http://$1:5984/live_demo2/_design/replies" --data-binary @./retweets_followers.json
\ No newline at end of file
- name: Copy script for harvester
copy:
src: ./twt_harvest.sh
dest: /home/ubuntu/twt_harvest.sh
owner: ubuntu
group: ubuntu
mode: 0644
- name: change script permissions
become: yes
shell: |
sudo chmod 777 /home/ubuntu/twt_harvest.sh
- name: Run script cluster
become: yes
command: ./twt_harvest.sh
\ No newline at end of file
- name: Copy couch db cluster setup script with owner and permissions - name: Copy couch db cluster setup script with owner and permissions
copy: copy:
src: /home/alex/CCC/project/comp90024/Ansible/cluster_setup.sh src: ./cluster_setup.sh
dest: /home/ubuntu/cluster_setup.sh dest: /home/ubuntu/cluster_setup.sh
owner: ubuntu owner: ubuntu
group: ubuntu group: ubuntu
......
- name: Copy couch db installation script with owner and permissions - name: Copy couch db installation script with owner and permissions
copy: copy:
src: /home/alex/CCC/project/comp90024/Ansible/install_couchdb.sh src: ./install_couchdb.sh
dest: /home/ubuntu/install_couchdb.sh dest: /home/ubuntu/install_couchdb.sh
owner: ubuntu owner: ubuntu
group: ubuntu group: ubuntu
......
- name: Copy couchdb views script with owner and permissions
copy:
src: ./mapreduce.sh
dest: /home/ubuntu/mapreduce.sh
owner: ubuntu
group: ubuntu
mode: 0644
- name: change script permissions
become: yes
shell: |
sudo chmod 777 /home/ubuntu/mapreduce.sh
- name: install couchdb
become: yes
command: sh /home/ubuntu/mapreduce.sh {{ groups['COUCHGROUP'][0] }}
\ No newline at end of file
#!/usr/bin/env bash
array=$(cat IP.txt)
export mainnode=`echo ${array} | cut -f1 -d' '`
git clone https://gitlab.eng.unimelb.edu.au/framosmorale/comp90024.git
apt install python3-pip -y
pip3 install -r ./comp90024/Data\ collection/requirements.txt
python3 ./comp90024/Data\ collection/streamFile_to_couch.py "$mainnode"
python3 ./comp90024/Data\ collection/searchFile_to_couch.py.py "$mainnode"
python3 ./comp90024/Data\ collection/tweet_gatherer_app.py stream 0 "$mainnode" & python3 ./comp90024/Data\ collection/tweet_gatherer_app.py search 1 "$mainnode" & python3 ./comp90024/Data\ collection/tweet_gatherer_app.py stream 2 "$mainnode" & python3 ./comp90024/Data\ collection/tweet_gatherer_app.py stream 3 "$mainnode" & python3 ./comp90024/Data\ collection/tweet_gatherer_app.py stream 4 "$mainnode" &
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment