ctdb-docs: Add example configuration files
authorMartin Schwenke <martin@meltin.net>
Sun, 13 May 2018 05:42:31 +0000 (15:42 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 17 May 2018 02:04:32 +0000 (04:04 +0200)
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/doc/examples/11.natgw.options [new file with mode: 0644]
ctdb/doc/examples/91.lvs.options [new file with mode: 0644]
ctdb/doc/examples/README
ctdb/doc/examples/ctdb.conf [new file with mode: 0644]

diff --git a/ctdb/doc/examples/11.natgw.options b/ctdb/doc/examples/11.natgw.options
new file mode 100644 (file)
index 0000000..e2460cb
--- /dev/null
@@ -0,0 +1,25 @@
+# NAT gateway configuration
+#
+# See ctdb.conf for main cluster configuration 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 using the additional CTDB_NATGW_PUBLIC_IP.
+
+# ---------- /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
diff --git a/ctdb/doc/examples/91.lvs.options b/ctdb/doc/examples/91.lvs.options
new file mode 100644 (file)
index 0000000..adb3660
--- /dev/null
@@ -0,0 +1,12 @@
+# LVS configuration
+#
+# ---------- /etc/ctdb/lvs_nodes ----------
+# 192.168.1.1
+# 192.168.1.2
+# 192.168.1.3
+# ---------- /etc/ctdb/lvs_nodes ----------
+#
+CTDB_LVS_NODES=/etc/ctdb/lvs_nodes
+
+CTDB_LVS_PUBLIC_IP=10.1.1.101
+CTDB_LVS_PUBLIC_IFACE=eth1
index b3ca1c197a7552e282a21874694c8ee5544b3b86..fc41d16eb4e6500e91e226bf13d436398bfdd3af 100644 (file)
@@ -1,12 +1,17 @@
 This directory includes...
 
-Sample CTDB cluster configurations
+Sample CTDB configuration files:
+
+  o ctdb.conf        - Main configuration file
+  o 11.natgw.options - Options for the 11.natgw event script
+  o 91.lvs.options   - Options for the 91.lvs event script
+
+Sample old-style CTDB cluster configurations
 
   o cluster.conf  - Basic cluster setup
   o natgw.conf    - Basic cluster setup with NAT gateway feature
   o external.conf - Basic cluster setup with externally managed public IP addresses
 
-
 Sample 60.nfs configuration for NFS ganesha - callout script and
 .check file
 
diff --git a/ctdb/doc/examples/ctdb.conf b/ctdb/doc/examples/ctdb.conf
new file mode 100644 (file)
index 0000000..fa5e8f7
--- /dev/null
@@ -0,0 +1,73 @@
+#
+# 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)
+
+[logging]
+       # Enable logging to syslog
+       location = syslog
+
+       # Default log level
+       log level = NOTICE
+
+[cluster]
+       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 ----------
+#
+#
+# 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 ----------
+#
+# Event script configuration - see *.options examples