| # |
| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. |
| # The ASF licenses this file to You under the Apache License, Version 2.0 |
| # (the "License"); you may not use this file except in compliance with |
| # the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| # |
| --- |
| # |
| # instantiate the hosts on amazon ec2 |
| # |
| - hosts: localhost |
| vars_files: |
| - conf/defaults.yml |
| pre_tasks: |
| - name: Verify Ansible Version |
| fail: msg="Metron Requires Ansible 2.0.0.2, 2.2.2.0 or 2.5.0, current version is {{ ansible_version }}" |
| when: "ansible_version.full | version_compare('2.2.2.0', '!=') and ansible_version.full | version_compare('2.0.0.2', '!=') and ansible_version.full | version_compare('2.5.0', '!=')" |
| tasks: |
| - include: tasks/create-keypair.yml |
| - include: tasks/create-vpc.yml |
| - include: tasks/create-open-inbound-security-group.yml |
| - include: tasks/create-open-outbound-security-group.yml |
| - include: tasks/create-hosts.yml host_count=1 host_type=sensors,ambari_master,ec2,monit |
| - include: tasks/create-hosts.yml host_count=4 host_type=ambari_slave,ec2 |
| - include: tasks/create-hosts.yml host_count=1 host_type=monit,ec2 |
| - include: tasks/create-hosts.yml host_count=1 host_type=ambari_slave,enrichment,metron,ec2,zeppelin |
| - include: tasks/create-hosts.yml host_count=2 host_type=ambari_slave,search,ec2 |
| - include: tasks/create-hosts.yml host_count=1 host_type=ambari_slave,web,ec2 |
| tags: |
| - ec2 |
| |
| # |
| # wait for all ec2 hosts to come up |
| # |
| - hosts: ec2 |
| become: True |
| vars_files: |
| - conf/defaults.yml |
| gather_facts: False |
| tasks: |
| - include: tasks/check-hosts.yml |
| tags: |
| - ec2 |
| - wait |
| |
| # |
| # mount additional data volumes on all ec2 hosts |
| # |
| - hosts: ec2 |
| become: True |
| vars_files: |
| - conf/defaults.yml |
| tasks: |
| - include: tasks/mount-volume.yml vol_src=/dev/xvdb vol_mnt=/data1 |
| - include: tasks/mount-volume.yml vol_src=/dev/xvdc vol_mnt=/data2 |
| - include: tasks/check-volume.yml vol_name=xvda vol_src=/dev/xvda vol_size={{ xvda_vol_size }} |
| tags: |
| - ec2 |
| - mount |
| |
| # |
| # build the metron cluster |
| # |
| - include: ../ansible/playbooks/metron_full_install.yml |