Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial orangefs work for sdp #1

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ansible/ceph-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# This playbook applies site config for Ceph client support,
# in particular CephFS home directories
- hosts: cluster_ceph_client
remote_user: centos
remote_user: "{{ cluster_guest }}"
become: yes
roles:
- role: ceph_setup
Expand Down
6 changes: 3 additions & 3 deletions ansible/generic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# This playbook applies site config for Ceph support,
# in particular CephFS home directories
- hosts: cluster
remote_user: centos
remote_user: "{{ cluster_guest }}"
become: yes
roles:
- role: cluster_setup
Expand All @@ -24,15 +24,15 @@
# if required. Generate an RSA public key and configure as
# an OpenStack-aware login node.
- hosts: control
remote_user: centos
remote_user: "{{ cluster_guest }}"
become: yes
roles:
- role: user_setup
users: "{{ alaska_users }}"
homedir: "{{ alaska_homedir }}"

- hosts: compute
remote_user: centos
remote_user: "{{ cluster_guest }}"
become: yes
roles:
- role: user_propagate
Expand Down
3 changes: 3 additions & 0 deletions ansible/group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ cluster_name: stack
cluster_groups: []
cluster_roles: []

# Cloud guest user used for Ansible access and password-less sudo.
cluster_guest: centos

# This keypair should exist in OpenStack. It will be assigned
# for the cloud user for the next phase of deployment.
cluster_keypair: rsa_keypair
Expand Down
6 changes: 3 additions & 3 deletions ansible/openhpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
- include: users.yml

- hosts: cluster_login
remote_user: centos
remote_user: "{{ cluster_guest }}"
become: yes
roles:
- role: openhpc_control

- hosts: cluster_batch
remote_user: centos
remote_user: "{{ cluster_guest }}"
become: yes
roles:
- role: openhpc_compute

- hosts: cluster
remote_user: centos
remote_user: "{{ cluster_guest }}"
become: yes
roles:
- role: openhpc_runtime
Expand Down
17 changes: 17 additions & 0 deletions ansible/orangefs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
- include: setup.yml

- hosts: orange_meta
remote_user: "{{ cluster_guest }}"
become: yes
tasks:
- name: Ensure the /scratch filesystem is present on Metadata servers
become: yes
file: path=/scratch state=directory

- hosts: cluster
remote_user: "{{ cluster_guest }}"
become: yes
roles:
- role: orange_setup
- role: orangefs
7 changes: 6 additions & 1 deletion ansible/roles/cluster_setup/tasks/time.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
name: Europe/London

- name: Ensure NTP packages are installed
yum:
package:
name: ntp
state: present

- name: Ensure SELinux python bindings are installed
package:
name: libselinux-python
state: present

- name: Apply Site NTP configuration
copy:
src: ntp.conf
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 10 additions & 0 deletions ansible/roles/orange_setup/files/orangefs_client.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=OrangeFS Parallel File System Client
After=network.target

[Service]
Type=forking
ExecStart=/usr/sbin/pvfs2-client -p /usr/sbin/pvfs2-client-core

[Install]
WantedBy=multi-user.target
29 changes: 29 additions & 0 deletions ansible/roles/orange_setup/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
- name: copy rpms to server
copy: src={{ item.src }} dest={{ item.dest }}
with_items:
- { src: '{{ role_path }}/files/orangefs-2.9.7-1.fc25.x86_64.rpm',
dest: '/tmp/orangefs-2.9.7-1.fc25.x86_64.rpm' }
- { src: '{{ role_path }}/files/orangefs-server-2.9.7-1.fc25.x86_64.rpm',
dest: '/tmp/orangefs-server-2.9.7-1.fc25.x86_64.rpm' }

- name: copy unit file for client
copy: src={{ item.src }} dest={{ item.dest }}
with_items:
- { src: '{{ role_path }}/files/orangefs_client.service',
dest: '/usr/lib/systemd/system/' }
become: yes
when: inventory_hostname in groups['orange_client']

- name: orange dependencys
dnf:
name: perl-Math-BigInt
state: present

- name: install orangefs packages
dnf:
name: "{{ item }}"
state: present
with_items:
- /tmp/orangefs-2.9.7-1.fc25.x86_64.rpm
- /tmp/orangefs-server-2.9.7-1.fc25.x86_64.rpm
89 changes: 89 additions & 0 deletions ansible/roles/orangefs/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
# Generate the configuration file on one server and then distribute globally.
# If we don't do this, pvfs2-genconfig will not apply our config changes to /etc/pvfs2.conf...
- name: Generate a PVFS2 configuration file
block:
- name: Ensure PVFS2 config file is not present
file:
path: /etc/pvfs2.conf
state: absent
- name: Generate a sample config file
command: pvfs2-genconfig --quiet --protocol tcp --ioservers "{{ groups['orange_data'] | join(',') }}" --metaservers "{{ groups['orange_data'] |join(',') }}" --storage /export/orangefs /etc/pvfs2.conf
args:
creates: /etc/pvfs2.conf
- name: Update DataStorageSpace setting
lineinfile:
path: /etc/pvfs2.conf
regexp: 'DataStorageSpace .*$'
line: ' DataStorageSpace /export/orangefs/data'
insertbefore: '^</Defaults>'
- name: Update MetadataStorageSpace setting
lineinfile:
path: /etc/pvfs2.conf
regexp: 'MetadataStorageSpace .*$'
line: ' MetadataStorageSpace /export/orangefs/meta'
insertbefore: '^</Defaults>'
- name: Retrieve generated PVFS2 config
fetch:
dest: "{{ playbook_dir }}/pvfs2.conf.tmp"
src: /etc/pvfs2.conf
fail_on_missing: yes
flat: yes
run_once: true

- name: Copy out the PVFS2 config
copy:
src: pvfs2.conf.tmp
dest: /etc/pvfs2.conf
mode: 0644
owner: root
group: root
force: yes

- name: Remove temporary PVFS2 config file
local_action:
module: file
path: "{{ playbook_dir }}/pvfs2.conf.tmp"
state: absent
become: false
run_once: true

- name: probe the orangefs module
modprobe:
name: orangefs
state: present

- name: Setup for data servers
block:
- name: Obliterate previous filesystem local data
file:
path: "{{ item }}"
state: absent
with_items:
- /export/orangefs/data
- /export/orangefs/meta
- name: Format PVFS2 storage
command: pvfs2-server -f -a "{{ inventory_hostname }}" /etc/pvfs2.conf creates=/export/orangefs/data
- name: Start PVFS2 server
systemd:
name: orangefs
enabled: yes
state: restarted
when: inventory_hostname in groups['orange_data']

- name: Start PVFS2 client
systemd:
name: orangefs_client
enabled: yes
state: restarted
when: inventory_hostname in groups['orange_client']

- name: create mountpoint scratch
file:
path: /scratch
state: directory
when: inventory_hostname in groups['orange_client']

- name: run the mount comand
command: "mount -t pvfs2 tcp://{{ groups['orange_data'] | first }}:3334/orangefs /scratch"
when: inventory_hostname in groups['orange_client']
2 changes: 1 addition & 1 deletion ansible/roles/user_setup/tasks/keystone.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: Ensure that Keystone user auth packages are installed
yum:
package:
name: "{{item}}"
state: present
with_items:
Expand Down
2 changes: 1 addition & 1 deletion ansible/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# Apply generic setup configuration that is universally useful
- hosts: cluster
remote_user: centos
remote_user: "{{ cluster_guest }}"
become: yes
roles:
- role: cluster_setup
Expand Down
4 changes: 2 additions & 2 deletions ansible/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
# if required. Generate an RSA public key and configure as
# an OpenStack-aware login node.
- hosts: cluster_login
remote_user: centos
remote_user: "{{ cluster_guest }}"
become: yes
roles:
- role: user_setup
users: "{{ alaska_users }}"
homedir: "{{ alaska_homedir }}"

- hosts: cluster_batch
remote_user: centos
remote_user: "{{ cluster_guest }}"
become: yes
roles:
- role: user_propagate
Expand Down
10 changes: 10 additions & 0 deletions config/orangefs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
---
cluster_name: orange
cluster_keypair: ilab_sclt100

# We are using Fedora images for this deployment:
# We need to use the Fedora cloud image guest user
cluster_guest: "fedora"

# Site-specific network configuration.
cluster_net:
- { net: "ilab", subnet: "ilab" }

cluster_groups:
- "{{ orangefs_meta }}"
- "{{ orangefs_data }}"
Expand All @@ -24,3 +33,4 @@ orangefs_client:
image: "FedoraCore"
num_nodes: 4

cluster_roles: []