setup.yml 1.35 KB
Newer Older
1 2 3
---
  - name: Download Apache Hadoop.
    get_url: url="{{ mirror_url }}/hadoop-{{ version }}/hadoop-{{ version }}.tar.gz" dest="{{ download_path }}/hadoop-{{ version }}.tar.gz"
Ioannis Tsafaras's avatar
Ioannis Tsafaras committed
4
    environment: proxy_env
5 6

  - name: Uncompress Apache Hadoop.
7
    unarchive: src="{{ download_path }}/hadoop-{{ version }}.tar.gz" dest="{{ installation_path }}" copy=no owner=hduser group=lambda
8 9 10 11 12

  - name: Create softlink for Apache Hadoop.
    file: src="{{ installation_path }}/hadoop-{{ version }}" dest="{{ installation_path }}/hadoop" state=link

  - name: Set JAVA_HOME in Apache Hadoop environment.
13
    lineinfile: dest="{{ installation_path }}/hadoop/etc/hadoop/hadoop-env.sh" regexp="^export JAVA_HOME=" line="export JAVA_HOME=/usr"
14 15

  - name: Configure slaves.
16
    template: src=slaves.j2 dest="{{ installation_path }}/hadoop/etc/hadoop/slaves" owner=hduser group=lambda mode=0644
17 18

  - name: Configure core.
19 20
    template: src=core-site.xml.j2 dest="{{ installation_path }}/hadoop/etc/hadoop/core-site.xml" owner=hduser group=lambda mode=0644

21
  - name: Configure Apache HDFS.
22
    template: src=hdfs-site.xml.j2 dest="{{ installation_path }}/hadoop/etc/hadoop/hdfs-site.xml" backup=no owner=hduser group=lambda mode=0644
23

24 25
  - name: Configure Apache Yarn.
    template: src=yarn-site.xml.j2 dest="{{ installation_path }}/hadoop/etc/hadoop/yarn-site.xml" owner=hduser group=lambda mode=0644