This repository has been archived by the owner on Mar 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 82
Updating quick user guide #1076
Open
rishubhjain
wants to merge
5
commits into
gluster:master
Choose a base branch
from
rishubhjain:user_guide
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0138559
Updating quick user guide
rishubhjain be5b31c
Merge branch 'master' of https://github.com/gluster/glusterd2 into us…
rishubhjain c1a178b
Merge branch 'master' of https://github.com/gluster/glusterd2 into us…
rishubhjain 97ccebb
Merge branch 'master' of https://github.com/gluster/glusterd2 into us…
rishubhjain 095df04
Merge branch 'master' of https://github.com/gluster/glusterd2 into us…
rishubhjain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,18 +9,9 @@ This guide takes the following as an example of IPs for the two nodes: | |
* **Node 1**: `192.168.56.101` | ||
* **Node 2**: `192.168.56.102` | ||
|
||
Please follow these steps for setup on **each of the two nodes**. | ||
Please follow these steps for setting up glusterd2 on **each of the two nodes**. | ||
|
||
### Installing dependent packages | ||
|
||
Install rpcbind: | ||
|
||
```sh | ||
# dnf install rpcbind | ||
# mkdir -p /run/rpcbind | ||
# systemctl start rpcbind | ||
# systemctl enable rpcbind | ||
``` | ||
### Installing Glusterfs | ||
|
||
> **IMPORTANT:** Please install glusterfs from source using code from the [master branch](https://github.com/gluster/glusterfs/tree/master) OR if on CentOS 7, you can install glusterfs using nightly RPMs. | ||
|
||
|
@@ -44,54 +35,66 @@ We recommend that you use the RPMs made available nightly as they contain the la | |
# yum install glusterd2 | ||
``` | ||
|
||
Alternatlively, if you are using a non-RPM based distro, you can download | ||
binaries of the latest release. Like all Go programs, glusterd2 is a single | ||
binary (statically linked) without external dependencies. You can download the | ||
[latest release](https://github.com/gluster/glusterd2/releases) from Github. | ||
For other distros, you can download binaries of the [latest release](https://github.com/gluster/glusterd2/releases) from Github. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I really do not see how this change fixes or improves anything There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fedora does not come under "non-rpm distros", but to install glusterd2 in Fedora we need to use binaries, so it is better to mention just distros to make it more generalized. |
||
Like all Go programs, glusterd2 is a single binary (statically linked) without | ||
external dependencies. | ||
|
||
**Config File:** Default path of glusterd2 config file is `/etc/glusterd2/glusterd2.toml`. | ||
|
||
### Running glusterd2 | ||
### Using external etcd. | ||
|
||
**Create a working directory:** This is where glusterd2 will store all data which includes logs, pid files, etcd information etc. For this example, we will be using a temporary path. If a working directory is not specified, it defaults to current directory. | ||
Setup etcd on a node. Edit glusterd2 config file by adding `noembed` and `etcdenpoints` options. Replace | ||
endpoints argument to point to etcd client URL: | ||
|
||
```toml | ||
etcdendpoints = "http://[ip_address]:[port]" | ||
noembed = true | ||
``` | ||
|
||
### Running glusterd2 for RPM installation | ||
|
||
**Enable glusterd2 service:** Ensure that glusterd2 service starts automatically when system starts. | ||
To enable glusterd2 service run: | ||
|
||
```sh | ||
$ mkdir -p /var/lib/gd2 | ||
# systemctl enable glusterd2 | ||
``` | ||
|
||
**Create a config file:** This is optional but if your VM/machine has multiple network interfaces, it is recommended to create a config file. The config file location can be passed to Glusterd2 using the `--config` option. | ||
Glusterd2 will also pick up conf file named `glusterd2.toml` if available in `/etc/glusterd2/` or the current directory. | ||
**Start glusterd2 service:** To start glusterd2 process run: | ||
|
||
```toml | ||
$ cat conf.toml | ||
localstatedir = "/var/lib/gd2" | ||
peeraddress = "192.168.56.101:24008" | ||
clientaddress = "192.168.56.101:24007" | ||
etcdcurls = "http://192.168.56.101:2379" | ||
etcdpurls = "http://192.168.56.101:2380" | ||
```sh | ||
# systemctl start glusterd2 | ||
``` | ||
|
||
Check the status of glusterd2 service: | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extra line |
||
```sh | ||
# systemctl status glusterd2 | ||
``` | ||
Please ensure that glusterd2 service status is "active (runnning)" before proceeding. | ||
|
||
|
||
Replace the IP address accordingly on each node. | ||
### Running glusterd2 for binaries installation | ||
|
||
**Start glusterd2 process:** Glusterd2 is not a daemon and currently can run only in the foreground. | ||
**Start glusterd2 process:** Create a config file and provide the path of config file while running glusterd2 as shown below. | ||
|
||
```sh | ||
# ./glusterd2 --config conf.toml | ||
``` | ||
|
||
You will see an output similar to the following: | ||
```log | ||
INFO[2017-08-28T16:03:58+05:30] Starting GlusterD pid=1650 | ||
INFO[2017-08-28T16:03:58+05:30] loaded configuration from file file=conf.toml | ||
INFO[2017-08-28T16:03:58+05:30] Generated new UUID uuid=19db62df-799b-47f1-80e4-0f5400896e05 | ||
INFO[2017-08-28T16:03:58+05:30] started muxsrv listener | ||
INFO[2017-08-28T16:03:58+05:30] Started GlusterD ReST server ip:port=192.168.56.101:24007 | ||
INFO[2017-08-28T16:03:58+05:30] Registered RPC Listener ip:port=192.168.56.101:24008 | ||
INFO[2017-08-28T16:03:58+05:30] started GlusterD SunRPC server ip:port=192.168.56.101:24007 | ||
``` | ||
### Authentication | ||
|
||
In glusterd2, REST API authentication is enabled by default. To disable rest authentication add `restauth=false` in Glusterd2 config file(`/etc/glusterd2/glusterd2.toml`) or the custom config file provided by you (conf.toml as per above example) | ||
|
||
Please restart glusterd2 service after changing config file. | ||
|
||
### Using Glusterd2 | ||
|
||
Now you have two nodes running glusterd2. | ||
|
||
> NOTE: Ensure that firewalld is configured (or stopped) to let traffic on ports ` before adding a peer. | ||
|
||
|
||
## Add peer | ||
|
||
Glusterd2 natively provides only ReST API for clients to perform management operations. A CLI is provided which interacts with glusterd2 using the [ReST APIs](https://github.com/gluster/glusterd2/wiki/ReST-API). | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The title of PR needs to be more accurate and concise. Titles such as
Updating quick user guide
don't give a any useful information to reviewers. This applies to commit messages as well.