Commit bac90107 authored by Georgios Ouzounis's avatar Georgios Ouzounis

Merge pull request #32 from efikalti/ansible-devel

One user per λ service
parents 1517c353 70e20ea2
......@@ -5,7 +5,7 @@
- download
- name: Uncompress Apache Flink.
unarchive: src="{{ download_path }}/flink-{{ version }}-{{ version_for }}.tgz" dest="{{ installation_path }}" copy=no
unarchive: src="{{ download_path }}/flink-{{ version }}-{{ version_for }}.tgz" dest="{{ installation_path }}" copy=no owner=flink group=lambda
tags:
- uncompress
......@@ -15,7 +15,7 @@
- uncompress
- name: Configure Apache Flink.
template: src=flink-conf.j2 dest="{{ installation_path }}/flink/conf/flink-conf.yaml" owner=root group=root mode=0644
template: src=flink-conf.j2 dest="{{ installation_path }}/flink/conf/flink-conf.yaml" owner=flink group=lambda mode=0644
tags:
- configure
......@@ -25,4 +25,3 @@
poll: 0
tags:
- start
......@@ -3,7 +3,7 @@
get_url: url="{{ mirror_url }}/hadoop-{{ version }}/hadoop-{{ version }}.tar.gz" dest="{{ download_path }}/hadoop-{{ version }}.tar.gz"
- name: Uncompress Apache Hadoop.
unarchive: src="{{ download_path }}/hadoop-{{ version }}.tar.gz" dest="{{ installation_path }}" copy=no
unarchive: src="{{ download_path }}/hadoop-{{ version }}.tar.gz" dest="{{ installation_path }}" copy=no owner=hduser group=lambda
- name: Create softlink for Apache Hadoop.
file: src="{{ installation_path }}/hadoop-{{ version }}" dest="{{ installation_path }}/hadoop" state=link
......@@ -12,14 +12,13 @@
lineinfile: dest="{{ installation_path }}/hadoop/etc/hadoop/hadoop-env.sh" regexp="^export JAVA_HOME=" line="export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64"
- name: Configure slaves.
template: src=slaves.j2 dest="{{ installation_path }}/hadoop/etc/hadoop/slaves" owner=root group=root mode=0644
template: src=slaves.j2 dest="{{ installation_path }}/hadoop/etc/hadoop/slaves" owner=hduser group=lambda mode=0644
- name: Configure core.
template: src=core-site.xml.j2 dest="{{ installation_path }}/hadoop/etc/hadoop/core-site.xml" owner=root group=root mode=0644
template: src=core-site.xml.j2 dest="{{ installation_path }}/hadoop/etc/hadoop/core-site.xml" owner=hduser group=lambda mode=0644
- name: Configure Apache HDFS.
template: src=hdfs-site.xml.j2 dest="{{ installation_path }}/hadoop/etc/hadoop/hdfs-site.xml" backup=no owner=root group=root mode=0644
- name: Configure Apache Yarn.
template: src=yarn-site.xml.j2 dest="{{ installation_path }}/hadoop/etc/hadoop/yarn-site.xml" owner=root group=root mode=0644
template: src=hdfs-site.xml.j2 dest="{{ installation_path }}/hadoop/etc/hadoop/hdfs-site.xml" backup=no owner=hduser group=lambda mode=0644
- 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
......@@ -3,8 +3,7 @@
get_url: url="{{ mirror_url }}/{{ version }}/kafka_{{ scala_version }}-{{ version }}.tgz" dest="{{ download_path }}/kafka_{{ scala_version }}-{{ version }}.tgz"
- name: Uncompress Apache Kafka.
unarchive: src="{{ download_path }}/kafka_{{ scala_version }}-{{ version }}.tgz" dest="{{ installation_path }}" copy=no
unarchive: src="{{ download_path }}/kafka_{{ scala_version }}-{{ version }}.tgz" dest="{{ installation_path }}" copy=no owner=kafka group=lambda
- name: Create softlink for Apache Kafka.
file: src="{{ installation_path }}/kafka_{{ scala_version }}-{{ version }}" dest="{{ installation_path }}/kafka" state=link
......@@ -5,7 +5,7 @@
- download
- name: Configure Apache kafka.
copy: src=server.properties dest="{{ installation_path }}/kafka/config/server.properties" owner=root group=root mode=0644
copy: src=server.properties dest="{{ installation_path }}/kafka/config/server.properties" owner=kafka group=lambda mode=0644
tags:
- configure-kafka
......@@ -35,4 +35,3 @@
- create topics
tags:
- start-kafka
......@@ -5,7 +5,7 @@
- download
- name: Configure Apache kafka.
template: src=server.properties.j2 dest="{{ installation_path }}/kafka/config/server.properties" owner=root group=root mode=0644
template: src=server.properties.j2 dest="{{ installation_path }}/kafka/config/server.properties" owner=kafka group=lambda mode=0644
tags:
- configure-kafka
......@@ -20,4 +20,3 @@
wait_for: port=9092
tags:
- start-kafka
......@@ -6,7 +6,7 @@
apt: name=openjdk-7-jdk state=latest install_recommends=no update_cache=yes
- name: Copy hosts file.
template: src=hosts.j2 dest=/etc/hosts backup=no owner=root group=root mode=0750
template: src=hosts.j2 dest=/etc/hosts backup=no owner=root group=lambda mode=0750
- name: Copy environment file.
copy: src=environment dest=/etc/environment backup=no owner=root group=root mode=0750
......@@ -15,4 +15,3 @@
shell: cat /dev/zero | ssh-keygen -q -N ""
args:
creates: /root/.ssh/id_rsa.pub
......@@ -10,4 +10,3 @@
when: "'slaves' in group_names"
tags:
- slaves
---
- name: Create users for each application.
include: users.yml
- name: Include common tasks.
include: common-1.yml
......@@ -10,4 +13,3 @@
- name: Include more common tasks.
include: common-2.yml
---
- name: Create users for each application.
include: users.yml
- name: Include common tasks.
include: common-1.yml
- name: Include more common tasks.
include: common-2.yml
---
# Example group command from Ansible Playbooks
- name: Create lambda group
group: name=lambda state=present
tags:
- users
- name: Create hduser user
user: name=hduser uid=2010 groups="lambda" shell=/bin/bash generate_ssh_key=yes
tags:
- users
- name: Create flink user
user: name=flink uid=2011 groups="lambda" shell=/bin/bash generate_ssh_key=yes
tags:
- users
- name: Create kafka user
user: name=kafka uid=2012 groups="lambda" shell=/bin/bash generate_ssh_key=yes
tags:
- users
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment