Commit 3bab80b3 authored by Decoupes Remy's avatar Decoupes Remy Committed by rdecoupe
Browse files
No related merge requests found
Showing with 25 additions and 12 deletions
+25 -12
[![alt](https://licensebuttons.net/l/by-nc/4.0/88x31.png)](https://creativecommons.org/licenses/by-nc/4.0/legalcode)
# Ansible deployment for AIDMOIt # Ansible deployment for AIDMOIt
This project aims to deploy a datalake and its ecosystem using **[Ansible](https://docs.ansible.com/)** and/or **[Vagrant](https://www.vagrantup.com/)**. This project aims to deploy a datalake and its ecosystem using **[Ansible](https://docs.ansible.com/)** and/or **[Vagrant](https://www.vagrantup.com/)**.
...@@ -80,9 +77,10 @@ Then run the script [ansible-launch.sh](ansible-launch.sh) : ...@@ -80,9 +77,10 @@ Then run the script [ansible-launch.sh](ansible-launch.sh) :
``` ```
# Deploy a HDFS cluster # Deploy a HDFS cluster
## Deploy cluster HDFS with multiple VMs ## Deploy cluster HDFS with multiple VMs
1. Set your nodes' IP address in [VagrantFile](vagrant/cluster/Vagrantfile) 1. Set your nodes' IP address in [VagrantFile](vagrant/cluster/Vagrantfile).
Inside this file, edit your network setting (name for your interface adaptator and DNS option)
2. Declare those IP for ansible provision in [vars](playbook/roles/hosts-file/vars/main.yml) 2. Declare those IP for ansible provision in [vars](playbook/roles/hosts-file/vars/main.yml)
3. Configure your own computer to access to your nodes using their hostname 3. Configure your own computer to access to your nodes using their hostname (need for access to hadoop web ui)
```shell ```shell
vim /etc/hosts vim /etc/hosts
``` ```
...@@ -111,3 +109,21 @@ Then run the script [ansible-launch.sh](ansible-launch.sh) : ...@@ -111,3 +109,21 @@ Then run the script [ansible-launch.sh](ansible-launch.sh) :
if default : http://10.0.0.10:9870 if default : http://10.0.0.10:9870
## Deploy cluster HDFS on servers ## Deploy cluster HDFS on servers
work in progress work in progress
## License
![licence](https://img.shields.io/badge/Licence-GPL--3-blue.svg)
**Aidmoit's Collect** 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.
This program 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 this program. If not, see http://www.gnu.org/licenses
#ssh-copy-id vagrant@172.16.50.54
ansible-playbook -i inventory/static playbook/mononode.yml -u vagrant --become --ask-become-pass
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
- name: Set JAVA_HOME as environment variable - name: Set JAVA_HOME as environment variable
become: yes become: yes
become_user : hadoop # become_user : hadoop
blockinfile: blockinfile:
insertafter: EOF insertafter: EOF
path : ~/.bashrc path : ~/.bashrc
......
...@@ -9,7 +9,7 @@ Vagrant.configure("2") do |config| ...@@ -9,7 +9,7 @@ Vagrant.configure("2") do |config|
namenode.vm.network "public_network", bridge:"enp1s0", use_dhcp_assigned_default_route: true namenode.vm.network "public_network", bridge:"enp1s0", use_dhcp_assigned_default_route: true
namenode.vm.provision "shell", inline: <<-SHELL namenode.vm.provision "shell", inline: <<-SHELL
systemctl stop resolvconf systemctl stop resolvconf
echo "nameserver 10.34.192.61" > /etc/resolv.conf echo "nameserver 10.34.192.61" >> /etc/resolv.conf
echo "nameserver 10.34.192.62" >> /etc/resolv.conf echo "nameserver 10.34.192.62" >> /etc/resolv.conf
SHELL SHELL
namenode.vm.hostname = "namenode" namenode.vm.hostname = "namenode"
...@@ -32,7 +32,7 @@ Vagrant.configure("2") do |config| ...@@ -32,7 +32,7 @@ Vagrant.configure("2") do |config|
machine.vm.network "public_network", bridge:"enp1s0", use_dhcp_assigned_default_route: true machine.vm.network "public_network", bridge:"enp1s0", use_dhcp_assigned_default_route: true
machine.vm.provision "shell", inline: <<-SHELL machine.vm.provision "shell", inline: <<-SHELL
systemctl stop resolvconf systemctl stop resolvconf
echo "nameserver 10.34.192.61" > /etc/resolv.conf echo "nameserver 10.34.192.61" >> /etc/resolv.conf
echo "nameserver 10.34.192.62" >> /etc/resolv.conf echo "nameserver 10.34.192.62" >> /etc/resolv.conf
SHELL SHELL
machine.vm.hostname = "datanode#{machine_id}" machine.vm.hostname = "datanode#{machine_id}"
......
...@@ -4,14 +4,13 @@ ...@@ -4,14 +4,13 @@
Vagrant.configure("2") do |config| Vagrant.configure("2") do |config|
config.vm.box = "generic/debian9" config.vm.box = "generic/debian9"
# Config Rémy pour piloter avec ansible et installer geonetwork
config.vm.define "aidmoit-geonetwork" config.vm.define "aidmoit-geonetwork"
config.vm.hostname = "aidmoit-geonetwork" config.vm.hostname = "aidmoit-geonetwork"
config.vm.network "public_network", bridge:"enp1s0", use_dhcp_assigned_default_route: true config.vm.network "public_network", bridge:"enp1s0", use_dhcp_assigned_default_route: true
config.vm.provision "shell", inline: <<-SHELL config.vm.provision "shell", inline: <<-SHELL
systemctl stop resolvconf systemctl stop resolvconf
echo "nameserver 10.34.192.61" > /etc/resolv.conf echo "nameserver 10.34.192.61" >> /etc/resolv.conf
echo "nameserver 10.34.192.62" >> /etc/resolv.conf echo "nameserver 10.34.192.62" >> /etc/resolv.conf
SHELL SHELL
......
Supports Markdown
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