ceph安裝
參考rabbitmq
2、搜尋ceph,進入官方的映象,在tag頁籤中可以看到幾種型別的映象;
3、拉取映象:
docker pull ceph/daemon:master-f0a1ab7-mimic-centos-7-x86_64 較新
# docker pull ceph/daemon:master-08456a7-mimic-centos-7-x86_64 較舊
docker images 檢視所有映象
建立共享網路:
docker network rm cephnet
docker network create --driver bridge --subnet=172.20.0.0/16 --gateway=172.20.0.1 cephnet
通過docker network inspect redisnet,可以看到閘道器資訊
建立集群監控容器monitor
ceph monitor 維護著展示集群狀態的各種圖表
mkdir -p /home/chually/99_dockerdata/cephcluster/cephetc
mkdir -p /home/chually/99_dockerdata/cephcluster/cephlib
mkdir -p /home/chually/99_dockerdata/cephcluster/cephlog
chmod -r 777 /home/chually/99_dockerdata/cephcluster/
docker run -d --name=cephmonitor --restart always --net=cephnet -v /home/chually/99_dockerdata/cephcluster/cephetc:/etc/ceph -v /home/chually/99_dockerdata/cephcluster/cephlib:/var/lib/ceph -v /home/chually/99_dockerdata/cephcluster/cephlog:/var/log/ceph -e mon_ip=172.20.0.2 -e ceph_public_network=172.20.0.0/16 -e ceph_cluster_network=172.20.0.0/16 76bdbb3960e3 mon
docker logs -f cephmonitor
檢視monitor部署情況:docker exec -it cephmonitor ceph -s
docker exec -it cephmonitor /bin/bash
檢視版本:ceph -v
檢視詳細資訊:ceph -s
快速重建
docker stop cephmonitor
docker rm cephmonitor
rm -rf /home/chually/99_dockerdata/cephcluster/cephetc/*
rm -rf /home/chually/99_dockerdata/cephcluster/cephlib/*
rm -rf /home/chually/99_dockerdata/cephcluster/cephlog/*
建立mgr 物件儲存守護程序
docker stop cephmgr
docker rm cephmgr
docker run -d --name=cephmgr --restart always --net=cephnet -v /home/chually/99_dockerdata/cephcluster/cephetc:/etc/ceph -v /home/chually/99_dockerdata/cephcluster/cephlib:/var/lib/ceph -v /home/chually/99_dockerdata/cephcluster/cephlog:/var/log/ceph 76bdbb3960e3 mgr
docker logs -f cephmgr
建立osd物件儲存守護程序
ceph osd為物件儲存守護程序,提供實際的儲存,預設情況下ceph集群需要部署3個osd。新增磁碟分割槽參考《擴充套件磁碟空間,掛載點》
docker stop cephosd1
docker rm cephosd1
docker run -d --name cephosd1 --restart always --net=cephnet --privileged=true --pid=host -v /home/chually/99_dockerdata/cephcluster/cephetc:/etc/ceph -v /home/chually/99_dockerdata/cephcluster/cephlib:/var/lib/ceph -v /home/chually/99_dockerdata/cephcluster/cephlog:/var/log/ceph -v /dev:/dev -v /cephosd1:/var/lib/ceph/osd 76bdbb3960e3 osd_directory
docker logs -f cephosd1
docker stop cephosd2
docker rm cephosd2
docker run -d --name cephosd2 --restart always --net=cephnet --privileged=true --pid=host -v /home/chually/99_dockerdata/cephcluster/cephetc:/etc/ceph -v /home/chually/99_dockerdata/cephcluster/cephlib:/var/lib/ceph -v /home/chually/99_dockerdata/cephcluster/cephlog:/var/log/ceph -v /dev:/dev -v /cephosd2:/var/lib/ceph/osd 76bdbb3960e3 osd_directory
docker logs -f cephosd2
docker stop cephosd3
docker rm cephosd3
docker run -d --name cephosd3 --restart always --net=cephnet --privileged=true --pid=host -v /home/chually/99_dockerdata/cephcluster/cephetc:/etc/ceph -v /home/chually/99_dockerdata/cephcluster/cephlib:/var/lib/ceph -v /home/chually/99_dockerdata/cephcluster/cephlog:/var/log/ceph -v /dev:/dev -v /cephosd3:/var/lib/ceph/osd 76bdbb3960e3 osd_directory
docker logs -f cephosd3
建立rgw並測試物件儲存
ceph rgw - rados閘道器:提供s3與swift相容的api,儲存資料至物件儲存。
docker run -d --name=cephrgw --restart always --net=cephnet -v /home/chually/99_dockerdata/cephcluster/cephetc:/etc/ceph -v /home/chually/99_dockerdata/cephcluster/cephlib:/var/lib/ceph -v /home/chually/99_dockerdata/cephcluster/cephlog:/var/log/ceph -p 8070:8080 76bdbb3960e3 rgw
(1)建立乙個使用者
docker exec -it cephrgw /bin/bash
radosgw-admin user create --uid="chually" --display-name="default opt user" --email="chually#chually.com"
(2)建立環境引數配置檔案
vim s3key.sh
key資訊對照test使用者
(3)列出當前bucket
./s3client list
docker 安裝軟體
docker search mysql docker pull mysql 5.6 docker images grep mysql 檢視本地映象執行容器 docker run p 13306 3306 name mymysql v pwd conf etc mysql conf.d v pwd l...
使用Docker安裝軟體
目錄 hub.baidubce.com mythos alpine ssh 1.0alpine配置好ssh,適合瞎折騰 hub.baidubce.com mythos redis alpine 1211redis的alpine版映象,輕量 官方映象位址 連線mysql h 127.0.0.1 p 3...
docker軟體安裝 rabbitMQ
rabbitmq安裝 2 搜尋rabbitmq,進入官方的映象,可以看到以下幾種型別的映象 我們選擇帶有 mangement 的版本 包含web管理頁面 docker pull rabbitmq 3.8.4 management3 拉取映象 docker run d name rabbitmq3.8...