Skip to content
Browse files

Started describing the GlusterFS scripts

  • Loading branch information...
1 parent 4850eae commit 0b24fdd9cfe446526adc3f3a2f5ef65c9bc0e584 @beloglazov committed Jul 19, 2012
View
14 01-network-gateway/01-iptables-nat.sh
@@ -1,30 +1,30 @@
#!/bin/sh
# Copyright 2012 Anton Beloglazov
-#
+#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-# Flush the iptables rules. For production it is recommented to open
+# Flush the iptables rules. For production it is recommended to open
# the specific required ports.
iptables -F
iptables -t nat -F
iptables -t mangle -F
# Set up packet forwarding for NAT
-iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
-iptables -A FORWARD -i eth1 -j ACCEPT
-iptables -A FORWARD -o eth1 -j ACCEPT
+iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
+iptables -A FORWARD -i eth1 -j ACCEPT
+iptables -A FORWARD -o eth1 -j ACCEPT
# Save the iptables configuration into a file and restart iptables
service iptables save
View
8 02-glusterfs-all/01-iptables-flush.sh
@@ -1,21 +1,21 @@
#!/bin/sh
# Copyright 2012 Anton Beloglazov
-#
+#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-# Flush the iptables rules. For production it is recommented to open
+# Flush the iptables rules. For production it is recommended to open
# the specific required ports.
iptables -F
View
51 doc/src/tutorial.md
@@ -274,7 +274,8 @@ enable the Internet access on all the hosts. First, it is necessary to check whe
is available on the gateway itself. If the Internet is not available, the problem might be in the
configuration of eth0, the network interface connected to the public network in our setup.
-If the Internet is available on the gateway, it is necessary to install
+In all the following steps, it is assumed that the user logged in is `root`. If the Internet is
+available on the gateway, it is necessary to install
Git^[http://en.wikipedia.org/wiki/Git_(software)] to be able to clone the repository containing the
installation scripts. This can be done using yum, the default package manager in CentOS, as follows:
@@ -341,9 +342,9 @@ service network restart
This script copies the `hosts` file from the `config` directory to `/etc` locally, as well to all
the other hosts: the remaining compute hosts and the controller. The `hosts` files defines a mapping
between the IP addresses of the hosts and host names. For convenience, prior to copying you may use
-the `ssh-copy-id` command to copy the public key to the other hosts for password-less SSH access.
+the `ssh-copy-id` program to copy the public key to the other hosts for password-less SSH access.
Once the `hosts` file is copied to all the hosts, they can be accessed by using their respective
-host name instead of the IP addresses.
+host names instead of the IP addresses.
```Bash
# Copy the hosts file into the local configuration
@@ -357,25 +358,49 @@ scp ../config/hosts root@controller:/etc/
```
+From this point, all the installation steps on any host can be performed remotely over SSH.
-it is necessary to perform a few steps prior to being
-able to start using the installation script. First of all, it important to check if the Internet is
-working on all the machines. If it does not, the problem might be in either the configuration of the
-network interfaces on that machine, or wrong
+### GlusterFS Distributed Replicated Storage
+
+In this section, we describe how to set up distributed replicated storage using GlusterFS.
+#### All nodes
-The following are the initial steps that need to be followed prior to
-running the installation scripts:
+The steps discussed in this section need to be run on all the hosts. The easiest way to manage
+multi-node installation is to SSH into all the hosts from another machine using separate terminals.
+This way the hosts can be conveniently managed from a single machine. Before applying further
+installation, it is necessary to run the following commands:
+```Bash
yum update -y
-yum install -y man nano emacs git
-git clone git@github.com:beloglazov/openstack-centos-kvm-glusterfs.git
+yum install -y git
+git clone https://github.com/beloglazov/openstack-centos-kvm-glusterfs.git
+
+```
+
+It is optional but might be useful to install other programs on all the hosts, such as `man`,
+`nano`, or `emacs` for reading manuals and editing files.
+
+
+(@) `01-iptables-flush.sh`
+
+This script flushes all the default `iptables` rules to allow connections through all the ports. As
+mentioned above, this is insecure and not recommended for production environments. For production it
+is recommended to open the specific required ports.
+
+```Bash
+# Flush the iptables rules.
+iptables -F
+
+# Save the configuration and restart iptables
+service iptables save
+service iptables restart
+
+```
-### GlusterFS Distributed Replicated Storage
-#### All nodes
#### Controller
#### All nodes
View
BIN doc/tutorial.pdf
Binary file not shown.

0 comments on commit 0b24fdd

Please sign in to comment.
Something went wrong with that request. Please try again.