ceph存儲(chǔ)操作
創(chuàng)建用戶
(ceph-rgw)[root@ceph-node01 /]# radosgw-admin user create --uid=registry --display-name="registry"
{
"user_id": "registry",
"display_name": "registry",
"email": "",
"suspended": 0,
"max_buckets": 1000,
"auid": 0,
"subusers": [],
"keys": [
{
"user": "registry",
"access_key": "3JHGH0WDQO5LG2HTF6UX",
"secret_key": "jt8KzI8XUagl2KTX0XkdFTP39mkcD9774ql4ZbDp"
}
],
"swift_keys": [],
"caps": [],
"op_mask": "read, write, delete",
"default_placement": "",
"placement_tags": [],
"bucket_quota": {
"enabled": false,
"max_size_kb": -1,
"max_objects": -1
},
"user_quota": {
"enabled": false,
"max_size_kb": -1,
"max_objects": -1
},
"temp_url_keys": []
}
創(chuàng)建swift用戶
(ceph-rgw)[root@ceph-node01 /]# radosgw-admin subuser create --uid=registry --subuser=registry:swift --access=full
{
"user_id": "registry",
"display_name": "registry",
"email": "",
"suspended": 0,
"max_buckets": 1000,
"auid": 0,
"subusers": [
{
"id": "registry:swift",
"permissions": "full-control"
}
],
"keys": [
{
"user": "registry",
"access_key": "3JHGH0WDQO5LG2HTF6UX",
"secret_key": "jt8KzI8XUagl2KTX0XkdFTP39mkcD9774ql4ZbDp"
}
],
"swift_keys": [
{
"user": "registry:swift",
"secret_key": "dfRwo00KoOTw3IJJJCrRpFqIinaEFSEvxCuBxXa5"
}
],
"caps": [],
"op_mask": "read, write, delete",
"default_placement": "",
"placement_tags": [],
"bucket_quota": {
"enabled": false,
"max_size_kb": -1,
"max_objects": -1
},
"user_quota": {
"enabled": false,
"max_size_kb": -1,
"max_objects": -1
},
"temp_url_keys": []
}
配置registry訪問(wèn)
storage:
swift:
authurl: http://192.168.48.213:6780/auth/v1
username: registry:swift
password: dfRwo00KoOTw3IJJJCrRpFqIinaEFSEvxCuBxXa5
container: registry
cache:
layerinfo: inmemory
maintenance:
uploadpurging:
enabled: false
delete:
enable: true
health:
storagedriver:
enabled: true
interval: 10s
threshold: 3
據(jù)java接口可知必要參數(shù)為:username,password,authurl
http://docs.ceph.com/docs/master/radosgw/swift/java/
測(cè)試驗(yàn)證
[root@gx-yun-084069 ~]# docker push paas/golang:1.6.2
The push refers to a repository [registry.vclound.com/paas/golang]
d966b83f8000: Pushed
6fe25112314d: Pushed
4d8ac510a6fe: Pushing [===================> ] 126.2 MB/318.1 MB
5aee74d2e9d0: Pushing [=========================> ] 68.6 MB/134.4 MB
338cb8e0e9ed: Pushing [=========================> ] 67.77 MB/131.2 MB
d1c800db26c7: Pushed
42755cf4ee95: Pushing [==============================> ] 75.38 MB/125.1 MB
查看ceph是否已上有g(shù)olang
(ceph-rgw)[root@ceph-node01 /]# rados lspools
rbd
.rgw.root
default.rgw.control
default.rgw.data.root
default.rgw.gc
default.rgw.log
volumes
default.rgw.users.uid
default.rgw.users.keys
default.rgw.meta
default.rgw.users.email
default.rgw.users.swift
default.rgw.buckets.index
default.rgw.buckets.data
(ceph-rgw)[root@ceph-node01 /]# rados --pool default.rgw.buckets.data ls|grep golang
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_manifests/tags/1.6.2/current/link
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_uploads/32bfc9f1-d07f-4def-8fc7-3fd4099e2607/startedat
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_layers/sha256/0ffc1204e0abead91aa6678abffa44739455c7b95b96b108eefc2f29d6001fdf/link
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_layers/sha256/a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4/link
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_layers/sha256/ab30c63719b10dd434ddbe896879bd9b637fe4e16749a94d3dc827450dc2a437/link
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_uploads/5e016d36-55dc-41c9-945d-85c18399723e/startedat
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_layers/sha256/d8a921df8ce9d2b00d139bc78f0a2036f1960204281570d5794ad0e0c9f32ceb/link
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_uploads/377a0560-0beb-4f2d-87c2-2173bfa15e3f/data
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_layers/sha256/b0850b14d0d144ceecb975d0b296d7630c5c8658054535164c8a5ea55a3fa627/link
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_manifests/tags/1.6.2/index/sha256/3b746975638c2640b41de2f6669fb4a6d24d5c218c008b359d21148a580b2178/link
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_uploads/32bfc9f1-d07f-4def-8fc7-3fd4099e2607/data
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_uploads/5e016d36-55dc-41c9-945d-85c18399723e/data
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_uploads/d51b6005-d7d2-4981-ad27-284914e21159/startedat
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_manifests/revisions/sha256/3b746975638c2640b41de2f6669fb4a6d24d5c218c008b359d21148a580b2178/link
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_uploads/377a0560-0beb-4f2d-87c2-2173bfa15e3f/startedat
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_layers/sha256/c6072700a24252bd71f6c5d2cabf5978ddf324a959b05bad417d8b3789f8df33/link
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_layers/sha256/d34bc98c277053d749016539968fbde53f0e095713988ccc780505b9c3d37187/link
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_manifests/revisions/sha256/3b746975638c2640b41de2f6669fb4a6d24d5c218c008b359d21148a580b2178/signatures/sha256/134a8ac27aa47d9ef953be3968d2c899cb1ed8efd7a3e4ce066abeba2c8a3b98/link
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_uploads/d51b6005-d7d2-4981-ad27-284914e21159/data
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_layers/sha256/8ecba0e9bd481f27b172d1a0ff04269981946aa1aaa91da3b2f41380031ed865/link
208d0ff3-767d-4edc-ac3f-fb55689374cb.44103.1_files/docker/registry/v2/repositories/paas/golang/_layers/sha256/5c90d4a2d1a8dfffd05ff2dd659923f0ca2d843b5e45d030e17abbcd06a11b5b/link
pull鏡像
[root@gx-yun-084069 ~]# docker pull paas/golang:1.6.2
Trying to pull repository registry.vclound.com/paas/golang ...
1.6.2: Pulling from registry.vclound.com/paas/golang
5c90d4a2d1a8: Already exists
ab30c63719b1: Already exists
c6072700a242: Already exists
0ffc1204e0ab: Already exists
d8a921df8ce9: Already exists
d34bc98c2770: Already exists
Digest: sha256:3b746975638c2640b41de2f6669fb4a6d24d5c218c008b359d21148a580b2178
Status: Downloaded newer p_w_picpath for registry.vclound.com/paas/golang:1.6.2
創(chuàng)新互聯(lián)公司專(zhuān)注于中大型企業(yè)的
成都做網(wǎng)站、網(wǎng)站設(shè)計(jì)和網(wǎng)站改版、網(wǎng)站營(yíng)銷(xiāo)服務(wù),追求商業(yè)策劃與數(shù)據(jù)分析、創(chuàng)意藝術(shù)與技術(shù)開(kāi)發(fā)的融合,累計(jì)客戶上千余家,服務(wù)滿意度達(dá)97%。幫助廣大客戶順利對(duì)接上互聯(lián)網(wǎng)浪潮,準(zhǔn)確優(yōu)選出符合自己需要的互聯(lián)網(wǎng)運(yùn)用,我們將一直專(zhuān)注
成都品牌網(wǎng)站建設(shè)和互聯(lián)網(wǎng)程序開(kāi)發(fā),在前進(jìn)的路上,與客戶一起成長(zhǎng)!
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專(zhuān)為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。
新聞標(biāo)題:dockerregistry接入cephSwiftAP-創(chuàng)新互聯(lián)
地址分享:
http://weahome.cn/article/ihjse.html