Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
salt
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
17
Merge Requests
1
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b01ae5bd
authored
Nov 01, 2015
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ceph-client: add multi server address mode, authentication, extend README.md
parent
43d81a00
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
15 deletions
+49
-15
README.md
+10
-13
install.sh
+10
-0
pillar/common.sls
+2
-0
pillar/installer.sls
+4
-0
salt/ceph-client/init.sls
+23
-2
No files found.
README.md
View file @
b01ae5bd
...
@@ -20,15 +20,15 @@ sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.n
...
@@ -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:
Install some important packages:
```
bash
```
bash
sudo
yum install python-pip gcc vim git
sudo
yum
-y
install python-pip gcc vim git
```
```
### Debian family
### Debian family
Install some important packages:
Install some important packages:
```
bash
```
bash
sudo
apt-get update
sudo
apt-get
-y
update
sudo
apt-get install python-pip git
sudo
apt-get
-y
install python-pip git
```
```
## Install Salt
## Install Salt
...
@@ -37,14 +37,6 @@ sudo apt-get install python-pip git
...
@@ -37,14 +37,6 @@ sudo apt-get install python-pip git
sudo
pip install
salt
==
2014.7.1
sudo
pip install
salt
==
2014.7.1
```
```
## Configure salt
Open the salt minion configuration
```
bash
sudo
mkdir
-p
/etc/salt
```
## Get the installer
## Get the installer
Clone circle installer git repository into cloud home
Clone circle installer git repository into cloud home
...
@@ -125,14 +117,19 @@ Other variables
...
@@ -125,14 +117,19 @@ Other variables
*
repo_revision: revision
*
repo_revision: revision
*
ceph:
*
ceph:
*
enabled: ceph is enabled
*
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
*
directory: this directory will be shared
*
username: ceph cliet username
*
keyfile_path: path of cephx keyfile
## Install Circle
## Install Circle
Run the following installation command:
Run the following installation command:
```
bash
```
bash
s
udo
salt-call state.sls
allinone
s
alt/install.sh
allinone
```
```
After this finished, you have to get "Failed: 0" message.
After this finished, you have to get "Failed: 0" message.
If installer fails, please visit the
[
Troubleshooting
](
#troubleshooting
)
paragraph.
If installer fails, please visit the
[
Troubleshooting
](
#troubleshooting
)
paragraph.
...
...
install.sh
0 → 100755
View file @
b01ae5bd
#!/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
pillar/common.sls
View file @
b01ae5bd
...
@@ -27,3 +27,5 @@ ceph:
...
@@ -27,3 +27,5 @@ ceph:
enabled: false
enabled: false
server: localhost
server: localhost
directory: /
directory: /
username: admin
keyfile_path:
pillar/installer.sls
View file @
b01ae5bd
...
@@ -41,6 +41,10 @@
...
@@ -41,6 +41,10 @@
#storagedriver:
#storagedriver:
# queue_name: cloud-6605
# 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:
#fwdriver:
# queue_name: cloud-6605
# queue_name: cloud-6605
# gateway: 10.0.255.254
# gateway: 10.0.255.254
...
...
salt/ceph-client/init.sls
View file @
b01ae5bd
...
@@ -5,15 +5,36 @@ ceph-client:
...
@@ -5,15 +5,36 @@ ceph-client:
- ceph
- ceph
{% else %}
{% else %}
- ceph-fs-common
- ceph-fs-common
- ceph-common
{% endif %}
{% endif %}
- require_in:
- require_in:
- mount: /datastore
- 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:
/datastore:
mount.mounted:
mount.mounted:
- device: {{ pillar['ceph']['server'] }}:{{ pillar['ceph']['directory'] }}
- device: {{ pillar['ceph']['server']
|replace(' ','')
}}:{{ pillar['ceph']['directory'] }}
- fstype: ceph
- 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
- dump: 0
- pass_num: 2
- pass_num: 2
- persist: True
- persist: True
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment