summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--glustolibs-gluster/gdeploy_configs/add_node_to_nfs_ganesha_cluster.jinja27
-rw-r--r--glustolibs-gluster/gdeploy_configs/create_nfs_ganesha_cluster.jinja20
-rw-r--r--glustolibs-gluster/gdeploy_configs/delete_node_from_nfs_ganesha_cluster.jinja6
-rw-r--r--glustolibs-gluster/gdeploy_configs/nfs_ganesha_client_configuration.jinja31
-rw-r--r--glustolibs-gluster/gdeploy_configs/nfs_ganesha_refresh_config.jinja6
-rw-r--r--glustolibs-gluster/gdeploy_configs/nfs_ganesha_update_export_file.jinja7
-rw-r--r--glustolibs-gluster/gdeploy_configs/teardown_nfs_ganesha_cluster.jinja6
-rw-r--r--glustolibs-gluster/setup.py5
8 files changed, 107 insertions, 1 deletions
diff --git a/glustolibs-gluster/gdeploy_configs/add_node_to_nfs_ganesha_cluster.jinja b/glustolibs-gluster/gdeploy_configs/add_node_to_nfs_ganesha_cluster.jinja
new file mode 100644
index 0000000..e4bc1d8
--- /dev/null
+++ b/glustolibs-gluster/gdeploy_configs/add_node_to_nfs_ganesha_cluster.jinja
@@ -0,0 +1,27 @@
+[hosts]{% for server in servers %}
+{{server}}{% endfor %}
+
+[peer]
+action=probe
+
+#Enabling firewall ports
+[firewalld]
+action=add
+ports=111/tcp,2049/tcp,54321/tcp,5900/tcp,5900-6923/tcp,5666/tcp,16514/tcp
+services=glusterfs,nlm,nfs,rpc-bind,high-availability,mountd,rquota
+permanent=true
+zone=public
+
+[clients]
+action=mount
+volname={{ node_to_add }}:/gluster_shared_storage
+hosts={{ node_to_add }}
+fstype=glusterfs
+client_mount_points=/var/run/gluster/shared_storage/
+
+[nfs-ganesha]
+action=add-node
+cluster_nodes={{ cluster_nodes|join(',') }}
+nodes={{ node_to_add }}
+vip={{ vip }}
+
diff --git a/glustolibs-gluster/gdeploy_configs/create_nfs_ganesha_cluster.jinja b/glustolibs-gluster/gdeploy_configs/create_nfs_ganesha_cluster.jinja
new file mode 100644
index 0000000..01bd3f0
--- /dev/null
+++ b/glustolibs-gluster/gdeploy_configs/create_nfs_ganesha_cluster.jinja
@@ -0,0 +1,20 @@
+[hosts]{% for server in servers %}
+{{server}}{% endfor %}
+
+[peer]
+action=probe
+
+#Enabling firewall ports
+[firewalld]
+action=add
+ports=111/tcp,2049/tcp,54321/tcp,5900/tcp,5900-6923/tcp,5666/tcp,16514/tcp
+services=glusterfs,nlm,nfs,rpc-bind,high-availability,mountd,rquota
+permanent=true
+zone=public
+
+#Creating a high availability cluster and exporting the volume
+[nfs-ganesha]
+action=create-cluster
+ha-name=ganesha-ha-360
+cluster-nodes={{ servers|join(',') }}
+vip={{ vips|join(',') }}
diff --git a/glustolibs-gluster/gdeploy_configs/delete_node_from_nfs_ganesha_cluster.jinja b/glustolibs-gluster/gdeploy_configs/delete_node_from_nfs_ganesha_cluster.jinja
new file mode 100644
index 0000000..ba77057
--- /dev/null
+++ b/glustolibs-gluster/gdeploy_configs/delete_node_from_nfs_ganesha_cluster.jinja
@@ -0,0 +1,6 @@
+[hosts]{% for server in servers %}
+{{server}}{% endfor %}
+
+[nfs-ganesha]
+action=delete-node
+nodes={{ node_to_delete }}
diff --git a/glustolibs-gluster/gdeploy_configs/nfs_ganesha_client_configuration.jinja b/glustolibs-gluster/gdeploy_configs/nfs_ganesha_client_configuration.jinja
new file mode 100644
index 0000000..db0c2a6
--- /dev/null
+++ b/glustolibs-gluster/gdeploy_configs/nfs_ganesha_client_configuration.jinja
@@ -0,0 +1,31 @@
+[hosts]{% for server in servers %}
+{{server}}{% endfor %}
+
+[yum1]
+action=install
+gpgcheck=yes
+packages=nfs-utils
+
+#Enabling firewall ports
+[firewalld]
+action=add
+ports=662/tcp,662/udp,32803/tcp,32769/udp
+permanent=true
+zone=public
+
+[shell1]
+action=execute
+command=sed -i '/STATD_PORT/s/^#//' /etc/sysconfig/nfs
+
+[shell2]
+action=execute
+command=sed -i '/LOCKD_TCPPORT/s/^#//' /etc/sysconfig/nfs
+
+[shell3]
+action=execute
+command=sed -i '/LOCKD_UDPPORT/s/^#//' /etc/sysconfig/nfs
+
+[service]
+action=restart
+service=nfs-config,rpc-statd,nfslock
+
diff --git a/glustolibs-gluster/gdeploy_configs/nfs_ganesha_refresh_config.jinja b/glustolibs-gluster/gdeploy_configs/nfs_ganesha_refresh_config.jinja
new file mode 100644
index 0000000..804e7b1
--- /dev/null
+++ b/glustolibs-gluster/gdeploy_configs/nfs_ganesha_refresh_config.jinja
@@ -0,0 +1,6 @@
+[hosts]
+{{ server }}
+
+[nfs-ganesha]
+action=refresh-config
+volname={{ volname }}
diff --git a/glustolibs-gluster/gdeploy_configs/nfs_ganesha_update_export_file.jinja b/glustolibs-gluster/gdeploy_configs/nfs_ganesha_update_export_file.jinja
new file mode 100644
index 0000000..477125a
--- /dev/null
+++ b/glustolibs-gluster/gdeploy_configs/nfs_ganesha_update_export_file.jinja
@@ -0,0 +1,7 @@
+[hosts]
+{{ server }}
+
+[nfs-ganesha]
+action=refresh-config
+update_config_lines={{ config_to_update }}
+volname={{ volname }}
diff --git a/glustolibs-gluster/gdeploy_configs/teardown_nfs_ganesha_cluster.jinja b/glustolibs-gluster/gdeploy_configs/teardown_nfs_ganesha_cluster.jinja
new file mode 100644
index 0000000..f420178
--- /dev/null
+++ b/glustolibs-gluster/gdeploy_configs/teardown_nfs_ganesha_cluster.jinja
@@ -0,0 +1,6 @@
+[hosts]{% for server in servers %}
+{{server}}{% endfor %}
+
+[nfs-ganesha]
+action=destroy-cluster
+cluster-nodes={{ servers|join(',') }}
diff --git a/glustolibs-gluster/setup.py b/glustolibs-gluster/setup.py
index 91fb09a..ad16359 100644
--- a/glustolibs-gluster/setup.py
+++ b/glustolibs-gluster/setup.py
@@ -17,8 +17,9 @@
#
from setuptools import setup, find_packages
+from distutils import dir_util
-version = '0.1.1'
+version = '0.2'
name = 'glustolibs-gluster'
setup(
@@ -46,3 +47,5 @@ setup(
dependency_links=['http://github.com/loadtheaccumulator/glusto/tarball/master#egg=glusto'],
namespace_packages = ['glustolibs']
)
+
+dir_util.copy_tree('./gdeploy_configs', '/usr/share/glustolibs/gdeploy_configs')