OpenStack 安装和使用(二)
| Property | Value |
+————-+———————————-+
| description | Keystone Identity Service |
| id | 0ad1e477af5e4ef698b48cb9aec2ae61 |
| name | keystone |
| type | identity |
+————-+———————————-+
–service_id=0ad1e477af5e4ef698b48cb9aec2ae61 \
–publicurl=http://10.24.1.47:5000/v2.0 \
–internalurl=http://10.24.1.47:5000/v2.0 \
–adminurl=http://10.24.1.47:35357/v2.0
| Property | Value |
+————-+———————————-+
| adminurl | http://10.24.1.47:35357/v2.0 |
| id | cabcc01fc08842c3bd56d1534ae38cde |
| internalurl | http://10.24.1.47:5000/v2.0 |
| publicurl | http://10.24.1.47:5000/v2.0 |
| region | RegionHanborq |
| service_id | 0ad1e477af5e4ef698b48cb9aec2ae61 |
+————-+———————————-+
| Property | Value |
+————-+———————————-+
| description | Nova Compute Service |
| id | 4eb163f3847144d094c003d9ae928908 |
| name | nova |
| type | compute |
+————-+———————————-+
–service_id=4eb163f3847144d094c003d9ae928908 \
–internalurl=’http://10.24.1.47:8774/v2/%(tenant_id)s’ \
–adminurl=’http://10.24.1.47:8774/v2/%(tenant_id)s’
| Property | Value |
+————-+—————————————–+
| adminurl | http://10.24.1.47:8774/v2/%(tenant_id)s |
| id | 3b32c5dfc3f94b8f836da6725131b013 |
| internalurl | http://10.24.1.47:8774/v2/%(tenant_id)s |
| publicurl | http://10.24.1.47:8774/v2/%(tenant_id)s |
| region | RegionHanborq |
| service_id | 4eb163f3847144d094c003d9ae928908 |
+————-+—————————————–+
| Property | Value |
+————-+———————————-+
| description | Nova Volume Service |
| id | 9f19952076ae4613a6c4fbc05b53125d |
| name | volume |
| type | volume |
+————-+———————————-+
–service_id=9f19952076ae4613a6c4fbc05b53125d \
–internalurl=’http://10.24.1.47:8776/v1/%(tenant_id)s’ \
–adminurl=’http://10.24.1.47:8776/v1/%(tenant_id)s’
| Property | Value |
+————-+—————————————–+
| adminurl | http://10.24.1.47:8776/v1/%(tenant_id)s |
| id | 3de88e79eded428dbd3f506c88f62a85 |
| internalurl | http://10.24.1.47:8776/v1/%(tenant_id)s |
| publicurl | http://10.24.1.47:8776/v1/%(tenant_id)s |
| region | RegionHanborq |
| service_id | 9f19952076ae4613a6c4fbc05b53125d |
+————-+—————————————–+
| Property | Value |
+————-+———————————-+
| description | Glance Image Service |
| id | f827d479585f403f97e915edc4c636ed |
| name | glance |
| type | image |
+————-+———————————-+
–service_id=f827d479585f403f97e915edc4c636ed \
–internalurl=http://10.24.1.47:9292/v1 \
–adminurl=http://10.24.1.47:9292/v1
| Property | Value |
+————-+———————————-+
| adminurl | http://10.24.1.47:9292/v1 |
| id | ab7c08e879f448279c447d6574a21d7c |
| internalurl | http://10.24.1.47:9292/v1 |
| publicurl | http://10.24.1.47:9292/v1 |
| region | RegionHanborq |
| service_id | f827d479585f403f97e915edc4c636ed |
+————-+———————————-+
| Property | Value |
+————-+———————————-+
| description | EC2 Compatibility Layer |
| id | e6152edec1104429afa1de55ca7b7f32 |
| name | ec2 |
| type | ec2 |
+————-+———————————-+
–service_id=e6152edec1104429afa1de55ca7b7f32 \
–internalurl=http://10.24.1.47:8773/services/Cloud \
–adminurl=http://10.24.1.47:8773/services/Admin
| Property | Value |
+————-+—————————————+
| adminurl | http://10.24.1.47:8773/services/Admin |
| id | d103c48c349545518dfb25e454c1e388 |
| internalurl | http://10.24.1.47:8773/services/Cloud |
| publicurl | http://10.24.1.47:8773/services/Cloud |
| region | RegionHanborq |
| service_id | e6152edec1104429afa1de55ca7b7f32 |
+————-+—————————————+
| Property | Value |
+————-+———————————-+
| description | Object Storage Service |
| id | 7e2feb47c52648a98716ba3176c35dc5 |
| name | swift |
| type | object-store |
+————-+———————————-+
–service_id=7e2feb47c52648a98716ba3176c35dc5 \
–adminurl ‘http://10.24.1.47:8080/’ \
| Property | Value |
+————-+———————————————-+
| adminurl | http://10.24.1.47:8080/ |
| id | c7d71561f5e54dc0be7cbfce3e791b3d |
| internalurl | http://10.24.1.47:8080/v1/AUTH_%(tenant_id)s |
| publicurl | http://10.24.1.47:8080/v1/AUTH_%(tenant_id)s |
| region | RegionHanborq |
| service_id | 7e2feb47c52648a98716ba3176c35dc5 |
+————-+———————————————-+
+———————————-+—————+———————————————-+———————————————-+—————————————–+
| id | region | publicurl | internalurl | adminurl |
+———————————-+—————+———————————————-+———————————————-+—————————————–+
| 3b32c5dfc3f94b8f836da6725131b013 | RegionHanborq | http://10.24.1.47:8774/v2/%(tenant_id)s | http://10.24.1.47:8774/v2/%(tenant_id)s | http://10.24.1.47:8774/v2/%(tenant_id)s |
| 3de88e79eded428dbd3f506c88f62a85 | RegionHanborq | http://10.24.1.47:8776/v1/%(tenant_id)s | http://10.24.1.47:8776/v1/%(tenant_id)s | http://10.24.1.47:8776/v1/%(tenant_id)s |
| ab7c08e879f448279c447d6574a21d7c | RegionHanborq | http://10.24.1.47:9292/v1 | http://10.24.1.47:9292/v1 | http://10.24.1.47:9292/v1 |
| c7d71561f5e54dc0be7cbfce3e791b3d | RegionHanborq | http://10.24.1.47:8080/v1/AUTH_%(tenant_id)s | http://10.24.1.47:8080/v1/AUTH_%(tenant_id)s | http://10.24.1.47:8080/ |
| cabcc01fc08842c3bd56d1534ae38cde | RegionHanborq | http://10.24.1.47:5000/v2.0 | http://10.24.1.47:5000/v2.0 | http://10.24.1.47:35357/v2.0 |
| d103c48c349545518dfb25e454c1e388 | RegionHanborq | http://10.24.1.47:8773/services/Cloud | http://10.24.1.47:8773/services/Cloud | http://10.24.1.47:8773/services/Admin |
+———————————-+—————+———————————————-+———————————————-+—————————————–+
[root@cc ~]#
[root@cc ~]# keystone –token c8701a128708a76161e3 –endpoint http://127.0.0.1:35357/v2.0 service-list
+———————————-+———-+————–+—————————+
| id | name | type | description |
+———————————-+———-+————–+—————————+
| 0ad1e477af5e4ef698b48cb9aec2ae61 | keystone | identity | Keystone Identity Service |
| 4eb163f3847144d094c003d9ae928908 | nova | compute | Nova Compute Service |
| 7e2feb47c52648a98716ba3176c35dc5 | swift | object-store | Object Storage Service |
| 9f19952076ae4613a6c4fbc05b53125d | volume | volume | Nova Volume Service |
| e6152edec1104429afa1de55ca7b7f32 | ec2 | ec2 | EC2 Compatibility Layer |
| f827d479585f403f97e915edc4c636ed | glance | image | Glance Image Service |
+———————————-+———-+————–+—————————+
| Property | Value |
+———–+———————————-+
| access | 0cbf78260bd546e9bec3492e04950a85 |
| secret | 9ae082b31f5e4505a080bf9d85968c7b |
| tenant_id | 94d38db32a7d4107beeed36d9e98bf06 | 这个为租户id
| user_id | cd5e2e764fc7420dad016f9af7be7123 | 这个为admin用户id
+———–+———————————-+
+———+———————————-+———————————-+
| tenant | access | secret |
+———+———————————-+———————————-+
| hanborq | 0cbf78260bd546e9bec3492e04950a85 | 9ae082b31f5e4505a080bf9d85968c7b |
+———+———————————-+———————————-+
# echo “export EC2_URL=http://localhost:8773/services/Cloud” > ec2rc
# echo “export EC2_USER_ID=\$(keystone user-list | awk ‘/admin / {print \$2}’)” >> ec2rc
# echo “export EC2_ACCESS_KEY=\$(keystone ec2-credentials-list –user \$EC2_USER_ID | awk ‘/hanborq / {print \$4}’)” >> ec2rc
# echo “export EC2_SECRET_KEY=\$(keystone ec2-credentials-list –user \$EC2_USER_ID | awk ‘/hanborq / {print \$6}’)” >> ec2rc
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 350 0 244 100 106 2733 1187 –:–:– –:–:– –:–:– 2772
{
“access”: {
“serviceCatalog”: {},
“token”: {
“expires”: “2012-07-17T09:03:07Z”,
“id”: “878fafae0d5d4a239b3916bc5517fc7e”
},
“user”: {
“id”: “cd5e2e764fc7420dad016f9af7be7123”,
“name”: “admin”,
“roles”: [],
“roles_links”: [],
“username”: “admin”
}
}
}
[root@cc ~]# curl -d ‘{“auth”: {“tenantName”: “hanborq”, “passwordCredentials”:{“username”: “admin”, “password”: “123456”}}}’ -H “Content-type: application/json” http://10.24.1.47:35357/v2.0/tokens | python -mjson.tool
Dload Upload Total Spent Left Speed
100 2296 0 2194 100 102 23032 1070 –:–:– –:–:– –:–:– 23340
{
“access”: {
“serviceCatalog”: [
{
“endpoints”: [
{
“adminURL”: “http://10.24.1.47:8774/v2/94d38db32a7d4107beeed36d9e98bf06”,
“internalURL”: “http://10.24.1.47:8774/v2/94d38db32a7d4107beeed36d9e98bf06”,
“publicURL”: “http://10.24.1.47:8774/v2/94d38db32a7d4107beeed36d9e98bf06”,
“region”: “RegionHanborq”
}
],
“endpoints_links”: [],
“name”: “nova”,
“type”: “compute”
},
{
“endpoints”: [
{
“adminURL”: “http://10.24.1.47:9292/v1”,
“internalURL”: “http://10.24.1.47:9292/v1”,
“publicURL”: “http://10.24.1.47:9292/v1”,
“region”: “RegionHanborq”
}
],
“endpoints_links”: [],
“name”: “glance”,
“type”: “image”
},
{
“endpoints”: [
{
“adminURL”: “http://10.24.1.47:8776/v1/94d38db32a7d4107beeed36d9e98bf06”,
“internalURL”: “http://10.24.1.47:8776/v1/94d38db32a7d4107beeed36d9e98bf06”,
“publicURL”: “http://10.24.1.47:8776/v1/94d38db32a7d4107beeed36d9e98bf06”,
“region”: “RegionHanborq”
}
],
“endpoints_links”: [],
“name”: “volume”,
“type”: “volume”
},
{
“endpoints”: [
{
“adminURL”: “http://10.24.1.47:8773/services/Admin”,
“internalURL”: “http://10.24.1.47:8773/services/Cloud”,
“publicURL”: “http://10.24.1.47:8773/services/Cloud”,
“region”: “RegionHanborq”
}
],
“endpoints_links”: [],
“name”: “ec2”,
“type”: “ec2”
},
{
“endpoints”: [
{
“adminURL”: “http://10.24.1.47:8080/”,
“internalURL”: “http://10.24.1.47:8080/v1/AUTH_94d38db32a7d4107beeed36d9e98bf06”,
“publicURL”: “http://10.24.1.47:8080/v1/AUTH_94d38db32a7d4107beeed36d9e98bf06”,
“region”: “RegionHanborq”
}
],
“endpoints_links”: [],
“name”: “swift”,
“type”: “object-store”
},
{
“endpoints”: [
{
“adminURL”: “http://10.24.1.47:35357/v2.0”,
“internalURL”: “http://10.24.1.47:5000/v2.0”,
“publicURL”: “http://10.24.1.47:5000/v2.0”,
“region”: “RegionHanborq”
}
],
“endpoints_links”: [],
“name”: “keystone”,
“type”: “identity”
}
],
“token”: {
“expires”: “2012-07-17T09:03:47Z”,
“id”: “6a8f81a63c7b4af895f43a52d2d744f0”,
“tenant”: {
“description”: “HanBorq Tenant”,
“enabled”: true,
“id”: “94d38db32a7d4107beeed36d9e98bf06”,
“name”: “hanborq”
}
},
“user”: {
“id”: “cd5e2e764fc7420dad016f9af7be7123”,
“name”: “admin”,
“roles”: [
{
“id”: “428438feb3eb4946907b519383f38ceb”,
“name”: “admin”
},
{
“id”: “aee579c6430c46d9861c5b684d42ebb7”,
“name”: “member”
}
],
“roles_links”: [],
“username”: “admin”
}
}
}
glance 2012.1
Uploading image ‘tty-linux-kernel’
=====================================================================================================[100%] 41.7M/s, ETA 0h 0m 0s
Added new image with ID: 2eb1ed9e-b1f2-450a-8ce2-810580d09610
Uploading image ‘tty-linux-ramdisk’
===============================================================================================[100%] 936.330177K/s, ETA 0h 0m 0s
Added new image with ID: e36a1d2d-7ae1-4496-b25c-3ee4be0a14d8
Uploading image ‘tty-linux’
===============================================================================================[100%] 119.366753M/s, ETA 0h 0m 0s
Added new image with ID: e951ba9a-a5f1-40fb-916a-56fc2aeee429
ID Name Disk Format Container Format Size
———————————— —————————— ——————– ——————– ————–
e951ba9a-a5f1-40fb-916a-56fc2aeee429 tty-linux ami ami 25165824
e36a1d2d-7ae1-4496-b25c-3ee4be0a14d8 tty-linux-ramdisk ari ari 96629
2eb1ed9e-b1f2-450a-8ce2-810580d09610 tty-linux-kernel aki aki 4404752