From 973c16751f8f6a00306396fc6a537335b66a206e Mon Sep 17 00:00:00 2001
From: alex <dariasrodrig@student.unimelb.edu.au>
Date: Thu, 13 May 2021 15:08:24 +1000
Subject: [PATCH] update

---
 ansible/mrc_1/mrc_1/host_vars/couchdb.yaml     |  9 ++++++---
 ansible/mrc_1/mrc_1/host_vars/mrc.yaml         | 18 +++++++-----------
 .../roles/openstack-couchdb/tasks/main.yml     |  8 +++-----
 ansible/mrc_1/mrc_1/run-mrc.sh                 |  2 ++
 tweet_stream.py                                | 10 +++++-----
 5 files changed, 23 insertions(+), 24 deletions(-)

diff --git a/ansible/mrc_1/mrc_1/host_vars/couchdb.yaml b/ansible/mrc_1/mrc_1/host_vars/couchdb.yaml
index 1b46e5d..b286919 100644
--- a/ansible/mrc_1/mrc_1/host_vars/couchdb.yaml
+++ b/ansible/mrc_1/mrc_1/host_vars/couchdb.yaml
@@ -1,6 +1,9 @@
 - hosts: mrc.db
   vars:
-    user: 'admin'
-    password: 'admin'
+    database_user: 'admin'
+    database_password: 'admin'
     cookie: 'alexis'
-    ansible_python_interpreter: /usr/bin/python3.8
\ No newline at end of file
+    ansible_python_interpreter: /usr/bin/python3.8
+
+  roles:
+    - role: 
\ No newline at end of file
diff --git a/ansible/mrc_1/mrc_1/host_vars/mrc.yaml b/ansible/mrc_1/mrc_1/host_vars/mrc.yaml
index 1bc5477..6be6d08 100644
--- a/ansible/mrc_1/mrc_1/host_vars/mrc.yaml
+++ b/ansible/mrc_1/mrc_1/host_vars/mrc.yaml
@@ -3,13 +3,9 @@ availability_zone: melbourne-qh2-uom
 
 # Volume
 volumes:
-  - vol_name: demo-vol-1-1
+  - vol_name: volPrueba1
     vol_size: 10
-  - vol_name: demo-vol-1-2
-    vol_size: 10
-  - vol_name: demo-vol-2-1
-    vol_size: 10
-  - vol_name: demo-vol-2-2
+  - vol_name: volPrueba2
     vol_size: 10
 
 #Security group
@@ -29,11 +25,11 @@ security_groups:
 
 #Instance
 instances:
-  - name: demo-1
-    volumes: ['demo-vol-1-1', 'demo-vol-1-2']
-  #- name: 
-    volumes: ['demo-vol-2-1', 'demo-vol-2-2']
+  - name: prueba1
+    volumes: 'volPrueba1'
+  - name: prueba2
+    volumes: 'volPrueba2'
 
-instance_image: f8b79936-6616-4a22-b55d-0d0a1d27bceb
+instance_image: 34ce7ec8-50f2-4604-a38f-7d81d1c2041d #f8b79936-6616-4a22-b55d-0d0a1d27bceb
 instance_key_name: couchTestKey
 instance_flavor: uom.mse.1c4g
\ No newline at end of file
diff --git a/ansible/mrc_1/mrc_1/roles/openstack-couchdb/tasks/main.yml b/ansible/mrc_1/mrc_1/roles/openstack-couchdb/tasks/main.yml
index 7a2e1d8..78bafce 100644
--- a/ansible/mrc_1/mrc_1/roles/openstack-couchdb/tasks/main.yml
+++ b/ansible/mrc_1/mrc_1/roles/openstack-couchdb/tasks/main.yml
@@ -1,7 +1,3 @@
-- name: Bind the clustered interface to all IP addresses availble on this machine
-
-  command: curl -X PUT http://{{ database_user }}:{{ database_password }}@127.0.0.1:5984/_node/_local/_config/chttpd/bind_address -d '"0.0.0.0"'
-
 - name: Bind the clustered interface to all IP addresses availble on this machine
 
   command: curl -X PUT http://{{ database_user }}:{{ database_password }}@127.0.0.1:5984/_node/_local/_config/httpd/bind_address -d '"0.0.0.0"'
@@ -12,4 +8,6 @@
 
 - name: Set the shared http secret for cookie creation
 
-  command: curl -X PUT http://{{ database_user }}:{{ database_password }}@127.0.0.1:5984/_node/_local/_config/couch_httpd_auth/secret -d '"{{ database_secret }}" 
\ No newline at end of file
+  command: curl -X PUT http://{{ database_user }}:{{ database_password }}@127.0.0.1:5984/_node/_local/_config/couch_httpd_auth/secret -d '"{{ database_secret }}" 
+
+  - name: Setup cluster
diff --git a/ansible/mrc_1/mrc_1/run-mrc.sh b/ansible/mrc_1/mrc_1/run-mrc.sh
index eab80d7..2e5f41d 100644
--- a/ansible/mrc_1/mrc_1/run-mrc.sh
+++ b/ansible/mrc_1/mrc_1/run-mrc.sh
@@ -1 +1,3 @@
 . ./unimelb-comp90024-2021-grp-62-openrc.sh; ansible-playbook mrc.yaml
+
+. ./unimelb-comp90024-2021-grp-62-openrc.sh; ansible-playbook couchdb.yaml
\ No newline at end of file
diff --git a/tweet_stream.py b/tweet_stream.py
index 2fcdeb7..4bec103 100644
--- a/tweet_stream.py
+++ b/tweet_stream.py
@@ -8,11 +8,11 @@ collector_type = sys.argv[1]
 
 
 #change code to your current Twitter account
-API_key = 'SZS77byadyNlV99Vc0JQvDNS3'
-API_secret = 'obAZTi5ovBhVVqDhwVTRQH0qFzlPe1YKhiSb134ylIUjNt55AO'
-baerer_token = 'AAAAAAAAAAAAAAAAAAAAAIq9OwEAAAAAZWncNeg2Hjj80ehT39b%2FenLaHI0%3DEq6SnKSiOXJDKGIm1q7agIQON2WkPPpJ3Vkhlxx3tbgZp7r5r6'
-access_token = "1386612665682853892-Tp6J5KfT4Wr8gsIPYSr2G5W15axUlj"
-access_secret = "hN59hNhidGKLJpsJ8nX8Dr2EEB4m9ny0w70K2Fd0dpY8Q"
+API_key = 'gfrSs7VJvSDNuDutLDLx2kdnP'
+API_secret = 'Czhc2ryBJmeaaV5KMcRVd35TmXii2N1y1PhH8sfZ4L1S10Nw4S'
+baerer_token = 'AAAAAAAAAAAAAAAAAAAAAC7aPAEAAAAAuzFLDS15Spr%2FC6e9AZyxwmRwfkY%3D1jEWvLv4ScIBjQ8WZnLrklgbVm6DUrdqIAvOLEf6YHEd84qTN0'
+access_token = "1389730005953900549-Fpc4niDhzmCMEDwRDvJcFKDHaThchd"
+access_secret = "sxly7UABoMN3p5l5PhGpVPqvALg2Vv7MCCNZ0fCoH8pnv"
 
 
 class StreamListener(tweepy.StreamListener):
-- 
GitLab