metron-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ceste...@apache.org
Subject [03/30] incubator-metron git commit: Ansible and vagrant scripts to deploy Metron
Date Fri, 29 Jan 2016 20:04:16 GMT
Ansible and vagrant scripts to deploy Metron


Project: http://git-wip-us.apache.org/repos/asf/incubator-metron/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-metron/commit/dc7f8a8b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-metron/tree/dc7f8a8b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-metron/diff/dc7f8a8b

Branch: refs/heads/master
Commit: dc7f8a8b6ef59108ac7c5004875f7c51e48f3164
Parents: bafa055
Author: rmerriman <rmerriman@hortonworks.com>
Authored: Fri Jan 22 17:47:39 2016 -0600
Committer: rmerriman <rmerriman@hortonworks.com>
Committed: Fri Jan 22 17:47:39 2016 -0600

----------------------------------------------------------------------
 deployment/.gitignore                           |   2 +
 deployment/README.md                            |  48 ++
 deployment/ansible.cfg                          |   4 +
 .../extra_modules/ambari_cluster_state.py       | 393 ++++++++++
 .../inventory/metron_example/group_vars/all     |  29 +
 deployment/inventory/metron_example/hosts       |  11 +
 .../inventory/singlenode-vagrant/group_vars/all |  32 +
 deployment/inventory/singlenode-vagrant/hosts   |  17 +
 deployment/playbooks/ambari_install.yml         |  19 +
 deployment/playbooks/metron_full_install.yml    |   3 +
 deployment/playbooks/metron_install.yml         |  36 +
 deployment/roles/ambari_common/README.md        |  38 +
 .../roles/ambari_common/defaults/main.yml       |   2 +
 .../roles/ambari_common/handlers/main.yml       |   2 +
 deployment/roles/ambari_common/meta/main.yml    | 139 ++++
 deployment/roles/ambari_common/tasks/main.yml   |  42 ++
 .../ambari_common/tasks/passwd_less_ssh.yml     |  22 +
 deployment/roles/ambari_common/vars/main.yml    |   7 +
 deployment/roles/ambari_config/README.md        |  38 +
 .../roles/ambari_config/defaults/main.yml       |   2 +
 .../roles/ambari_config/handlers/main.yml       |   2 +
 deployment/roles/ambari_config/meta/main.yml    | 139 ++++
 deployment/roles/ambari_config/tasks/main.yml   |  20 +
 deployment/roles/ambari_config/vars/main.yml    |   3 +
 .../roles/ambari_config/vars/single_node_vm.yml |  43 ++
 .../roles/ambari_config/vars/small_cluster.yml  |  36 +
 .../roles/ambari_gather_facts/defaults/main.yml |   2 +
 .../roles/ambari_gather_facts/handlers/main.yml |   2 +
 .../roles/ambari_gather_facts/meta/main.yml     | 139 ++++
 .../roles/ambari_gather_facts/tasks/main.yml    | 145 ++++
 .../roles/ambari_gather_facts/vars/main.yml     |   2 +
 deployment/roles/ambari_master/README.md        |  38 +
 .../roles/ambari_master/defaults/main.yml       |   2 +
 .../roles/ambari_master/handlers/main.yml       |   2 +
 deployment/roles/ambari_master/meta/main.yml    | 139 ++++
 deployment/roles/ambari_master/tasks/main.yml   |  15 +
 deployment/roles/ambari_master/vars/main.yml    |   2 +
 deployment/roles/ambari_slave/README.md         |  38 +
 deployment/roles/ambari_slave/defaults/main.yml |   2 +
 deployment/roles/ambari_slave/handlers/main.yml |   2 +
 deployment/roles/ambari_slave/meta/main.yml     | 139 ++++
 deployment/roles/ambari_slave/tasks/main.yml    |  17 +
 deployment/roles/ambari_slave/vars/main.yml     |  11 +
 .../roles/bro/files/flume-bro.conf.template     |  28 +
 deployment/roles/bro/tasks/bro.yml              |  51 ++
 deployment/roles/bro/tasks/flume.yml            |  41 ++
 deployment/roles/bro/tasks/main.yml             |  14 +
 deployment/roles/bro/vars/main.yml              |   2 +
 .../roles/elasticsearch/defaults/main.yml       |   2 +
 .../elasticsearch/files/elasticsearch.repo      |   6 +
 .../roles/elasticsearch/handlers/main.yml       |   3 +
 deployment/roles/elasticsearch/meta/main.yml    | 139 ++++
 deployment/roles/elasticsearch/tasks/main.yml   |  32 +
 deployment/roles/elasticsearch/vars/main.yml    |   3 +
 deployment/roles/flume/files/flume-ipfix.conf   |  27 +
 deployment/roles/flume/tasks/main.yml           |  32 +
 deployment/roles/flume/vars/main.yml            |   2 +
 deployment/roles/metron_pcapservice/README.md   |  38 +
 .../roles/metron_pcapservice/defaults/main.yml  |   2 +
 .../roles/metron_pcapservice/handlers/main.yml  |   3 +
 .../roles/metron_pcapservice/meta/main.yml      | 139 ++++
 .../roles/metron_pcapservice/tasks/main.yml     |  38 +
 .../roles/metron_pcapservice/vars/main.yml      |   6 +
 .../roles/metron_streaming/defaults/main.yml    |   2 +
 .../roles/metron_streaming/handlers/main.yml    |   3 +
 deployment/roles/metron_streaming/meta/main.yml | 139 ++++
 .../roles/metron_streaming/tasks/main.yml       |  76 ++
 deployment/roles/metron_streaming/vars/main.yml |   8 +
 deployment/roles/metron_ui/defaults/main.yml    |   2 +
 deployment/roles/metron_ui/files/opensoc-ui     |   6 +
 deployment/roles/metron_ui/handlers/main.yml    |   3 +
 deployment/roles/metron_ui/meta/main.yml        | 139 ++++
 deployment/roles/metron_ui/tasks/main.yml       |  46 ++
 deployment/roles/metron_ui/vars/main.yml        |   6 +
 deployment/roles/pycapa/tasks/main.yml          |  28 +
 deployment/roles/pycapa/vars/main.yml           |   4 +
 deployment/roles/snort/files/flume-snort.conf   |  28 +
 deployment/roles/snort/files/snort.conf         | 731 +++++++++++++++++++
 .../snort/files/snortrules-snapshot-2962.tar.gz | Bin 0 -> 34687290 bytes
 deployment/roles/snort/tasks/flume.yml          |  27 +
 deployment/roles/snort/tasks/main.yml           |  10 +
 deployment/roles/snort/tasks/snort.yml          |  63 ++
 deployment/roles/snort/vars/main.yml            |   3 +
 deployment/roles/yaf/files/flume-ipfix.conf     |  27 +
 deployment/roles/yaf/tasks/flume.yml            |  27 +
 deployment/roles/yaf/tasks/main.yml             |  10 +
 deployment/roles/yaf/tasks/yaf.yml              |  77 ++
 deployment/roles/yaf/vars/main.yml              |   3 +
 deployment/vagrant/multinode-vagrant/.gitignore |   1 +
 .../vagrant/multinode-vagrant/Vagrantfile       |  45 ++
 .../vagrant/multinode-vagrant/ansible.cfg       |   4 +
 .../vagrant/singlenode-vagrant/.gitignore       |   1 +
 .../vagrant/singlenode-vagrant/Vagrantfile      |  40 +
 .../vagrant/singlenode-vagrant/ansible.cfg      |   4 +
 94 files changed, 3997 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/.gitignore
