Skip to content

Commit

Permalink
Merge pull request #85 from rug-cit-hpc/develop
Browse files Browse the repository at this point in the history
Merge of Develop into Master
  • Loading branch information
erijpkema authored Mar 21, 2019
2 parents 5ca01be + ef1e7da commit 37e3480
Show file tree
Hide file tree
Showing 95 changed files with 1,797 additions and 1,329 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
*.md.html
*.vagrant
*.pydevproject
*.pyc
*.retry
*.swp
.vault_pass.txt
.vault_pass.txt*
documentation/.~lock.UMCG Research IT HPC cluster technical design.docx#
promtools/results/*
roles/hpc-cloud
Expand Down
69 changes: 69 additions & 0 deletions callback_plugins/homsaplog.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
'''
callback: homsaplog
type: stdout
short_description: Homo sapiens friendly formatted output.
description: Use this callback to sort though extensive debug output.
'''

from __future__ import (absolute_import, division, print_function)
from ansible.plugins.callback.default import CallbackModule as CallbackModule_default
from ansible.plugins.callback import CallbackBase
try:
# Ansible 2.3
from ansible.vars import strip_internal_keys
except ImportError:
try:
# Anisble2.4
from ansible.vars.manager import strip_internal_keys
except ImportError:
# Ansible 2.5
from ansible.vars.clean import strip_internal_keys
try:
import simplejson as json
except ImportError:
import json
import sys
reload(sys).setdefaultencoding('utf-8')

__metaclass__ = type

class CallbackModule(CallbackModule_default): # pylint: disable=too-few-public-methods,no-init
'''
Override for the default callback module.
Render std err/out outside of the rest of the result which it prints with
indentation.
'''
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'stdout'
CALLBACK_NAME = 'homsaplog'

def _dump_results(self, result, indent=4, sort_keys=True, keep_invocation=False):
'''Return the text to output for a result.'''

if result.get('_ansible_no_log', False):
return json.dumps(dict(censored=
"The output has been hidden due to the fact that 'no_log: true' was specified for this result."))

# All result keys starting with _ansible_ are for internal use only,
# so remove them from the result before we output anything.
reformatted_result = strip_internal_keys(result)

# remove invocation unless specifically wanting it
if not keep_invocation and self._display.verbosity < 3 and 'invocation' in result:
del reformatted_result['invocation']

# remove diff information from screen output
if self._display.verbosity < 3 and 'diff' in result:
del reformatted_result['diff']

# remove exception from screen output
if 'exception' in reformatted_result:
del reformatted_result['exception']

output = json.dumps(reformatted_result, indent=indent, ensure_ascii=False, sort_keys=sort_keys)
output = output.replace('\\r\\n\",', '",')
output = output.replace('\\r\\n', "\n\t")
output = output.replace('\\n\",', '",')
output = output.replace('\\n', "\n\t")
return output
9 changes: 0 additions & 9 deletions cinder-controller.yml

This file was deleted.

9 changes: 0 additions & 9 deletions cinder-storage.yml

This file was deleted.

63 changes: 43 additions & 20 deletions cluster.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,41 @@
---
- name: Sign host keys of all cluster hosts.
- name: Sanity checks before we start.
hosts: all
pre_tasks:
- name: Verify Ansible version meets requirements.
assert:
that: "ansible_version.full | version_compare('2.4', '>=')"
msg: 'You must update Ansible to at least 2.4.x to use this playbook.'

- import_playbook: local_admin_users.yml

- name: Install roles needed for all virtual cluster components.
hosts: all
roles:
- logins
- ssh_host_signer
- ssh_known_hosts
tasks:
- cron:
#
# Silly workaround for bug in interaction dbus <-> logind
# Need DBus 1.11.10 for a fix, but CentOS 7.6 is stuck on dbus 1.10.24.
#
name: Restart systemd-logind
minute: "/10"
user: root
job: /bin/systemctl restart systemd-logind
cron_file: restart_logind
become: true

- name: Mount the ceph volume
hosts:
- compute-vm
- sys-admin-interface
- deploy-admin-interface
become: True
roles:
- mount-volume

- name: Install roles needed for all virtual cluster components except jumphosts.
hosts: cluster
Expand All @@ -14,6 +46,8 @@
- ldap
- node_exporter
- cluster
- resolver
- shared_storage

- name: Install ansible on admin interfaces (DAI & SAI).
hosts:
Expand Down Expand Up @@ -46,18 +80,21 @@
- hosts: slurm
become: true
roles:
- slurm
- prom_server
- cadvisor
- slurm
vars:
# These variables are needed by the mariadb role.
# Which is a depencency of the slurm role.
# See roles/slurm/meta/main.yml
hostname_node0: "{{ ansible_hostname }}"
ip_node0: "{{ ansible_default_ipv4['address'] }}"

- name: Install virtual compute nodes
hosts: compute-vm
become: true
tasks:
roles:
- compute-vm
- isilon
- datahandling
- slurm-client

- name: Install User Interface (UI)
Expand All @@ -66,19 +103,5 @@
tasks:
roles:
- slurm_exporter
- user-interface
- datahandling
- isilon
- slurm-client

- name: Export /home on NFS server.
hosts: user-interface:&talos-cluster
roles:
- nfs_home_server

- name: Mount /home on NFS clients.
hosts: compute-vm&talos-cluster
roles:
- nfs_home_client

- import_playbook: users.yml
...
2 changes: 1 addition & 1 deletion documentation/Gearshift_technical_design.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Figure 4. Network design for gs-compute[0-9] node

Figure 5. Network design for gs-vcompute[0-9] virtual compute node

![](./media/media/image6.jpg)
![](./media/media/image6a.jpg)

### Compute cluster design

Expand Down
Binary file added documentation/media/media/image6a.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 0 additions & 44 deletions gearshift_hosts.ini
Original file line number Diff line number Diff line change
@@ -1,43 +1,3 @@
[databases]
gs-openstack
gs-compute10
gs-compute11

[keystone]
gs-openstack

[glance-controller]
gs-openstack

[heat]
gs-openstack

[horizon]
gs-openstack

[rabbitmq]
gs-openstack
gs-compute10
gs-compute11

[memcached]
gs-openstack

[neutron-controller]
gs-openstack physical_interface_mappings=provider:enp130s0f0

[nova-controller]
gs-openstack

[cinder-controller]
gs-openstack

[cinder-storage]
gs-compute[01:11] storage_volume=/dev/sdb

[nova-compute]
gs-compute[01:11] physical_interface_mappings=provider:enp130s0f0

[jumphost]
airlock

Expand Down Expand Up @@ -68,7 +28,3 @@ administration
[gearshift-cluster:children]
cluster
jumphost

[metal]
gs-openstack
gs-compute[01:11]
9 changes: 0 additions & 9 deletions glance-controller.yml

This file was deleted.

3 changes: 3 additions & 0 deletions group_vars/administration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

volume_mount_point: "/apps"
Loading

0 comments on commit 37e3480

Please sign in to comment.