Skip to content
Snippets Groups Projects
Commit c844d3a7 authored by Chris Hines's avatar Chris Hines
Browse files

Merge branch 'master' of https://github.com/monash-merc/ansible_cluster_in_a_box into merge

Conflicts:
	roles/nfs-client/tasks/mountFileSystem.yml
	roles/slurm/tasks/main.yml
parents d7363d4f 35445fbe
No related branches found
No related tags found
No related merge requests found
...@@ -22,16 +22,16 @@ ...@@ -22,16 +22,16 @@
slurmctrl: "{{ groups['ManagementNodes'][0] }}" slurmctrl: "{{ groups['ManagementNodes'][0] }}"
slurmqueues: slurmqueues:
- {name: batch, group: ComputeNodes, default: true} - {name: batch, group: ComputeNodes, default: true}
- {name: dev, group: ComputeNodesDebug, default: false} - {name: dev, group: ComputeNodesDev, default: false}
- {name: multicore, group: ComputeNodesLarge, default: false} - {name: multicore, group: ComputeNodesLarge, default: false}
mkFileSystems: mkFileSystems:
- {fstype : 'ext4', dev: '/dev/vdc1', opts: '', name: '/scrach'} - {fstype : 'ext4', dev: '/dev/vdc1', opts: ''}
- {fstype : 'ext4', dev: '/dev/vdc2', opts: '', name: '/cvl_home'} - {fstype : 'ext4', dev: '/dev/vdc2', opts: ''}
- {fstype : 'ext4', dev: '/dev/vdc3', opts: '', name: '/usr/local'} - {fstype : 'ext4', dev: '/dev/vdc3', opts: ''}
mntFileSystems: mountFileSystems:
- {fstype : 'ext4', dev: '/dev/vdc1', opts: 'defaults,nofail', name: '/scrach'} - {fstype : 'ext4', dev: '/dev/vdc1', opts: 'defaults,nofail', name: '/cvl/scratch'}
- {fstype : 'ext4', dev: '/dev/vdc2', opts: 'defaults,nofail', name: '/cvl_home'} - {fstype : 'ext4', dev: '/dev/vdc2', opts: 'defaults,nofail', name: '/cvl/home'}
- {fstype : 'ext4', dev: '/dev/vdc3', opts: 'defaults,nofail', name: '/usr/local'} - {fstype : 'ext4', dev: '/dev/vdc3', opts: 'defaults,nofail', name: '/cvl/local'}
roles: roles:
- { role: easy-rsa-CA } - { role: easy-rsa-CA }
- { role: OpenVPN-Server } - { role: OpenVPN-Server }
...@@ -41,12 +41,13 @@ ...@@ -41,12 +41,13 @@
- { role: nfs-server, configDiskDevice: true } - { role: nfs-server, configDiskDevice: true }
- { role: slurm, slurm_use_vpn: true} - { role: slurm, slurm_use_vpn: true}
- { role: installPackage, yumGroupPackageList: ['CVL Pre-installation', 'CVL Base Packages'], cliCopy: {'run': 'cp -r /usr/local/Modules/modulefiles/cvl /usr/local/Modules/modulefiles/massive', 'check': '/usr/local/Modules/modulefiles/massive'} } - { role: installPackage, yumGroupPackageList: ['CVL Pre-installation', 'CVL Base Packages'], cliCopy: {'run': 'cp -r /usr/local/Modules/modulefiles/cvl /usr/local/Modules/modulefiles/massive', 'check': '/usr/local/Modules/modulefiles/massive'} }
tasks:
setup:
- hosts: all - hosts: all
vars_files: vars_files:
- massive_var/main.yml - massive_var/main.yml
vars:
x509_ca_server: "{{ groups['ManagementNodes'][0] }}"
openvpn_servers: "{{ groups['ManagementNodes'] }}"
roles: roles:
- { role: etcHosts, domain: "{{ ldapDomain }}" } - { role: etcHosts, domain: "{{ ldapDomain }}" }
...@@ -56,6 +57,7 @@ ...@@ -56,6 +57,7 @@
- massive_var/passwords.yml - massive_var/passwords.yml
- massive_var/package.yml - massive_var/package.yml
vars: vars:
x509_ca_server: "{{ groups['ManagementNodes'][0] }}"
openvpn_servers: "{{ groups['ManagementNodes'] }}" openvpn_servers: "{{ groups['ManagementNodes'] }}"
roles: roles:
- { role: OpenVPN-Client } - { role: OpenVPN-Client }
...@@ -66,6 +68,7 @@ ...@@ -66,6 +68,7 @@
- massive_var/passwords.yml - massive_var/passwords.yml
- massive_var/package.yml - massive_var/package.yml
vars: vars:
x509_ca_server: "{{ groups['ManagementNodes'][0] }}"
openvpn_servers: "{{ groups['ManagementNodes'] }}" openvpn_servers: "{{ groups['ManagementNodes'] }}"
roles: roles:
- { role: OpenVPN-Client } - { role: OpenVPN-Client }
...@@ -73,8 +76,24 @@ ...@@ -73,8 +76,24 @@
- hosts: all - hosts: all
vars_files: vars_files:
- massive_var/main.yml - massive_var/main.yml
- massive_var/passwords.yml
- massive_var/package.yml
vars:
x509_ca_server: "{{ groups['ManagementNodes'][0] }}"
nfs_server: "{{ groups['ManagementNodes'][0] }}"
openvpn_servers: "{{ groups['ManagementNodes'] }}"
groupList:
- { name : 'ComputeNodes', interface : 'tun0' }
- { name : 'ComputeNodesDev', interface : 'tun0' }
- { name : 'ComputeNodesLarge', interface : 'tun0' }
- { name : 'LoginNodes', interface : 'tun0' }
exportList:
- { name: '/usr/local', src: '/cvl/local', fstype: 'nfs4', opts: 'defaults,ro,nofail', interface : 'tun0', srvopts: 'ro,sync' }
- { name: '/home', src: '/cvl/home', fstype: 'nfs4', opts: 'defaults,nofail', interface : 'tun0', srvopts: 'rw,root_squash,sync' }
- { name: '/scratch', src: '/cvl/scratch', fstype: 'nfs4', opts: 'defaults,nofail', interface : 'tun0', srvopts: 'rw,root_squash,sync' }
roles: roles:
- { role: etcHosts, domain: "{{ ldapDomain }}" } - { role: etcHosts, domain: "{{ ldapDomain }}" }
- { role: syncExports }
- hosts: 'ComputeNodes' - hosts: 'ComputeNodes'
vars_files: vars_files:
...@@ -91,13 +110,12 @@ ...@@ -91,13 +110,12 @@
groupList: groupList:
- { name : 'ComputeNodes', interface : 'tun0' } - { name : 'ComputeNodes', interface : 'tun0' }
exportList: exportList:
- { name: '/usr/local', src: '/usr/local', fstype: 'nfs4', opts: 'defaults,ro,nofail', interface : 'tun0', srvopts: 'ro,fsid=0,sync' } - { name: '/usr/local', src: '/cvl/local', fstype: 'nfs4', opts: 'defaults,ro,nofail', interface : 'tun0', srvopts: 'ro,sync' }
- { name: '/home', src: '/cvl_home', fstype: 'nfs4', opts: 'defaults,nofail', interface : 'tun0', srvopts: 'rw,root_squash,fsid=0,sync' } - { name: '/home', src: '/cvl/home', fstype: 'nfs4', opts: 'defaults,nofail', interface : 'tun0', srvopts: 'rw,root_squash,sync' }
- { name: '/scratch', src: '/scratch', fstype: 'nfs4', opts: 'defaults,nofail', interface : 'tun0', srvopts: 'rw,root_squash,fsid=0,sync' } - { name: '/scratch', src: '/cvl/scratch', fstype: 'nfs4', opts: 'defaults,nofail', interface : 'tun0', srvopts: 'rw,root_squash,sync' }
roles: roles:
- { role: ntp } - { role: ntp }
- { role: openLdapClient } - { role: openLdapClient }
- { role: syncExports }
- { role: nfs-client } - { role: nfs-client }
- { role: slurm, slurm_use_vpn: true} - { role: slurm, slurm_use_vpn: true}
- { role: installPackage, preInstallation: "umount /usr/local", postInstallation: "mount /usr/local", yumGroupPackageList: ["CVL Pre-installation", "CVL Base Packages"], cliFileCopy: {'src': '/tmp/gconf_path', 'dest': '/etc/gconf/2/path'} } - { role: installPackage, preInstallation: "umount /usr/local", postInstallation: "mount /usr/local", yumGroupPackageList: ["CVL Pre-installation", "CVL Base Packages"], cliFileCopy: {'src': '/tmp/gconf_path', 'dest': '/etc/gconf/2/path'} }
...@@ -112,17 +130,16 @@ ...@@ -112,17 +130,16 @@
openvpn_servers: "{{ groups['ManagementNodes'] }}" openvpn_servers: "{{ groups['ManagementNodes'] }}"
slurmctrl: "{{ groups['ManagementNodes'][0] }}" slurmctrl: "{{ groups['ManagementNodes'][0] }}"
slurmqueues: slurmqueues:
- {name: dev, group: ComputeNodesDebug, default: false} - {name: dev, group: ComputeNodesDev, default: false}
nfs_server: "{{ groups['ManagementNodes'][0] }}" nfs_server: "{{ groups['ManagementNodes'][0] }}"
groupList: groupList:
- { name : 'ComputeNodes', interface : 'tun0' } - { name : 'ComputeNodes', interface : 'tun0' }
exportList: exportList:
- { name: '/home', src: '/cvl_home', fstype: 'nfs4', opts: 'defaults,nofail', interface : 'tun0', srvopts: 'rw,root_squash,fsid=0,sync' } - { name: '/home', src: '/cvl/home', fstype: 'nfs4', opts: 'defaults,nofail', interface : 'tun0', srvopts: 'rw,root_squash,sync' }
- { name: '/scratch', src: '/scratch', fstype: 'nfs4', opts: 'defaults,nofail', interface : 'tun0', srvopts: 'rw,root_squash,fsid=0,sync' } - { name: '/scratch', src: '/cvl/scratch', fstype: 'nfs4', opts: 'defaults,nofail', interface : 'tun0', srvopts: 'rw,root_squash,sync' }
roles: roles:
- { role: ntp } - { role: ntp }
- { role: openLdapClient } - { role: openLdapClient }
- { role: syncExports }
- { role: nfs-client } - { role: nfs-client }
- { role: slurm, slurm_use_vpn: true} - { role: slurm, slurm_use_vpn: true}
- { role: installPackage, preInstallation: "umount /usr/local", postInstallation: "mount /usr/local", yumGroupPackageList: ["CVL Pre-installation", "CVL Base Packages"], cliFileCopy: {'src': '/tmp/gconf_path', 'dest': '/etc/gconf/2/path'} } - { role: installPackage, preInstallation: "umount /usr/local", postInstallation: "mount /usr/local", yumGroupPackageList: ["CVL Pre-installation", "CVL Base Packages"], cliFileCopy: {'src': '/tmp/gconf_path', 'dest': '/etc/gconf/2/path'} }
...@@ -142,13 +159,12 @@ ...@@ -142,13 +159,12 @@
groupList: groupList:
- { name : 'ComputeNodes', interface : 'tun0' } - { name : 'ComputeNodes', interface : 'tun0' }
exportList: exportList:
- { name: '/usr/local', src: '/usr/local', fstype: 'nfs4', opts: 'defaults,ro,nofail', interface : 'tun0', srvopts: 'ro,fsid=0,sync' } - { name: '/usr/local', src: '/cvl/local', fstype: 'nfs4', opts: 'defaults,ro,nofail', interface : 'tun0', srvopts: 'ro,sync' }
- { name: '/home', src: '/cvl_home', fstype: 'nfs4', opts: 'defaults,nofail', interface : 'tun0', srvopts: 'rw,root_squash,fsid=0,sync' } - { name: '/home', src: '/cvl/home', fstype: 'nfs4', opts: 'defaults,nofail', interface : 'tun0', srvopts: 'rw,root_squash,sync' }
- { name: '/scratch', src: '/scratch', fstype: 'nfs4', opts: 'defaults,nofail', interface : 'tun0', srvopts: 'rw,root_squash,fsid=0,sync' } - { name: '/scratch', src: '/cvl/scratch', fstype: 'nfs4', opts: 'defaults,nofail', interface : 'tun0', srvopts: 'rw,root_squash,sync' }
roles: roles:
- { role: ntp } - { role: ntp }
- { role: openLdapClient } - { role: openLdapClient }
- { role: syncExports }
- { role: nfs-client } - { role: nfs-client }
- { role: slurm, slurm_use_vpn: true} - { role: slurm, slurm_use_vpn: true}
- { role: installPackage, preInstallation: "umount /usr/local", postInstallation: "mount /usr/local", yumGroupPackageList: ["CVL Pre-installation", "CVL Base Packages"], cliFileCopy: {'src': '/tmp/gconf_path', 'dest': '/etc/gconf/2/path'} } - { role: installPackage, preInstallation: "umount /usr/local", postInstallation: "mount /usr/local", yumGroupPackageList: ["CVL Pre-installation", "CVL Base Packages"], cliFileCopy: {'src': '/tmp/gconf_path', 'dest': '/etc/gconf/2/path'} }
...@@ -166,26 +182,11 @@ ...@@ -166,26 +182,11 @@
slurmqueues: slurmqueues:
- {name: batch, group: ComputeNodes, default: true} - {name: batch, group: ComputeNodes, default: true}
exportList: exportList:
- { name: '/home', src: '/cvl_home', fstype: 'nfs4', opts: 'defaults,nofail', interface : 'tun0', srvopts: 'rw,root_squash,fsid=0,sync' } - { name: '/home', src: '/cvl/home', fstype: 'nfs4', opts: 'defaults,nofail', interface : 'tun0', srvopts: 'rw,root_squash,sync' }
roles: roles:
- { role: syncExports }
# - { role: OpenVPN-Client }
- { role: ntp } - { role: ntp }
- { role: openLdapClient } - { role: openLdapClient }
- { role: nfs-client } - { role: nfs-client }
- { role: slurm, slurm_use_vpn: true} - { role: slurm, slurm_use_vpn: true}
- { role: installPackage, importRepo: { command: "wget http://cvlrepo.massive.org.au/repo/cvl.repo -O", destination: "/etc/yum.repos.d/cvl.repo" }, yumGroupPackageList: ['CVL Pre-installation', 'CVL Base Packages'], cliCopy: {'run': 'cp -r /usr/local/Modules/modulefiles/cvl /usr/local/Modules/modulefiles/massive', 'check': '/usr/local/Modules/modulefiles/massive'} } - { role: installPackage, importRepo: { command: "wget http://cvlrepo.massive.org.au/repo/cvl.repo -O", destination: "/etc/yum.repos.d/cvl.repo" }, yumGroupPackageList: ['CVL Pre-installation', 'CVL Base Packages'], cliCopy: {'run': 'cp -r /usr/local/Modules/modulefiles/cvl /usr/local/Modules/modulefiles/massive', 'check': '/usr/local/Modules/modulefiles/massive'} }
- hosts: "'ComputeNodes*' 'LoginNodes'"
vars_files:
- massive_var/main.yml
- massive_var/passwords.yml
- massive_var/package.yml
vars:
exportList:
- { name: '/usr/local', src: '/usr/local', fstype: 'nfs4', opts: 'defaults,ro,nofail', interface : 'tun0', srvopts: 'ro,fsid=0,sync' }
- { name: '/home', src: '/cvl_home', fstype: 'nfs4', opts: 'defaults,nofail', interface : 'tun0', srvopts: 'rw,root_squash,fsid=0,sync' }
- { name: '/scratch', src: '/scratch', fstype: 'nfs4', opts: 'defaults,nofail', interface : 'tun0', srvopts: 'rw,root_squash,fsid=0,sync' }
roles:
- { role: syncExports }
...@@ -10,3 +10,4 @@ ...@@ -10,3 +10,4 @@
- openssl-devel - openssl-devel
- nfs-utils - nfs-utils
yum: "name={{ item }} state=present" yum: "name={{ item }} state=present"
sudo: true
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
- name: Pre installation - name: Pre installation
shell: "{{ preInstallation }}" shell: "{{ preInstallation }}"
sudo: true sudo: true
ignore_errors: true
when: ansible_distribution == 'CentOS' and preInstallation is defined when: ansible_distribution == 'CentOS' and preInstallation is defined
- name: Add new repo file - name: Add new repo file
......
--- ---
#- name: "Check mount"
# shell: mount | grep {{ item.name }}
# with_items: exportList
# register: result
- name: "stop fail2ban" - name: "stop fail2ban"
service: name=fail2ban state=stopped service: name=fail2ban state=stopped
sudo: true sudo: true
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
filesystem: fstype={{ item.fstype }} dev={{ item.dev }} opts={{ item.opts }} filesystem: fstype={{ item.fstype }} dev={{ item.dev }} opts={{ item.opts }}
with_items: mkFileSystems with_items: mkFileSystems
sudo: true sudo: true
when: configDiskDevice or mkFileSystems is defined when: mkFileSystems is defined
- name: Mount device - name: Mount device
mount: name={{ item.name }} src={{ item.dev }} fstype={{ item.fstype }} opts={{ item.opts }} state=mounted mount: name={{ item.name }} src={{ item.dev }} fstype={{ item.fstype }} opts={{ item.opts }} state=mounted
with_items: mountFileSystems with_items: mountFileSystems
sudo: true sudo: true
when: configDiskDevice or mountFileSystems is defined when: mountFileSystems is defined
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
sudo: true sudo: true
- name: create slurm user - name: create slurm user
user: name=slurm group=slurm system=yes user: name=slurm group=slurm system=yes createhome=no
sudo: true sudo: true
- name: install slurm rpms - name: install slurm rpms
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment