-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathseqware-install.yml
More file actions
106 lines (95 loc) · 3.36 KB
/
seqware-install.yml
File metadata and controls
106 lines (95 loc) · 3.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
# file: seqware-install.yml
# This file is used for installing a seqware cluster
# Not sure why, but I needed this to create a /etc/hosts that actually works with the Ubuntu image here on openstack
- hosts: all
sudo: True
# Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source.
# Will include all hosts the playbook is run on.
# Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html
tasks:
- name: Build hosts file for all hosts
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present
when: hostvars[item].ansible_default_ipv4.address is defined and docker is not defined
with_items: groups['all']
- name: Setting hostname to {{ inventory_hostname }}
hostname: name={{ inventory_hostname }}
when: docker is not defined
- name: Disable automatic retrieval of hostname from dhcp on Amazon EC2
template: src=roles/common/templates/dhclient.conf dest=/etc/dhcp/dhclient.conf
when: docker is not defined
- name: Disable setting hostname from /etc/hostname on Amazon EC2
template: src=roles/common/templates/hostname.conf dest=/etc/init/hostname.conf
when: docker is not defined
- name: Disable ephemeral mount at /mnt for amazon AWS
shell: umount /mnt
register: umount_output
ignore_errors: yes
# This is a super-fugly way of determining the number of hosts in total, Ansible bug referenced
- hosts: all
sudo: True
tasks:
- name: Determine number of hosts in fugly way
include: roles/common/tasks/determine_num_hosts.yml
- hosts: all
sudo: True
vars:
shared_storage_system: lvm
vendor_data: /mnt/seqware-oozie
lvm_device_whitelist: /dev/xvdd,/dev/xvde
include: roles/storage/common/tasks/play_deploy_shared_storage.yml
when: single_node_lvm is defined
- hosts: all
sudo: True
vars:
shared_storage_system: glusterfs
vendor_data: /mnt/seqware-oozie
glusterfs_version: 3.5
include: roles/storage/common/tasks/play_deploy_shared_storage.yml
- hosts: all
sudo: True
roles:
- { role: docker }
# The grid master depends on the hosts file, as we need to know at least who we
# are by this stage.
- hosts: master
sudo: True
roles:
- { role: java, java_provider: Oracle8 }
- { role: grid-engine, grid_engine_master: True }
- { role: seqware-master-infrastructure }
- { role: seqware-code }
- { role: seqware-webservice, when: test_environment is undefined }
- hosts: worker
sudo: True
roles:
- { role: java, java_provider: Oracle8 }
- { role: grid-engine, grid_engine_master: False }
- { role: seqware-worker-infrastructure }
- hosts: master
sudo: yes
sudo_user: seqware
vars:
run_integration_tests: false
roles:
- { role: seqware-integration-tests, when: "{{ run_integration_tests }} == True" }
- hosts: master
sudo: True
roles:
- { role: seqware-cron, when: test_environment is undefined }
- { role: seqware-helloworld, when: test_environment is undefined }
# cleanup for seqware 1.2
- hosts: all
sudo: True
tasks:
- name: Clean extra packages
apt: name={{ item }} state=absent purge=yes
with_items:
- maven
- spark-core
- hive
- pig
- solr
- hbase
- name: Autoremove unused packages
command: apt-get -y autoremove