You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2019/06/30 17:22:43 UTC
[airavata] 04/04: AIRAVATA-2588 Dev stack needs public network
access to mysql
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git
commit 184ff08a5227a5fd7d77a6447c7f6a8e67d6f739
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Sun Jun 30 13:22:06 2019 -0400
AIRAVATA-2588 Dev stack needs public network access to mysql
---
.../scigap/develop/group_vars/all/vars.yml | 4 +++-
dev-tools/ansible/inventories/scigap/develop/hosts | 20 ++++++++++----------
dev-tools/ansible/roles/database/tasks/django.yml | 7 ++++++-
3 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/dev-tools/ansible/inventories/scigap/develop/group_vars/all/vars.yml b/dev-tools/ansible/inventories/scigap/develop/group_vars/all/vars.yml
index b668ea2..514e355 100644
--- a/dev-tools/ansible/inventories/scigap/develop/group_vars/all/vars.yml
+++ b/dev-tools/ansible/inventories/scigap/develop/group_vars/all/vars.yml
@@ -35,7 +35,9 @@ airavata_dist_name: "{{ airavata_dist }}-bin.tar.gz"
git_branch: develop
# Database related variables
-db_server: "{{ hostvars[groups['database'][0]]['ansible_default_ipv4']['address'] }}"
+# FIXME: once we get the entire dev stack on the same network we can use the
+# internal ip address instead of the public one
+db_server: "{{ groups['database'][0] }}"
db_server_port: "3306"
db_user: "airavata"
db_password: "{{ vault_db_password }}"
diff --git a/dev-tools/ansible/inventories/scigap/develop/hosts b/dev-tools/ansible/inventories/scigap/develop/hosts
index e9912bf..22e10409 100644
--- a/dev-tools/ansible/inventories/scigap/develop/hosts
+++ b/dev-tools/ansible/inventories/scigap/develop/hosts
@@ -23,16 +23,16 @@
149.165.156.151
[django]
-seagrid ansible_host=pgadev.scigap.org
-simvascular ansible_host=pgadev.scigap.org
-simccs ansible_host=pgadev.scigap.org
-interactwel ansible_host=pgadev.scigap.org
-usd ansible_host=pgadev.scigap.org
-csbglsu ansible_host=pgadev.scigap.org
-nexttdb ansible_host=pgadev.scigap.org
-saver-x ansible_host=pgadev.scigap.org
-pfec-hydro ansible_host=pgadev.scigap.org
-cyberwater ansible_host=pgadev.scigap.org
+seagrid ansible_host=149.165.156.46
+simvascular ansible_host=149.165.156.46
+simccs ansible_host=149.165.156.46
+interactwel ansible_host=149.165.156.46
+usd ansible_host=149.165.156.46
+csbglsu ansible_host=149.165.156.46
+nexttdb ansible_host=149.165.156.46
+saver-x ansible_host=149.165.156.46
+pfec-hydro ansible_host=149.165.156.46
+cyberwater ansible_host=149.165.156.46
[helix]
149.165.157.37
diff --git a/dev-tools/ansible/roles/database/tasks/django.yml b/dev-tools/ansible/roles/database/tasks/django.yml
index b14b860..8751b60 100644
--- a/dev-tools/ansible/roles/database/tasks/django.yml
+++ b/dev-tools/ansible/roles/database/tasks/django.yml
@@ -26,11 +26,16 @@
with_items:
- "{{ groups['django'] }}"
-- name: give access to {{ django_db_username }} from remote
+- name: give access to {{ django_db_username }} from remote (internal ip)
mysql_user: name="{{ django_db_username }}" password="{{ django_db_password }}" host="{{ hostvars[item]['ansible_default_ipv4']['address'] }}"
with_items:
- "{{ groups['django'] }}"
+- name: give access to {{ django_db_username }} from remote (public ip)
+ mysql_user: name="{{ django_db_username }}" password="{{ django_db_password }}" host="{{ hostvars[item].ansible_host }}"
+ with_items:
+ - "{{ groups['django'] }}"
+
- name: create new user {{ django_db_username }} with all privileges on all django databases
mysql_user: name="{{ django_db_username }}"
password="{{ django_db_password }}"