Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPCasCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hpc-team
HPCasCode
Commits
a63654b1
Commit
a63654b1
authored
8 years ago
by
Chris Hines
Browse files
Options
Downloads
Plain Diff
Merge branch 'nfs-client' into 'master'
Nfs client See merge request
!62
parents
fab7632a
75e7357b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
roles/mellanox_drivers/tasks/main.yml
+10
-100
10 additions, 100 deletions
roles/mellanox_drivers/tasks/main.yml
roles/nfs-client/tasks/mountFileSystem.yml
+1
-30
1 addition, 30 deletions
roles/nfs-client/tasks/mountFileSystem.yml
with
11 additions
and
130 deletions
roles/mellanox_drivers/tasks/main.yml
+
10
−
100
View file @
a63654b1
...
...
@@ -2,7 +2,7 @@
-
include_vars
:
mellanoxVars.yml
-
name
:
yum install dependencies
yum
:
name=perl,pciutils,gtk2,atk,cairo,gcc-gfortran,libxml2-python,tcsh,libnl,lsof,tcl,tk
yum
:
name=perl,pciutils,gtk2,atk,cairo,gcc-gfortran,libxml2-python,tcsh,libnl,lsof,tcl,tk
,kernel-devel,python-devel,createrepo
sudo
:
true
ignore_errors
:
true
when
:
ansible_os_family == "RedHat"
...
...
@@ -13,99 +13,29 @@
register
:
drivers_installed
ignore_errors
:
true
-
name
:
set install
set_fact
:
install_now=True, reboot_now=False
# This is NASTY. Don't upgrade production systems without taking them out of the queue first.
#- name: yum update to upgrade kernel
# shell: "yum update -y"
# sudo: true
# ignore_errors: true
# when: ansible_os_family == "RedHat" and drivers_installed|failed
#
# A REBOOT IS NEEDED AFTER a KERNEL UPDATE
#
#- name: restart machine
# shell: sleep 5; sudo shutdown -r now "Ansible updates triggered"
# async: 2
# poll: 0
# ignore_errors: true
# sudo: true
# when: ansible_os_family == "RedHat" and drivers_installed|failed
#
#- name: waiting for server to come back
# local_action: wait_for host={{ ansible_host }} state=started port=22 delay=10 search_regex=OpenSSH
# sudo: false
#
#- name: waiting for server to come back number 2
# local_action: wait_for host={{ ansible_host }} state=started port=22 delay=10 search_regex=OpenSSH
# sudo: false
-
name
:
copy driver source
#make this a variable
unarchive
:
copy=
yes
src="
files
/{{ MELLANOX_DRIVER_SRC }}.tgz" dest=/tmp
unarchive
:
copy=
no
src="
http://consistency0/src
/{{ MELLANOX_DRIVER_SRC }}.tgz" dest=/tmp
sudo
:
true
#when: drivers_installed|failed and ansible_os_family=="RedHat" and ansible_distribution_major_version == "7"
when
:
drivers_installed|failed
when
:
install_now
-
name
:
install drivers
shell
:
./mlnxofedinstall -q
shell
:
./mlnxofedinstall -q
--add-kernel-support --force
args
:
#more changes
chdir
:
"
/tmp/{{
MELLANOX_DRIVER_SRC
}}"
sudo
:
true
when
:
drivers_installed|failed
when
:
install_now
#
# get IP address before reboot
#
-
name
:
get IP address
local_action
:
command ./scripts/map_ib_ip.pl {{ inventory_hostname }}
register
:
ip_address
sudo
:
false
#when: drivers_installed|failed
#get the interface name
-
name
:
get devide name of Mellanox Interface from ibdev2netdev.sh
script
:
ibdev2netdev.sh
register
:
MELLANOX_DEVICE_NAME
sudo
:
true
-
name
:
create /etc/sysconfig/network-scripts/ifcfg-<device name>
template
:
dest=/etc/sysconfig/network-scripts/ifcfg-{{ MELLANOX_DEVICE_NAME.stdout }} src=ifcfg-conf.j2 owner=root group=root
sudo
:
true
when
:
ansible_os_family=="RedHat"
#ubuntu equivalent of previous command
-
name
:
Ubuntu network interfaces - line
1
lineinfile
:
args
:
dest
:
/etc/network/interfaces
line
:
auto {{ MELLANOX_DEVICE_NAME.stdout }}
state
:
present
sudo
:
true
when
:
ansible_os_family=="Debian" and drivers_installed|failed
-
name
:
Ubuntu network interfaces - line
2
lineinfile
:
args
:
dest
:
/etc/network/interfaces
line
:
iface {{ MELLANOX_DEVICE_NAME.stdout }} inet static
state
:
present
insertafter
:
"
auto
{{
MELLANOX_DEVICE_NAME.stdout
}}"
sudo
:
true
when
:
ansible_os_family=="Debian" and drivers_installed|failed
-
name
:
Ubuntu network interfaces - line
3
lineinfile
:
args
:
dest
:
/etc/network/interfaces
line
:
address {{ ip_address.stdout }}
state
:
present
insertafter
:
"
iface
{{
MELLANOX_DEVICE_NAME.stdout
}}
inet
static"
sudo
:
true
when
:
ansible_os_family=="Debian" and drivers_installed|failed
#
# A REBOOT IS NEEDED AFTER SUCCESSFUL INSTALL
#
...
...
@@ -115,29 +45,9 @@
poll
:
1
ignore_errors
:
true
sudo
:
true
when
:
ansible_os_family=="RedHat" and drivers_installed|failed
-
name
:
restart machine for Ubuntu -cos it is 'special'
shell
:
"
sleep
5;
sudo
shutdown
-r
now"
async
:
2
poll
:
1
ignore_errors
:
true
sudo
:
true
when
:
ansible_os_family=="Debian" and drivers_installed|failed
when
:
reboot_now
-
name
:
waiting for server to come back
local_action
:
wait_for host={{ ansible_host }} state=started port=22 delay=10 search_regex=OpenSSH
sudo
:
false
when
:
drivers_installed|failed
-
name
:
waiting for server to come back
2
local_action
:
wait_for host={{ ansible_host }} state=started port=22 delay=10 search_regex=OpenSSH
when
:
drivers_installed|failed
-
name
:
bring up interface
#variable=eth0 or ens6 or eth1
command
:
ifup {{ MELLANOX_DEVICE_NAME.stdout }}
sudo
:
true
when
:
ansible_os_family=="RedHat" and ansible_distribution_major_version == "7"
when
:
reboot_now
This diff is collapsed.
Click to expand it.
roles/nfs-client/tasks/mountFileSystem.yml
+
1
−
30
View file @
a63654b1
---
-
name
:
"
stop
fail2ban"
service
:
name=fail2ban state=stopped
sudo
:
true
-
name
:
"
Check
NFS
mount,
it
may
not
be
necessary,
just
in
case
if
the
following
role
does
actively
re-mount"
shell
:
mountpoint -q {{ nfsMounts[0].name }}
register
:
mount_state
ignore_errors
:
true
when
:
nfsMounts is defined
-
name
:
"
Mounting
NFS
mounts"
mount
:
name={{ item.name }} src="{{ item.ipv4 }}:{{ item.src }}" fstype={{ item.fstype }} opts={{ item.opts }} state=mounted
with_items
:
"
{{
nfsMounts
}}"
notify
:
"
restart
rpcbind"
notify
:
"
restart
idmap"
sudo
:
true
ignore_errors
:
true
register
:
firstMount
when
:
nfsMounts is defined and mount_state | failed
-
name
:
"
Wait
for
nfs
to
stabailse"
command
:
sleep
60
delegate_to
:
127.0.0.1
when
:
firstMount | failed
-
name
:
"
Mounting
NFS
mounts
after
failure"
mount
:
name={{ item.name }} src="{{ item.ipv4 }}:{{ item.src }}" fstype={{ item.fstype }} opts={{ item.opts }} state=mounted
with_items
:
"
{{
nfsMounts
}}"
notify
:
"
restart
idmap"
notify
:
"
restart
rpcbind"
sudo
:
true
when
:
nfsMounts is defined and firstMount is defined and firstMount | failed
-
name
:
"
restart
fail2ban"
service
:
name=fail2ban state=started
sudo
:
true
when
:
nfsMounts is defined
This diff is collapsed.
Click to expand it.
Chris Hines
@chines
mentioned in commit
c9de8126
·
4 years ago
mentioned in commit
c9de8126
mentioned in commit c9de812616d80ff152e3fc7c0feda1ba0785d627
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment