Skip to content

Commit

Permalink
add gfio notes and binary
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsimcall committed Jun 2, 2018
1 parent 4c90682 commit 1dbca31
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 79 deletions.
Binary file added fio-3.1-2-JCALL.el7.x86_64.rpm
Binary file not shown.
18 changes: 18 additions & 0 deletions gfio-notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Notes to rebuild fio RPM to include gfio
# https://wiki.centos.org/HowTos/RebuildSRPM
# https://blog.packagecloud.io/eng/2015/04/20/working-with-source-rpms/

# yum-builddep fio
# yum install rpm-build gcc libpmem-devel libpmemblk-devel libaio-devel librdmacm-devel librbd1-devel gtk2-devel
# yum install PackageKit-gtk3-module libcanberra-gtk2 "liberation-*-fonts" xorg-x11-xauth
# yumdownloader --source fio
# rpm -i ~/fio-3.1-2.el7.src.rpm

# vi ~/rpmbuild/SPECS/fio.spec
Release: 2%-JCALL{?dist}
./configure --disable-optimizations --enable-gfio

# rpmbuild -ba mypackage.spec
# yum install ~/rpmbuild/RPMS/x86_64/fio-3.1-2-JCALL.el7.x86_64.rpm

# /usr/local/bin/gfio
113 changes: 35 additions & 78 deletions gluster-install-rhel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@
---
- hosts: all
vars:
repos: #dynamically populated below
repos:
repo_list:
- rhel-7-server-rpms
- rhel-7-server-extras-rpms
- rhel-7-server-optional-rpms
- rhel-ha-for-rhel-7-server-rpms
- rh-gluster-3-for-rhel-7-server-rpms
- rh-gluster-3-nfs-for-rhel-7-server-rpms
- rh-gluster-3-samba-for-rhel-7-server-rpms
- rh-gluster-3-nagios-for-rhel-7-server-rpms

firewall_services:
- glusterfs
Expand Down Expand Up @@ -52,100 +61,48 @@
private: no

tasks:
- name: Register with Red Hat
redhat_subscription:
state: present
username: "{{ rhsm_username }}"
password: "{{ rhsm_password }}"
autosubscribe: false
force_register: true
ignore_errors: True
async: 60
poll: 10
tags:
- rhsm

- name: Attach Pool
command: subscription-manager attach --pool "{{ poolid }}"
ignore_errors: True
async: 60
poll: 10
tags:
- rhsm
- block:
- name: Register with Red Hat
redhat_subscription:
state: present
username: "{{ rhsm_username }}"
password: "{{ rhsm_password }}"
autosubscribe: false
force_register: true
ignore_errors: True
async: 60
poll: 10
- name: Attach Pool
command: subscription-manager attach --pool "{{ poolid }}"
ignore_errors: True
async: 60
poll: 10
tags: [ rhsm ]
#end block

- name: Enable repos
block:
- block:
- set_fact:
repos: "{{ repos }} --enable={{ item }}"
no_log: true
with_items:
- rhel-7-server-rpms
- rhel-7-server-extras-rpms
- rhel-7-server-optional-rpms
- rhel-ha-for-rhel-7-server-rpms
- rh-gluster-3-for-rhel-7-server-rpms
- rh-gluster-3-nfs-for-rhel-7-server-rpms
- rh-gluster-3-samba-for-rhel-7-server-rpms
- rh-gluster-3-nagios-for-rhel-7-server-rpms
repos: "{{ repo_list | join(' --enable=') }}"
- debug:
var: repos
- command: subscription-manager repos --disable="*"
- command: subscription-manager repos {{ repos }}
when: ansible_distribution_major_version == "7"
tags:
- repos
- name: Enable repos
command: subscription-manager repos --disable="*" --enable={{ repos }}
tags: [repos]
#end block

# - name: Install ssh private key
# copy:
# content: "{{ lookup('file', '/root/.ssh/id_rsa') }}"
# dest: /root/.ssh/id_rsa
# mode: 0600
# owner: root
# tags:
# - ssh
#
# - name: Install ssh public key
# copy:
# content: "{{ lookup('file', '/root/.ssh/id_rsa.pub') }}"
# dest: /root/.ssh/id_rsa.pub
# mode: 0644
# owner: root
# tags:
# - ssh
#
# - name: Set authorized key
# authorized_key:
# user: root
# state: present
# key: "{{ lookup('file', '/root/.ssh/id_rsa.pub') }}"
# tags:
# - ssh

- name: Install firewalld
yum:
name: firewalld
state: latest

- name: Start firewalld
systemd:
name: firewalld
enabled: yes
state: started

- name: Install gluster
yum:
name: redhat-storage-server
state: latest

- name: Install NFS-Ganesha
yum:
name: glusterfs-ganesha
state: latest

- name: Install gstatus
- name: Install gluster, NFS-Ganesha and gstatus
yum:
name: gstatus
name: redhat-storage-server,glusterfs-ganesha,gstatus
state: latest

- name: Install Samba
Expand Down
36 changes: 36 additions & 0 deletions home.lab/gluster-small-vars.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
rhvCluster: Default
templateName: rhel75cloud
storageDomain: sanstore
instanceType: Large
dnsServer: 192.168.0.99
vm_root_password: passw0rd
ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC1vfRWODjNpS45BwAD864B1ezqIOb5fxCjnOwsgx/p8QchwWQhIUeC+PAUBI/QJ/nzX2pUOx0erNu8wuQRobOMxmYmsIyeuIIkBSJxffeFm4Cuy0glgkNR5ry90AHabO7bvXoY1q2QJ6sdkMeh2r1b/tx+2KFBOpe6v2HAcBpS+srl/fpdOV0GK2HNC0DsHz/2/me2hQ9gNIBOrb/Y7TJL5GcmbbHeteW4g648w1771El6r+JugmwlJ7/B/Jw5b4StpJmYQq0s1x9TJnqXO1kZGZ1YDrUEF25ZxkLZxmLxwD8hUDVbaeCAjbNQCe5OXc3wl96VvwXsPE2d838DBUTL jcall@home.lab
vms:
gluster-1:
nic1:
ipaddress: 192.168.0.111
netmask: 255.255.255.0
gateway: 192.168.0.1
gluster-2:
nic1:
ipaddress: 192.168.0.112
netmask: 255.255.255.0
gateway: 192.168.0.1
gluster-3:
nic1:
ipaddress: 192.168.0.113
netmask: 255.255.255.0
gateway: 192.168.0.1

disks_size: 10GiB
disks:
- name: gluster-1
id:
- 1
- name: gluster-2
id:
- 1
- name: gluster-3
id:
- 1
3 changes: 2 additions & 1 deletion vm-make-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
# $ ansible-playbook vm-make-snapshots.yml --ask-vault-pass -e 'vmVars=home.lab/ocp-cns-vars.yml' -e 'snapState=restore '-e 'snapDescription="Before a big change"'

---
- hosts: localhost
#- hosts: localhost
- hosts: rhvm
gather_facts: yes
vars:
snapState: present
Expand Down

0 comments on commit 1dbca31

Please sign in to comment.