-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
82 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
- hosts: [all] | ||
sudo: True | ||
tags: ['system'] | ||
pre_tasks: | ||
- name: Install Debian Packages | ||
apt: pkg={{ item }} state=present | ||
with_items: | ||
- git | ||
- vim | ||
- htop | ||
- unzip | ||
when: ansible_os_family == "Debian" | ||
- name: Downloading and enable the EPEL repository definitions. | ||
yum: name=http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm state=present | ||
when: ansible_os_family == "RedHat" | ||
- name: Install Redhat Packages | ||
yum: pkg={{ item }} state=present | ||
with_items: | ||
- java7 | ||
- git | ||
- vim | ||
- htop | ||
- unzip | ||
when: ansible_os_family == "RedHat" | ||
- name: Disable iptables | ||
action: service name=iptables state=stopped enabled=false | ||
when: ansible_os_family == "RedHat" | ||
- name: Remove require tty | ||
lineinfile: regexp="requiretty" dest=/etc/sudoers state=absent | ||
- name: Remove require tty - alt | ||
lineinfile: regexp="requiretty" dest=/etc/sudoers/os_defaults state=absent | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
- hosts: [mesos_primaries] | ||
sudo: True | ||
pre_tasks: | ||
- name: Install HAProxy (RedHat) | ||
yum: pkg=haproxy state=present | ||
when: ansible_os_family == "RedHat" | ||
- name: Install HAProxy (Ubuntu) | ||
apt: pkg=haproxy state=present | ||
when: ansible_os_family == "Debian" | ||
- name: Sets haproxy to enabled (Ubuntu) | ||
lineinfile: dest=/etc/default/haproxy regexp="^ENABLED" line="ENABLED=1" | ||
when: ansible_os_family == "Debian" | ||
roles: | ||
- { role: 'ansible-java8', tags:['runtimes', 'java'], when: ansible_os_family == 'Debian' } | ||
- { role: 'ansible-zookeeper', zookeeper_hosts: "{{ groups.mesos_primaries}}", tags:['zookeeper'] } | ||
- { role: 'ansible-mesos', mesos_quorum: "2", zookeeper_hostnames: "{{ groups.mesos_primaries | join(':' + zookeeper_client_port + ',') }}:{{ zookeeper_client_port }}", mesos_install_mode: 'master', mesos_cluster_name: 'mlh_mesos', tags: ['mesos', 'platforms'] } | ||
- { role: 'ansible-marathon', zookeeper_hostnames: "{{ groups.mesos_primaries | join(':' + zookeeper_client_port + ',') }}:{{ zookeeper_client_port }}", tags:['mesos-tools'] } | ||
- { role: 'ansible-consul', consul_client_address: "0.0.0.0", consul_version: "0.4.1", consul_datacenter: "sea", consul_is_server: true, consul_servers: "{{ groups.mesos_primaries }}", consul_is_ui: true, consul_join_at_start: true } | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
- hosts: [mesos_workers] | ||
sudo: True | ||
pre_tasks: | ||
- name: Remove require tty | ||
lineinfile: regexp="tty" dest=/etc/sudoers/os_defaults state=absent | ||
tags: ['system'] | ||
roles: | ||
- { role: 'ansible-docker', tags:['docker'] } | ||
- { role: 'ansible-java8', tags:['java'], when: ansible_os_family == 'Debian' } | ||
- { role: 'ansible-mesos', mesos_containerizers: "docker,mesos", zookeeper_hostnames: "{{ groups.mesos_primaries | join(':' + zookeeper_client_port + ',') }}:{{ zookeeper_client_port }}", mesos_install_mode: "slave", tags: ['mesos'] } | ||
- { role: 'ansible-consul', consul_client_address: "0.0.0.0", consul_is_server: false, consul_datacenter: "sea", consul_servers: "{{ groups.mesos_primaries }}", consul_join_at_start: true, tags:['consul'] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,4 @@ | ||
- hosts: [mesos_masters] | ||
sudo: True | ||
pre_tasks: | ||
- name: Install Debian Packages | ||
apt: pkg={{ item }} state=present | ||
with_items: | ||
- git | ||
- vim | ||
- htop | ||
- haproxy | ||
when: ansible_os_family == "Debian" | ||
- name: Downloading and enable the EPEL repository definitions. | ||
action: command rpm -Uvh --replacepkgs http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | ||
when: ansible_os_family == "RedHat" | ||
- name: Install Redhat Packages | ||
yum: pkg={{ item }} state=present | ||
with_items: | ||
- java7 | ||
- git | ||
- vim | ||
- htop | ||
- haproxy | ||
when: ansible_os_family == "RedHat" | ||
- name: Disable iptables | ||
action: service name=iptables state=stopped enabled=false | ||
when: ansible_os_family == "RedHat" | ||
- name: Sets haproxy to enabled | ||
lineinfile: dest=/etc/default/haproxy regexp="^ENABLED" line="ENABLED=1" | ||
when: ansible_os_family == "Debian" | ||
|
||
roles: | ||
- { role: 'ansible-java8', tags:['runtimes', 'java'], when: ansible_os_family == 'Debian' } | ||
- { role: 'ansible-zookeeper', zookeeper_hosts: "{{ groups.mesos_masters}}", tags:['zookeeper'] } | ||
- { role: 'ansible-mesos', mesos_quorum: "2", zookeeper_hostnames: "{{ groups.mesos_masters | join(':' + zookeeper_client_port + ',') }}:{{ zookeeper_client_port }}", mesos_install_mode: 'master', mesos_cluster_name: 'mlh_mesos', tags: ['mesos', 'platforms'] } | ||
- { role: 'ansible-marathon', zookeeper_hostnames: "{{ groups.mesos_masters | join(':' + zookeeper_client_port + ',') }}:{{ zookeeper_client_port }}", tags:['mesos-tools'] } | ||
|
||
- hosts: [mesos_slaves] | ||
sudo: True | ||
roles: | ||
- { role: 'ansible-docker', tags:['runtimes', 'docker'] } | ||
- { role: 'ansible-java8', tags:['runtimes', 'java'], when: ansible_os_family == 'Debian' } | ||
- { role: 'ansible-mesos', mesos_containerizers: "docker,mesos", zookeeper_hostnames: "{{ groups.mesos_masters | join(':' + zookeeper_client_port + ',') }}:{{ zookeeper_client_port }}", mesos_install_mode: "slave", tags: ['mesos', 'platforms'] } | ||
--- | ||
- include: common.yml | ||
- include: mesos_primaries.yml | ||
- include: mesos_workers.yml |