Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
arbutus-nt
TerraFold
Commits
a16daf10
Commit
a16daf10
authored
Apr 23, 2020
by
Ryan Taylor
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '20200421-config' into 'master'
new config Closes
#3
See merge request
!1
parents
9517e4fd
41934ca9
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
57 additions
and
40 deletions
+57
-40
.gitignore
.gitignore
+1
-0
ansible/controller.yml
ansible/controller.yml
+1
-1
ansible/roles/folding-client/defaults/main.yml
ansible/roles/folding-client/defaults/main.yml
+0
-1
ansible/roles/folding-client/tasks/config.yml
ansible/roles/folding-client/tasks/config.yml
+18
-6
ansible/roles/folding-client/tasks/install.yml
ansible/roles/folding-client/tasks/install.yml
+1
-1
ansible/roles/folding-client/tasks/main.yml
ansible/roles/folding-client/tasks/main.yml
+1
-1
ansible/roles/folding-client/templates/config.xml.j2
ansible/roles/folding-client/templates/config.xml.j2
+4
-24
ansible/roles/folding-client/templates/fahclient.j2
ansible/roles/folding-client/templates/fahclient.j2
+3
-0
ansible/roles/folding-controller/tasks/main.yml
ansible/roles/folding-controller/tasks/main.yml
+2
-2
ansible/roles/folding-controller/templates/inventory-dump.j2
ansible/roles/folding-controller/templates/inventory-dump.j2
+2
-2
ansible/template.yml
ansible/template.yml
+22
-0
ansible/terrafold.yml
ansible/terrafold.yml
+2
-2
No files found.
.gitignore
View file @
a16daf10
terraform/.terraform/
terraform/terraform.tfstate
terraform/.terraform.tfstate.lock.info
terraform/terraform.tfstate.backup
ansible/controller.yml
View file @
a16daf10
...
...
@@ -2,7 +2,7 @@
# Set up a management node to run FAHControl and monitor the clients.
-
hosts
:
control
ler
-
hosts
:
fah
control
roles
:
-
folding-controller
become
:
yes
...
...
ansible/roles/folding-client/defaults/main.yml
View file @
a16daf10
...
...
@@ -19,4 +19,3 @@ fah_manager: ""
apply_updates
:
"
false"
timezone
:
"
America/Vancouver"
ansible/roles/folding-client/tasks/config.yml
View file @
a16daf10
---
# A handler doesn't work well here because we don't want to reload
# at the end, after it was already stopped and started.
-
name
:
Configure FAHClient
# A handler doesn't work well for these config changes because
# we don't want to reload at the end again, after it was already stopped and started.
# Slot config goes here
-
name
:
Configure FAHClient (/etc/fahclient/config.xml)
template
:
src
:
"
config.xml.j2"
dest
:
"
/etc/fahclient/config.xml"
owner
:
fahclient
group
:
root
mode
:
0644
register
:
fah_config
register
:
fah_xmlconfig
# Otherwise as much config as possible goes here
-
name
:
Configure FAHClient (/etc/default/fahclient)
template
:
src
:
"
fahclient.j2"
dest
:
"
/etc/default/fahclient"
owner
:
root
group
:
root
mode
:
0644
register
:
fah_defconfig
# FIXME: use of 'pattern' is a workaround in these sysvinit tasks
# Remove after https://github.com/ansible/ansible/pull/68472
...
...
@@ -20,7 +33,6 @@
pattern
:
"
/usr/bin/FAHClient"
register
:
fah_running_check
check_mode
:
yes
changed_when
:
no
# If it was already running, we need this to apply config change
-
name
:
Reload FAHClient if configuration changed
...
...
@@ -29,7 +41,7 @@
state
:
"
reloaded"
pattern
:
"
/usr/bin/FAHClient"
when
:
-
fah_config.changed
-
fah_
xmlconfig.changed or fah_def
config.changed
-
not fah_running_check.changed
-
name
:
Ensure FAHClient is enabled and running
...
...
ansible/roles/folding-client/tasks/install.yml
View file @
a16daf10
...
...
@@ -3,7 +3,7 @@
# download from https://foldingathome.org/start-folding/
-
name
:
Install FAHClient
yum
:
name
:
https://download.foldingathome.org/releases/public/release/fahclient/centos-6.7-64bit/v7.
5
/fahclient-7.
5.1
-1.x86_64.rpm
name
:
https://download.foldingathome.org/releases/public/release/fahclient/centos-6.7-64bit/v7.
6
/fahclient-7.
6.9
-1.x86_64.rpm
state
:
present
validate_certs
:
yes
when
:
ansible_facts.packages['fahclient'] is not defined
...
...
ansible/roles/folding-client/tasks/main.yml
View file @
a16daf10
...
...
@@ -9,7 +9,7 @@
-
name
:
set timezone
timezone
:
name
:
"
{{
timezone
}}
"
name
:
"
UTC
"
-
{
import_tasks
:
storage.yml
,
tags
:
[
'
storage'
]
}
-
{
import_tasks
:
update.yml
,
tags
:
[
'
update'
],
when
:
apply_updates|bool
}
...
...
ansible/roles/folding-client/templates/config.xml.j2
View file @
a16daf10
{#
Note: FAHClient parses and re-writes the config file,
Note: FAHClient parses and re-writes the config file
(?)
,
so we try to match what it will write to maintain idempotence.
Also see: /usr/share/doc/fahclient/sample-config.xml
#}
<config>
<!-- Client Control -->
<idle-seconds v='0'/>
<!-- Folding Slot Configuration -->
<client-type v='advanced'/>
<max-packet-size v='big'/>
<!-- HTTP Server -->
<allow v='127.0.0.1 {{ fah_manager }}'/>
<!-- Remote Command Server -->
<password v='{{ fah_adminpass }}'/>
<!-- Slot Control -->
<
power v='full
'/>
{% if 'gpu_nodes' in group_names %}
<
smp v='true
'/>
{% if '
meta-terrafold_group_
gpu_nodes' in group_names %}
<gpu v='true'/>
{% endif %}
<!-- User Information -->
{% if fah_passkey is defined %}
<passkey v='{{ fah_passkey }}'/>
{% endif %}
<team v='{{ fah_team }}'/>
<user v='{{ fah_user }}'/>
<!-- Folding Slots -->
<slot id='0' type='CPU'/>
{% if 'gpu_nodes' in group_names %}
{% if '
meta-terrafold_group_
gpu_nodes' in group_names %}
<slot id='1' type='GPU'/>
{% endif %}
</config>
\ No newline at end of file
ansible/roles/folding-client/templates/fahclient.j2
0 → 100644
View file @
a16daf10
EXTRA_OPTS="--user={{ fah_user }} --team={{ fah_team }} {% if fah_passkey is defined %}--passkey={{ fah_passkey }}{% endif %} \
--password={{ fah_adminpass }} --allow=127.0.0.1,{{ fah_manager }} \
{{ fah_other_options|default('') }}"
ansible/roles/folding-controller/tasks/main.yml
View file @
a16daf10
...
...
@@ -3,8 +3,8 @@
-
name
:
Install packages
yum
:
name
:
-
https://download.foldingathome.org/releases/public/release/fahcontrol/centos-6.7-64bit/v7.
5
/fahcontrol-7.
5.1
-1.noarch.rpm
-
https://download.foldingathome.org/releases/public/release/fahviewer/centos-6.7-64bit/v7.
5
/fahviewer-7.
5.1
-1.x86_64.rpm
-
https://download.foldingathome.org/releases/public/release/fahcontrol/centos-6.7-64bit/v7.
6
/fahcontrol-7.
6.9
-1.noarch.rpm
-
https://download.foldingathome.org/releases/public/release/fahviewer/centos-6.7-64bit/v7.
6
/fahviewer-7.
6.9
-1.x86_64.rpm
-
xorg-x11-xauth
-
mesa-dri-drivers
...
...
ansible/roles/folding-controller/templates/inventory-dump.j2
View file @
a16daf10
{% for node in groups['cpu_nodes'] | union(groups['gpu_nodes']) %}
{{ hostvars[node].inventory_hostname }},{{ hostvars[node].
ansible_host
}}
{% for node in groups['
meta-terrafold_group_
cpu_nodes'] | union(groups['
meta-terrafold_group_
gpu_nodes']) %}
{{ hostvars[node].inventory_hostname }},{{ hostvars[node].
openstack.private_v4
}}
{% endfor %}
ansible/template.yml
0 → 100644
View file @
a16daf10
---
# For initial image configuration.
# extra setup for GPU nodes if applicable
#- hosts: template
# roles:
# - nvidia-gpu-setup
# become: yes
# become_user: root
# TODO Need to remove the initial slot config from config.xml so that
# slot auto config (incl. for GPUs) works
-
hosts
:
template
roles
:
-
folding-client
vars
:
apply_updates
:
true
become
:
yes
become_user
:
root
ansible/terrafold.yml
View file @
a16daf10
...
...
@@ -3,13 +3,13 @@
# Configure CPU and GPU compute nodes to run FAHClient.
# extra setup for GPU nodes if applicable
-
hosts
:
gpu_nodes
-
hosts
:
meta-terrafold_group_
gpu_nodes
roles
:
-
nvidia-gpu-setup
become
:
yes
become_user
:
root
-
hosts
:
cpu_nodes:g
pu_nodes
-
hosts
:
meta-terrafold_group_gpu_nodes:meta-terrafold_group_c
pu_nodes
roles
:
-
folding-client
become
:
yes
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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