Ceph luminous on el7
- Category: 電腦相關
- Last Updated: Monday, 17 July 2017 09:39
- Published: Friday, 14 July 2017 17:06
- Written by sam
這次測試的目的,只是為了要看一下ceph內建的控制臺
非常簡潔
安裝方式和之前差不多
只是多了幾個設定
[sam@px160 ceph]$ sudo cat /etc/yum.repos.d/ceph.repo
[ceph]
name=ceph
baseurl=https://download.ceph.com/rpm-luminous/el7/x86_64
gpgcheck=0
gpgkey=https://download.ceph.com/keys/release.asc
[ceph-noarch]
name=Ceph noarch packages
baseurl=https://download.ceph.com/rpm-luminous/el7/noarch/
gpgcheck=0
gpgkey=https://download.ceph.com/keys/release.asc
這樣就能確保是安裝最新的
[sam@px160 ceph]$ sudo ceph -v
ceph version 12.1.0 (262617c9f16c55e863693258061c5b25dea5b086) luminous (dev)
多了mgr
[sam@px160 ceph]$ sudo cat /etc/ceph/ceph.conf
[global]
fsid = f02b6eb0-97de-41f7-aaf0-ace60068eb67
mon_initial_members = px160, px161, px162
mon_host = 10.0.252.160,10.0.252.161,10.0.252.162
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
osd_journal_size = 10000
osd_pool_default_size = 3
osd_pool_default_min_size = 3
osd_crush_chooseleaf_type = 1
osd_crush_update_on_start = true
max_open_files = 131072
osd pool default pg num = 128
osd pool default pgp num = 128
mon_pg_warn_max_per_osd = 0
mon_allow_pool_delete = true
[mgr]
mgr modules = dashboard
[client.rgw.px160]
rgw_frontends = "civetweb port=80"
[client.rgw.px162]
rgw_frontends = "civetweb port=80"
[client.rgw.px161]
rgw_frontends = "civetweb port=80"
[sam@px160 ceph]$ sudo ceph config-key put mgr/dashboard/server_addr 10.0.252.160
[sam@px160 ceph]$ sudo ceph config-key put mgr/dashboard/server_port 7000
[sam@px160 ceph]$ sudo systemctl restart ceph-mgr@px160
[sam@px160 ceph]$ sudo firewall-cmd --zone=public --add-port=7000/tcp --permanent
[sam@px160 ceph]$ sudo firewall-cmd --reload
這樣就有完美的畫面了
再來把舊的radosgw裡的使用者弄過來
[sam@px160 ceph]$ sudo radosgw-admin user info --uid=aft{
"user_id": "aft",
"display_name": "aft",
"email": "This email address is being protected from spambots. You need JavaScript enabled to view it.",
"suspended": 0,
"max_buckets": 1000,
"auid": 0,
"subusers": [],
"keys": [
{
"user": "aft",
"access_key": "HDPW977XQ9X03KTBZSTH",
"secret_key": "URqhHHHplh1wmPeGVwXluNA9uejxh83hgztg2PbWk6pv"
}
],
"swift_keys": [],
"caps": [],
"op_mask": "read, write, delete",
"default_placement": "",
"placement_tags": [],
"bucket_quota": {
"enabled": false,
"check_on_raw": false,
"max_size": -1,
"max_size_kb": 0,
"max_objects": -1
},
"user_quota": {
"enabled": false,
"check_on_raw": false,
"max_size": -1,
"max_size_kb": 0,
"max_objects": -1
},
"temp_url_keys": [],
"type": "rgw"
}
再新加帳號,直接帶key
sudo radosgw-admin user create --uid=aft --display-name=aft --email=This email address is being protected from spambots. You need JavaScript enabled to view it. --access-key=HDPW977XQ9X03KTBZSTH
--secret_key=URqhHHHplh1wmPeGVwXluNA9uejxh83hgztg2PbWk6pv