doc/examples: Add CTDB configuration examples
authorAmitay Isaacs <amitay@gmail.com>
Thu, 24 Oct 2013 03:26:12 +0000 (14:26 +1100)
committerAmitay Isaacs <amitay@gmail.com>
Thu, 24 Oct 2013 05:57:16 +0000 (16:57 +1100)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
doc/examples/README [new file with mode: 0644]
doc/examples/cluster.conf [new file with mode: 0644]
doc/examples/natgw.conf [new file with mode: 0644]
packaging/RPM/ctdb.spec.in

diff --git a/doc/examples/README b/doc/examples/README
new file mode 100644 (file)
index 0000000..71337b7
--- /dev/null
@@ -0,0 +1,4 @@
+This directory includes sample CTDB cluster configurations.
+
+  o cluster.conf - Basic cluster setup
+  o natgw.conf   - Basic cluster setup with NAT gateway feature
diff --git a/doc/examples/cluster.conf b/doc/examples/cluster.conf
new file mode 100644 (file)
index 0000000..871468e
--- /dev/null
@@ -0,0 +1,92 @@
+#
+# CTDB configuration for simple cluster
+#
+# This is the sample configuration for a 3-node CTDB cluster providing file
+# services via Samba and NFS.
+#
+# Cluster details:
+#
+#                internal network (192.168.1.0/24)
+#   -------+----------------------+-----------------------+----------
+#          |                      |                       |
+#          |                      |                       |
+#     eth0 | 192.168.1.1     eth0 | 192.168.1.2      eth0 | 192.168.1.3
+#    +-----+-----+          +-----+-----+           +-----+-----+
+#    |           |          |           |           |           |
+#    |  Node 1   |          |  Node 2   |           |  Node 3   |
+#    |           |          |           |           |           |
+#    +-----+-----+          +-----+-----+           +-----+-----+
+#     eth1 | 10.1.1.1        eth1 | 10.1.1.2         eth1 | 10.1.1.3
+#          |                      |                       |
+#          |                      |                       |
+#   -------+----------------------+-----------------------+----------
+#                  public network (10.1.1.0/24)
+#
+#
+# Storage details:
+#
+#  Each node has a shared storage - /shared
+#
+#
+# Service details:
+#
+#  Cluster provides file services on following IP addresses
+#
+#     10.1.1.101 - 10.1.1.106
+#
+#  Each node also has a fixed IP address on public network.  This is used to
+#  communicate to network infrastructure (e.g. DNS, Active Directory, ...).
+#  Make sure that file services are not available on these fixed IP addresses
+#  (e.g. network filtering, using cluster hostname instead of IPs)
+
+
+CTDB_RECOVERY_LOCK=/shared/recovery.lock
+
+#
+# Nodes configuration
+#
+# ---------- /etc/ctdb/nodes ----------
+# 192.168.1.1
+# 192.168.1.2
+# 192.168.1.3
+# ---------- /etc/ctdb/nodes ----------
+#
+CTDB_NODES=/etc/ctdb/nodes
+
+#
+# Public addresses configuration
+#
+# ---------- /etc/ctdb/public_addresses ----------
+# 10.1.1.101/24 eth1
+# 10.1.1.102/24 eth1
+# 10.1.1.103/24 eth1
+# 10.1.1.104/24 eth1
+# 10.1.1.105/24 eth1
+# 10.1.1.106/24 eth1
+# ---------- /etc/ctdb/public_addresses ----------
+#
+CTDB_PUBLIC_ADDRESSES=/etc/ctdb/public_addresses
+
+# Enable logging to syslog
+CTDB_SYSLOG=yes
+
+# Default log level
+CTDB_DEBUGLEVEL=NOTICE
+
+# Auto start/stop managed services
+CTDB_AUTO_STARTSTOP=yes
+
+#
+# Samba configuration
+#
+CTDB_MANAGES_SAMBA=yes
+# CTDB_SAMBA_SKIP_SHARE_CHECK=yes
+
+CTDB_MANAGES_WINBIND=yes
+
+#
+# NFS configuration
+#
+CTDB_MANAGES_NFS=yes
+CTDB_RPCINFO_LOCALHOST="127.0.0.1"
+# CTDB_MONITOR_NFS_THREAD_COUNT=yes
diff --git a/doc/examples/natgw.conf b/doc/examples/natgw.conf
new file mode 100644 (file)
index 0000000..2e3a3ea
--- /dev/null
@@ -0,0 +1,109 @@
+#
+# CTDB configuration for simple cluster with NAT gateway
+#
+# This is the sample configuration for a 3-node CTDB cluster providing file
+# services via Samba and NFS.
+#
+# Cluster details:
+#
+#                internal network (192.168.1.0/24)
+#   -------+----------------------+-----------------------+----------
+#          |                      |                       |
+#          |                      |                       |
+#     eth0 | 192.168.1.1     eth0 | 192.168.1.2      eth0 | 192.168.1.3
+#    +-----+-----+          +-----+-----+           +-----+-----+
+#    |           |          |           |           |           |
+#    |  Node 1   |          |  Node 2   |           |  Node 3   |
+#    |           |          |           |           |           |
+#    +-----+-----+          +-----+-----+           +-----+-----+
+#     eth1 |                 eth1 |                  eth1 |
+#          |                      |                       |
+#          |                      |                       |
+#   -------+----------------------+-----------------------+-----+----
+#                  public network (10.1.1.0/24)                 |
+#                                                               | 10.1.1.254
+#                                                               o (router)
+#
+# Storage details:
+#
+#  Each node has a shared storage - /shared
+#
+#
+# Service details:
+#
+#  Cluster provides file services on following IP addresses
+#
+#     10.1.1.101 - 10.1.1.106
+#
+#  When a node is not hosting any IPs, it cannot connect to network
+#  infrastructure (e.g. DNS, Active Directory, ...).
+#
+#  Using NAT gateway feature of CTDB allows a node not hosting IPs to connect
+#  to network infrastructure.
+
+
+CTDB_RECOVERY_LOCK=/shared/recovery.lock
+
+#
+# Nodes configuration
+#
+# ---------- /etc/ctdb/nodes ----------
+# 192.168.1.1
+# 192.168.1.2
+# 192.168.1.3
+# ---------- /etc/ctdb/nodes ----------
+#
+CTDB_NODES=/etc/ctdb/nodes
+
+#
+# Public addresses configuration
+#
+# ---------- /etc/ctdb/public_addresses ----------
+# 10.1.1.101/24 eth1
+# 10.1.1.102/24 eth1
+# 10.1.1.103/24 eth1
+# 10.1.1.104/24 eth1
+# 10.1.1.105/24 eth1
+# 10.1.1.106/24 eth1
+# ---------- /etc/ctdb/public_addresses ----------
+#
+CTDB_PUBLIC_ADDRESSES=/etc/ctdb/public_addresses
+
+# Enable logging to syslog
+CTDB_SYSLOG=yes
+
+# Default log level
+CTDB_DEBUGLEVEL=NOTICE
+
+# Auto start/stop managed services
+CTDB_AUTO_STARTSTOP=yes
+
+#
+# Samba configuration
+#
+CTDB_MANAGES_SAMBA=yes
+# CTDB_SAMBA_SKIP_SHARE_CHECK=yes
+
+CTDB_MANAGES_WINBIND=yes
+
+#
+# NFS configuration
+#
+CTDB_MANAGES_NFS=yes
+CTDB_RPCINFO_LOCALHOST="127.0.0.1"
+# CTDB_MONITOR_NFS_THREAD_COUNT=yes
+
+#
+# NAT gateway configuration
+#
+# ---------- /etc/ctdb/natgw_nodes ----------
+# 192.168.1.1
+# 192.168.1.2
+# 192.168.1.3
+# ---------- /etc/ctdb/natgw_nodes ----------
+#
+CTDB_NATGW_PUBLIC_IP=10.1.1.121/24
+CTDB_NATGW_PUBLIC_IFACE=eth1
+CTDB_NATGW_DEFAULT_GATEWAY=10.1.1.254
+CTDB_NATGW_PRIVATE_NETWORK=192.168.1.0/24
+CTDB_NATGW_NODES=/etc/ctdb/natgw_nodes
index 3157ef7e4c974f46f99af3a39033749f874ab3ae..b7d1befc4cdb46bccec0779c27a34db21f922585 100644 (file)
@@ -163,6 +163,7 @@ rm -rf $RPM_BUILD_ROOT
 %doc README.eventscripts README.notify.d
 %doc doc/recovery-process.txt
 %doc doc/*.html
+%doc doc/examples
 %{_sysconfdir}/sudoers.d/ctdb
 %{_sysconfdir}/ctdb/functions
 %{_sysconfdir}/ctdb/events.d/00.ctdb