Commit c27d9d2c authored by Paschalis Korosoglou's avatar Paschalis Korosoglou

WebUI Role addition

parent c0bf477a
......@@ -4,3 +4,6 @@ webapi.node
[standalone]
standalone.node
[webui]
webui.node
\ No newline at end of file
......@@ -3,23 +3,26 @@
- name: Install epel repo files
yum: name={{ epel_release_url }}{{ epel_release_name }}
state=present
when: inventory_hostname in groups.standalone or inventory_hostname in groups.webapi
- name: Install arstats repo files
yum: name={{ arstats_release_url }}{{ arstats_release_name }}
state=present
when: inventory_hostname in groups.standalone or inventory_hostname in groups.webapi
- name: Install mongodb repo
tags: mongodb_repo
copy: src=etc/yum.repos.d/mongodb_3.repo
dest=/etc/yum.repos.d/mongodb_3.repo backup=no
owner=root group=root mode=0644
when: inventory_hostname in groups.standalone or inventory_hostname in groups.webapi
- name: Install EGI-trustanchors repository definitions
tags: ca_bundle_repo
copy: src=etc/yum.repos.d/EGI-trustanchors.repo
dest=/etc/yum.repos.d/EGI-trustanchors.repo backup=no
owner=root group=root mode=0644
when: inventory_hostname in groups.standalone
when: inventory_hostname in groups.standalone or inventory_hostname in groups.webui
- name: Install cloudera-cdh4 repo
tags: cloudera-cdh4_repo
......
---
iptables_rules:
input:
- { dport: "80", proto: "tcp", policy: "accept"}
- { dport: "443", proto: "tcp", policy: "accept"}
lavoisier_home: /var/www/lavoisier
download_url: https://github.com/ARGOeu/argo-egi-web/archive/master.zip
certificate_password: change_me_or_overwrite_me_in_vars_file
certificate_path: /etc/grid-security/server.p12
cache_directory: /tmp
truststore_path: /etc/grid-security
keystore_path: /etc/grid-security/server.p12
keystore_password: change_me_or_overwrite_me_in_vars_file
admin_password_md5: b91cd1a54781790beaa2baf741fa6789
\ No newline at end of file
# File to export the variable HOME_LAVOISIER.
setenv HOME_LAVOISIER "/var/www/lavoisier"
\ No newline at end of file
# File to export the variable HOME_LAVOISIER.
export HOME_LAVOISIER=/var/www/lavoisier
\ No newline at end of file
---
- name: Install requirements
yum: name={{ item }} state=present
with_items:
- java-1.7.0-openjdk.x86_64
- wget
- unzip
tags: install_requirements
- name: Install CAs metapackage
yum: name=ca-policy-egi-core state=latest
tags: install_ca_bundle
- name: Copy files to setup HOME_LAVOISIER
copy: src={{ item }} dest=/etc/profile.d/{{ item }}
owner=root group=root mode=0644
with_items:
- lavoisier.sh
- lavoisier.csh
- name: Create download directory
file: path={{ lavoisier_home }} state=directory
- name: Download lavoisier zip file
get_url: url={{ download_url }}
dest={{ lavoisier_home }}/master.zip
mode=0640
register: download_out
- name: Stage old directory if download target has changed
command: mv argo-egi-web-master argo-egi-web-master.old
chdir={{ lavoisier_home }}
when: download_out is defined and download_out.changed
- name: Unzip zip file
command: unzip master.zip
chdir={{ lavoisier_home }}
when: download_out is defined and download_out.changed
- name: Configure etc/lavoisier-hidden.properties step 1
lineinfile: dest={{ lavoisier_home }}/argo-egi-web-master/etc/lavoisier-hidden.properties
line='certificate.password = {{ certificate_password }}'
regexp='^certificate.password'
state=present
tags: hidden
- name: Configure etc/lavoisier-hidden.properties step 2
lineinfile: dest={{ lavoisier_home }}/argo-egi-web-master/etc/lavoisier-hidden.properties
line='certificate.path = {{ certificate_path }}'
regexp='^certificate.path'
state=present
tags: hidden
- name: Configure etc/lavoisier-hidden.properties step 3
lineinfile: dest={{ lavoisier_home }}/argo-egi-web-master/etc/lavoisier-hidden.properties
line='cache.baseDirectory={{ cache_directory }}'
regexp='^cache.baseDirectory='
state=present
insertafter='^#cache.baseDirectory'
tags: hidden
- name: Configure etc/lavoisier-hidden.properties step 4
lineinfile: dest={{ lavoisier_home }}/argo-egi-web-master/etc/lavoisier-hidden.properties
line='server.baseUrl = https://{{ inventory_hostname }}'
regexp='^server.baseUrl'
state=present
tags: hidden
- name: Configure etc/lavoisier-hidden.properties step 5
lineinfile: dest={{ lavoisier_home }}/argo-egi-web-master/etc/lavoisier-hidden.properties
line='lavoisier.ssl.trustStore={{ truststore_path }}'
regexp='^lavoisier.ssl.trustStore='
state=present
tags: hidden
- name: Configure etc/lavoisier-hidden.properties step 6
lineinfile: dest={{ lavoisier_home }}/argo-egi-web-master/etc/lavoisier-hidden.properties
line='lavoisier.ssl.keyStore={{ keystore_path }}'
regexp='^lavoisier.ssl.keyStore='
state=present
tags: hidden
- name: Configure etc/lavoisier-hidden.properties step 7
lineinfile: dest={{ lavoisier_home }}/argo-egi-web-master/etc/lavoisier-hidden.properties
line='lavoisier.ssl.keyStorePassword={{ keystore_password }}'
regexp='^lavoisier.ssl.keyStorePassword='
state=present
tags: hidden
- name: Configure etc/security/passwords.properties
lineinfile: dest={{ lavoisier_home }}/argo-egi-web-master/etc/security/passwords.properties
line='admin={{ admin_password_md5 }}'
regexp='^admin'
state=present
tags: hidden
---
certificate_password: change_me
keystore_password: change_me
\ No newline at end of file
---
- hosts: webui
user: root
roles:
- { role: firewall, tags: firewall }
- { role: repos, tags: repos }
- { role: webui, tags: webui }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment