Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6BC53200BB5 for ; Sun, 2 Oct 2016 01:46:26 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6AA26160B08; Sat, 1 Oct 2016 23:46:26 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 652C3160AD7 for ; Sun, 2 Oct 2016 01:46:25 +0200 (CEST) Received: (qmail 72493 invoked by uid 500); 1 Oct 2016 23:46:24 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 71889 invoked by uid 99); 1 Oct 2016 23:46:24 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Oct 2016 23:46:24 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D32CBE00A4; Sat, 1 Oct 2016 23:46:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: lahiru@apache.org To: commits@airavata.apache.org Date: Sat, 01 Oct 2016 23:46:35 -0000 Message-Id: In-Reply-To: <2f7f04cf62bf47d9812a18d9276d3009@git.apache.org> References: <2f7f04cf62bf47d9812a18d9276d3009@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [13/49] airavata git commit: Use fqdn instead of ip4 address in hosts file, removed redundent tags from rabbitmq and zookeeper archived-at: Sat, 01 Oct 2016 23:46:26 -0000 Use fqdn instead of ip4 address in hosts file, removed redundent tags from rabbitmq and zookeeper Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/433ae48b Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/433ae48b Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/433ae48b Branch: refs/heads/lahiru/AIRAVATA-2107 Commit: 433ae48bb6b38d850f64d3ce6392acd6c4fd8d64 Parents: 414c0e9 Author: Shameera Rathnayaka Authored: Mon Aug 1 23:19:33 2016 -0400 Committer: Shameera Rathnayaka Committed: Mon Aug 1 23:19:33 2016 -0400 ---------------------------------------------------------------------- group_vars/all | 6 +++--- hosts | 12 ++++++------ roles/rabbitmq/tasks/main.yml | 14 +++++--------- roles/zookeeper/tasks/main.yml | 2 -- 4 files changed, 14 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/433ae48b/group_vars/all ---------------------------------------------------------------------- diff --git a/group_vars/all b/group_vars/all index 6098bc1..bae52a5 100644 --- a/group_vars/all +++ b/group_vars/all @@ -34,15 +34,15 @@ key_stores_location: "{{ deployment_dir }}/keystores" mysql_connector_jar: "mysql-connector-java-5.1.37-bin.jar" api_server_name: "apiserver-node0" -api_server_host: "{{ host_address }}" +api_server_host: "{{ ansible_fqdn }}" api_server_port: "8930" orchestrator_name: "orchestrator-node0" -orchestrator_host: "{{ host_address }}" +orchestrator_host: "{{ ansible_fqdn }}" orchestrator_port: "8940" gfac_name: "gfac-node0" -gfac_host: "{{ host_address }}" +gfac_host: "{{ ansible_fqdn }}" gfac_port: "8950" monitor_email_address: "jobs@scigap.org" http://git-wip-us.apache.org/repos/asf/airavata/blob/433ae48b/hosts ---------------------------------------------------------------------- diff --git a/hosts b/hosts index 2865ff1..8a317b8 100644 --- a/hosts +++ b/hosts @@ -2,24 +2,24 @@ [api-orch] #149.165.156.196 host_name=js-156-196 host_address=149.165.156.196 -149.165.171.11 host_name=js-171-11 host_address=149.165.171.11 +js-171-11.jetstream-cloud.org [gfac] #149.165.156.196 host_name=js-156-196 host_address=149.165.156.196 -149.165.171.11 host_name=js-171-11 host_address=149.165.171.11 +js-171-11.jetstream-cloud.org [pga] #149.165.156.196 -149.165.171.11 +js-171-11.jetstream-cloud.org [zookeeper] #149.165.156.196 host_name=js-156-196 host_address=149.165.156.196 -149.165.171.11 host_name=js-171-11 host_address=149.165.171.11 +js-171-11.jetstream-cloud.org [rabbitmq] #149.165.156.196 host_name=js-156-196 host_address=149.165.156.196 -149.165.171.11 host_name=js-171-11 host_address=149.165.171.11 +js-171-11.jetstream-cloud.org [database] #149.165.156.196 -149.165.171.11 +js-171-11.jetstream-cloud.org http://git-wip-us.apache.org/repos/asf/airavata/blob/433ae48b/roles/rabbitmq/tasks/main.yml ---------------------------------------------------------------------- diff --git a/roles/rabbitmq/tasks/main.yml b/roles/rabbitmq/tasks/main.yml index 1d0647b..56ae071 100644 --- a/roles/rabbitmq/tasks/main.yml +++ b/roles/rabbitmq/tasks/main.yml @@ -5,31 +5,28 @@ # Setup and run rabbitmq - name: Install erlang latest version yum: name=https://www.rabbitmq.com/releases/erlang/erlang-18.3-1.el7.centos.x86_64.rpm state=present - tags: rabbitmq, dependency - - name: Install Rabbitmq rpm yum: name=https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.3/rabbitmq-server-3.6.3-1.noarch.rpm state=present - tags: rabbimq, dependency # add hostname to /etc/hosts file +- name: get ip4 address + command: dig +short myip.opendns.com @resolver1.opendns.com + register: _ip4 + - name: Edit /etc/hosts file - lineinfile: dest=/etc/hosts line="{{ host_address }} {{host_name}}" + lineinfile: dest=/etc/hosts line="{{ _ip4.stdout }} {{ ansible_hostname }} {{ ansible_fqdn }}" notify: - restart rabbitmq - tags: rabbitmq, dependency - name: Start Rabbitmq server service: name=rabbitmq-server state=started - tags: rabbitmq, dependency - name: Enable rabbitmq management plugin rabbitmq_plugin: names=rabbitmq_management state=enabled - tags: rabbitmq, dependency - name: Create rabbitmq vhost {{ rabbitmq_vhost }} rabbitmq_vhost: name="{{ rabbitmq_vhost }}" state=present - tags: rabbitmq, dependency - name: Add user {{ rabbitmq_user }} to vhost {{ rabbitmq_vhost }} and give permission rabbitmq_user: user="{{ rabbitmq_user }}" @@ -39,6 +36,5 @@ read_priv=.* write_priv=.* state=present - tags: rabbitmq, dependency ... http://git-wip-us.apache.org/repos/asf/airavata/blob/433ae48b/roles/zookeeper/tasks/main.yml ---------------------------------------------------------------------- diff --git a/roles/zookeeper/tasks/main.yml b/roles/zookeeper/tasks/main.yml index c1fd86b..90a2d30 100644 --- a/roles/zookeeper/tasks/main.yml +++ b/roles/zookeeper/tasks/main.yml @@ -3,13 +3,11 @@ # Setup and run Zookeeper - name: Download and unarchive zookeeper unarchive: src="{{ zookeeper_url }}" dest="{{ user_home }}" copy=no owner="{{ user }}" group="{{ group }}" - tags: zookeeper, dependency - name: Copy zoo.cfg file template: src=zoo.cfg.j2 dest="{{ zookeeper_dir }}/conf/zoo.cfg" owner="{{ user }}" group="{{ group }}" mode="u=rw,g=r,o=r" notify: - start zookeeper - restart zookeeper - tags: zookeeper, dependency ...