----------------------------------------------------------------------
diff --git a/deployment/.gitignore b/deployment/.gitignore
new file mode 100644
index 0000000..a98b3a5
--- /dev/null
+++ b/deployment/.gitignore
@@ -0,0 +1,2 @@
+keys/
+.vagrant

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/README.md
----------------------------------------------------------------------
diff --git a/deployment/README.md b/deployment/README.md
new file mode 100644
index 0000000..fadb471
--- /dev/null
+++ b/deployment/README.md
@@ -0,0 +1,48 @@
+# Overview
+This set of playbooks will deploy the full Metron stack using ansible 
+playbooks. These playbooks currently only target RHEL/CentOS 6.x operating
+systems. 
+
+## Setting up your inventory
+Make sure to update the hosts file in `inventory/hosts` or provide an 
+alternate inventory file when you launch the playbooks, including the 
+ssh user(s) and ssh keyfile location(s). These playbooks expect three 
+host groups:
+
+- ambari_master
+- hadoop_master
+- hadoop_slaves
+
+## Running the playbooks
+#### Ambari Install:
+This will install the Ambari server on one machine the ambari agent on 
+the hadoop master/slaves.
+
+Run this playbook with: `ansible-playbook ambari_install.yml`
+
+Some of the code for installing/configuring Ambari comes from here: 
+https://github.com/seanorama/ansible-ambari
+
+#### Ambari Config:
+This will create a cluster in Ambari with a blueprint for the required 
+Metron components. This uses a custom ansible module for managing Ambari 
+clusters using a yaml configuration. The cluster blueprint is defined in 
+this file: `roles/ambari_config/vars/main.yml`
+
+To create a Metron cluster in Ambari, run this playbook with the command: 
+`ansible-playbook ambari_config.yml --tags "create_cluster"`
+
+To delete a Metron cluster in Ambari, run this playbook with the command: 
+`ansible-playbook ambari_config.yml --tags "delete_cluster"`  
+*NOTE: The bug reported in [AMBARI-13906](https://issues.apache.org/jira/browse/AMBARI-13906) 
+prevents cluster delete via the API. To remove the cluster, you must perform
+a hard reset of the ambari server to delete the cluster.*
+
+## TODO
+- Automatically create and populate HBase tables from files
+- migrate existing elasticsearch playbook
+- migrate existing OpenSOC UI playbook
+- migrate existing MySQL/GeoLite playbook
+- migrate existing OpenSOC Storm client playbook
+- Update all playbooks to baseline Metron version
+- Support Ubuntu deployments

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/ansible.cfg
----------------------------------------------------------------------
diff --git a/deployment/ansible.cfg b/deployment/ansible.cfg
new file mode 100644
index 0000000..05de078
--- /dev/null
+++ b/deployment/ansible.cfg
@@ -0,0 +1,4 @@
+[defaults]
+host_key_checking = false
+library = extra_modules
+roles_path = ./roles

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/extra_modules/ambari_cluster_state.py
----------------------------------------------------------------------
diff --git a/deployment/extra_modules/ambari_cluster_state.py b/deployment/extra_modules/ambari_cluster_state.py
new file mode 100644
index 0000000..5ac3e3f
--- /dev/null
+++ b/deployment/extra_modules/ambari_cluster_state.py
@@ -0,0 +1,393 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Author: Mark Bittmann (https://github.com/mbittmann)
+# This file is part of Ansible
+#
+# Ansible is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Ansible is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Ansible.  If not, see <http://www.gnu.org/licenses/>.
+
+DOCUMENTATION = '''
+---
+module: ambari_cluster_state
+version_added: "2.1"
+author: Mark Bittmann (https://github.com/mbittmann)
+short_description: Create, delete, start or stop an ambari cluster
+description:
+    - Create, delete, start or stop an ambari cluster
+options:
+  host:
+    description:
+      The hostname for the ambari web server
+  port:
+    description:
+      The port for the ambari web server
+  username:
+    description:
+      The username for the ambari web server
+  password:
+    description:
+      The name of the cluster in web server
+    required: yes
+  cluster_name:
+    description:
+      The name of the cluster in ambari
+    required: yes
+  cluster_state:
+    description:
+      The desired state for the ambari cluster ['present', 'absent', 'started', 'stopped']. Setting the cluster
+      state to absent will first stop the cluster.
+    required: yes
+  blueprint_var:
+    description:
+      The path to the file defining the cluster blueprint and host mapping. Required when state == 'present'
+    required: no
+  blueprint_name:
+    description:
+      The name of the blueprint. Required when state == 'present'
+    required: no
+  wait_for_complete:
+    description:
+      Whether to wait for the request to complete before returning. Default is False.
+    required: no
+  requirements: [ 'requests']
+'''
+
+EXAMPLES = '''
+# must use full relative path to any files in stored in roles/role_name/files/
+- name: Create a new ambari cluster
+    ambari_cluster_state:
+      host: localhost
+      port: 8080
+      username: admin
+      password: admin
+      cluster_name: my_cluster
+      cluster_state: present
+      blueprint_var: roles/my_role/files/blueprint.yml
+      blueprint_name: hadoop
+      wait_for_complete: True
+- name: Start the ambari cluster
+  ambari_cluster_state:
+    host: localhost
+    port: 8080
+    username: admin
+    password: admin
+    cluster_name: my_cluster
+    cluster_state: started
+    wait_for_complete: True
+- name: Stop the ambari cluster
+  ambari_cluster_state:
+    host: localhost
+    port: 8080
+    username: admin
+    password: admin
+    cluster_name: my_cluster
+    cluster_state: stopped
+    wait_for_complete: True
+- name: Delete the ambari cluster
+  ambari_cluster_state:
+    host: localhost
+    port: 8080
+    username: admin
+    password: admin
+    cluster_name: my_cluster
+    cluster_state: absent
+'''
+
+RETURN = '''
+results:
+    description: The content of the requests object returned from the RESTful call
+    returned: success
+    type: string
+created_blueprint:
+    description: Whether a blueprint was created
+    returned: success
+    type: boolean
+status:
+    description: The status of the blueprint creation process
+    returned: success
+    type: string
+'''
+
+__author__ = 'mbittmann'
+
+import json
+try:
+    import requests
+except ImportError:
+    REQUESTS_FOUND = False
+else:
+    REQUESTS_FOUND = True
+
+
+def main():
+
+    argument_spec = dict(
+        host=dict(type='str', default=None, required=True),
+        port=dict(type='int', default=None, required=True),
+        username=dict(type='str', default=None, required=True),
+        password=dict(type='str', default=None, required=True),
+        cluster_name=dict(type='str', default=None, required=True),
+        cluster_state=dict(type='str', default=None, required=True,
+                           choices=['present', 'absent', 'started', 'stopped']),
+        blueprint_var=dict(type='dict', required=False),
+        blueprint_name=dict(type='str', default=None, required=False),
+        configurations=dict(type='list', default=None, required=False),
+        wait_for_complete=dict(default=False, required=False, choices=BOOLEANS),
+    )
+
+    required_together = ['blueprint_var', 'blueprint_name']
+
+    module = AnsibleModule(
+        argument_spec=argument_spec,
+        required_together=required_together
+    )
+
+    if not REQUESTS_FOUND:
+        module.fail_json(
+            msg='requests library is required for this module')
+
+    p = module.params
+
+    host = p.get('host')
+    port = p.get('port')
+    username = p.get('password')
+    password = p.get('password')
+    cluster_name = p.get('cluster_name')
+    cluster_state = p.get('cluster_state')
+    blueprint_name = p.get('blueprint_name')
+    wait_for_complete = p.get('wait_for_complete')
+
+    ambari_url = 'http://{0}:{1}'.format(host, port)
+
+    try:
+        if cluster_state in ['started', 'stopped']:
+            if not cluster_exists(ambari_url, username, password, cluster_name):
+                module.fail_json(msg="Cluster name {0} does not exist".format(cluster_name))
+            state = ''
+            if cluster_state == 'started':
+                state = 'STARTED'
+            elif cluster_state == 'stopped':
+                state = 'INSTALLED'
+
+            request = set_cluster_state(ambari_url, username, password, cluster_name, state)
+            if wait_for_complete:
+                request_id = json.loads(request.content)['Requests']['id']
+                status = wait_for_request_complete(ambari_url, username, password, cluster_name, request_id, 2)
+                if status != 'COMPLETED':
+                    module.fail_json(msg="Request failed with status {0}".format(status))
+            module.exit_json(changed=True, results=request.content)
+        elif cluster_state == 'absent':
+            if not cluster_exists(ambari_url, username, password, cluster_name):
+                module.exit_json(changed=False, msg='Skipping. Cluster does not exist')
+            if not can_delete_cluster(ambari_url, username, password, cluster_name):
+                request = set_cluster_state(ambari_url, username, password, cluster_name, 'INSTALLED')
+                request_id = json.loads(request.content)['Requests']['id']
+                status = wait_for_request_complete(ambari_url, username, password, cluster_name, request_id, 2)
+                if status != 'COMPLETED':
+                    module.fail_json(msg="Request failed with status {0}".format(status))
+            request = delete_cluster(ambari_url, username, password, cluster_name)
+            module.exit_json(changed=True, results=request.content)
+        elif cluster_state == 'present':
+            if not p.get('blueprint_var') or not blueprint_name:  # have neither name nor file
+                module.fail_json(msg="Must provide blueprint_var and blueprint_name when cluster_state=='present'")
+
+            blueprint_var = p.get('blueprint_var')
+            blueprint, host_map = blueprint_var_to_ambari_converter(blueprint_var)
+            created_blueprint = False
+
+            if not blueprint_exists(ambari_url, username, password, blueprint_name):
+                create_blueprint(ambari_url, username, password, blueprint_name, blueprint)
+                created_blueprint = True
+
+            if cluster_exists(ambari_url, username, password, cluster_name):
+                module.exit_json(changed=False, msg='Cluster {0} already exists'.format(cluster_name),
+                                 created_blueprint=created_blueprint)
+
+            configurations = p.get('configurations')
+            request = create_cluster(ambari_url, username, password, cluster_name, blueprint_name, configurations, host_map)
+            request_id = json.loads(request.content)['Requests']['id']
+            if wait_for_complete:
+                status = wait_for_request_complete(ambari_url, username, password, cluster_name, request_id, 2)
+                if status != 'COMPLETED':
+                    module.fail_json(msg="Request failed with status {0}".format(status))
+            request_status = get_request_status(ambari_url, username, password, cluster_name, request_id)
+            module.exit_json(changed=True, results=request.content,
+                             created_blueprint=created_blueprint, status=request_status)
+
+    except requests.ConnectionError, e:
+        module.fail_json(msg="Could not connect to Ambari client: " + str(e.message))
+    except Exception, e:
+        module.fail_json(msg="Ambari client exception occurred: " + str(e.message))
+
+
+def get_clusters(ambari_url, user, password):
+    r = get(ambari_url, user, password, '/api/v1/clusters')
+    if r.status_code != 200:
+        msg = 'Coud not get cluster list: request code {0}, \
+                    request message {1}'.format(r.status_code, r.content)
+        raise Exception(msg)
+    clusters = json.loads(r.content)
+    return clusters['items']
+
+
+def cluster_exists(ambari_url, user, password, cluster_name):
+    clusters = get_clusters(ambari_url, user, password)
+    return cluster_name in [item['Clusters']['cluster_name'] for item in clusters]
+
+
+def set_cluster_state(ambari_url, user, password, cluster_name, cluster_state):
+    path = '/api/v1/clusters/{0}/services'.format(cluster_name)
+    request = {"RequestInfo": {"context": "Setting cluster state"},
+               "Body": {"ServiceInfo": {"state": "{0}".format(cluster_state)}}}
+    payload = json.dumps(request)
+    r = put(ambari_url, user, password, path, payload)
+    if r.status_code not in [202, 200]:
+        msg = 'Coud not set cluster state: request code {0}, \
+                    request message {1}'.format(r.status_code, r.content)
+        raise Exception(msg)
+    return r
+
+
+def create_cluster(ambari_url, user, password, cluster_name, blueprint_name, configurations, hosts_json):
+    path = '/api/v1/clusters/{0}'.format(cluster_name)
+    data = json.dumps({'blueprint': blueprint_name, 'configurations': configurations, 'host_groups': hosts_json})
+    f = open('cluster.log', 'w')
+    f.write(data)
+    f.close()
+    r = post(ambari_url, user, password, path, data)
+    if r.status_code != 202:
+        msg = 'Coud not create cluster: request code {0}, \
+                    request message {1}'.format(r.status_code, r.content)
+        raise Exception(msg)
+    return r
+
+
+def get_request_status(ambari_url, user, password, cluster_name, request_id):
+    path = '/api/v1/clusters/{0}/requests/{1}'.format(cluster_name, request_id)
+    r = get(ambari_url, user, password, path)
+    if r.status_code != 200:
+        msg = 'Coud not get cluster request status: request code {0}, \
+                    request message {1}'.format(r.status_code, r.content)
+        raise Exception(msg)
+    service = json.loads(r.content)
+    return service['Requests']['request_status']
+
+
+def wait_for_request_complete(ambari_url, user, password, cluster_name, request_id, sleep_time):
+    while True:
+        status = get_request_status(ambari_url, user, password, cluster_name, request_id)
+        if status == 'COMPLETED':
+            return status
+        elif status in ['FAILED', 'TIMEDOUT', 'ABORTED', 'SKIPPED_FAILED']:
+            return status
+        else:
+            time.sleep(sleep_time)
+
+
+def can_delete_cluster(ambari_url, user, password, cluster_name):
+    path = '/api/v1/clusters/{0}/services?ServiceInfo/state=STARTED'.format(cluster_name)
+    r = get(ambari_url, user, password, path)
+    items = json.loads(r.content)['items']
+    return len(items) > 0
+
+
+def get_blueprints(ambari_url, user, password):
+    path = '/api/v1/blueprints'
+    r = get(ambari_url, user, password, path)
+    if r.status_code != 200:
+        msg = 'Coud not get blueprint list: request code {0}, \
+                    request message {1}'.format(r.status_code, r.content)
+        raise Exception(msg)
+
+    services = json.loads(r.content)
+    return services['items']
+
+
+def create_blueprint(ambari_url, user, password, blueprint_name, blueprint_data):
+    data = json.dumps(blueprint_data)
+    f = open('blueprint.log', 'w')
+    f.write(data)
+    f.close()
+    path = "/api/v1/blueprints/" + blueprint_name
+    r = post(ambari_url, user, password, path, data)
+    if r.status_code != 201:
+        msg = 'Coud not create blueprint: request code {0}, \
+                    request message {1}'.format(r.status_code, r.content)
+        raise Exception(msg)
+    return r
+
+
+def blueprint_exists(ambari_url, user, password, blueprint_name):
+    blueprints = get_blueprints(ambari_url, user, password)
+    return blueprint_name in [item['Blueprints']['blueprint_name'] for item in blueprints]
+
+
+def delete_cluster(ambari_url, user, password, cluster_name):
+    path = '/api/v1/clusters/{0}'.format(cluster_name)
+    r = delete(ambari_url, user, password, path)
+    if r.status_code != 200:
+        msg = 'Coud not delete cluster: request code {0}, \
+                    request message {1}'.format(r.status_code, r.content)
+        raise Exception(msg)
+    return r
+
+
+def get(ambari_url, user, password, path):
+    r = requests.get(ambari_url + path, auth=(user, password))
+    return r
+
+
+def put(ambari_url, user, password, path, data):
+    headers = {'X-Requested-By': 'ambari'}
+    r = requests.put(ambari_url + path, data=data, auth=(user, password), headers=headers)
+    return r
+
+
+def post(ambari_url, user, password, path, data):
+    headers = {'X-Requested-By': 'ambari'}
+    r = requests.post(ambari_url + path, data=data, auth=(user, password), headers=headers)
+    return r
+
+
+def delete(ambari_url, user, password, path):
+    headers = {'X-Requested-By': 'ambari'}
+    r = requests.delete(ambari_url + path, auth=(user, password), headers=headers)
+    return r
+
+
+def blueprint_var_to_ambari_converter(blueprint_var):
+    groups = blueprint_var['groups']
+    new_groups = []
+    host_map = []
+    for group in groups:
+        components = []
+        for component in group['components']:
+            components.append({'name': component})
+        group['components'] = components
+        hosts = group.pop('hosts')
+        new_groups.append(group)
+        this_host_map = dict()
+        this_host_map['name'] = group['name']
+        this_host_list = [{'fqdn': host} for host in hosts]
+        this_host_map['hosts'] = this_host_list
+        host_map.append(this_host_map)
+    blueprint = dict()
+    blueprint['host_groups'] = new_groups
+    blueprint['Blueprints'] = {'stack_name': blueprint_var['stack_name'], 'stack_version': blueprint_var['stack_version']}
+
+    return blueprint, host_map
+
+from ansible.module_utils.basic import *
+if __name__ == '__main__':
+    main()

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/inventory/metron_example/group_vars/all
----------------------------------------------------------------------
diff --git a/deployment/inventory/metron_example/group_vars/all b/deployment/inventory/metron_example/group_vars/all
new file mode 100644
index 0000000..12515c7
--- /dev/null
+++ b/deployment/inventory/metron_example/group_vars/all
@@ -0,0 +1,29 @@
+#Ambari variables
+ambari_host: "metron01.cloud.hortonworks.com"
+ambari_port: 8080
+ambari_user: "admin"
+ambari_password: "admin"
+
+#Metron variables
+elasticsearch_ip: "metron07.cloud.hortonworks.com"
+elasticsearch_web_port: 9200
+elasticsearch_transport_port: 9300
+elasticsearch_cluster_name: "metron"
+pcapservice_host: "metron07.cloud.hortonworks.com"
+
+#Default values
+hdp_repo_def: "http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.3.2.0/hdp.repo"
+bro_version: "2.4.1"
+fixbuf_version: "1.7.1"
+yaf_version: "2.8.0"
+snort_version: "2.9.8.0-1"
+daq_version: "2.0.6-1"
+iface: "eth0"
+yaf_topic: "ipfix"
+snort_topic: "snort"
+bro_conn_topic: "bro-conn"
+bro_dns_topic: "bro-dns"
+bro_software_topic: "bro-software"
+pycapa_repo: "https://github.com/OpenSOC/pycapa.git"
+pycapa_home: "/opt/pycapa"
+pycapa_topic: "pcap"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/inventory/metron_example/hosts
----------------------------------------------------------------------
diff --git a/deployment/inventory/metron_example/hosts b/deployment/inventory/metron_example/hosts
new file mode 100644
index 0000000..f399a2b
--- /dev/null
+++ b/deployment/inventory/metron_example/hosts
@@ -0,0 +1,11 @@
+[enrichment]
+metron07.cloud.hortonworks.com  ansible_ssh_private_key_file=/Users/rmerriman/Projects/Metron/AWS/secloud/cluster_key.txt ansible_ssh_user=root
+
+[search]
+metron07.cloud.hortonworks.com  ansible_ssh_private_key_file=/Users/rmerriman/Projects/Metron/AWS/secloud/cluster_key.txt ansible_ssh_pass=vagrant ansible_ssh_user=root
+
+[web]
+metron07.cloud.hortonworks.com  ansible_ssh_private_key_file=/Users/rmerriman/Projects/Metron/AWS/secloud/cluster_key.txt ansible_ssh_pass=vagrant ansible_ssh_user=root
+
+[sensors]
+metron07.cloud.hortonworks.com  ansible_ssh_private_key_file=/Users/rmerriman/Projects/Metron/AWS/secloud/cluster_key.txt ansible_ssh_pass=vagrant ansible_ssh_user=root
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/inventory/singlenode-vagrant/group_vars/all
----------------------------------------------------------------------
diff --git a/deployment/inventory/singlenode-vagrant/group_vars/all b/deployment/inventory/singlenode-vagrant/group_vars/all
new file mode 100644
index 0000000..79f1794
--- /dev/null
+++ b/deployment/inventory/singlenode-vagrant/group_vars/all
@@ -0,0 +1,32 @@
+#Ambari variables
+ambari_host: "node1"
+ambari_port: 8080
+ambari_user: "admin"
+ambari_password: "admin"
+cluster_name: "metron_cluster"
+cluster_type: "single_node_vm"
+hdp_host_group: ["node1"]
+
+#Metron variables
+elasticsearch_ip: "192.168.66.121"
+elasticsearch_web_port: 9200
+elasticsearch_transport_port: 9300
+elasticsearch_cluster_name: "metron"
+pcapservice_host: "node1"
+
+#Default values
+hdp_repo_def: "http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.3.2.0/hdp.repo"
+bro_version: "2.4.1"
+fixbuf_version: "1.7.1"
+yaf_version: "2.8.0"
+snort_version: "2.9.8.0-1"
+daq_version: "2.0.6-1"
+iface: "eth0"
+yaf_topic: "ipfix"
+snort_topic: "snort"
+bro_conn_topic: "bro-conn"
+bro_dns_topic: "bro-dns"
+bro_software_topic: "bro-software"
+pycapa_repo: "https://github.com/OpenSOC/pycapa.git"
+pycapa_home: "/opt/pycapa"
+pycapa_topic: "pcap"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/inventory/singlenode-vagrant/hosts
----------------------------------------------------------------------
diff --git a/deployment/inventory/singlenode-vagrant/hosts b/deployment/inventory/singlenode-vagrant/hosts
new file mode 100644
index 0000000..e46577c
--- /dev/null
+++ b/deployment/inventory/singlenode-vagrant/hosts
@@ -0,0 +1,17 @@
+[ambari_master]
+node1
+
+[ambari_slave]
+node1
+
+[enrichment]
+node1
+
+[search]
+node1
+
+[web]
+node1
+
+[sensors]
+node1

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/playbooks/ambari_install.yml
----------------------------------------------------------------------
diff --git a/deployment/playbooks/ambari_install.yml b/deployment/playbooks/ambari_install.yml
new file mode 100644
index 0000000..bd918f6
--- /dev/null
+++ b/deployment/playbooks/ambari_install.yml
@@ -0,0 +1,19 @@
+---
+- hosts: ambari_*
+  sudo: yes
+  roles:
+    - role: ambari_common
+
+- hosts: ambari_master
+  sudo: yes
+  roles:
+    - role: ambari_master
+
+- hosts: ambari_slave
+  sudo: yes
+  roles:
+    - role: ambari_slave
+
+- hosts: ambari_master
+  roles:
+    - role: ambari_config
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/playbooks/metron_full_install.yml
----------------------------------------------------------------------
diff --git a/deployment/playbooks/metron_full_install.yml b/deployment/playbooks/metron_full_install.yml
new file mode 100644
index 0000000..c6200a8
--- /dev/null
+++ b/deployment/playbooks/metron_full_install.yml
@@ -0,0 +1,3 @@
+---
+- include: ambari_install.yml
+- include: metron_install.yml
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/playbooks/metron_install.yml
----------------------------------------------------------------------
diff --git a/deployment/playbooks/metron_install.yml b/deployment/playbooks/metron_install.yml
new file mode 100644
index 0000000..07364b4
--- /dev/null
+++ b/deployment/playbooks/metron_install.yml
@@ -0,0 +1,36 @@
+---
+- hosts: search
+  sudo: yes
+  roles:
+    - role: elasticsearch
+  tags:
+    - elasticsearch
+
+- hosts: sensors
+  sudo: yes
+  roles:
+    - role: ambari_gather_facts
+    - role: flume
+    - role: pycapa
+    - role: bro
+    - role: snort
+    - role: yaf
+  tags:
+      - sensors
+
+- hosts: enrichment
+  sudo: yes
+  roles:
+    - role: ambari_gather_facts
+    - role: metron_streaming
+  tags:
+    - enrichment
+
+- hosts: web
+  sudo: yes
+  roles:
+    - role: ambari_gather_facts
+    - role: metron_ui
+    - role: metron_pcapservice
+  tags:
+    - web
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_common/README.md
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_common/README.md b/deployment/roles/ambari_common/README.md
new file mode 100644
index 0000000..225dd44
--- /dev/null
+++ b/deployment/roles/ambari_common/README.md
@@ -0,0 +1,38 @@
+Role Name
+=========
+
+A brief description of the role goes here.
+
+Requirements
+------------
+
+Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
+
+Role Variables
+--------------
+
+A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
+
+Dependencies
+------------
+
+A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
+
+Example Playbook
+----------------
+
+Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
+
+    - hosts: servers
+      roles:
+         - { role: username.rolename, x: 42 }
+
+License
+-------
+
+BSD
+
+Author Information
+------------------
+
+An optional section for the role authors to include contact information, or a website (HTML is not allowed).

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_common/defaults/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_common/defaults/main.yml b/deployment/roles/ambari_common/defaults/main.yml
new file mode 100644
index 0000000..a50f9ca
--- /dev/null
+++ b/deployment/roles/ambari_common/defaults/main.yml
@@ -0,0 +1,2 @@
+---
+# defaults file for ambari_common

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_common/handlers/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_common/handlers/main.yml b/deployment/roles/ambari_common/handlers/main.yml
new file mode 100644
index 0000000..63c3e6f
--- /dev/null
+++ b/deployment/roles/ambari_common/handlers/main.yml
@@ -0,0 +1,2 @@
+---
+# handlers file for ambari_common

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_common/meta/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_common/meta/main.yml b/deployment/roles/ambari_common/meta/main.yml
new file mode 100644
index 0000000..62c7d35
--- /dev/null
+++ b/deployment/roles/ambari_common/meta/main.yml
@@ -0,0 +1,139 @@
+---
+galaxy_info:
+  author: your name
+  description: 
+  company: your company (optional)
+  # If the issue tracker for your role is not on github, uncomment the
+  # next line and provide a value
+  # issue_tracker_url: http://example.com/issue/tracker
+  # Some suggested licenses:
+  # - BSD (default)
+  # - MIT
+  # - GPLv2
+  # - GPLv3
+  # - Apache
+  # - CC-BY
+  license: license (GPLv2, CC-BY, etc)
+  min_ansible_version: 1.2
+  #
+  # Below are all platforms currently available. Just uncomment
+  # the ones that apply to your role. If you don't see your 
+  # platform on this list, let us know and we'll get it added!
+  #
+  #platforms:
+  #- name: EL
+  #  versions:
+  #  - all
+  #  - 5
+  #  - 6
+  #  - 7
+  #- name: GenericUNIX
+  #  versions:
+  #  - all
+  #  - any
+  #- name: Fedora
+  #  versions:
+  #  - all
+  #  - 16
+  #  - 17
+  #  - 18
+  #  - 19
+  #  - 20
+  #  - 21
+  #  - 22
+  #- name: Windows
+  #  versions:
+  #  - all
+  #  - 2012R2
+  #- name: SmartOS
+  #  versions:
+  #  - all
+  #  - any
+  #- name: opensuse
+  #  versions:
+  #  - all
+  #  - 12.1
+  #  - 12.2
+  #  - 12.3
+  #  - 13.1
+  #  - 13.2
+  #- name: Amazon
+  #  versions:
+  #  - all
+  #  - 2013.03
+  #  - 2013.09
+  #- name: GenericBSD
+  #  versions:
+  #  - all
+  #  - any
+  #- name: FreeBSD
+  #  versions:
+  #  - all
+  #  - 8.0
+  #  - 8.1
+  #  - 8.2
+  #  - 8.3
+  #  - 8.4
+  #  - 9.0
+  #  - 9.1
+  #  - 9.1
+  #  - 9.2
+  #- name: Ubuntu
+  #  versions:
+  #  - all
+  #  - lucid
+  #  - maverick
+  #  - natty
+  #  - oneiric
+  #  - precise
+  #  - quantal
+  #  - raring
+  #  - saucy
+  #  - trusty
+  #  - utopic
+  #  - vivid
+  #- name: SLES
+  #  versions:
+  #  - all
+  #  - 10SP3
+  #  - 10SP4
+  #  - 11
+  #  - 11SP1
+  #  - 11SP2
+  #  - 11SP3
+  #- name: GenericLinux
+  #  versions:
+  #  - all
+  #  - any
+  #- name: Debian
+  #  versions:
+  #  - all
+  #  - etch
+  #  - jessie
+  #  - lenny
+  #  - squeeze
+  #  - wheezy
+  #
+  # Below are all categories currently available. Just as with
+  # the platforms above, uncomment those that apply to your role.
+  #
+  #categories:
+  #- cloud
+  #- cloud:ec2
+  #- cloud:gce
+  #- cloud:rax
+  #- clustering
+  #- database
+  #- database:nosql
+  #- database:sql
+  #- development
+  #- monitoring
+  #- networking
+  #- packaging
+  #- system
+  #- web
+dependencies: []
+  # List your role dependencies here, one per line.
+  # Be sure to remove the '[]' above if you add dependencies
+  # to this list.
+  

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_common/tasks/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_common/tasks/main.yml b/deployment/roles/ambari_common/tasks/main.yml
new file mode 100644
index 0000000..0acefa7
--- /dev/null
+++ b/deployment/roles/ambari_common/tasks/main.yml
@@ -0,0 +1,42 @@
+---
+# tasks file for ambari_common
+- name: Install libselinux-python
+  yum: name=libselinux-python state=latest
+
+- include: passwd_less_ssh.yml
+
+# 
+# ambari uses socket.getfqdn() to find the hostname. with 'localhost.localdomain'
+# in '/etc/hosts' this function will report the hostname as 'localhost.localdomain'
+# rather than 'node1' as would be expected.  other functions like socket.gethostname()
+# will always return 'node1' as expected.  ambari needs to see 'node1' to be able to
+# communicate between the master and agents.
+
+- name: Remove ipv4 'localhost.localdomain' from /etc/hosts
+  lineinfile: dest=/etc/hosts state=absent regexp="^127.0.0.1(.*)localdomain(.*)$"
+
+- name: Remove ipv6 'localhost.localdomain' from /etc/hosts
+  lineinfile: dest=/etc/hosts state=absent regexp="^::1(.*)localdomain(.*)$"
+
+- name: Add localhost to /etc/hosts
+  lineinfile: dest=/etc/hosts line="127.0.0.1   localhost"
+
+- name: Download HDP repo
+  get_url: url="{{ rhel_ambari_install_url }}" dest=/etc/yum.repos.d/
+
+- name: Install EPEL repo.
+  yum:
+    name: "{{ epel_repo_url }}"
+    state: present
+
+- name: Clean yum
+  shell: yum clean all
+
+- name: install ntp
+  yum: name=ntp state=present
+
+- name: Ensure ntp is running and enabled
+  service: name=ntpd state=started enabled=yes
+
+- name: Ensure iptables is stopped and is not running at boot time.
+  service: name=iptables state=stopped enabled=no

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_common/tasks/passwd_less_ssh.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_common/tasks/passwd_less_ssh.yml b/deployment/roles/ambari_common/tasks/passwd_less_ssh.yml
new file mode 100644
index 0000000..e414712
--- /dev/null
+++ b/deployment/roles/ambari_common/tasks/passwd_less_ssh.yml
@@ -0,0 +1,22 @@
+---
+- name: Generate ssh key pair for "{{ ambari_user }}"
+  user: name={{ ambari_user }} generate_ssh_key=yes
+
+- name: Fetch the generated public key from "{{ ansible_hostname }}"
+  fetch: src=~{{ ambari_user }}/.ssh/id_rsa.pub dest=/tmp/keys/{{ ansible_hostname }}.pub flat=yes
+
+- name: Set ownership/permissions on 'authorized_keys' file
+  file:
+    path: "~{{ ambari_user }}/.ssh/authorized_keys"
+    owner: "{{ ambari_user }}"
+    group: "{{ ambari_user }}"
+    mode: 0644
+    state: touch
+
+- name: Assemble each host's public key into an 'authorized_keys' file
+  assemble:
+    remote_src: false
+    src: /tmp/keys
+    dest: "~{{ ambari_user }}/.ssh/authorized_keys"
+    owner: "{{ ambari_user }}"
+    mode: 0644

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_common/vars/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_common/vars/main.yml b/deployment/roles/ambari_common/vars/main.yml
new file mode 100644
index 0000000..935a138
--- /dev/null
+++ b/deployment/roles/ambari_common/vars/main.yml
@@ -0,0 +1,7 @@
+---
+# vars file for ambari_common
+epel_repo_url: "http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm"
+rhel_ambari_install_url: "http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.1.2.1/ambari.repo"
+ambari_user: "root"
+local_tmp_keygen_file: "/tmp/id_rsa.tmp"
+dest_tmp_keygen_file: "/tmp/id_rsa.tmp"

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_config/README.md
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_config/README.md b/deployment/roles/ambari_config/README.md
new file mode 100644
index 0000000..225dd44
--- /dev/null
+++ b/deployment/roles/ambari_config/README.md
@@ -0,0 +1,38 @@
+Role Name
+=========
+
+A brief description of the role goes here.
+
+Requirements
+------------
+
+Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
+
+Role Variables
+--------------
+
+A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
+
+Dependencies
+------------
+
+A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
+
+Example Playbook
+----------------
+
+Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
+
+    - hosts: servers
+      roles:
+         - { role: username.rolename, x: 42 }
+
+License
+-------
+
+BSD
+
+Author Information
+------------------
+
+An optional section for the role authors to include contact information, or a website (HTML is not allowed).

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_config/defaults/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_config/defaults/main.yml b/deployment/roles/ambari_config/defaults/main.yml
new file mode 100644
index 0000000..78fc121
--- /dev/null
+++ b/deployment/roles/ambari_config/defaults/main.yml
@@ -0,0 +1,2 @@
+---
+# defaults file for ambari_config

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_config/handlers/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_config/handlers/main.yml b/deployment/roles/ambari_config/handlers/main.yml
new file mode 100644
index 0000000..bf6bdbe
--- /dev/null
+++ b/deployment/roles/ambari_config/handlers/main.yml
@@ -0,0 +1,2 @@
+---
+# handlers file for ambari_config

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_config/meta/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_config/meta/main.yml b/deployment/roles/ambari_config/meta/main.yml
new file mode 100644
index 0000000..62c7d35
--- /dev/null
+++ b/deployment/roles/ambari_config/meta/main.yml
@@ -0,0 +1,139 @@
+---
+galaxy_info:
+  author: your name
+  description: 
+  company: your company (optional)
+  # If the issue tracker for your role is not on github, uncomment the
+  # next line and provide a value
+  # issue_tracker_url: http://example.com/issue/tracker
+  # Some suggested licenses:
+  # - BSD (default)
+  # - MIT
+  # - GPLv2
+  # - GPLv3
+  # - Apache
+  # - CC-BY
+  license: license (GPLv2, CC-BY, etc)
+  min_ansible_version: 1.2
+  #
+  # Below are all platforms currently available. Just uncomment
+  # the ones that apply to your role. If you don't see your 
+  # platform on this list, let us know and we'll get it added!
+  #
+  #platforms:
+  #- name: EL
+  #  versions:
+  #  - all
+  #  - 5
+  #  - 6
+  #  - 7
+  #- name: GenericUNIX
+  #  versions:
+  #  - all
+  #  - any
+  #- name: Fedora
+  #  versions:
+  #  - all
+  #  - 16
+  #  - 17
+  #  - 18
+  #  - 19
+  #  - 20
+  #  - 21
+  #  - 22
+  #- name: Windows
+  #  versions:
+  #  - all
+  #  - 2012R2
+  #- name: SmartOS
+  #  versions:
+  #  - all
+  #  - any
+  #- name: opensuse
+  #  versions:
+  #  - all
+  #  - 12.1
+  #  - 12.2
+  #  - 12.3
+  #  - 13.1
+  #  - 13.2
+  #- name: Amazon
+  #  versions:
+  #  - all
+  #  - 2013.03
+  #  - 2013.09
+  #- name: GenericBSD
+  #  versions:
+  #  - all
+  #  - any
+  #- name: FreeBSD
+  #  versions:
+  #  - all
+  #  - 8.0
+  #  - 8.1
+  #  - 8.2
+  #  - 8.3
+  #  - 8.4
+  #  - 9.0
+  #  - 9.1
+  #  - 9.1
+  #  - 9.2
+  #- name: Ubuntu
+  #  versions:
+  #  - all
+  #  - lucid
+  #  - maverick
+  #  - natty
+  #  - oneiric
+  #  - precise
+  #  - quantal
+  #  - raring
+  #  - saucy
+  #  - trusty
+  #  - utopic
+  #  - vivid
+  #- name: SLES
+  #  versions:
+  #  - all
+  #  - 10SP3
+  #  - 10SP4
+  #  - 11
+  #  - 11SP1
+  #  - 11SP2
+  #  - 11SP3
+  #- name: GenericLinux
+  #  versions:
+  #  - all
+  #  - any
+  #- name: Debian
+  #  versions:
+  #  - all
+  #  - etch
+  #  - jessie
+  #  - lenny
+  #  - squeeze
+  #  - wheezy
+  #
+  # Below are all categories currently available. Just as with
+  # the platforms above, uncomment those that apply to your role.
+  #
+  #categories:
+  #- cloud
+  #- cloud:ec2
+  #- cloud:gce
+  #- cloud:rax
+  #- clustering
+  #- database
+  #- database:nosql
+  #- database:sql
+  #- development
+  #- monitoring
+  #- networking
+  #- packaging
+  #- system
+  #- web
+dependencies: []
+  # List your role dependencies here, one per line.
+  # Be sure to remove the '[]' above if you add dependencies
+  # to this list.
+  

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_config/tasks/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_config/tasks/main.yml b/deployment/roles/ambari_config/tasks/main.yml
new file mode 100644
index 0000000..7b8864e
--- /dev/null
+++ b/deployment/roles/ambari_config/tasks/main.yml
@@ -0,0 +1,20 @@
+---
+# tasks file for ambari_config
+
+- include_vars: "{{ cluster_type }}.yml"
+
+- name: Install python-requests
+  yum: name=python-requests state=latest
+
+- name: Create the ambari cluster
+  ambari_cluster_state:
+    host: "{{ ambari_host }}"
+    port: "{{ ambari_port }}"
+    username: "{{ ambari_user }}"
+    password: "{{ ambari_password }}"
+    cluster_name: "{{ cluster_name }}"
+    cluster_state: present
+    blueprint_name: "{{ blueprint_name }}"
+    configurations: "{{ configurations }}"
+    wait_for_complete: True
+    blueprint_var: "{{ blueprint }}"

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_config/vars/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_config/vars/main.yml b/deployment/roles/ambari_config/vars/main.yml
new file mode 100644
index 0000000..3888eb1
--- /dev/null
+++ b/deployment/roles/ambari_config/vars/main.yml
@@ -0,0 +1,3 @@
+---
+# vars file for ambari_config
+

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_config/vars/single_node_vm.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_config/vars/single_node_vm.yml b/deployment/roles/ambari_config/vars/single_node_vm.yml
new file mode 100644
index 0000000..010903b
--- /dev/null
+++ b/deployment/roles/ambari_config/vars/single_node_vm.yml
@@ -0,0 +1,43 @@
+---
+# vars file for single_node_vm blueprint
+
+hadoop_master: [NAMENODE, SECONDARY_NAMENODE, RESOURCEMANAGER, HISTORYSERVER]
+hadoop_slave: [APP_TIMELINE_SERVER, DATANODE, HDFS_CLIENT, NODEMANAGER, YARN_CLIENT, MAPREDUCE2_CLIENT]
+spark_master: [SPARK_JOBHISTORYSERVER]
+spark_slave: [SPARK_CLIENT]
+storm_master: [NIMBUS, STORM_UI_SERVER, DRPC_SERVER]
+storm_slave: [SUPERVISOR]
+kafka_broker: [KAFKA_BROKER]
+zookeeper_master: [ZOOKEEPER_SERVER]
+zookeeper_slave: [ZOOKEEPER_CLIENT]
+ganglia_master: [GANGLIA_SERVER]
+hbase_master: [HBASE_MASTER, HBASE_CLIENT]
+hbase_slave: [HBASE_REGIONSERVER]
+
+metron_components: "{{ hadoop_master | union(zookeeper_master) | union(storm_master) | union(spark_master) | union(ganglia_master) | union(hbase_master) | union(hadoop_slave) | union(zookeeper_slave) | union(storm_slave) | union(spark_slave) | union(kafka_broker) | union(hbase_slave) }}"
+
+blueprint_name: "metron_blueprint"
+
+configurations:
+  - hadoop-env:
+      namenode_heapsize: 1024
+      dtnode_heapsize: 1024
+  - hbase-env:
+      hbase_regionserver_heapsize: 1024
+      hbase_master_heapsize: 1024
+  - yarn-env:
+      nodemanager_heapsize: 1024
+      yarn_heapsize: 1024
+  - yarn-site:
+      yarn.nodemanager.resource.memory-mb: 1024
+      yarn.scheduler.maximum-allocation-mb: 1024
+
+blueprint:
+  stack_name: HDP
+  stack_version: 2.3
+  groups:
+    - name : host_group_1
+      cardinality: 1
+      configurations: []
+      components: "{{ metron_components }}"
+      hosts: "{{ hdp_host_group }}"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_config/vars/small_cluster.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_config/vars/small_cluster.yml b/deployment/roles/ambari_config/vars/small_cluster.yml
new file mode 100644
index 0000000..da6b655
--- /dev/null
+++ b/deployment/roles/ambari_config/vars/small_cluster.yml
@@ -0,0 +1,36 @@
+---
+# vars file for small_cluster blueprint
+
+hadoop_master: [NAMENODE, SECONDARY_NAMENODE, RESOURCEMANAGER, HISTORYSERVER]
+hadoop_slave: [APP_TIMELINE_SERVER, DATANODE, HDFS_CLIENT, NODEMANAGER, YARN_CLIENT, MAPREDUCE2_CLIENT]
+spark_master: [SPARK_JOBHISTORYSERVER]
+spark_slave: [SPARK_CLIENT]
+storm_master: [NIMBUS, STORM_UI_SERVER, DRPC_SERVER]
+storm_slave: [SUPERVISOR]
+kafka_broker: [KAFKA_BROKER]
+zookeeper_master: [ZOOKEEPER_SERVER]
+zookeeper_slave: [ZOOKEEPER_CLIENT]
+ganglia_master: [GANGLIA_SERVER]
+hbase_master: [HBASE_MASTER, HBASE_CLIENT]
+hbase_slave: [HBASE_REGIONSERVER]
+
+master_components: "{{ hadoop_master | union(zookeeper_master) | union(storm_master) | union(spark_master) | union(ganglia_master) | union(hbase_master) }}"
+slave_components: "{{ hadoop_slave | union(zookeeper_slave) | union(storm_slave) | union(spark_slave) | union(kafka_broker) | union(hbase_slave) }}"
+
+cluster_name: "metron_cluster"
+blueprint_name: "metron_blueprint"
+
+blueprint:
+  stack_name: HDP
+  stack_version: 2.3
+  groups:
+    - name : master
+      cardinality: 1
+      configuration: []  # configuration not yet implemented
+      components: "{{ master_components }}"
+      hosts: "{{masters_group}}"
+    - name: slaves
+      cardinality: 1+
+      configuration: []  # configuration not yet implemented
+      components: "{{ slave_components }}"
+      hosts: "{{slaves_group}}"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_gather_facts/defaults/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_gather_facts/defaults/main.yml b/deployment/roles/ambari_gather_facts/defaults/main.yml
new file mode 100644
index 0000000..a5edc1e
--- /dev/null
+++ b/deployment/roles/ambari_gather_facts/defaults/main.yml
@@ -0,0 +1,2 @@
+---
+# defaults file for ambari_gather_facts

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_gather_facts/handlers/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_gather_facts/handlers/main.yml b/deployment/roles/ambari_gather_facts/handlers/main.yml
new file mode 100644
index 0000000..277d551
--- /dev/null
+++ b/deployment/roles/ambari_gather_facts/handlers/main.yml
@@ -0,0 +1,2 @@
+---
+# handlers file for ambari_gather_facts

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_gather_facts/meta/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_gather_facts/meta/main.yml b/deployment/roles/ambari_gather_facts/meta/main.yml
new file mode 100644
index 0000000..62c7d35
--- /dev/null
+++ b/deployment/roles/ambari_gather_facts/meta/main.yml
@@ -0,0 +1,139 @@
+---
+galaxy_info:
+  author: your name
+  description: 
+  company: your company (optional)
+  # If the issue tracker for your role is not on github, uncomment the
+  # next line and provide a value
+  # issue_tracker_url: http://example.com/issue/tracker
+  # Some suggested licenses:
+  # - BSD (default)
+  # - MIT
+  # - GPLv2
+  # - GPLv3
+  # - Apache
+  # - CC-BY
+  license: license (GPLv2, CC-BY, etc)
+  min_ansible_version: 1.2
+  #
+  # Below are all platforms currently available. Just uncomment
+  # the ones that apply to your role. If you don't see your 
+  # platform on this list, let us know and we'll get it added!
+  #
+  #platforms:
+  #- name: EL
+  #  versions:
+  #  - all
+  #  - 5
+  #  - 6
+  #  - 7
+  #- name: GenericUNIX
+  #  versions:
+  #  - all
+  #  - any
+  #- name: Fedora
+  #  versions:
+  #  - all
+  #  - 16
+  #  - 17
+  #  - 18
+  #  - 19
+  #  - 20
+  #  - 21
+  #  - 22
+  #- name: Windows
+  #  versions:
+  #  - all
+  #  - 2012R2
+  #- name: SmartOS
+  #  versions:
+  #  - all
+  #  - any
+  #- name: opensuse
+  #  versions:
+  #  - all
+  #  - 12.1
+  #  - 12.2
+  #  - 12.3
+  #  - 13.1
+  #  - 13.2
+  #- name: Amazon
+  #  versions:
+  #  - all
+  #  - 2013.03
+  #  - 2013.09
+  #- name: GenericBSD
+  #  versions:
+  #  - all
+  #  - any
+  #- name: FreeBSD
+  #  versions:
+  #  - all
+  #  - 8.0
+  #  - 8.1
+  #  - 8.2
+  #  - 8.3
+  #  - 8.4
+  #  - 9.0
+  #  - 9.1
+  #  - 9.1
+  #  - 9.2
+  #- name: Ubuntu
+  #  versions:
+  #  - all
+  #  - lucid
+  #  - maverick
+  #  - natty
+  #  - oneiric
+  #  - precise
+  #  - quantal
+  #  - raring
+  #  - saucy
+  #  - trusty
+  #  - utopic
+  #  - vivid
+  #- name: SLES
+  #  versions:
+  #  - all
+  #  - 10SP3
+  #  - 10SP4
+  #  - 11
+  #  - 11SP1
+  #  - 11SP2
+  #  - 11SP3
+  #- name: GenericLinux
+  #  versions:
+  #  - all
+  #  - any
+  #- name: Debian
+  #  versions:
+  #  - all
+  #  - etch
+  #  - jessie
+  #  - lenny
+  #  - squeeze
+  #  - wheezy
+  #
+  # Below are all categories currently available. Just as with
+  # the platforms above, uncomment those that apply to your role.
+  #
+  #categories:
+  #- cloud
+  #- cloud:ec2
+  #- cloud:gce
+  #- cloud:rax
+  #- clustering
+  #- database
+  #- database:nosql
+  #- database:sql
+  #- development
+  #- monitoring
+  #- networking
+  #- packaging
+  #- system
+  #- web
+dependencies: []
+  # List your role dependencies here, one per line.
+  # Be sure to remove the '[]' above if you add dependencies
+  # to this list.
+  

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_gather_facts/tasks/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_gather_facts/tasks/main.yml b/deployment/roles/ambari_gather_facts/tasks/main.yml
new file mode 100644
index 0000000..eb0b4ca
--- /dev/null
+++ b/deployment/roles/ambari_gather_facts/tasks/main.yml
@@ -0,0 +1,145 @@
+---
+# tasks file for ambari_gather_facts
+- name: Install pip
+  yum:
+    name: python-pip
+    state: latest
+
+- name: Install python httplib2 dependency
+  pip:
+    name: httplib2
+
+- name: Ambari rest get cluster name
+  uri:
+    url: "http://{{ ambari_host }}:{{ ambari_port }}/api/v1/clusters"
+    user: "{{ ambari_user }}"
+    password: "{{ ambari_password }}"
+    force_basic_auth: yes
+    return_content: yes
+  register: cluster_name_response
+
+- set_fact:
+    cluster_name: "{{ (cluster_name_response.content | from_json)['items'][0].Clusters.cluster_name }}"
+
+- name: Ambari rest get namenode hosts
+  uri:
+    url: "http://{{ ambari_host }}:{{ ambari_port }}/api/v1/clusters/{{ cluster_name }}/services/HDFS/components/NAMENODE"
+    user: "{{ ambari_user }}"
+    password: "{{ ambari_password }}"
+    force_basic_auth: yes
+    return_content: yes
+  register: namenode_hosts_response
+
+- set_fact:
+    namenode_host: "{{ (namenode_hosts_response.content | from_json).host_components[0].HostRoles.host_name }}"
+
+- name: Ambari rest get namenode core-site tag
+  uri:
+    url: "http://{{ ambari_host }}:{{ ambari_port }}/api/v1/clusters/{{ cluster_name }}/hosts/{{ namenode_host }}/host_components/NAMENODE"
+    user: "{{ ambari_user }}"
+    password: "{{ ambari_password }}"
+    force_basic_auth: yes
+    return_content: yes
+  register: core_site_tag_response
+
+- set_fact:
+    core_site_tag: "{{ (core_site_tag_response.content | from_json).HostRoles.actual_configs['core-site'].default }}"
+
+- name: Ambari rest get namenode core-site properties
+  uri:
+    url: "http://{{ ambari_host }}:{{ ambari_port }}/api/v1/clusters/{{ cluster_name }}/configurations?type=core-site&tag={{ core_site_tag }}"
+    user: "{{ ambari_user }}"
+    password: "{{ ambari_password }}"
+    force_basic_auth: yes
+    return_content: yes
+  register: core_site_response
+
+- set_fact:
+    hdfs_url: "{{ (core_site_response.content | from_json)['items'][0].properties['fs.defaultFS'] }}"
+
+- name: Ambari rest get kafka broker hosts
+  uri:
+    url: "http://{{ ambari_host }}:{{ ambari_port }}/api/v1/clusters/{{ cluster_name }}/services/KAFKA/components/KAFKA_BROKER"
+    user: "{{ ambari_user }}"
+    password: "{{ ambari_password }}"
+    force_basic_auth: yes
+    return_content: yes
+  register: kafka_broker_hosts_response
+
+- set_fact:
+    kafka_broker_hosts: "{{ (kafka_broker_hosts_response.content | from_json).host_components | map(attribute='HostRoles.host_name') | list }}"
+
+- name: Ambari rest get kafka kafka-broker tag
+  uri:
+    url: "http://{{ ambari_host }}:{{ ambari_port }}/api/v1/clusters/{{ cluster_name }}/hosts/{{ kafka_broker_hosts[0] }}/host_components/KAFKA_BROKER"
+    user: "{{ ambari_user }}"
+    password: "{{ ambari_password }}"
+    force_basic_auth: yes
+    return_content: yes
+  register: kafka_broker_tag_response
+
+- set_fact:
+    kafka_broker_tag: "{{ (kafka_broker_tag_response.content | from_json).HostRoles.actual_configs['kafka-broker'].default }}"
+
+- name: Ambari rest get kafka kafka-broker properties
+  uri:
+    url: "http://{{ ambari_host }}:{{ ambari_port }}/api/v1/clusters/{{ cluster_name }}/configurations?type=kafka-broker&tag={{ kafka_broker_tag }}"
+    user: "{{ ambari_user }}"
+    password: "{{ ambari_password }}"
+    force_basic_auth: yes
+    return_content: yes
+  register: kafka_broker_properties_response
+
+- set_fact:
+    kafka_broker_port: "{{ (kafka_broker_properties_response.content | from_json)['items'][0].properties['listeners'] | replace('PLAINTEXT://localhost:', '')}}"
+
+- set_fact:
+    kafka_broker_url: "{% for host in kafka_broker_hosts %}{% if loop.index != 1 %},{% endif %}{{ host }}:{{ kafka_broker_port }}{% endfor %}"
+
+- name: Ambari rest get zookeeper hosts
+  uri:
+    url: "http://{{ ambari_host }}:{{ ambari_port }}/api/v1/clusters/{{ cluster_name }}/services/ZOOKEEPER/components/ZOOKEEPER_SERVER"
+    user: "{{ ambari_user }}"
+    password: "{{ ambari_password }}"
+    force_basic_auth: yes
+    return_content: yes
+  register: zookeeper_hosts_response
+
+- set_fact:
+    zookeeper_hosts: "{{ (zookeeper_hosts_response.content | from_json).host_components | map(attribute='HostRoles.host_name') | list }}"
+
+- name: Ambari rest get zookeeper zoo.cfg tag
+  uri:
+    url: "http://{{ ambari_host }}:{{ ambari_port }}/api/v1/clusters/{{ cluster_name }}/hosts/{{ zookeeper_hosts[0] }}/host_components/ZOOKEEPER_SERVER"
+    user: "{{ ambari_user }}"
+    password: "{{ ambari_password }}"
+    force_basic_auth: yes
+    return_content: yes
+  register: zookeeper_tag_response
+
+- set_fact:
+    zookeeper_tag: "{{ (zookeeper_tag_response.content | from_json).HostRoles.actual_configs['zoo.cfg'].default }}"
+
+- name: Ambari rest get kafka kafka-broker properties
+  uri:
+    url: "http://{{ ambari_host }}:{{ ambari_port }}/api/v1/clusters/{{ cluster_name }}/configurations?type=zoo.cfg&tag={{ zookeeper_tag }}"
+    user: "{{ ambari_user }}"
+    password: "{{ ambari_password }}"
+    force_basic_auth: yes
+    return_content: yes
+  register: zookeeper_properties_response
+
+- set_fact:
+    zookeeper_port: "{{ (zookeeper_properties_response.content | from_json)['items'][0].properties['clientPort'] }}"
+
+- set_fact:
+    zookeeper_url: "{% for host in zookeeper_hosts %}{% if loop.index != 1 %},{% endif %}{{ host }}:{{ zookeeper_port }}{% endfor %}"
+
+- name: debug
+  debug:
+    msg: "zookeeper_port = {{ zookeeper_port }},
+          zookeeper_hosts = {{ zookeeper_hosts }},
+          zookeeper_url = {{ zookeeper_url }},
+          kafka_broker_port = {{ kafka_broker_port }},
+          kafka_broker_hosts = {{ kafka_broker_hosts }},
+          kafka_broker_url = {{ kafka_broker_url }}"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_gather_facts/vars/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_gather_facts/vars/main.yml b/deployment/roles/ambari_gather_facts/vars/main.yml
new file mode 100644
index 0000000..20fda92
--- /dev/null
+++ b/deployment/roles/ambari_gather_facts/vars/main.yml
@@ -0,0 +1,2 @@
+---
+# vars file for ambari_gather_facts

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_master/README.md
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_master/README.md b/deployment/roles/ambari_master/README.md
new file mode 100644
index 0000000..225dd44
--- /dev/null
+++ b/deployment/roles/ambari_master/README.md
@@ -0,0 +1,38 @@
+Role Name
+=========
+
+A brief description of the role goes here.
+
+Requirements
+------------
+
+Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
+
+Role Variables
+--------------
+
+A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
+
+Dependencies
+------------
+
+A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
+
+Example Playbook
+----------------
+
+Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
+
+    - hosts: servers
+      roles:
+         - { role: username.rolename, x: 42 }
+
+License
+-------
+
+BSD
+
+Author Information
+------------------
+
+An optional section for the role authors to include contact information, or a website (HTML is not allowed).

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_master/defaults/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_master/defaults/main.yml b/deployment/roles/ambari_master/defaults/main.yml
new file mode 100644
index 0000000..3379cb7
--- /dev/null
+++ b/deployment/roles/ambari_master/defaults/main.yml
@@ -0,0 +1,2 @@
+---
+# defaults file for ambari_master

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_master/handlers/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_master/handlers/main.yml b/deployment/roles/ambari_master/handlers/main.yml
new file mode 100644
index 0000000..99943a5
--- /dev/null
+++ b/deployment/roles/ambari_master/handlers/main.yml
@@ -0,0 +1,2 @@
+---
+# handlers file for ambari_master

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_master/meta/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_master/meta/main.yml b/deployment/roles/ambari_master/meta/main.yml
new file mode 100644
index 0000000..62c7d35
--- /dev/null
+++ b/deployment/roles/ambari_master/meta/main.yml
@@ -0,0 +1,139 @@
+---
+galaxy_info:
+  author: your name
+  description: 
+  company: your company (optional)
+  # If the issue tracker for your role is not on github, uncomment the
+  # next line and provide a value
+  # issue_tracker_url: http://example.com/issue/tracker
+  # Some suggested licenses:
+  # - BSD (default)
+  # - MIT
+  # - GPLv2
+  # - GPLv3
+  # - Apache
+  # - CC-BY
+  license: license (GPLv2, CC-BY, etc)
+  min_ansible_version: 1.2
+  #
+  # Below are all platforms currently available. Just uncomment
+  # the ones that apply to your role. If you don't see your 
+  # platform on this list, let us know and we'll get it added!
+  #
+  #platforms:
+  #- name: EL
+  #  versions:
+  #  - all
+  #  - 5
+  #  - 6
+  #  - 7
+  #- name: GenericUNIX
+  #  versions:
+  #  - all
+  #  - any
+  #- name: Fedora
+  #  versions:
+  #  - all
+  #  - 16
+  #  - 17
+  #  - 18
+  #  - 19
+  #  - 20
+  #  - 21
+  #  - 22
+  #- name: Windows
+  #  versions:
+  #  - all
+  #  - 2012R2
+  #- name: SmartOS
+  #  versions:
+  #  - all
+  #  - any
+  #- name: opensuse
+  #  versions:
+  #  - all
+  #  - 12.1
+  #  - 12.2
+  #  - 12.3
+  #  - 13.1
+  #  - 13.2
+  #- name: Amazon
+  #  versions:
+  #  - all
+  #  - 2013.03
+  #  - 2013.09
+  #- name: GenericBSD
+  #  versions:
+  #  - all
+  #  - any
+  #- name: FreeBSD
+  #  versions:
+  #  - all
+  #  - 8.0
+  #  - 8.1
+  #  - 8.2
+  #  - 8.3
+  #  - 8.4
+  #  - 9.0
+  #  - 9.1
+  #  - 9.1
+  #  - 9.2
+  #- name: Ubuntu
+  #  versions:
+  #  - all
+  #  - lucid
+  #  - maverick
+  #  - natty
+  #  - oneiric
+  #  - precise
+  #  - quantal
+  #  - raring
+  #  - saucy
+  #  - trusty
+  #  - utopic
+  #  - vivid
+  #- name: SLES
+  #  versions:
+  #  - all
+  #  - 10SP3
+  #  - 10SP4
+  #  - 11
+  #  - 11SP1
+  #  - 11SP2
+  #  - 11SP3
+  #- name: GenericLinux
+  #  versions:
+  #  - all
+  #  - any
+  #- name: Debian
+  #  versions:
+  #  - all
+  #  - etch
+  #  - jessie
+  #  - lenny
+  #  - squeeze
+  #  - wheezy
+  #
+  # Below are all categories currently available. Just as with
+  # the platforms above, uncomment those that apply to your role.
+  #
+  #categories:
+  #- cloud
+  #- cloud:ec2
+  #- cloud:gce
+  #- cloud:rax
+  #- clustering
+  #- database
+  #- database:nosql
+  #- database:sql
+  #- development
+  #- monitoring
+  #- networking
+  #- packaging
+  #- system
+  #- web
+dependencies: []
+  # List your role dependencies here, one per line.
+  # Be sure to remove the '[]' above if you add dependencies
+  # to this list.
+  

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_master/tasks/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_master/tasks/main.yml b/deployment/roles/ambari_master/tasks/main.yml
new file mode 100644
index 0000000..8ff2dd2
--- /dev/null
+++ b/deployment/roles/ambari_master/tasks/main.yml
@@ -0,0 +1,15 @@
+---
+# tasks file for ambari_master
+- name: Install ambari repo
+  yum: name=ambari-server state=present
+
+- name: Setup ambari server
+  shell: ambari-server setup -s; touch /etc/ambari-server/configured creates=/etc/ambari-server/configured
+  register: ambari_server_setup
+  failed_when: ambari_server_setup.stderr
+
+- name: start ambari server
+  service: name=ambari-server state=restarted
+
+- name : check if ambari-server is up
+  wait_for : host=127.0.0.1 port=8080 delay=10

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_master/vars/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_master/vars/main.yml b/deployment/roles/ambari_master/vars/main.yml
new file mode 100644
index 0000000..a97605d
--- /dev/null
+++ b/deployment/roles/ambari_master/vars/main.yml
@@ -0,0 +1,2 @@
+---
+# vars file for ambari_master

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_slave/README.md
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_slave/README.md b/deployment/roles/ambari_slave/README.md
new file mode 100644
index 0000000..225dd44
--- /dev/null
+++ b/deployment/roles/ambari_slave/README.md
@@ -0,0 +1,38 @@
+Role Name
+=========
+
+A brief description of the role goes here.
+
+Requirements
+------------
+
+Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
+
+Role Variables
+--------------
+
+A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
+
+Dependencies
+------------
+
+A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
+
+Example Playbook
+----------------
+
+Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
+
+    - hosts: servers
+      roles:
+         - { role: username.rolename, x: 42 }
+
+License
+-------
+
+BSD
+
+Author Information
+------------------
+
+An optional section for the role authors to include contact information, or a website (HTML is not allowed).

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_slave/defaults/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_slave/defaults/main.yml b/deployment/roles/ambari_slave/defaults/main.yml
new file mode 100644
index 0000000..755f529
--- /dev/null
+++ b/deployment/roles/ambari_slave/defaults/main.yml
@@ -0,0 +1,2 @@
+---
+# defaults file for ambari_slave

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_slave/handlers/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_slave/handlers/main.yml b/deployment/roles/ambari_slave/handlers/main.yml
new file mode 100644
index 0000000..cdab51c
--- /dev/null
+++ b/deployment/roles/ambari_slave/handlers/main.yml
@@ -0,0 +1,2 @@
+---
+# handlers file for ambari_slave

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_slave/meta/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_slave/meta/main.yml b/deployment/roles/ambari_slave/meta/main.yml
new file mode 100644
index 0000000..62c7d35
--- /dev/null
+++ b/deployment/roles/ambari_slave/meta/main.yml
@@ -0,0 +1,139 @@
+---
+galaxy_info:
+  author: your name
+  description: 
+  company: your company (optional)
+  # If the issue tracker for your role is not on github, uncomment the
+  # next line and provide a value
+  # issue_tracker_url: http://example.com/issue/tracker
+  # Some suggested licenses:
+  # - BSD (default)
+  # - MIT
+  # - GPLv2
+  # - GPLv3
+  # - Apache
+  # - CC-BY
+  license: license (GPLv2, CC-BY, etc)
+  min_ansible_version: 1.2
+  #
+  # Below are all platforms currently available. Just uncomment
+  # the ones that apply to your role. If you don't see your 
+  # platform on this list, let us know and we'll get it added!
+  #
+  #platforms:
+  #- name: EL
+  #  versions:
+  #  - all
+  #  - 5
+  #  - 6
+  #  - 7
+  #- name: GenericUNIX
+  #  versions:
+  #  - all
+  #  - any
+  #- name: Fedora
+  #  versions:
+  #  - all
+  #  - 16
+  #  - 17
+  #  - 18
+  #  - 19
+  #  - 20
+  #  - 21
+  #  - 22
+  #- name: Windows
+  #  versions:
+  #  - all
+  #  - 2012R2
+  #- name: SmartOS
+  #  versions:
+  #  - all
+  #  - any
+  #- name: opensuse
+  #  versions:
+  #  - all
+  #  - 12.1
+  #  - 12.2
+  #  - 12.3
+  #  - 13.1
+  #  - 13.2
+  #- name: Amazon
+  #  versions:
+  #  - all
+  #  - 2013.03
+  #  - 2013.09
+  #- name: GenericBSD
+  #  versions:
+  #  - all
+  #  - any
+  #- name: FreeBSD
+  #  versions:
+  #  - all
+  #  - 8.0
+  #  - 8.1
+  #  - 8.2
+  #  - 8.3
+  #  - 8.4
+  #  - 9.0
+  #  - 9.1
+  #  - 9.1
+  #  - 9.2
+  #- name: Ubuntu
+  #  versions:
+  #  - all
+  #  - lucid
+  #  - maverick
+  #  - natty
+  #  - oneiric
+  #  - precise
+  #  - quantal
+  #  - raring
+  #  - saucy
+  #  - trusty
+  #  - utopic
+  #  - vivid
+  #- name: SLES
+  #  versions:
+  #  - all
+  #  - 10SP3
+  #  - 10SP4
+  #  - 11
+  #  - 11SP1
+  #  - 11SP2
+  #  - 11SP3
+  #- name: GenericLinux
+  #  versions:
+  #  - all
+  #  - any
+  #- name: Debian
+  #  versions:
+  #  - all
+  #  - etch
+  #  - jessie
+  #  - lenny
+  #  - squeeze
+  #  - wheezy
+  #
+  # Below are all categories currently available. Just as with
+  # the platforms above, uncomment those that apply to your role.
+  #
+  #categories:
+  #- cloud
+  #- cloud:ec2
+  #- cloud:gce
+  #- cloud:rax
+  #- clustering
+  #- database
+  #- database:nosql
+  #- database:sql
+  #- development
+  #- monitoring
+  #- networking
+  #- packaging
+  #- system
+  #- web
+dependencies: []
+  # List your role dependencies here, one per line.
+  # Be sure to remove the '[]' above if you add dependencies
+  # to this list.
+  

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_slave/tasks/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_slave/tasks/main.yml b/deployment/roles/ambari_slave/tasks/main.yml
new file mode 100644
index 0000000..bd8432a
--- /dev/null
+++ b/deployment/roles/ambari_slave/tasks/main.yml
@@ -0,0 +1,17 @@
+---
+# tasks file for ambari_slave
+- name: Install ambari-agent
+  yum: name=ambari-agent state=latest
+
+- name: Configure ambari-server hostname in ambari-agent configuration
+  lineinfile:
+    dest: /etc/ambari-agent/conf/ambari-agent.ini
+    regexp: ^.*hostname=.*$
+    line: hostname={{ ansible_hostname }}
+    backup: yes
+
+- name: Ensure ambari-agent is running
+  service: name=ambari-agent state=restarted
+
+- name : Wait for agent to register
+  command : sleep 10

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/ambari_slave/vars/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/ambari_slave/vars/main.yml b/deployment/roles/ambari_slave/vars/main.yml
new file mode 100644
index 0000000..40a14b2
--- /dev/null
+++ b/deployment/roles/ambari_slave/vars/main.yml
@@ -0,0 +1,11 @@
+---
+# vars file for ambari_slave
+
+#
+# TODO: duplicates from ambari-common.  need all of these moved to group_vars
+#
+epel_repo_url: "http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm"
+rhel_ambari_install_url: "http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.1.2.1/ambari.repo"
+ambari_user: "root"
+local_tmp_keygen_file: "/tmp/id_rsa.tmp"
+dest_tmp_keygen_file: "/tmp/id_rsa.tmp"

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/bro/files/flume-bro.conf.template
----------------------------------------------------------------------
diff --git a/deployment/roles/bro/files/flume-bro.conf.template b/deployment/roles/bro/files/flume-bro.conf.template
new file mode 100644
index 0000000..0881e22
--- /dev/null
+++ b/deployment/roles/bro/files/flume-bro.conf.template
@@ -0,0 +1,28 @@
+
+bro-conn.sources = exec-source
+bro-conn.channels = memory-channel
+bro-conn.sinks = kafka-sink logger-sink
+
+# bro data is logged to a set of files
+bro-conn.sources.exec-source.type = exec
+bro-conn.sources.exec-source.command = tail -F /usr/local/bro/logs/current/conn.log
+bro-conn.sources.exec-source.restart = true
+bro-conn.sources.exec-source.logStdErr = true
+
+# bro alerts are sent to kafka
+bro-conn.sinks.kafka-sink.type = org.apache.flume.sink.kafka.KafkaSink
+bro-conn.sinks.kafka-sink.brokerList = localhost:9092
+bro-conn.sinks.kafka-sink.topic = bro-conn
+
+# also log events
+bro-conn.sinks.logger-sink.type = logger
+
+# buffer events in memory
+bro-conn.channels.memory-channel.type = memory
+bro-conn.channels.memory-channel.capacity = 1000
+bro-conn.channels.memory-channel.transactionCapacity = 100
+
+# bind the source and sink to the channel
+bro-conn.sources.exec-source.channels = memory-channel
+bro-conn.sinks.kafka-sink.channel = memory-channel
+bro-conn.sinks.logger-sink.channel = memory-channel

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/bro/tasks/bro.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/bro/tasks/bro.yml b/deployment/roles/bro/tasks/bro.yml
new file mode 100644
index 0000000..836ff90
--- /dev/null
+++ b/deployment/roles/bro/tasks/bro.yml
@@ -0,0 +1,51 @@
+---
+- name: Install Bro dependencies
+  yum: name={{item}} state=latest update_cache=no
+  with_items:
+    - cmake
+    - make
+    - gcc
+    - gcc-c++
+    - flex
+    - bison
+    - libpcap-devel
+    - openssl-devel
+    - python-devel
+    - swig
+    - zlib-devel
+
+- name: Install geoip data
+  yum: name={{item}} state=latest update_cache=yes
+  with_items:
+    - epel-release
+    - GeoIP
+    - GeoIP-devel
+    - GeoIP-data
+
+- name: Download bro
+  get_url:
+    url: "https://www.bro.org/downloads/release/bro-{{bro_version}}.tar.gz"
+    dest: "/tmp/bro-{{bro_version}}.tar.gz"
+
+- name: Extract tarball
+  unarchive:
+    src: "/tmp/bro-{{bro_version}}.tar.gz"
+    dest: /tmp
+    copy: no
+    creates: "/tmp/bro-{{bro_version}}"
+
+- name: Build and install bro
+  shell: "{{item}}"
+  args:
+    chdir: "/tmp/bro-{{bro_version}}"
+    creates: /usr/local/bro/bin/broctl
+  with_items:
+    - ./configure
+    - make
+    - make install
+
+- name: Configure json logging
+  lineinfile: dest=/usr/local/bro/share/bro/site/local.bro line="@load policy/tuning/json-logs"
+
+- name: Install updated bro configuration
+  shell: /usr/local/bro/bin/broctl install

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/bro/tasks/flume.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/bro/tasks/flume.yml b/deployment/roles/bro/tasks/flume.yml
new file mode 100644
index 0000000..4f8721f
--- /dev/null
+++ b/deployment/roles/bro/tasks/flume.yml
@@ -0,0 +1,41 @@
+---
+- name: Install flume configurations
+  copy: src={{ item.src }} dest={{ item.dest }}
+  with_items:
+    - { src: flume-bro.conf.template, dest: /etc/flume/conf/flume-bro-conn.conf }
+    - { src: flume-bro.conf.template, dest: /etc/flume/conf/flume-bro-dns.conf }
+    - { src: flume-bro.conf.template, dest: /etc/flume/conf/flume-bro-software.conf }
+
+- name: Set kafka broker in flume
+  lineinfile: >
+    dest="{{ item.dest }}"
+    regexp="{{ item.regexp }}"
+    line="{{ item.line }}"
+    state=present
+  with_items:
+    - { dest: /etc/flume/conf/flume-bro-conn.conf,
+        regexp: '^bro-conn\.sinks\.kafka-sink\.brokerList.*$',
+        line: 'bro-conn.sinks.kafka-sink.brokerList = {{ kafka_broker_url }}' }
+    - { dest: /etc/flume/conf/flume-bro-dns.conf,
+        regexp: '^bro-dns\.sinks\.kafka-sink\.brokerList.*$',
+        line: 'bro-dns.sinks.kafka-sink.brokerList = {{ kafka_broker_url }}' }
+    - { dest: /etc/flume/conf/flume-bro-software.conf,
+        regexp: '^bro-software\.sinks\.kafka-sink\.brokerList.*$',
+        line: 'bro-software.sinks.kafka-sink.brokerList = {{ kafka_broker_url }}' }
+
+- name: Set kafka topics in flume
+  lineinfile: >
+    dest="{{ item.dest }}"
+    regexp="{{ item.regexp }}"
+    line="{{ item.line }}"
+    state=present
+  with_items:
+    - { dest: /etc/flume/conf/flume-bro-conn.conf,
+        regexp: '^bro-conn\.sinks\.kafka-sink\.topic.*$',
+        line: 'bro-conn.sinks.kafka-sink.topic = {{ bro_conn_topic }}' }
+    - { dest: /etc/flume/conf/flume-bro-dns.conf,
+        regexp: '^bro-dns\.sinks\.kafka-sink\.topic.*$',
+        line: 'bro-dns.sinks.kafka-sink.topic = {{ bro_dns_topic }}' }
+    - { dest: /etc/flume/conf/flume-bro-software.conf,
+        regexp: '^bro-software\.sinks\.kafka-sink\.topic.*$',
+        line: 'bro-software.sinks.kafka-sink.topic = {{ bro_software_topic }}' }

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/bro/tasks/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/bro/tasks/main.yml b/deployment/roles/bro/tasks/main.yml
new file mode 100644
index 0000000..1585cfe
--- /dev/null
+++ b/deployment/roles/bro/tasks/main.yml
@@ -0,0 +1,14 @@
+---
+- include: bro.yml
+
+- include: flume.yml
+
+- name: Start flume to consume bro data
+  service: name=flume-agent state=started args={{ item }}
+  with_items:
+    - bro-conn
+    - bro-dns
+    - bro-software
+
+- name: Start bro
+  shell: /usr/local/bro/bin/broctl deploy

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/bro/vars/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/bro/vars/main.yml b/deployment/roles/bro/vars/main.yml
new file mode 100644
index 0000000..dddd281
--- /dev/null
+++ b/deployment/roles/bro/vars/main.yml
@@ -0,0 +1,2 @@
+---
+bro_version: 2.4.1

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/elasticsearch/defaults/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/elasticsearch/defaults/main.yml b/deployment/roles/elasticsearch/defaults/main.yml
new file mode 100644
index 0000000..a50f9ca
--- /dev/null
+++ b/deployment/roles/elasticsearch/defaults/main.yml
@@ -0,0 +1,2 @@
+---
+# defaults file for ambari_common

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/elasticsearch/files/elasticsearch.repo
----------------------------------------------------------------------
diff --git a/deployment/roles/elasticsearch/files/elasticsearch.repo b/deployment/roles/elasticsearch/files/elasticsearch.repo
new file mode 100644
index 0000000..ed299b4
--- /dev/null
+++ b/deployment/roles/elasticsearch/files/elasticsearch.repo
@@ -0,0 +1,6 @@
+[elasticsearch-1.7]
+name=Elasticsearch repository for 1.7.x packages
+baseurl=http://packages.elastic.co/elasticsearch/1.7/centos
+gpgcheck=1
+gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
+enabled=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/elasticsearch/handlers/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/elasticsearch/handlers/main.yml b/deployment/roles/elasticsearch/handlers/main.yml
new file mode 100644
index 0000000..a4c1162
--- /dev/null
+++ b/deployment/roles/elasticsearch/handlers/main.yml
@@ -0,0 +1,3 @@
+---
+- name: restart elasticsearch
+  service: name=elasticsearch state=restarted

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/elasticsearch/meta/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/elasticsearch/meta/main.yml b/deployment/roles/elasticsearch/meta/main.yml
new file mode 100644
index 0000000..62c7d35
--- /dev/null
+++ b/deployment/roles/elasticsearch/meta/main.yml
@@ -0,0 +1,139 @@
+---
+galaxy_info:
+  author: your name
+  description: 
+  company: your company (optional)
+  # If the issue tracker for your role is not on github, uncomment the
+  # next line and provide a value
+  # issue_tracker_url: http://example.com/issue/tracker
+  # Some suggested licenses:
+  # - BSD (default)
+  # - MIT
+  # - GPLv2
+  # - GPLv3
+  # - Apache
+  # - CC-BY
+  license: license (GPLv2, CC-BY, etc)
+  min_ansible_version: 1.2
+  #
+  # Below are all platforms currently available. Just uncomment
+  # the ones that apply to your role. If you don't see your 
+  # platform on this list, let us know and we'll get it added!
+  #
+  #platforms:
+  #- name: EL
+  #  versions:
+  #  - all
+  #  - 5
+  #  - 6
+  #  - 7
+  #- name: GenericUNIX
+  #  versions:
+  #  - all
+  #  - any
+  #- name: Fedora
+  #  versions:
+  #  - all
+  #  - 16
+  #  - 17
+  #  - 18
+  #  - 19
+  #  - 20
+  #  - 21
+  #  - 22
+  #- name: Windows
+  #  versions:
+  #  - all
+  #  - 2012R2
+  #- name: SmartOS
+  #  versions:
+  #  - all
+  #  - any
+  #- name: opensuse
+  #  versions:
+  #  - all
+  #  - 12.1
+  #  - 12.2
+  #  - 12.3
+  #  - 13.1
+  #  - 13.2
+  #- name: Amazon
+  #  versions:
+  #  - all
+  #  - 2013.03
+  #  - 2013.09
+  #- name: GenericBSD
+  #  versions:
+  #  - all
+  #  - any
+  #- name: FreeBSD
+  #  versions:
+  #  - all
+  #  - 8.0
+  #  - 8.1
+  #  - 8.2
+  #  - 8.3
+  #  - 8.4
+  #  - 9.0
+  #  - 9.1
+  #  - 9.1
+  #  - 9.2
+  #- name: Ubuntu
+  #  versions:
+  #  - all
+  #  - lucid
+  #  - maverick
+  #  - natty
+  #  - oneiric
+  #  - precise
+  #  - quantal
+  #  - raring
+  #  - saucy
+  #  - trusty
+  #  - utopic
+  #  - vivid
+  #- name: SLES
+  #  versions:
+  #  - all
+  #  - 10SP3
+  #  - 10SP4
+  #  - 11
+  #  - 11SP1
+  #  - 11SP2
+  #  - 11SP3
+  #- name: GenericLinux
+  #  versions:
+  #  - all
+  #  - any
+  #- name: Debian
+  #  versions:
+  #  - all
+  #  - etch
+  #  - jessie
+  #  - lenny
+  #  - squeeze
+  #  - wheezy
+  #
+  # Below are all categories currently available. Just as with
+  # the platforms above, uncomment those that apply to your role.
+  #
+  #categories:
+  #- cloud
+  #- cloud:ec2
+  #- cloud:gce
+  #- cloud:rax
+  #- clustering
+  #- database
+  #- database:nosql
+  #- database:sql
+  #- development
+  #- monitoring
+  #- networking
+  #- packaging
+  #- system
+  #- web
+dependencies: []
+  # List your role dependencies here, one per line.
+  # Be sure to remove the '[]' above if you add dependencies
+  # to this list.
+  

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/elasticsearch/tasks/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/elasticsearch/tasks/main.yml b/deployment/roles/elasticsearch/tasks/main.yml
new file mode 100644
index 0000000..b491a10
--- /dev/null
+++ b/deployment/roles/elasticsearch/tasks/main.yml
@@ -0,0 +1,32 @@
+---
+
+# tasks file for elasticsearch
+- name: alternatives link for "java"
+  alternatives: name=java link=/usr/bin/java  path=/usr/jdk64/jdk1.8.0_40/bin/java
+
+- name: Add Elasticsearch GPG key.
+  rpm_key:
+    key: https://packages.elastic.co/GPG-KEY-elasticsearch
+    state: present
+
+- name: Add Elasticsearch repository.
+  copy:
+    src: elasticsearch.repo
+    dest: /etc/yum.repos.d/elasticsearch.repo
+    mode: 0644
+
+- name: Install Elasticsearch.
+  yum: pkg=elasticsearch state=installed
+
+- name: Configure Elasticsearch.
+  lineinfile: >
+    dest=/etc/elasticsearch/elasticsearch.yml
+    regexp="{{ item.regexp }}"
+    line="{{ item.line }}"
+    state=present
+  with_items:
+    - { regexp: '#cluster\.name', line: 'cluster.name: metron' }
+  notify: restart elasticsearch
+
+- name: Start Elasticsearch.
+  service: name=elasticsearch state=started enabled=yes
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/dc7f8a8b/deployment/roles/elasticsearch/vars/main.yml
----------------------------------------------------------------------
diff --git a/deployment/roles/elasticsearch/vars/main.yml b/deployment/roles/elasticsearch/vars/main.yml
new file mode 100644
index 0000000..837bf23
--- /dev/null
+++ b/deployment/roles/elasticsearch/vars/main.yml
@@ -0,0 +1,3 @@
+---
+# vars file for elasticsearch
+



Mime
View raw message