Skip to content

Commit 41818bf

Browse files
committed
updated guide and script and Vagrantfile
updated the Vagrant file to no longer build from source since it's now part of the stable release. Changed the script to run rexray as a service instead of invoking systemctl since it hasn't been installed as a service. updated the guide to better reflect the labs way of doing tutorials. Signed-off-by: Kendrick Coleman <[email protected]>
1 parent a3434ee commit 41818bf

File tree

4 files changed

+58
-28
lines changed

4 files changed

+58
-28
lines changed

ceph/README.md

Lines changed: 54 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,70 @@
11
# REX-Ray + Ceph RBD
22

3-
This is a Vagrant environment using `VirtualBox` and
4-
`Virtual Media` as storage for Ceph to be consumed by REX-Ray along with
5-
Docker as the container runtime. This can be used as a quick way
6-
to get started working with Ceph and REX-Ray.
3+
This Vagrant environment uses `VirtualBox` and `Virtual Media` as storage for
4+
Ceph to be consumed by REX-Ray. Docker is used as the container runtime allowing
5+
a quick way to get started using Ceph and REX-Ray.
76

87
The `RBD` storage driver within REX-Ray is attaching RADOS Block Devices (RBD)
9-
to the Vagrant VMs. This enables the persistent volumes to be
10-
moved between containers, which allow container hosts to be immutable and
11-
containers to remain non-persistent.
8+
to the Vagrant VMs. This enables the persistent volumes to be moved between
9+
containers, which allow container hosts to be immutable and containers to remain
10+
non-persistent.
11+
12+
The environment uses 3 Virtual Machines. One machine labeled as `ceph-admin` to
13+
be used for running the containers and checking cluster status. The other two
14+
machines, `ceph-server-1` and `ceph-server-2` are providing storage.
1215

1316
## Installation
1417

1518
### Clone the repo
1619
```
1720
git clone https://github.com/codedellemc/vagrant
1821
cd vagrant/ceph
22+
ssh-add ~/.vagrant.d/insecure_private_key
1923
vagrant up
2024
```
2125

22-
## Usage
23-
When the Vagrant environment is up and running, you can now run
24-
`vagrant ssh ceph-admin` to get into the VM. Since REX-Ray requires root
25-
privileges for mounting, etc you can at this point issue something similar to
26-
`sudo -i` to ensure you are running as root.
27-
28-
You can check the status of the Ceph cluster with `ceph -s`. You should be
29-
able to immediately run commands like `rexray volume create` and
30-
`rexray volume ls`, or do the same thing with docker via `docker volume create`
31-
and `docker volume ls`
32-
3326
**NOTE**: The VMs contain the default Vagrant insecure SSH public key, such that
3427
`vagrant ssh` works by default. However, the `ceph-admin` VM needs to be able to
3528
SSH to the other VMs in order to configure Ceph via `ceph-deploy`. In order to
36-
do this, the Vagrant SSH private key must be in your local SSH agent. The most
29+
do this, the Vagrant SSH private key must be in your local SSH agent. Configuration of the Ceph cluster will not work without this step. The most
3730
typical way to accomplish this on a nix-like machine is by running the command:
3831

3932
```
4033
ssh-add ~/.vagrant.d/insecure_private_key
4134
```
4235

43-
Configuration of the Ceph cluster will not work without this step.
36+
37+
## Usage
38+
When the Vagrant environment is up and running, run `vagrant ssh ceph-admin` to
39+
get into the VM. Since REX-Ray requires root privileges for mounting, etc,
40+
run the rest of the lab as root:
41+
42+
```
43+
sudo -i
44+
```
45+
46+
Check the status of the Ceph cluster with:
47+
48+
```
49+
ceph -s
50+
```
51+
52+
The REX-Ray command line is available at this time:
53+
54+
```
55+
rexray volume create <name> --size=X
56+
rexray volume ls
57+
```
58+
59+
The Docker Command line can be invoked as well for volume operation
60+
61+
```
62+
docker volume create -d rexray --name <name> --opt=size=X
63+
docker volume ls
64+
```
65+
66+
Go to the [Application Demo of {code} Labs](https://github.com/codedellemc/labs#application-demo) to look at running applications like Postgres.
67+
4468

4569
## Options
4670
There are optional fields in the `Vagrantfile` that can be modified or
@@ -57,7 +81,7 @@ commented and uncommented.
5781

5882
Only one of the install options is intended to be set to true at one time.
5983
Setting multiple to true will result in wasted work, as each one overwrites the
60-
other. Setting all to false will result in no new rexray being installed,
84+
other. Setting all to `false` will result in rexray not being installed,
6185
leaving whatever happens to be pre-installed in the vagrant box.
6286

6387
When using `install_rex_from_source`, it is also possible to modify the
@@ -69,15 +93,21 @@ Consult the full REX-Ray documentation [here](http://rexray.readthedocs.org/en/s
6993

7094
Get information on the existing volumes:
7195

72-
`rexray volume ls`
96+
```
97+
rexray volume ls
98+
```
7399

74100
Create a new volume:
75101

76-
`rexray volume create --size=20 test`
102+
```
103+
rexray volume create --size=20 test
104+
```
77105

78106
Delete a volume:
79107

80-
`rexray volume remove test`
108+
```
109+
rexray volume remove test
110+
```
81111

82112
## Docker
83113
Consult the Docker and REX-Ray documentation [here](http://rexray.readthedocs.io/en/stable/user-guide/schedulers/#docker).

ceph/Vagrantfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ network = "172.21.13"
99

1010
# Flags to control which REX-Ray to install
1111
# Setting all options to false will use whatever rexray is already present
12-
install_latest_stable_rex = false
12+
install_latest_stable_rex = true
1313
install_latest_staged_rex = false
14-
install_rex_from_source = true
14+
install_rex_from_source = false
1515

1616

1717
# Script to build rexray from source

ceph/rexconfig.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ libstorage:
1111
preempt: false
1212
EOF
1313

14-
sudo systemctl restart rexray
14+
sudo rexray start

scaleio/Vagrantfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ secondmdmip = "#{network}.13"
2727
clusterinstall = "True" #If True a fully working ScaleIO cluster is installed. False mean only IM is installed on node MDM1.
2828

2929
# Install Docker and REX-Ray automatically
30-
rexrayinstall = "True"
30+
rexrayinstall = "False"
3131

3232
# version of installation package
3333
version = "2.0-0.0"

0 commit comments

Comments
 (0)