Skip to content

Commit

Permalink
Merge pull request #471 from Zarquan/20210428-zrq-spark-conf
Browse files Browse the repository at this point in the history
20210428 zrq spark conf
  • Loading branch information
stvoutsin authored May 7, 2021
2 parents 725da65 + 8e15d7c commit 54c5255
Show file tree
Hide file tree
Showing 56 changed files with 5,460 additions and 380 deletions.
2 changes: 2 additions & 0 deletions deployments/hadoop-yarn/ansible/01-create-keypair.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
gather_facts: false
hosts: localhost
vars_files:
- config/ansible.yml
- config/openstack.yml
- /tmp/ansible-vars.yml
tasks:

Expand Down
2 changes: 2 additions & 0 deletions deployments/hadoop-yarn/ansible/01-create-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
gather_facts: false
hosts: localhost
vars_files:
- config/ansible.yml
- config/openstack.yml
- /tmp/ansible-vars.yml
tasks:

Expand Down
96 changes: 0 additions & 96 deletions deployments/hadoop-yarn/ansible/02-create-gateway.yml

This file was deleted.

2 changes: 2 additions & 0 deletions deployments/hadoop-yarn/ansible/03-create-masters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
gather_facts: false
hosts: localhost
vars_files:
- config/ansible.yml
- config/openstack.yml
- /tmp/ansible-vars.yml
tasks:

Expand Down
2 changes: 2 additions & 0 deletions deployments/hadoop-yarn/ansible/04-create-workers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
gather_facts: false
hosts: localhost
vars_files:
- config/ansible.yml
- config/openstack.yml
- /tmp/ansible-vars.yml
tasks:

Expand Down
4 changes: 3 additions & 1 deletion deployments/hadoop-yarn/ansible/04-update-fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@

- name: "DNF update"
gather_facts: false
hosts: masters:workers:zeppelin
hosts: all
vars_files:
- config/ansible.yml
- config/openstack.yml
- /tmp/ansible-vars.yml
tasks:

Expand Down
7 changes: 5 additions & 2 deletions deployments/hadoop-yarn/ansible/05-config-ssh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
vars:
sshdir: "{{ lookup('env','HOME') }}/.ssh"
vars_files:
- config/ansible.yml
- config/openstack.yml
- /tmp/ansible-vars.yml
tasks:

Expand All @@ -35,18 +37,19 @@
mode: 'u=rwx,g=rx,o=rx'
state: directory

- name: "Discover our zeppelin node"
- name: "Discover our Zeppelin node"
os_server_info:
cloud: "{{ cloudname }}"
server: "{{ deployname }}-zeppelin"
register:
zeppelinnodes
zeppelinnode

- name: "Generate Ansible SSH config"
template:
src: "templates/ssh-ansible.j2"
dest: "{{ sshdir }}/ansible-config"
mode: 'u=rw,g=,o='
force: true

- name: "Check our local SSH config"
stat:
Expand Down
10 changes: 5 additions & 5 deletions deployments/hadoop-yarn/ansible/06-config-dns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
- hosts: localhost
gather_facts: false
vars_files:
- config/ansible.yml
- config/openstack.yml
- /tmp/ansible-vars.yml
tasks:

Expand Down Expand Up @@ -52,11 +54,10 @@
src: 'templates/dns-hosts.j2'
dest: "/tmp/aglais-dns-hosts"


- hosts: zeppelin
gather_facts: false
tasks:
- name: "Deploy [/etc/hosts] to our Zeppelin node"
- name: "Deploy [/etc/hosts] file to our gateway node"
become: true
copy:
src: /tmp/aglais-dns-hosts
Expand All @@ -65,11 +66,10 @@
group: root
mode: u=rw,g=r,o=r


- hosts: masters:workers
- hosts: all:!zeppelin
gather_facts: false
tasks:
- name: "Deploy [/etc/hosts] file to masters and workers"
- name: "Deploy [/etc/hosts] file to all our nodes"
become: true
copy:
src: /tmp/aglais-dns-hosts
Expand Down
9 changes: 4 additions & 5 deletions deployments/hadoop-yarn/ansible/07-host-keys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@

- hosts: zeppelin
gather_facts: false
vars_files:
- config/ansible.yml
- /tmp/ansible-vars.yml
tasks:

- name: "ssh-keyscan by name"
Expand All @@ -50,7 +53,7 @@
dest: "/tmp/aglais-ssh-hosts"


- hosts: masters:workers:zeppelin
- hosts: all
gather_facts: false
tasks:
- name: "Deploy the known hosts file to [/etc/ssh/ssh_known_hosts]"
Expand Down Expand Up @@ -82,7 +85,3 @@
when: filestat.stat.exists == false






5 changes: 4 additions & 1 deletion deployments/hadoop-yarn/ansible/08-ping-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@

---
- name: "Ping tests"
hosts: zeppelin:masters:workers
hosts: all
gather_facts: false
vars_files:
- config/ansible.yml
- /tmp/ansible-vars.yml
tasks:

- name: "Check we can connect"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,25 @@
#
#

- name: "Create volumes on workers"
- name: "Create Cinder volumes"
gather_facts: false
hosts: localhost
vars_files:
- config/ansible.yml
- config/openstack.yml
- /tmp/ansible-vars.yml
tasks:

- name: "Create the volumes"
- name: "Create Cinder volumes"
include_tasks: "tasks/create-volumes.yml"
loop:
"{{ groups['workers'] }}"
"{{ groups['all'] }}"
loop_control:
loop_var: vmname

- name: "Mount volumes on workers"
- name: "Mount Cinder volumes"
gather_facts: false
hosts: workers
hosts: all
vars_files:
- /tmp/ansible-vars.yml
tasks:
Expand Down
3 changes: 3 additions & 0 deletions deployments/hadoop-yarn/ansible/10-install-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
- name: "Install Java"
hosts: masters:workers:zeppelin
gather_facts: false
vars_files:
- config/ansible.yml
- /tmp/ansible-vars.yml
tasks:

- name: "Install Java"
Expand Down
4 changes: 3 additions & 1 deletion deployments/hadoop-yarn/ansible/11-install-hadoop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
- name: "Install Hadoop"
hosts: masters:workers:zeppelin
gather_facts: false

vars_files:
- config/ansible.yml
- /tmp/ansible-vars.yml
vars:
# Empty on all hosts
hddatalink: "{{ hostvars[inventory_hostname].paths.hddatalink }}"
Expand Down
4 changes: 3 additions & 1 deletion deployments/hadoop-yarn/ansible/12-config-hadoop-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
- name: "Configure Hadoop [core-site.xml]"
hosts: masters:workers:zeppelin
gather_facts: false

vars_files:
- config/ansible.yml
- /tmp/ansible-vars.yml
vars:
hdtempdest: "{{ hostvars[inventory_hostname].paths.hdtempdest }}"
hdtemplink: "{{ hostvars[inventory_hostname].paths.hdtemplink }}"
Expand Down
9 changes: 6 additions & 3 deletions deployments/hadoop-yarn/ansible/12-config-ssh-access.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
- name: "Create a SSH key pair for each master node"
hosts: masters
gather_facts: true
vars_files:
- config/ansible.yml
- /tmp/ansible-vars.yml
vars:
username: "{{hostvars[inventory_hostname].login}}"
keyname: "{{inventory_hostname}}-{{username}}-rsa"
Expand Down Expand Up @@ -69,8 +72,8 @@
owner: "{{ userinfo.name }}"
group: "{{ userinfo.name }}"

- name: "Install the public keys on all our nodes"
hosts: masters:workers
- name: "Install the master keys on all our nodes"
hosts: all
gather_facts: true
vars:
username: "{{hostvars[inventory_hostname].login}}"
Expand Down Expand Up @@ -99,7 +102,7 @@
"{{ groups['masters'] }}"


- name: "Configure Hadoop [workers] on master nodes"
- name: "Install list of [workers] on [master] nodes"
hosts: masters:zeppelin
gather_facts: false

Expand Down
3 changes: 3 additions & 0 deletions deployments/hadoop-yarn/ansible/13-config-hdfs-namenode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
- name: "Configure HDFS namenode"
hosts: master01
gather_facts: false
vars_files:
- config/ansible.yml
- /tmp/ansible-vars.yml
vars:
hdfsmetalink: "{{ hostvars[inventory_hostname].paths.hdfsmetalink }}"
hdfsmetadest: "{{ hostvars[inventory_hostname].paths.hdfsmetadest }}"
Expand Down
3 changes: 3 additions & 0 deletions deployments/hadoop-yarn/ansible/14-config-hdfs-workers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
- name: "Configure Hadoop workers"
hosts: workers
gather_facts: false
vars_files:
- config/ansible.yml
- /tmp/ansible-vars.yml
vars:
hdfsdatalink: "{{ hostvars[inventory_hostname].paths.hdfsdatalink }}"
hdfsdatadest: "{{ hostvars[inventory_hostname].paths.hdfsdatadest }}"
Expand Down
Loading

0 comments on commit 54c5255

Please sign in to comment.