Commit b01ae5bd by Czémán Arnold

ceph-client: add multi server address mode, authentication, extend README.md

parent 43d81a00
......@@ -20,15 +20,15 @@ sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.n
Install some important packages:
```bash
sudo yum install python-pip gcc vim git
sudo yum -y install python-pip gcc vim git
```
### Debian family
Install some important packages:
```bash
sudo apt-get update
sudo apt-get install python-pip git
sudo apt-get -y update
sudo apt-get -y install python-pip git
```
## Install Salt
......@@ -37,14 +37,6 @@ sudo apt-get install python-pip git
sudo pip install salt==2014.7.1
```
## Configure salt
Open the salt minion configuration
```bash
sudo mkdir -p /etc/salt
```
## Get the installer
Clone circle installer git repository into cloud home
......@@ -125,14 +117,19 @@ Other variables
* repo_revision: revision
* ceph:
* enabled: ceph is enabled
* server: addres of ceph monitor
* server: address of ceph monitor,
you can add more monitor at the same time,
int the following format:
**<server_ip1>[:port1][,<server_ip2>[:port2] ...]**
* directory: this directory will be shared
* username: ceph cliet username
* keyfile_path: path of cephx keyfile
## Install Circle
Run the following installation command:
```bash
sudo salt-call state.sls allinone
salt/install.sh allinone
```
After this finished, you have to get "Failed: 0" message.
If installer fails, please visit the [Troubleshooting](#troubleshooting) paragraph.
......
#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "You must give a module name for argument!"
else
sudo salt-call state.sls $1 --local \
--file-root=/home/$USER/salt/salt \
--pillar-root=/home/$USER/salt/pillar
fi
......@@ -27,3 +27,5 @@ ceph:
enabled: false
server: localhost
directory: /
username: admin
keyfile_path:
......@@ -41,6 +41,10 @@
#storagedriver:
# queue_name: cloud-6605
#ceph:
# server: cloud-6660.vm.ik.bme.hu,cloud-6659.vm.ik.bme.hu
# keyfile_path: /home/cloud/secret.keyring
#fwdriver:
# queue_name: cloud-6605
# gateway: 10.0.255.254
......
......@@ -5,15 +5,36 @@ ceph-client:
- ceph
{% else %}
- ceph-fs-common
- ceph-common
{% endif %}
- require_in:
- mount: /datastore
{%if grains['os_family'] == 'RedHat' %}
{{ salt.cmd.run("yum -y install ceph") | truncate(0,False,"") }}
{% else %}
{{ salt.cmd.run("apt-get -y update; apt-get -y install ceph-fs-common ceph-common") | truncate(0,False,"") }}
{% endif %}
/datastore:
mount.mounted:
- device: {{ pillar['ceph']['server'] }}:{{ pillar['ceph']['directory'] }}
- device: {{ pillar['ceph']['server']|replace(' ','') }}:{{ pillar['ceph']['directory'] }}
- fstype: ceph
- opts: rw
- opts: >-
{% filter replace('\n','') %}{% filter replace(' ','') %}
rw
{% if pillar['ceph']['username'] is not none and
pillar['ceph']['keyfile_path'] is not none %}
,name={{ pillar['ceph']['username'] }}
{# Unfortunately a secret key will show in log file and /etc/fstab file #}
,secret={{ salt.cmd.run('ceph-authtool ' ~ pillar['ceph']['keyfile_path'] ~
' --name client.' ~ pillar['ceph']['username'] ~
' --print-key'
)
}}
{% endif %}
{% endfilter %}{% endfilter %}
- dump: 0
- pass_num: 2
- persist: True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment