Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
okeanos-LoD
Commits
fc807b40
Commit
fc807b40
authored
Jul 09, 2015
by
Georgios Ouzounis
Browse files
LAM-33 Created apache-hadoop role.
parent
86cddbcf
Changes
16
Hide whitespace changes
Inline
Side-by-side
ansible/playbooks/apache-hadoop/hadoop-install.yml
0 → 100644
View file @
fc807b40
---
-
hosts
:
all
user
:
root
roles
:
-
../roles/apache-hadoop
ansible/playbooks/files
deleted
120000 → 0
View file @
86cddbcf
../files/
\ No newline at end of file
ansible/playbooks/hadoop.yml
deleted
100644 → 0
View file @
86cddbcf
---
-
hosts
:
all
user
:
root
tasks
:
-
include
:
../tasks/hadoop/install.yml tags=install
-
include
:
../tasks/hadoop/config.yml tags=config
-
hosts
:
master
user
:
root
tasks
:
-
include
:
../tasks/hadoop/hdfs_format.yml tags=format
-
include
:
../tasks/hadoop/start.yml tags=start
-
include
:
../tasks/hadoop/hdfs_dirs.yml tags=mkdir
ansible/playbooks/tasks
deleted
120000 → 0
View file @
86cddbcf
../tasks/
\ No newline at end of file
ansible/roles/apache-hadoop/tasks/main.yml
0 → 100644
View file @
fc807b40
---
-
name
:
Include common tasks.
include
:
setup.yml
tags
:
-
setup
-
name
:
Include tasks for master.
include
:
master.yml
when
:
"
'master'
in
group_names"
tags
:
-
master-install
ansible/roles/apache-hadoop/tasks/master.yml
0 → 100644
View file @
fc807b40
---
-
name
:
Format Apache HDFS.
shell
:
"
yes
|
{{
installation_path
}}/hadoop/bin/hadoop
namenode
-format"
tags
:
-
format-hdfs
-
name
:
Start Apache HDFS.
shell
:
"
{{
installation_path
}}/hadoop/sbin/start-dfs.sh"
tags
:
-
start-hdfs
-
name
:
Start Apache Yarn.
shell
:
"
{{
installation_path
}}/hadoop/sbin/start-yarn.sh"
tags
:
-
start-yarn
-
name
:
Create Apache HDFS user directory.
command
:
"
{{
installation_path
}}/hadoop/bin/hadoop
fs
-mkdir
/user"
tags
:
-
create-dirs
-
name
:
Create Apache HDFS user/root directory.
command
:
"
{{
installation_path
}}/hadoop/bin/hadoop
fs
-mkdir
/user/root"
tags
:
-
create-dirs
ansible/roles/apache-hadoop/tasks/setup.yml
0 → 100644
View file @
fc807b40
---
-
name
:
Download Apache Hadoop.
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
-
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.
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
-
name
:
Configure core.
template
:
src=core-site.xml.j2 dest="{{ installation_path }}/hadoop/etc/hadoop/core-site.xml" owner=root group=root 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
ansible/
templates/usr/local/hadoop/etc/hadoop
/core-site.xml.j2
→
ansible/
roles/apache-hadoop/templates
/core-site.xml.j2
View file @
fc807b40
...
...
@@ -23,6 +23,6 @@
</property>
<property>
<name>
hadoop.tmp.dir
</name>
<value>
/usr/local
/hadoop/tmp
</value>
<value>
{{ installation_path }}
/hadoop/tmp
</value>
</property>
</configuration>
ansible/
fi
les/
usr/local/hadoop/etc/hadoop
/hdfs-site.xml
→
ansible/
ro
les/
apache-hadoop/templates
/hdfs-site.xml
.j2
View file @
fc807b40
...
...
@@ -19,7 +19,7 @@
<configuration>
<property>
<name>
dfs.replication
</name>
<value>
2
</value>
<value>
{{ dfs_replication }}
</value>
</property>
<property>
<name>
dfs.permissions
</name>
...
...
ansible/
templates/usr/local/hadoop/etc/hadoop
/slaves.j2
→
ansible/
roles/apache-hadoop/templates
/slaves.j2
View file @
fc807b40
File moved
ansible/
templates/usr/local/hadoop/etc/hadoop
/yarn-site.xml.j2
→
ansible/
roles/apache-hadoop/templates
/yarn-site.xml.j2
View file @
fc807b40
File moved
ansible/roles/apache-hadoop/vars/main.yml
0 → 100644
View file @
fc807b40
---
mirror_url
:
"
http://mirrors.myaegean.gr/apache/hadoop/common"
version
:
"
2.7.0"
download_path
:
"
/root"
installation_path
:
"
/usr/local"
dfs_replication
:
2
ansible/tasks/hadoop/config.yml
deleted
100644 → 0
View file @
86cddbcf
---
-
name
:
Set hadoop env
lineinfile
:
dest=/usr/local/hadoop/etc/hadoop/hadoop-env.sh regexp="^export JAVA_HOME=" line="export JAVA_HOME=/usr/"
tags
:
env
-
name
:
Copy slaves configuration
template
:
src=../templates/usr/local/hadoop/etc/hadoop/slaves.j2
dest=/usr/local/hadoop/etc/hadoop/slaves
owner=root group=root mode=0644
tags
:
slaves
-
name
:
Copy core configuration
template
:
src=../templates/usr/local/hadoop/etc/hadoop/core-site.xml.j2
dest=/usr/local/hadoop/etc/hadoop/core-site.xml
owner=root group=root mode=0644
tags
:
core
-
name
:
Copy hdfs configuration
copy
:
src=../files/usr/local/hadoop/etc/hadoop/hdfs-site.xml
dest=/usr/local/hadoop/etc/hadoop/hdfs-site.xml backup=no
owner=root group=root mode=0644
tags
:
hdfs
-
name
:
Copy yarn configuration
template
:
src=../templates/usr/local/hadoop/etc/hadoop/yarn-site.xml.j2
dest=/usr/local/hadoop/etc/hadoop/yarn-site.xml
owner=root group=root mode=0644
tags
:
yarn
ansible/tasks/hadoop/hdfs_format.yml
deleted
100644 → 0
View file @
86cddbcf
---
-
name
:
Format hdfs
command
:
/usr/local/hadoop/bin/hadoop namenode -format -nonInteractive
ansible/tasks/hadoop/install.yml
deleted
100644 → 0
View file @
86cddbcf
---
-
name
:
Download hadoop from apache servers
get_url
:
url=http://mirrors.myaegean.gr/apache/hadoop/common/hadoop-2.7.0/hadoop-2.7.0.tar.gz
dest=/root/hadoop-2.7.0.tar.gz
-
name
:
Untar hadoop
unarchive
:
src=/root/hadoop-2.7.0.tar.gz copy=no
dest=/usr/local/
-
name
:
Make hadoop softlink
file
:
src=/usr/local/hadoop-2.7.0 dest=/usr/local/hadoop state=link
ansible/tasks/hadoop/start.yml
deleted
100644 → 0
View file @
86cddbcf
---
-
name
:
Start hdfs
command
:
/usr/local/hadoop/sbin/start-dfs.sh
-
name
:
Start yarn
command
:
/usr/local/hadoop/sbin/start-yarn.sh
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment