Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ucegg
ansible
Commits
5e04c99c
Commit
5e04c99c
authored
Aug 16, 2017
by
julian.gethmann
Browse files
Add blas/Pelegant
* Install blas and Pelegant and open ports for Pelegant runs
parent
ae26072a
Changes
4
Hide whitespace changes
Inline
Side-by-side
roles/elegant/files/pelegant_setup.sh
0 → 100755
View file @
5e04c99c
#!/bin/bash
# bash >= 4 required
# This script assumes to be run only once per day and overwrites files
# It also does shouldn't be run for different hosts in parallel
# Search the "Edit"-line
#
# - This script has not been tested so far
# - Mounting via sshfs is not included yet
set
-euo
pipefail
IFS
=
$'
\n\t
'
############################################################
# Edit:
declare
-A
hosts_cpus
=(
[
"las113"
]=
"6"
[
"las126"
]=
"11"
)
############################################################
filename
=
"~/.ssh/Pelegant_
$(
date
--iso
)
"
ssh-keygen
-f
"
${
filename
}
"
-q
if
[
-f
~/.mpihosts
]
;
then
mv
~/.mpihosts ~/.mpihosts.
${
date
--iso
}
fi
for
cpus
in
"
${
!host_cpus[@]
}
"
;
do
echo
"
${
host_cpus
[
$cpus
]
}
"
:
${
cpus
}
user
=
${
USER
}
>>
~/.mpihosts
done
for
cpus
in
"
${
!host_cpus[@]
}
"
;
do
dest
=
"
${
host_cpus
[
$cpus
]
}
"
ssh-copy-id
-i
"
${
filename
}
"
${
dest
}
scp
"
${
filename
}
"
"
${
dest
}
:~/.ssh/"
scp
"
${
mpifile
}
"
"
${
dest
}
:.mpihosts"
done
roles/elegant/tasks/blas.yml
0 → 100644
View file @
5e04c99c
---
-
name
:
"
BLAS
(needed
by
elegant)"
become
:
yes
dnf
:
name
:
"
{{
item
}}"
state
:
present
with_items
:
"
{{
prePelegant
}}"
tags
:
pelegant
-
name
:
ansible dependencies for firewalld
become
:
yes
dnf
:
name
:
"
{{
item
}}"
state
:
present
with_items
:
-
python-decorator
-
python-slip
-
python-firewall
tags
:
pelegant
-
name
:
Pelegant open ports
become
:
yes
firewalld
:
state
:
enabled
permanent
:
true
rich_rule
:
'
rule
family="ipv4"
source
address="129.13.108.96/27"
port
port="10000-10100"
protocol="tcp"
accept'
notify
:
-
reload firewall
-
restart firewall
tags
:
pelegant
-
name
:
export variable
become
:
yes
copy
:
src
:
mpich.sh
dest
:
/etc/profile.d/pelegant.sh
group
:
root
owner
:
root
backup
:
yes
notify
:
run profiled
tags
:
pelegant
-
name
:
install sshfs
become
:
yes
dnf
:
name
:
fuse-sshfs
state
:
present
tags
:
pelegant
roles/elegant/tasks/main.yml
View file @
5e04c99c
---
#
- import_tasks: blas.yml
-
import_tasks
:
blas.yml
-
import_tasks
:
elegant.yml
-
import_tasks
:
examples.yml
# - import_tasks: pyhonsdds.yml
roles/elegant/tasks/pythonsdds.yml
0 → 100644
View file @
5e04c99c
---
-
name
:
install SDDS for Python
2
pip
:
name
:
-
name
:
install SDDS for Python
3
pip
:
name
:
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment