Difference: InstallingAndConfiguringKeystone (1 vs. 16)

Revision 162012-11-19 - MatteoManzali

Line: 1 to 1
 
META TOPICPARENT name="GestioneServiziGenerali.GestioneOpenstack"

Installazione e configurazione del servizio Identity (Keystone)

Line: 349 to 349
 
region RegionOne
service_id 6c02494e7a534c91a7a01228a4093e63
+-------------+------------------------------------------+
Deleted:
<
<
Dove <GLANCE_SERVER_HOSTNAME> è l'hostname del server sui è installato il servizio Glance. Nel nostro caso è "openstack-01.cnaf.infn.it".
 
Added:
>
>
Dove <GLANCE_SERVER_HOSTNAME> è l'hostname del server sui è installato il servizio Glance. Nel nostro caso è "openstack-01.cnaf.infn.it".
 

Troubleshooting

Revision 152012-11-19 - MatteoManzali

Line: 1 to 1
 
META TOPICPARENT name="GestioneServiziGenerali.GestioneOpenstack"

Installazione e configurazione del servizio Identity (Keystone)

Line: 356 to 356
 

Troubleshooting

  • Per le principali operazioni di troubleshooting riferirsi alla guida.
Deleted:
<
<
  • Installare curl tramite il gestore di pacchetti yum e lanciare il seguente comando per listare le informazioni inserite in Keystone:
 
[root@clstr-09 ~]# keystone tenant-list
+----------------------------------+-------------+---------+

Revision 142012-11-19 - EnricoFattibene

Line: 1 to 1
 
META TOPICPARENT name="GestioneServiziGenerali.GestioneOpenstack"

Installazione e configurazione del servizio Identity (Keystone)

Line: 358 to 358
 
  • Installare curl tramite il gestore di pacchetti yum e lanciare il seguente comando per listare le informazioni inserite in Keystone:

Changed:
<
<
# yum install curl # curl -d '{"auth": {"tenantName": "adminTenant", "passwordCredentials":{"username": "adminUser", "password": "************"}}}' -H "Content-type:application/json" http://hostname1.domain:35357/v2.0/tokens | python -mjson.tool % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 106 2446 101 2446 0 120 27990 1373 --:--:-- --:--:-- --:--:-- 27046 { "access": { "serviceCatalog": [ { "endpoints": [ {
"adminURL"
"http://hostname1.domain:8774/v2/c8854bd3d15f4f479476d0cf58ef7db2",
"internalURL"
"http://hostname1.domain:8774/v2/c8854bd3d15f4f479476d0cf58ef7db2",
"publicURL"
"http://hostname1.domain:8774/v2/c8854bd3d15f4f479476d0cf58ef7db2",
"region"
"RegionOne" } ], "endpoints_links": [], "name": "nova", "type": "compute" }, { "endpoints": [ {
"adminURL"
"http://hostname1.domain:9292/v1/",
"internalURL"
"http://hostname1.domain:9292/v1/",
"publicURL"
"http://hostname1.domain:9292/v1/",
"region"
"RegionOne" } ], "endpoints_links": [], "name": "glance", "type": "image" }, { "endpoints": [ {
"adminURL"
"http://hostname1.domain:8776/v1/c8854bd3d15f4f479476d0cf58ef7db2",
"internalURL"
"http://hostname1.domain:8776/v1/c8854bd3d15f4f479476d0cf58ef7db2",
"publicURL"
"http://hostname1.domain:8776/v1/c8854bd3d15f4f479476d0cf58ef7db2",
"region"
"RegionOne" } ], "endpoints_links": [], "name": "volume", "type": "volume" }, { "endpoints": [ {
"adminURL"
"http://hostname1.domain:8773/services/Admin",
"internalURL"
"http://hostname1.domain:8773/services/Cloud",
"publicURL"
"http://hostname1.domain:8773/services/Cloud",
"region"
"RegionOne" } ], "endpoints_links": [], "name": "keystone", "type": "identity" } ], "token": {
"expires"
"2012-10-11T09:49:27Z",
"id"
"1d9c15ed60414a92bc39d3b989d5bcae",
"tenant"
{ "description": "Admin Tenant Description", "enabled": true, "id": "c8854bd3d15f4f479476d0cf58ef7db2", "name": "adminTenant" } }, "user": {
"id"
"4b6da6bfa3634c819fc1abc022e88a22",
"name"
"adminUser",
"roles"
[ { "id": "ad6dc79aa39c4249ab63840f9591f99d", "name": "admin" } ],
"roles_links"
[],
"username"
"adminUser" } }
} </verbatim
>
>
[root@clstr-09 ~]# keystone tenant-list +----------------------------------+-------------+---------+
id name enabled
+----------------------------------+-------------+---------+
8f74bb88623e41619a4c020baed3caa0 adminTenant True
d6e9133d43b5440eae0db744c00bbca7 service True
+----------------------------------+-------------+---------+ [root@clstr-09 ~]# keystone user-list +----------------------------------+-----------+---------+-------+
id name enabled email
+----------------------------------+-----------+---------+-------+
30fc09b098b0451f8ec3861cf96f3422 nova True  
71228944d88b477188528c47942bcdb8 adminUser True  
7f3e370e94b54d8fa6ddbb02d5903f43 glance True  
+----------------------------------+-----------+---------+-------+ [root@clstr-09 ~]# keystone service-list +----------------------------------+----------+----------+---------------------------+
id name type description
+----------------------------------+----------+----------+---------------------------+
11279e60f5054500a1a0a4ea99016721 glance image Glance Image Service
25197e8149da4bc199fc3e8476f4c5ba volume volume Nova Volume Service
990589efda944f379888edc97f17cb75 keystone identity Keystone Identity Service
dbe9d50403c541f9b277e1c26b6e7946 nova compute Nova Compute Service
+----------------------------------+----------+----------+---------------------------+ [root@clstr-09 ~]# keystone endpoint-list +----------------------------------+-----------+----------------------------------------------------+----------------------------------------------------+----------------------------------------------------+----------------------------------+
id region publicurl internalurl adminurl service_id
+----------------------------------+-----------+----------------------------------------------------+----------------------------------------------------+----------------------------------------------------+----------------------------------+
20fef2ceae314842aade705eb6c3ed17 RegionOne http://clstr-09.cnaf.infn.it:8774/v2/%(tenant_id)s http://clstr-09.cnaf.infn.it:8774/v2/%(tenant_id)s http://clstr-09.cnaf.infn.it:8774/v2/%(tenant_id)s dbe9d50403c541f9b277e1c26b6e7946
8868e9748ad4481cac64ab0e3d33e614 RegionOne http://clstr-09.cnaf.infn.it:8776/v1/%(tenant_id)s http://clstr-09.cnaf.infn.it:8776/v1/%(tenant_id)s http://clstr-09.cnaf.infn.it:8776/v1/%(tenant_id)s 25197e8149da4bc199fc3e8476f4c5ba
8953d51657d8482a9037671db111f718 RegionOne http://clstr-09.cnaf.infn.it:5000/v2.0 http://clstr-09.cnaf.infn.it:5000/v2.0 http://clstr-09.cnaf.infn.it:35357/v2.0/ 990589efda944f379888edc97f17cb75
+----------------------------------+-----------+----------------------------------------------------+----------------------------------------------------+----------------------------------------------------+----------------------------------+ [root@clstr-09 ~]# keystone catalog Service: volume +-------------+-----------------------------------------------------------------------+
Property Value
+-------------+-----------------------------------------------------------------------+
adminURL http://clstr-09.cnaf.infn.it:8776/v1/8f74bb88623e41619a4c020baed3caa0
id 8868e9748ad4481cac64ab0e3d33e614
internalURL http://clstr-09.cnaf.infn.it:8776/v1/8f74bb88623e41619a4c020baed3caa0
publicURL http://clstr-09.cnaf.infn.it:8776/v1/8f74bb88623e41619a4c020baed3caa0
region RegionOne
+-------------+-----------------------------------------------------------------------+ Service: compute +-------------+-----------------------------------------------------------------------+
Property Value
+-------------+-----------------------------------------------------------------------+
adminURL http://clstr-09.cnaf.infn.it:8774/v2/8f74bb88623e41619a4c020baed3caa0
id 20fef2ceae314842aade705eb6c3ed17
internalURL http://clstr-09.cnaf.infn.it:8774/v2/8f74bb88623e41619a4c020baed3caa0
publicURL http://clstr-09.cnaf.infn.it:8774/v2/8f74bb88623e41619a4c020baed3caa0
region RegionOne
+-------------+-----------------------------------------------------------------------+ Service: identity +-------------+------------------------------------------+
Property Value
+-------------+------------------------------------------+
adminURL http://clstr-09.cnaf.infn.it:35357/v2.0/
id 8953d51657d8482a9037671db111f718
internalURL http://clstr-09.cnaf.infn.it:5000/v2.0
publicURL http://clstr-09.cnaf.infn.it:5000/v2.0
region RegionOne
+-------------+------------------------------------------+

  -- MatteoManzali - 2012-10-10

Revision 132012-11-19 - MatteoManzali

Line: 1 to 1
 
META TOPICPARENT name="GestioneServiziGenerali.GestioneOpenstack"

Installazione e configurazione del servizio Identity (Keystone)

Line: 104 to 104
  Dove <ADMIN_TENANT_ID> è l'ID del tenant appena creato, mentre <ADMIN_PASSWORD> è la password scelta per l'utente "adminUser".
Changed:
<
<

Creazione dei ruoli admin e memberRole

>
>

Creazione del ruolo "admin"

 
  • Creare il ruolo lanciando il seguente comando:
Line: 118 to 118
  # export ADMIN_ROLE_ID=2f196d11ff954c67befc3f190195f47c
Deleted:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT role-create --name memberRole +----------+----------------------------------+
Property Value
+----------+----------------------------------+
id d193b58e977d4c398b41c518f3629ea7
name memberRole
+----------+----------------------------------+
 

Assegnazione del ruolo "admin" all'utente "AdminUser"

  • Assegnare il ruolo tramite il seguente comando:

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT user-role-add --user $ADMIN_USER_ID --tenant_id $ADMIN_TENANT_ID --role $ADMIN_ROLE_ID
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT user-role-add --user_id $ADMIN_USER_ID --tenant_id $ADMIN_TENANT_ID --role_id $ADMIN_ROLE_ID
 

Dove <ADMIN_USER_ID> e <ADMIN_TENANT_ID> sono rispettivamente gli ID di user e tenant appena creati. $ADMIN_ROLE_ID è invece l'id del ruolo "admin" esportato nell'istruzione precedente. Nota bene: non viene visualizzato nulla se il comando ha successo.

Line: 184 to 177
 
  • Assegnare il ruolo tramite il seguente comando:

Changed:
<
<
keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT user-role-add --user $GLANCE_USER_ID --tenant_id $SERVICE_TENANT_ID --role $ADMIN_ROLE_ID
>
>
keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT user-role-add --user_id $GLANCE_USER_ID --tenant_id $SERVICE_TENANT_ID --role_id $ADMIN_ROLE_ID
 

Nota bene: non viene visualizzato nulla se il comando ha successo.

Line: 212 to 205
 
  • Assegnare il ruolo tramite il seguente comando:

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT user-role-add --user $NOVA_USER_ID --tenant_id $SERVICE_TENANT_ID --role $ADMIN_ROLE_ID

Nota bene: non viene visualizzato nulla se il comando ha successo.

Creazione ed inserimento dell'utente associato a EC2

  • Creare l'utente tramite il seguente comando:
    # keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT user-create --tenant_id $SERVICE_TENANT_ID --name ec2 --pass <EC2_PASSWORD> --enabled true
    +----------+-------------------------------------------------------------------------------------------------------------------------+
    | Property |                                                          Value                                                          |
    +----------+-------------------------------------------------------------------------------------------------------------------------+
    | email    | None                                                                                                                    |
    | enabled  | True                                                                                                                    |
    | id       | ea9ed6847b814e8e8f315b15ac987ce3                                                                                        |
    | name     | ec2                                                                                                                     |
    | password | $6$rounds=40000$egKz.H1MiHWIvq9o$wXiMiSx8FuIy2KOltS875ldjv0Q591y3xlEYvWl6Uk.n/5Lt.wgJS8.uJ28g75UFCWfys3JffJaOLFYO1nqN8/ |
    | tenantId | 73016aa2c9ca4aeba3736cf44cc8433b                                                                                        |
    +----------+-------------------------------------------------------------------------------------------------------------------------+
    
    export EC2_USER_ID=ea9ed6847b814e8e8f315b15ac987ce3
    
    
    Dove <EC2_PASSWORD> è la password che si desidera associare all'utente del servizio EC2.

  • Assegnare il ruolo tramite il seguente comando:
    # keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT user-role-add --user $EC2_USER_ID --tenant_id  $SERVICE_TENANT_ID --role $ADMIN_ROLE_ID
    
Nota bene: non viene visualizzato nulla se il comando ha successo.

Creazione ed inserimento dell'utente associato a Swift

  • Creare l'utente tramite il seguente comando:
    # keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT user-create --tenant_id $SERVICE_TENANT_ID --name swift --pass <SWIFT_PASSWORD> --enabled true
    +----------+-------------------------------------------------------------------------------------------------------------------------+
    | Property |                                                          Value                                                          |
    +----------+-------------------------------------------------------------------------------------------------------------------------+
    | email    | None                                                                                                                    |
    | enabled  | True                                                                                                                    |
    | id       | 995ee845a29147b7a93443054d185c3b                                                                                        |
    | name     | swift                                                                                                                   |
    | password | $6$rounds=40000$CRLmdT7rWkiLClCL$nZ54lQSF5J.wxUrCgZ37wYPywyx9WqChnAJr3g.XPG.S3LFGTSqcXvWwkROqQbJrKCi34Jvy1uZY/P6c2XBV3/ |
    | tenantId | 73016aa2c9ca4aeba3736cf44cc8433b                                                                                        |
    +----------+-------------------------------------------------------------------------------------------------------------------------+
    
    export SWIFT_USER_ID=995ee845a29147b7a93443054d185c3b
    
    Dove <SWIFT_PASSWORD> è la password che si desidera associare all'utente del servizio Swift.

  • Assegnare il ruolo tramite il seguente comando:
    # keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT user-role-add --user $SWIFT_USER_ID --tenant_id  $SERVICE_TENANT_ID --role $ADMIN_ROLE_ID
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT user-role-add --user_id $NOVA_USER_ID --tenant_id $SERVICE_TENANT_ID --role_id $ADMIN_ROLE_ID
 

Nota bene: non viene visualizzato nulla se il comando ha successo.

Line: 331 to 272
 
  • Creare l'endpoint per il servizio "nova":

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT endpoint-create --region RegionOne --service_id=$NOVA_SERVICE_ID --publicurl='http://:8774/v2/%(tenant_id)s' --internalurl='http://:8774/v2/%(tenant_id)s' --adminurl='http://:8774/v2/%(tenant_id)s'
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT endpoint-create --region RegionOne --service_id=$NOVA_SERVICE_ID --publicurl='http://:8774/v2/%(tenant_id)s' --internalurl='http://:8774/v2/%(tenant_id)s' --adminurl='http://:8774/v2/%(tenant_id)s'
 +-------------+--------------------------------------------------------+
Property Value
+-------------+--------------------------------------------------------+
Line: 412 to 352
  Dove <GLANCE_SERVER_HOSTNAME> è l'hostname del server sui è installato il servizio Glance. Nel nostro caso è "openstack-01.cnaf.infn.it".
Deleted:
<
<

Definizione del servizio compatibility (EC2)

  • Creare il servizio "ec2":
    # keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT service-create --name=ec2 --type=ec2 --description="EC2 Compatibility Service"
    +-------------+----------------------------------+
    |   Property  |              Value               |
    +-------------+----------------------------------+
    | description | EC2 Compatibility Service        |
    | id          | 0f30dac463d242668e999955f7ee3d61 |
    | name        | ec2                              |
    | type        | ec2                              |
    +-------------+----------------------------------+
    
    export EC2_COMPATIBILITY_SERVICE_ID=0f30dac463d242668e999955f7ee3d61
    
  • Creare l'endpoint per il servizio "ec2":
    # keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT endpoint-create --region RegionOne --service_id=$EC2_COMPATIBILITY_SERVICE_ID --publicurl=http://<EC2_SERVER_HOSTNAME>:8773/services/Cloud  --internalurl=http://<EC2_SERVER_HOSTNAME>:8773/services/Cloud --adminurl=http://<EC2_SERVER_HOSTNAME>:8773/services/Cloud
    +-------------+------------------------------------------------------+
    |   Property  |                        Value                         |
    +-------------+------------------------------------------------------+
    | adminurl    | http://openstack-01.cnaf.infn.it:8773/services/Cloud |
    | id          | e927ee99f3b84894a11f9216118d677a                     |
    | internalurl | http://openstack-01.cnaf.infn.it:8773/services/Cloud |
    | publicurl   | http://openstack-01.cnaf.infn.it:8773/services/Cloud |
    | region      | RegionOne                                            |
    | service_id  | 0f30dac463d242668e999955f7ee3d61                     |
    +-------------+------------------------------------------------------+
    
    Dove <EC2_SERVER_HOSTNAME> è l'hostname del server sui è installato il servizio EC2. Nel caso di questo prototipo EC2 non è stato installato.

Definizione del servizio object storage (Swift)

Il servizio object storage richiede un endpoint specifico per ogni tenant.

  • Creare il servizio "swift":
    # keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT service-create --name=swift --type=object-store --description="Object Storage Service"
    +-------------+----------------------------------+
    |   Property  |              Value               |
    +-------------+----------------------------------+
    | description | Object Storage Service           |
    | id          | 5b978ae3aeb1456a9d14c76f1d0c7956 |
    | name        | swift                            |
    | type        | object-store                     |
    +-------------+----------------------------------+
    
    export OBJECT_STORAGE_SERVICE_ID=5b978ae3aeb1456a9d14c76f1d0c7956
    
  • Creare l'endpoint per il servizio "swift":
    # keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT endpoint-create --region RegionOne --service_id=$OBJECT_STORAGE_SERVICE_ID --publicurl='<SWIFT_SERVER_HOSTNAME>:8080/v1/AUTH_%(tenant_id)s'  --internalurl='<SWIFT_SERVER_HOSTNAME>:8080/v1/AUTH_%(tenant_id)s' --adminurl='<SWIFT_SERVER_HOSTNAME>:8080/v1/AUTH_%(tenant_id)s'
    +-------------+-------------------------------------------------------------+
    |   Property  |                            Value                            |
    +-------------+-------------------------------------------------------------+
    | adminurl    | http://openstack-04.cnaf.infn.it:8080/v1/AUTH_%(tenant_id)s |
    | id          | ef01e39c5dde4757834aba9070132f34                            |
    | internalurl | http://openstack-04.cnaf.infn.it:8080/v1/AUTH_%(tenant_id)s |
    | publicurl   | http://openstack-04.cnaf.infn.it:8080/v1/AUTH_%(tenant_id)s |
    | region      | RegionOne                                                   |
    | service_id  | 5b978ae3aeb1456a9d14c76f1d0c7956                            |
    +-------------+-------------------------------------------------------------+
    
    
    Dove <SWIFT_SERVER_HOSTNAME> è l'hostname del server sui è installato il servizio Swift. Nel nostro caso è "openstack-04.cnaf.infn.it".
 

Troubleshooting

  • Per le principali operazioni di troubleshooting riferirsi alla guida.
Line: 540 to 415
  } ], "endpoints_links": [],
Deleted:
<
<
"name": "ec2", "type": "ec2" }, { "endpoints": [ {
"adminURL"
"http://hostname1.domain:8888/v1/AUTH_c8854bd3d15f4f479476d0cf58ef7db2",
"internalURL"
"http://hostname1.domain:8888/v1/AUTH_c8854bd3d15f4f479476d0cf58ef7db2",
"publicURL"
"http://hostname1.domain:8888/v1/AUTH_c8854bd3d15f4f479476d0cf58ef7db2",
"region"
"RegionOne" } ], "endpoints_links": [], "name": "swift", "type": "object-store" }, { "endpoints": [ {
"adminURL"
"http://hostname1.domain:35357/v2.0/",
"internalURL"
"http://hostname1.domain:5000/v2.0/",
"publicURL"
"http://hostname1.domain:5000/v2.0/",
"region"
"RegionOne" } ], "endpoints_links": [],
  "name": "keystone", "type": "identity" }

Revision 112012-10-15 - EnricoFattibene

Line: 1 to 1
 
META TOPICPARENT name="GestioneOpenstack"

Installazione e configurazione del servizio Identity (Keystone)

Line: 53 to 53
 # keystone-manage db_sync
Added:
>
>

 

Creazione di tenant, utente e ruolo per l'amministratore e del tenant per i servizi

Per comodità in questa sezione si utilizzeranno delle variabili d'ambiente settate come segue:
Line: 157 to 158
 # export SERVICE_TENANT_ID=73016aa2c9ca4aeba3736cf44cc8433b
Added:
>
>

 

Creazione ed inserimento degli utenti associati ai servizi

Una volta creato il "Service Tenant", si andrà ad inserire al suo interno un utente per ogni servizio che si vuole aggiungere.
Line: 267 to 269
  Nota bene: non viene visualizzato nulla se il comando ha successo.
Added:
>
>

 

Definizione dei servizi

Keystone agisce anche come catalogo dei servizi per permettere alle altre componenti OpenStack di conoscere quali sono gli endpoint dei vari servizi OpenStack.
Line: 474 to 477
  Dove <SWIFT_SERVER_HOSTNAME> è l'hostname del server sui è installato il servizio Swift. Nel nostro caso è "openstack-04.cnaf.infn.it".
Added:
>
>

 

Troubleshooting

  • Per le principali operazioni di troubleshooting riferirsi alla guida.

Revision 102012-10-15 - MatteoManzali

Line: 1 to 1
 
META TOPICPARENT name="GestioneOpenstack"

Installazione e configurazione del servizio Identity (Keystone)

Line: 328 to 328
 
  • Creare l'endpoint per il servizio "nova":

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT endpoint-create --region RegionOne --service_id=$NOVA_SERVICE_ID --publicurl='http://openstack-01.cnaf.infn.it:8774/v2/%(tenant_id)s' --internalurl='http://openstack-01.cnaf.infn.it:8774/v2/%(tenant_id)s' --adminurl='http://openstack-01.cnaf.infn.it:8774/v2/%(tenant_id)s'
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT endpoint-create --region RegionOne --service_id=$NOVA_SERVICE_ID --publicurl='http://:8774/v2/%(tenant_id)s' --internalurl='http://:8774/v2/%(tenant_id)s' --adminurl='http://:8774/v2/%(tenant_id)s'
 +-------------+--------------------------------------------------------+
Property Value
+-------------+--------------------------------------------------------+
Line: 341 to 341
 
service_id 5bfe94c4ff80410ab60b635cc99e2476
+-------------+--------------------------------------------------------+
Added:
>
>
Dove <CLOUD_CONTROLLER_HOSTNAME> è l'hostname del Cloud Controller (Nova). Nel nostro caso è "openstack-01.cnaf.infn.it".
 

Definizione del servizio volume (Volume)

Il servizio volume richiede un endpoint specifico per ogni tenant.
Line: 362 to 363
 
  • Creare l'endpoint per il servizio "volume":

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT endpoint-create --region RegionOne --service_id=$NOVA_VOLUME_SERVICE_ID --publicurl='http://openstack-01.cnaf.infn.it:8776/v1/%(tenant_id)s' --internalurl='http://openstack-01.cnaf.infn.it:8776/v1/%(tenant_id)s' --adminurl='http://openstack-01.cnaf.infn.it:8776/v1/%(tenant_id)s'
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT endpoint-create --region RegionOne --service_id=$NOVA_VOLUME_SERVICE_ID --publicurl='http://:8776/v1/%(tenant_id)s' --internalurl='http://:8776/v1/%(tenant_id)s' --adminurl='http://:8776/v1/%(tenant_id)s'
 +-------------+--------------------------------------------------------+
Property Value
+-------------+--------------------------------------------------------+
Line: 374 to 375
 
service_id f99ba2241e014295aa3ecfcda6633100
+-------------+--------------------------------------------------------+
Added:
>
>
Dove <CLOUD_CONTROLLER_HOSTNAME> è l'hostname del Cloud Controller (Nova). Nel nostro caso è "openstack-01.cnaf.infn.it".
 

Definizione del servizio image (Glance)

  • Creare il servizio "glance":
Line: 393 to 395
 
  • Creare l'endpoint per il servizio "glance":

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT endpoint-create --region RegionOne --service_id=$GLANCE_IMAGE_SERVICE_ID --publicurl=http://openstack-01.cnaf.infn.it:9292/v1 --internalurl=http://openstack-01.cnaf.infn.it:9292/v1 --adminurl=http://openstack-01.cnaf.infn.it:9292/v1
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT endpoint-create --region RegionOne --service_id=$GLANCE_IMAGE_SERVICE_ID --publicurl=http://:9292/v1 --internalurl=http://:9292/v1 --adminurl=http://:9292/v1
 +-------------+------------------------------------------+
Property Value
+-------------+------------------------------------------+
Line: 404 to 406
 
region RegionOne
service_id 6c02494e7a534c91a7a01228a4093e63
+-------------+------------------------------------------+
Changed:
<
<
>
>
Dove <GLANCE_SERVER_HOSTNAME> è l'hostname del server sui è installato il servizio Glance. Nel nostro caso è "openstack-01.cnaf.infn.it".
 

Definizione del servizio compatibility (EC2)

Line: 424 to 426
 
  • Creare l'endpoint per il servizio "ec2":

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT endpoint-create --region RegionOne --service_id=$EC2_COMPATIBILITY_SERVICE_ID --publicurl=http://openstack-01.cnaf.infn.it:8773/services/Cloud --internalurl=http://openstack-01.cnaf.infn.it:8773/services/Cloud --adminurl=http://openstack-01.cnaf.infn.it:8773/services/Cloud
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT endpoint-create --region RegionOne --service_id=$EC2_COMPATIBILITY_SERVICE_ID --publicurl=http://:8773/services/Cloud --internalurl=http://:8773/services/Cloud --adminurl=http://:8773/services/Cloud
 +-------------+------------------------------------------------------+
Property Value
+-------------+------------------------------------------------------+
Line: 436 to 438
 
service_id 0f30dac463d242668e999955f7ee3d61
+-------------+------------------------------------------------------+
Added:
>
>
Dove <EC2_SERVER_HOSTNAME> è l'hostname del server sui è installato il servizio EC2. Nel caso di questo prototipo EC2 non è stato installato.
 

Definizione del servizio object storage (Swift)

Il servizio object storage richiede un endpoint specifico per ogni tenant.
Line: 456 to 459
 
  • Creare l'endpoint per il servizio "swift":

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT endpoint-create --region RegionOne --service_id=$OBJECT_STORAGE_SERVICE_ID --publicurl='http://openstack-01.cnaf.infn.it:8888/v1/AUTH_%(tenant_id)s' --internalurl='http://openstack-01.cnaf.infn.it:8888/v1/AUTH_%(tenant_id)s' --adminurl='http://openstack-01.cnaf.infn.it:8888/v1/AUTH_%(tenant_id)s'
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT endpoint-create --region RegionOne --service_id=$OBJECT_STORAGE_SERVICE_ID --publicurl=':8080/v1/AUTH_%(tenant_id)s' --internalurl=':8080/v1/AUTH_%(tenant_id)s' --adminurl=':8080/v1/AUTH_%(tenant_id)s'
 +-------------+-------------------------------------------------------------+
Property Value
+-------------+-------------------------------------------------------------+
Changed:
<
<
adminurl http://openstack-01.cnaf.infn.it:8888/v1/AUTH_%(tenant_id)s
>
>
adminurl http://openstack-04.cnaf.infn.it:8080/v1/AUTH_%(tenant_id)s
 
id ef01e39c5dde4757834aba9070132f34
Changed:
<
<
internalurl http://openstack-01.cnaf.infn.it:8888/v1/AUTH_%(tenant_id)s
publicurl http://openstack-01.cnaf.infn.it:8888/v1/AUTH_%(tenant_id)s
>
>
internalurl http://openstack-04.cnaf.infn.it:8080/v1/AUTH_%(tenant_id)s
publicurl http://openstack-04.cnaf.infn.it:8080/v1/AUTH_%(tenant_id)s
 
region RegionOne
service_id 5b978ae3aeb1456a9d14c76f1d0c7956
+-------------+-------------------------------------------------------------+

Added:
>
>
Dove <SWIFT_SERVER_HOSTNAME> è l'hostname del server sui è installato il servizio Swift. Nel nostro caso è "openstack-04.cnaf.infn.it".
 

Troubleshooting

  • Per le principali operazioni di troubleshooting riferirsi alla guida.

Revision 92012-10-11 - PaoloVeronesi

Line: 1 to 1
 
META TOPICPARENT name="GestioneOpenstack"

Installazione e configurazione del servizio Identity (Keystone)

Line: 53 to 53
 # keystone-manage db_sync
Deleted:
<
<

 

Creazione di tenant, utente e ruolo per l'amministratore e del tenant per i servizi

Per comodità in questa sezione si utilizzeranno delle variabili d'ambiente settate come segue:
# export ADMIN_TOKEN=<ADMIN_TOKEN_VALUE>
Changed:
<
<
# export KEYSTONE35357=http://hostname1.domain:35357/v2.0 # export KEYSTONE5000=http://hostname1.domain:5000/v2.0
>
>
export OS_USERNAME=adminUser export OS_PASSWORD= export OS_TENANT_NAME=adminTenant export ENDPOINT=http://openstack-01.cnaf.infn.it:35357/v2.0/ export OS_AUTH_URL=http://openstack-01.cnaf.infn.it:5000/v2.0/
  Dove <ADMIN_TOKEN_VALUE> è il valore del parametro admin_token contenuto nel file /etc/keystone/keystone.conf .
Line: 68 to 71
 
  • Creare il tenant lanciando il comando:

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 tenant-create --name adminTenant --description "Admin Tenant" --enabled true
>
>
keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT tenant-create --name adminTenant --description "Admin Tenant" --enabled true
 +-------------+----------------------------------+
Property Value
+-------------+----------------------------------+
description Admin Tenant
enabled True
Changed:
<
<
id c10d9c9f296b47f8a1212dd7a98357e0
>
>
id db2cf825309c49989595fc2ff915dc7e
 
name adminTenant
+-------------+----------------------------------+
Added:
>
>
export ADMIN_TENANT_ID=db2cf825309c49989595fc2ff915dc7e
 

Creazione dell'utente "adminUser"

  • Creare l'utente lanciando il seguente comando:

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-create --tenant_id --name adminUser --pass --enabled true
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT user-create --tenant_id $ADMIN_TENANT_ID --name $OS_USERNAME --pass $OS_PASSWORD --enabled true
 +----------+-------------------------------------------------------------------------------------------------------------------------+
Property Value
+----------+-------------------------------------------------------------------------------------------------------------------------+
email None
enabled True
Changed:
<
<
id b0305faa3ace4671bc0399e71a0a1cc1
>
>
id 7d6a3a42c37948b88e2fa692b63587cd
 
name adminUser
Changed:
<
<
password $6$rounds=40000$FXbQphsGDVj.Qw6B$q2e/hqj/Jnv7l.r3HW9VLTVyHaRbCB7pySvJ9prsWahvQ.GJyELRARXL4apPZAltov6f3FRAwfXu5yE5kAUbg0
tenantId c10d9c9f296b47f8a1212dd7a98357e0
>
>
password $6$rounds=40000$NxZyxUfO8VRj3gR.$zt9GJKwMDOUMDHCMhqAqJje3JAJmqqTXADZkXll.usGHEsEpAMgKsnZEfF0itF75ooyY1/tjxXBJq9MaQXnfo.
tenantId db2cf825309c49989595fc2ff915dc7e
 +----------+-------------------------------------------------------------------------------------------------------------------------+
Deleted:
<
<
Dove <ADMIN_TENANT_ID> è l'ID del tenant appena creato, mentre <ADMIN_PASSWORD> è la password scelta per l'utente "adminUser". Nel caso in esempio <ADMIN_TENANT_ID> equivale a c10d9c9f296b47f8a1212dd7a98357e0 .
 
Changed:
<
<

Creazione del ruolo "admin"

>
>
Dove <ADMIN_TENANT_ID> è l'ID del tenant appena creato, mentre <ADMIN_PASSWORD> è la password scelta per l'utente "adminUser".

Creazione dei ruoli admin e memberRole

 
  • Creare il ruolo lanciando il seguente comando:

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 role-create --name admin
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT role-create --name admin
 +----------+----------------------------------+
Property Value
+----------+----------------------------------+
Changed:
<
<
id 6d67c71be79643e0bf497571510a6894
>
>
id 2f196d11ff954c67befc3f190195f47c
 
name admin
+----------+----------------------------------+
Added:
>
>
# export ADMIN_ROLE_ID=2f196d11ff954c67befc3f190195f47c

# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT role-create --name memberRole +----------+----------------------------------+

Property Value
+----------+----------------------------------+
id d193b58e977d4c398b41c518f3629ea7
name memberRole
+----------+----------------------------------+
 
Deleted:
<
<
  • Per comodità esportare l'id del ruolo "admin" (nelle istruzioni successive verrà utilizzato più volte):
    # export ADMIN_ROLE_ID=<ADMIN_ROLE_ID>
    
    Dove <ADMIN_ROLE_ID> è l'id del ruolo "admin", nel caso in esempio va scritto 6d67c71be79643e0bf497571510a6894 .
 

Assegnazione del ruolo "admin" all'utente "AdminUser"

  • Assegnare il ruolo tramite il seguente comando:

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-role-add --user --tenant_id --role $ADMIN_ROLE_ID
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT user-role-add --user $ADMIN_USER_ID --tenant_id $ADMIN_TENANT_ID --role $ADMIN_ROLE_ID
 
Added:
>
>
  Dove <ADMIN_USER_ID> e <ADMIN_TENANT_ID> sono rispettivamente gli ID di user e tenant appena creati. $ADMIN_ROLE_ID è invece l'id del ruolo "admin" esportato nell'istruzione precedente. Nota bene: non viene visualizzato nulla se il comando ha successo.
Added:
>
>

 

Creazione del tenant "service":

Questo tenant conterrà tutti gli utenti dei servizi che si desidera far conoscere al service catalog.
Line: 127 to 144
 
  • Creare il tenant lanciando il comando:

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 tenant-create --name service --description "Service Tenant" --enabled true
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT tenant-create --name service --description "Service Tenant" --enabled true
 +-------------+----------------------------------+
Property Value
+-------------+----------------------------------+
description Service Tenant
enabled True
Changed:
<
<
id edc5b7a35c644466849123cc937f9a04
>
>
id 73016aa2c9ca4aeba3736cf44cc8433b
 
name service
+-------------+----------------------------------+
Added:
>
>
# export SERVICE_TENANT_ID=73016aa2c9ca4aeba3736cf44cc8433b
 
Deleted:
<
<

 

Creazione ed inserimento degli utenti associati ai servizi

Una volta creato il "Service Tenant", si andrà ad inserire al suo interno un utente per ogni servizio che si vuole aggiungere.
Deleted:
<
<
Per comodità è conveniente esportare come variabile d'ambiente l'id del tenant "service":
# export SERVICE_TENANT_ID=<SERVICE_TENANT_ID>
Dove <SERVICE_TENANT_ID> è l'id del tenant appena creato, nel caso in esempio va scritto edc5b7a35c644466849123cc937f9a04 .
 

Creazione ed inserimento dell'utente associato a Glance

  • Creare l'utente tramite il seguente comando:

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-create --tenant_id $SERVICE_TENANT_ID --name glance --pass --enabled true
>
>
keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT user-create --tenant_id $SERVICE_TENANT_ID --name glance --pass --enabled=true
 +----------+-------------------------------------------------------------------------------------------------------------------------+
Property Value
+----------+-------------------------------------------------------------------------------------------------------------------------+
email None
enabled True
Changed:
<
<
id f085dd93f0ae42daa1a0623b9ec978f4
>
>
id 90ee5ac051eb4d1eaa543243987968a6
 
name glance
Changed:
<
<
password $6$rounds=40000$Jt2pbmLiN4liEImG$BheACef6A.wSgpj5EKn.XrAihLYy41y06rrAs3pEPr4Y/IF2uLSt9ADprzFGlATwfbimn98fp/e35wM2f783W1
tenantId edc5b7a35c644466849123cc937f9a04
>
>
password $6$rounds=40000$LApm.pXGC43cDMhN$J1mDpXad5r2YYNoMKK/P5t0VwXQidKauP/oHaVH5Nm9E7zGQLYamwa1Xxvh0FRcjOvhDtTSZ97CToKV6pWFPA1
tenantId 73016aa2c9ca4aeba3736cf44cc8433b
 +----------+-------------------------------------------------------------------------------------------------------------------------+
Added:
>
>
export GLANCE_USER_ID=90ee5ac051eb4d1eaa543243987968a6
 
Added:
>
>
  Dove <GLANCE_PASSWORD> è la password che si desidera associare all'utente del servizio Glance.

  • Assegnare il ruolo tramite il seguente comando:
Line: 167 to 182
 
  • Assegnare il ruolo tramite il seguente comando:

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-role-add --user --tenant_id $SERVICE_TENANT_ID --role $ADMIN_ROLE_ID
>
>
keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT user-role-add --user $GLANCE_USER_ID --tenant_id $SERVICE_TENANT_ID --role $ADMIN_ROLE_ID
 
Changed:
<
<
Dove <GLANCE_USER_ID> è l'id dello user appena creato, nel caso in esempio va scritto f085dd93f0ae42daa1a0623b9ec978f4 .
>
>
  Nota bene: non viene visualizzato nulla se il comando ha successo.

Creazione ed inserimento dell'utente associato a Nova

  • Creare l'utente tramite il seguente comando:

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-create --tenant_id $SERVICE_TENANT_ID --name nova --pass --enabled true
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT user-create --tenant_id $SERVICE_TENANT_ID --name nova --pass --enabled true
 +----------+-------------------------------------------------------------------------------------------------------------------------+
Property Value
+----------+-------------------------------------------------------------------------------------------------------------------------+
email None
enabled True
Changed:
<
<
id 6916a161eb55476a8b2615dae7d00f27
>
>
id 9b2d55e2f8164be5a9805a39588f4659
 
name nova
Changed:
<
<
password $6$rounds=40000$Fi6fO6FbiWQH./Sg$ICF/qEdojYNNCSGQlicUAoFMntUREVz96DPPM4bOHsRBAB0t6vIOEDxSUh3q0IJXFGeH0YASNgmmVIU6CRklw.
tenantId edc5b7a35c644466849123cc937f9a04
>
>
password $6$rounds=40000$jAXTAHvAnF4MBz7O$pr99MMc4gpfOOlYDO7dTTCy7Ai.XZ72P1GbMXHpj1ri7s9qIdnE67QPDkkfynEUyHXBNsrnsnHzmF9fvGo66r1
tenantId 73016aa2c9ca4aeba3736cf44cc8433b
 +----------+-------------------------------------------------------------------------------------------------------------------------+
Added:
>
>
export NOVA_USER_ID=9b2d55e2f8164be5a9805a39588f4659
 
Added:
>
>
  Dove <NOVA_PASSWORD> è la password che si desidera associare all'utente del servizio Nova.

  • Assegnare il ruolo tramite il seguente comando:
Line: 190 to 208
  Dove <NOVA_PASSWORD> è la password che si desidera associare all'utente del servizio Nova.

  • Assegnare il ruolo tramite il seguente comando:
Added:
>
>
 
Changed:
<
<
keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-role-add --user --tenant_id $SERVICE_TENANT_ID --role $ADMIN_ROLE_ID
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT user-role-add --user $NOVA_USER_ID --tenant_id $SERVICE_TENANT_ID --role $ADMIN_ROLE_ID
 
Changed:
<
<
Dove <NOVA_USER_ID> è l'id dello user appena creato, nel caso in esempio va scritto 6916a161eb55476a8b2615dae7d00f27 .
>
>
  Nota bene: non viene visualizzato nulla se il comando ha successo.

Creazione ed inserimento dell'utente associato a EC2

  • Creare l'utente tramite il seguente comando:

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-create --tenant_id $SERVICE_TENANT_ID --name ec2 --pass --enabled true
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT user-create --tenant_id $SERVICE_TENANT_ID --name ec2 --pass --enabled true
 +----------+-------------------------------------------------------------------------------------------------------------------------+
Property Value
+----------+-------------------------------------------------------------------------------------------------------------------------+
email None
enabled True
Changed:
<
<
id de4ca5902e6f47ffa3e00a37bff6364c
>
>
id ea9ed6847b814e8e8f315b15ac987ce3
 
name ec2
Changed:
<
<
password $6$rounds=40000$Fi6fO6FbiWQH./Sg$ICF/qEdojYNNCSGQlicUAoFMntUREVz96DPPM4bOHsRBAB0t6vIOEDxSUh3q0IJXFGeH0YASNgmmVIU6CRklw.
tenantId edc5b7a35c644466849123cc937f9a04
>
>
password $6$rounds=40000$egKz.H1MiHWIvq9o$wXiMiSx8FuIy2KOltS875ldjv0Q591y3xlEYvWl6Uk.n/5Lt.wgJS8.uJ28g75UFCWfys3JffJaOLFYO1nqN8/
tenantId 73016aa2c9ca4aeba3736cf44cc8433b
 +----------+-------------------------------------------------------------------------------------------------------------------------+
Added:
>
>
export EC2_USER_ID=ea9ed6847b814e8e8f315b15ac987ce3
  Dove <EC2_PASSWORD> è la password che si desidera associare all'utente del servizio EC2.

  • Assegnare il ruolo tramite il seguente comando:

Changed:
<
<
keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-role-add --user --tenant_id $SERVICE_TENANT_ID --role $ADMIN_ROLE_ID
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT user-role-add --user $EC2_USER_ID --tenant_id $SERVICE_TENANT_ID --role $ADMIN_ROLE_ID
 
Deleted:
<
<
Dove <EC2_USER_ID> è l'id dello user appena creato, nel caso in esempio va scritto de4ca5902e6f47ffa3e00a37bff6364c .
  Nota bene: non viene visualizzato nulla se il comando ha successo.

Creazione ed inserimento dell'utente associato a Swift

  • Creare l'utente tramite il seguente comando:

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-create --tenant_id $SERVICE_TENANT_ID --name swift --pass --enabled true
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT user-create --tenant_id $SERVICE_TENANT_ID --name swift --pass --enabled true
 +----------+-------------------------------------------------------------------------------------------------------------------------+
Property Value
+----------+-------------------------------------------------------------------------------------------------------------------------+
email None
enabled True
Changed:
<
<
id e79e37013e944d89b1430e31dae316fa
>
>
id 995ee845a29147b7a93443054d185c3b
 
name swift
Changed:
<
<
password $6$rounds=40000$Fi6fO6FbiWQH./Sg$ICF/qEdojYNNCSGQlicUAoFMntUREVz96DPPM4bOHsRBAB0t6vIOEDxSUh3q0IJXFGeH0YASNgmmVIU6CRklw.
tenantId edc5b7a35c644466849123cc937f9a04
>
>
password $6$rounds=40000$CRLmdT7rWkiLClCL$nZ54lQSF5J.wxUrCgZ37wYPywyx9WqChnAJr3g.XPG.S3LFGTSqcXvWwkROqQbJrKCi34Jvy1uZY/P6c2XBV3/
tenantId 73016aa2c9ca4aeba3736cf44cc8433b
 +----------+-------------------------------------------------------------------------------------------------------------------------+
Added:
>
>
export SWIFT_USER_ID=995ee845a29147b7a93443054d185c3b
  Dove <SWIFT_PASSWORD> è la password che si desidera associare all'utente del servizio Swift.

  • Assegnare il ruolo tramite il seguente comando:

Changed:
<
<
keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-role-add --user --tenant_id $SERVICE_TENANT_ID --role $ADMIN_ROLE_ID
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT user-role-add --user $SWIFT_USER_ID --tenant_id $SERVICE_TENANT_ID --role $ADMIN_ROLE_ID
 
Changed:
<
<
Dove <SWIFT_USER_ID> è l'id dello user appena creato, nel caso in esempio va scritto e79e37013e944d89b1430e31dae316fa .
>
>
  Nota bene: non viene visualizzato nulla se il comando ha successo.
Deleted:
<
<

 

Definizione dei servizi

Keystone agisce anche come catalogo dei servizi per permettere alle altre componenti OpenStack di conoscere quali sono gli endpoint dei vari servizi OpenStack.
Line: 257 to 279
 

Definizione del servizio identity (Keystone)

  • Creare il servizio "keystone":

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 service-create --name=keystone --type=identity --description="Keystone Identity Service"
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT service-create --name=keystone --type=identity --description="Keystone Identity Service"
 +-------------+----------------------------------+
Property Value
+-------------+----------------------------------+
description Keystone Identity Service
Changed:
<
<
id cfda291164a2416f99ddffc137ba14f9
>
>
id c2b7f0514dde412ea6c1fccac6437bb7
 
name keystone
type identity
+-------------+----------------------------------+
Added:
>
>
export KEYSTONE_SERVICE_ID=c2b7f0514dde412ea6c1fccac6437bb7 export KEYSTONE5000=http://openstack-01.cnaf.infn.it:5000/v2.0
 

  • Creare l'endpoint per il servizio "keystone":

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 endpoint-create --region RegionOne --service_id= --publicurl=$KEYSTONE5000 --internalurl=$KEYSTONE5000 --adminurl=$KEYSTONE35357 +-------------+------------------------------------+
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT endpoint-create --region RegionOne --service_id=$KEYSTONE_SERVICE_ID --publicurl=$KEYSTONE5000 --internalurl=$KEYSTONE5000 --adminurl=$ENDPOINT +-------------+----------------------------------------------+
 
Property Value
Changed:
<
<
+-------------+------------------------------------+
adminurl http://hostname1.domain:35357/v2.0
id e63155b607e1433f9ae8c66bc87c8ebf
internalurl http://hostname1.domain:5000/v2.0
publicurl http://hostname1.domain:5000/v2.0
>
>
+-------------+----------------------------------------------+
adminurl http://openstack-01.cnaf.infn.it:35357/v2.0/
id 93c84640b7384911afdd27dda19ea69c
internalurl http://openstack-01.cnaf.infn.it:5000/v2.0
publicurl http://openstack-01.cnaf.infn.it:5000/v2.0
 
region RegionOne
Changed:
<
<
service_id cfda291164a2416f99ddffc137ba14f9
+-------------+------------------------------------+
>
>
service_id c2b7f0514dde412ea6c1fccac6437bb7
+-------------+----------------------------------------------+
 
Deleted:
<
<
Dove <KEYSTONE_SERVICE_ID> è l'id del servizio appena creato, nel caso in esempio va scritto cfda291164a2416f99ddffc137ba14f9 .
 

Definizione del servizio compute (Nova)

Changed:
<
<
Il servizio compute richiede un endpoint specifico per ogni tenant. La stringa %(tenant_id)s ed i singoli apici che racchiudono i valori di publicurl, internalurl e adminurl devono essere digitati esattamente come mostrato sia per l'endpoint compute che per l'endpoint volume e l'endpoint object storage (paragrafi successivi).
>
>
Il servizio compute richiede un endpoint specifico per ogni tenant. La stringa %(tenant_id)s ed i singoli apici che racchiudono i valori di publicurl, internalurl e adminurl devono essere digitati esattamente come mostrato sia per l'endpoint compute che per l'endpoint volume e l'endpoint object storage (paragrafi successivi).
 
  • Creare il servizio "nova":

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 service-create --name=nova --type=compute --description="Nova Compute Service"
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT service-create --name=nova --type=compute --description="Nova Compute Service"
 +-------------+----------------------------------+
Property Value
+-------------+----------------------------------+
description Nova Compute Service
Changed:
<
<
id 83486ca8422c4cb0aa4be1a231556ee3
>
>
id 5bfe94c4ff80410ab60b635cc99e2476
 
name nova
type compute
+-------------+----------------------------------+
Added:
>
>
export NOVA_COMPUTE_SERVICE_ID=5bfe94c4ff80410ab60b635cc99e2476
 
Added:
>
>
 
  • Creare l'endpoint per il servizio "nova":

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 endpoint-create --region RegionOne --service_id= --publicurl='http://hostname1.domain:8774/v2/%(tenant_id)s' --internalurl='http://hostname1.domain:8774/v2/%(tenant_id)s' --adminurl='http://hostname1.domain:8774/v2/%(tenant_id)s' +-------------+-----------------------------------------------+
Property Value
+-------------+-----------------------------------------------+
adminurl http://hostname1.domain:8774/v2/%(tenant_id)s
id ef8874ac56b34b538536b053591d440e
internalurl http://hostname1.domain:8774/v2/%(tenant_id)s
publicurl http://hostname1.domain:8774/v2/%(tenant_id)s
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT endpoint-create --region RegionOne --service_id=$NOVA_SERVICE_ID --publicurl='http://openstack-01.cnaf.infn.it:8774/v2/%(tenant_id)s' --internalurl='http://openstack-01.cnaf.infn.it:8774/v2/%(tenant_id)s' --adminurl='http://openstack-01.cnaf.infn.it:8774/v2/%(tenant_id)s' +-------------+--------------------------------------------------------+
Property Value
+-------------+--------------------------------------------------------+
adminurl http://openstack-01.cnaf.infn.it:8774/v2/%(tenant_id)s
id 6168989f6fd2429d8f15d62c940a2fc2
internalurl http://openstack-01.cnaf.infn.it:8774/v2/%(tenant_id)s
publicurl http://openstack-01.cnaf.infn.it:8774/v2/%(tenant_id)s
 
region RegionOne
Changed:
<
<
service_id 83486ca8422c4cb0aa4be1a231556ee3
+-------------+-----------------------------------------------+
>
>
service_id 5bfe94c4ff80410ab60b635cc99e2476
+-------------+--------------------------------------------------------+
 
Deleted:
<
<
Dove <NOVA_COMPUTE_SERVICE_ID> è l'id del servizio appena creato, nel caso in esempio va scritto 83486ca8422c4cb0aa4be1a231556ee3 .
 

Definizione del servizio volume (Volume)

Il servizio volume richiede un endpoint specifico per ogni tenant.

  • Creare il servizio "volume":

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 service-create --name=volume --type=volume --description="Nova Volume Service"
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT service-create --name=volume --type=volume --description="Nova Volume Service"
 +-------------+----------------------------------+
Property Value
+-------------+----------------------------------+
description Nova Volume Service
Changed:
<
<
id 475701d5fb534be291d0f09f4ce39e40
>
>
id f99ba2241e014295aa3ecfcda6633100
 
name volume
type volume
+-------------+----------------------------------+
Added:
>
>
export NOVA_VOLUME_SERVICE_ID=f99ba2241e014295aa3ecfcda6633100
 
Added:
>
>
 
  • Creare l'endpoint per il servizio "volume":

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 endpoint-create --region RegionOne --service_id= --publicurl='http://hostname1.domain:8776/v1/%(tenant_id)s' --internalurl='http://hostname1.domain:8776/v1/%(tenant_id)s' --adminurl='http://hostname1.domain:8776/v1/%(tenant_id)s' +-------------+-----------------------------------------------+
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT endpoint-create --region RegionOne --service_id=$NOVA_VOLUME_SERVICE_ID --publicurl='http://openstack-01.cnaf.infn.it:8776/v1/%(tenant_id)s' --internalurl='http://openstack-01.cnaf.infn.it:8776/v1/%(tenant_id)s' --adminurl='http://openstack-01.cnaf.infn.it:8776/v1/%(tenant_id)s' +-------------+--------------------------------------------------------+
 
Property Value
Changed:
<
<
+-------------+-----------------------------------------------+
adminurl http://hostname1.domain:8776/v1/%(tenant_id)s
id 935fd37b6fa74b2f9fba6d907fa95825
internalurl http://hostname1.domain:8776/v1/%(tenant_id)s
publicurl http://hostname1.domain:8776/v1/%(tenant_id)s
>
>
+-------------+--------------------------------------------------------+
adminurl http://openstack-01.cnaf.infn.it:8776/v1/%(tenant_id)s
id 78b405450a5d432b8a4c61bc1abc52d9
internalurl http://openstack-01.cnaf.infn.it:8776/v1/%(tenant_id)s
publicurl http://openstack-01.cnaf.infn.it:8776/v1/%(tenant_id)s
 
region RegionOne
Changed:
<
<
service_id 475701d5fb534be291d0f09f4ce39e40
+-------------+-----------------------------------------------+
>
>
service_id f99ba2241e014295aa3ecfcda6633100
+-------------+--------------------------------------------------------+
 
Deleted:
<
<
Dove <NOVA_VOLUME_SERVICE_ID> è l'id del servizio appena creato, nel caso in esempio va scritto 475701d5fb534be291d0f09f4ce39e40 .
 

Definizione del servizio image (Glance)

  • Creare il servizio "glance":

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 service-create --name=glance --type=image --description="Glance Image Service"
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT service-create --name=glance --type=image --description="Glance Image Service"
 +-------------+----------------------------------+
Property Value
+-------------+----------------------------------+
description Glance Image Service
Changed:
<
<
id 97e15631bb8a4b2f8b41efd1ad3d53eb
>
>
id 6c02494e7a534c91a7a01228a4093e63
 
name glance
type image
+-------------+----------------------------------+
Added:
>
>
export GLANCE_IMAGE_SERVICE_ID=6c02494e7a534c91a7a01228a4093e63
 
Added:
>
>
 
  • Creare l'endpoint per il servizio "glance":

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 endpoint-create --region RegionOne --service_id= --publicurl=http://hostname1.domain:9292/v1 --internalurl=http://hostname1.domain:9292/v1 --adminurl=http://hostname1.domain:9292/v1 +-------------+----------------------------------+
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT endpoint-create --region RegionOne --service_id=$GLANCE_IMAGE_SERVICE_ID --publicurl=http://openstack-01.cnaf.infn.it:9292/v1 --internalurl=http://openstack-01.cnaf.infn.it:9292/v1 --adminurl=http://openstack-01.cnaf.infn.it:9292/v1 +-------------+------------------------------------------+
 
Property Value
Changed:
<
<
+-------------+----------------------------------+
adminurl http://hostname1.domain:9292/v1
id 1ff4ece13c3e48d8a6461faebd9cd38f
internalurl http://hostname1.domain:9292/v1
publicurl http://hostname1.domain:9292/v1
>
>
+-------------+------------------------------------------+
adminurl http://openstack-01.cnaf.infn.it:9292/v1
id 2251cae28faf450a8f86292a237e4fcf
internalurl http://openstack-01.cnaf.infn.it:9292/v1
publicurl http://openstack-01.cnaf.infn.it:9292/v1
 
region RegionOne
Changed:
<
<
service_id 97e15631bb8a4b2f8b41efd1ad3d53eb
+-------------+----------------------------------+
>
>
service_id 6c02494e7a534c91a7a01228a4093e63
+-------------+------------------------------------------+
 
Deleted:
<
<
Dove <GLANCE_IMAGE_SERVICE_ID> è l'id del servizio appena creato, nel caso in esempio va scritto 97e15631bb8a4b2f8b41efd1ad3d53eb .
 

Definizione del servizio compatibility (EC2)

  • Creare il servizio "ec2":

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 service-create --name=ec2 --type=ec2 --description="EC2 Compatibility Service"
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT service-create --name=ec2 --type=ec2 --description="EC2 Compatibility Service"
 +-------------+----------------------------------+
Property Value
+-------------+----------------------------------+
description EC2 Compatibility Service
Changed:
<
<
id 26040267bd2744348f52785f8d806123
>
>
id 0f30dac463d242668e999955f7ee3d61
 
name ec2
type ec2
+-------------+----------------------------------+
Added:
>
>
export EC2_COMPATIBILITY_SERVICE_ID=0f30dac463d242668e999955f7ee3d61
 
  • Creare l'endpoint per il servizio "ec2":

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 endpoint-create --region RegionOne --service_id= --publicurl=http://hostname1.domain:8773/services/Cloud --internalurl=http://hostname1.domain:8773/services/Cloud --adminurl=http://hostname1.domain:8773/services/Cloud +-------------+---------------------------------------------+
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT endpoint-create --region RegionOne --service_id=$EC2_COMPATIBILITY_SERVICE_ID --publicurl=http://openstack-01.cnaf.infn.it:8773/services/Cloud --internalurl=http://openstack-01.cnaf.infn.it:8773/services/Cloud --adminurl=http://openstack-01.cnaf.infn.it:8773/services/Cloud +-------------+------------------------------------------------------+
 
Property Value
Changed:
<
<
+-------------+---------------------------------------------+
adminurl http://hostname1.domain:8773/services/Cloud
id 3c8c0d749f21490b90163bfaed9befe7
internalurl http://hostname1.domain:8773/services/Cloud
publicurl http://hostname1.domain:8773/services/Cloud
>
>
+-------------+------------------------------------------------------+
adminurl http://openstack-01.cnaf.infn.it:8773/services/Cloud
id e927ee99f3b84894a11f9216118d677a
internalurl http://openstack-01.cnaf.infn.it:8773/services/Cloud
publicurl http://openstack-01.cnaf.infn.it:8773/services/Cloud
 
region RegionOne
Changed:
<
<
service_id 26040267bd2744348f52785f8d806123
+-------------+---------------------------------------------+
>
>
service_id 0f30dac463d242668e999955f7ee3d61
+-------------+------------------------------------------------------+
 
Deleted:
<
<
Dove <EC2_COMPATIBILITY_SERVICE_ID> è l'id del servizio appena creato, nel caso in esempio va scritto 26040267bd2744348f52785f8d806123 .
 

Definizione del servizio object storage (Swift)

Il servizio object storage richiede un endpoint specifico per ogni tenant.

  • Creare il servizio "swift":

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 service-create --name=swift --type=object-store --description="Object Storage Service"
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT service-create --name=swift --type=object-store --description="Object Storage Service"
 +-------------+----------------------------------+
Property Value
+-------------+----------------------------------+
description Object Storage Service
Changed:
<
<
id 648da339ec2549fcae0331b96929dd82
>
>
id 5b978ae3aeb1456a9d14c76f1d0c7956
 
name swift
type object-store
+-------------+----------------------------------+
Added:
>
>
export OBJECT_STORAGE_SERVICE_ID=5b978ae3aeb1456a9d14c76f1d0c7956
 
  • Creare l'endpoint per il servizio "swift":

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 endpoint-create --region RegionOne --service_id= --publicurl='http://hostname1.domain:8888/v1/AUTH_%(tenant_id)s --internalurl='http://hostname1.domain:8888/v1/AUTH_%(tenant_id)s' --adminurl='http://hostname1.domain:8888/v1/AUTH_%(tenant_id)s' +-------------+----------------------------------------------------+
>
>
# keystone --token $ADMIN_TOKEN --endpoint $ENDPOINT endpoint-create --region RegionOne --service_id=$OBJECT_STORAGE_SERVICE_ID --publicurl='http://openstack-01.cnaf.infn.it:8888/v1/AUTH_%(tenant_id)s' --internalurl='http://openstack-01.cnaf.infn.it:8888/v1/AUTH_%(tenant_id)s' --adminurl='http://openstack-01.cnaf.infn.it:8888/v1/AUTH_%(tenant_id)s' +-------------+-------------------------------------------------------------+
 
Property Value
Changed:
<
<
+-------------+----------------------------------------------------+
adminurl http://hostname1.domain:8888/v1/AUTH_%(tenant_id)s
id d2a3d7490c61442f9b2c8c8a2083c4b6
internalurl http://hostname1.domain:8888/v1/AUTH_%(tenant_id)s
publicurl http://hostname1.domain:8888/v1/AUTH_%(tenant_id)s
>
>
+-------------+-------------------------------------------------------------+
adminurl http://openstack-01.cnaf.infn.it:8888/v1/AUTH_%(tenant_id)s
id ef01e39c5dde4757834aba9070132f34
internalurl http://openstack-01.cnaf.infn.it:8888/v1/AUTH_%(tenant_id)s
publicurl http://openstack-01.cnaf.infn.it:8888/v1/AUTH_%(tenant_id)s
 
region RegionOne
Changed:
<
<
service_id 648da339ec2549fcae0331b96929dd82
+-------------+----------------------------------------------------+
>
>
service_id 5b978ae3aeb1456a9d14c76f1d0c7956
+-------------+-------------------------------------------------------------+
 
Deleted:
<
<
Dove <OBJECT_STORAGE_SERVICE_ID> è l'id del servizio appena creato, nel caso in esempio va scritto 648da339ec2549fcae0331b96929dd82 .
 
Deleted:
<
<

 

Troubleshooting

  • Per le principali operazioni di troubleshooting riferirsi alla guida.

Revision 82012-10-10 - EnricoFattibene

Line: 1 to 1
 
META TOPICPARENT name="GestioneOpenstack"

Installazione e configurazione del servizio Identity (Keystone)

Line: 27 to 27
 

Configurazione keystone

  • Rimuovere, se esiste, il file /var/lib/keystone/keystone.db (cioè il DB sqlite). Verrà utilizzato MySQL che permette a più Keystone di utilizzare lo stesso DB e al DB stesso di essere replicato utilizzando le feature di MySQL.
Changed:
<
<
 
  • Per creare il DB di keystone e l'utente keystone che ha completo accesso al DB stesso, digitare il comando:
>
>
  • Per creare il DB keystone e l'utente keystone che ha completo accesso al DB stesso, digitare il comando:
 
# openstack-db --init --service keystone
Line: 37 to 37
 connection = mysql://keystone:keystone@hostname1.domain/keystone Nota bene: in keystone:keystone il primo keystone è il nome utente, il secondo è la password. Utilizzando il comando openstack-db --init --service keystone per l'inizializzazione del DB keystone verranno utilizzati quei valori di default.
Changed:
<
<
>
>
 
  • Inizializzare il parametro admin_token contenuto all'interno del file /etc/keystone/keystone.conf , attraverso il comando:
    # openstack-config --set /etc/keystone/keystone.conf DEFAULT admin_token $(openssl rand -hex 10)
    
Changed:
<
<
 
  • Assicurarsi che il servizio sia attivo al boot ed avviarlo attraverso i seguenti comandi:
>
>
  • Assicurarsi che il servizio sia attivo al boot ed riavviarlo attraverso i seguenti comandi:
 
# chkconfig openstack-keystone on
Changed:
<
<
# service openstack-keystone start
>
>
# service openstack-keystone restart
 
  • Infine inizializzare il DB keystone:

Revision 72012-10-10 - EnricoFattibene

Line: 1 to 1
 
META TOPICPARENT name="GestioneOpenstack"
Changed:
<
<

Installing and Configuring the Identity Service (KEYSTONE)

>
>

Installazione e configurazione del servizio Identity (Keystone)

 
Changed:
<
<

Installazione keystone

>
>

Installazione Keystone

 Server designato per l'installazione: hostname1.domain .
Changed:
<
<
  • Installare keystone tramite il gestore di pacchetti yum :
>
>
  • Installare Keystone tramite il gestore di pacchetti yum :
 
# yum install openstack-utils openstack-keystone python-keystoneclient
Line: 26 to 26
 

Configurazione keystone

Changed:
<
<
  • Rimuovere, se esiste, il file /var/lib/keystone/keystone.db (cioè il DB sqlite). Verrà utilizzato MySQL che permette a più keystone di utilizzare lo stesso DB e al DB stesso di essere replicato utilizzando le feature di MySQL.
>
>
  • Rimuovere, se esiste, il file /var/lib/keystone/keystone.db (cioè il DB sqlite). Verrà utilizzato MySQL che permette a più Keystone di utilizzare lo stesso DB e al DB stesso di essere replicato utilizzando le feature di MySQL.
 
 
  • Per creare il DB di keystone e l'utente keystone che ha completo accesso al DB stesso, digitare il comando:

Revision 62012-10-10 - MatteoManzali

Line: 1 to 1
 
META TOPICPARENT name="GestioneOpenstack"

Installing and Configuring the Identity Service (KEYSTONE)

Line: 14 to 14
 
# yum install mysql mysql-server MySQL-python
Changed:
<
<
  • Permettere che il servizio mysqld venga avviato di default al riavvio del server:
>
>
  • Permettere che il servizio mysqld venga avviato di default al riavvio del server ed avviare il servizio:
 
# chkconfig mysqld on
# service mysqld start
Line: 28 to 28
 

Configurazione keystone

  • Rimuovere, se esiste, il file /var/lib/keystone/keystone.db (cioè il DB sqlite). Verrà utilizzato MySQL che permette a più keystone di utilizzare lo stesso DB e al DB stesso di essere replicato utilizzando le feature di MySQL .
    
    
Changed:
<
<
  • Per inizializzare il DB di keystone, cioè creare il DB keystone e l'utente keystone che ha completo accesso al DB stesso, digitare il comando:
>
>
  • Per creare il DB di keystone e l'utente keystone che ha completo accesso al DB stesso, digitare il comando:
 
# openstack-db --init --service keystone
Changed:
<
<
  • Controllare in /etc/keystone/keystone.conf che esista (se necessario modificarla) una riga del tipo:
>
>
  • Controllare in /etc/keystone/keystone.conf che esista una riga del tipo:
 
connection = mysql://keystone:keystone@hostname1.domain/keystone
Changed:
<
<
Nota bene: in keystone:keystone il primo keystone è il nome utente, il secondo è la password. Utilizzando il comando openstack-db --init --service keystone per l'inizializzazione del DB keystone verranno utilizzati quei valori di default.
>
>
Nota bene: in keystone:keystone il primo keystone è il nome utente, il secondo è la password. Utilizzando il comando openstack-db --init --service keystone per l'inizializzazione del DB keystone verranno utilizzati quei valori di default.
 
 
  • Inizializzare il parametro admin_token contenuto all'interno del file /etc/keystone/keystone.conf , attraverso il comando:

Line: 46 to 46
 
  • Assicurarsi che il servizio sia attivo al boot ed avviarlo attraverso i seguenti comandi:
    # chkconfig openstack-keystone on
Changed:
<
<
# service openstack-keystone restart
>
>
# service openstack-keystone start
 
  • Infine inizializzare il DB keystone:

Line: 54 to 54
 


Changed:
<
<

Creazione di tenant, utente e ruolo per l'amministratore

>
>

Creazione di tenant, utente e ruolo per l'amministratore e del tenant per i servizi

 Per comodità in questa sezione si utilizzeranno delle variabili d'ambiente settate come segue:
# export ADMIN_TOKEN=<ADMIN_TOKEN_VALUE>
Line: 63 to 63
  Dove <ADMIN_TOKEN_VALUE> è il valore del parametro admin_token contenuto nel file /etc/keystone/keystone.conf .
Changed:
<
<

Creazione del tenant "Devel-Tenant"

Definizione di tenant: A container used to group or isolate resources and/or identity objects. Depending on the service operator, a tenant may map to a customer, account, organization, or project.
>
>

Creazione del tenant "adminTenant"

Definizione di tenant: Un tenant è un contenitore usato per raggruppare risorse o utenti.
 
  • Creare il tenant lanciando il comando:

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 tenant-create --name Devel-Tenant --description "Devel Tenant" --enabled true
>
>
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 tenant-create --name adminTenant --description "Admin Tenant" --enabled true
 +-------------+----------------------------------+
Property Value
+-------------+----------------------------------+
Changed:
<
<
description Devel Tenant
>
>
description Admin Tenant
 
enabled True
id c10d9c9f296b47f8a1212dd7a98357e0
Changed:
<
<
name Devel-Tenant
>
>
name adminTenant
 +-------------+----------------------------------+

Creazione dell'utente "adminUser"

Deleted:
<
<
USER: A digital representation of a person, system, or service who uses OpenStack cloud services. Identity authentication services will validate that incoming request are being made by the user who claims to be making the call. Users have a login and may be assigned tokens to access resources. Users may be directly assigned to a particular tenant and behave as if they are contained in that tenant.
 
  • Creare l'utente lanciando il seguente comando:

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-create --tenant_id $DEVEL_TENANT_ID --name adminUser --pass < ADMIN_PASSWORD > --enabled true
>
>
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-create --tenant_id --name adminUser --pass --enabled true
 +----------+-------------------------------------------------------------------------------------------------------------------------+
Property Value
+----------+-------------------------------------------------------------------------------------------------------------------------+
Line: 97 to 95
 
tenantId c10d9c9f296b47f8a1212dd7a98357e0
+----------+-------------------------------------------------------------------------------------------------------------------------+
Changed:
<
<
Dove <ADMIN_PASSWORD> è la password scelta per l'amministratore che si desidera creare.
>
>
Dove <ADMIN_TENANT_ID> è l'ID del tenant appena creato, mentre <ADMIN_PASSWORD> è la password scelta per l'utente "adminUser". Nel caso in esempio <ADMIN_TENANT_ID> equivale a c10d9c9f296b47f8a1212dd7a98357e0 .
 
Changed:
<
<

Creazione del ruolo admin

ROLE: A personality that a user assumes when performing a specific set of operations. A role includes a set of right and privileges. A user assuming that role inherits those rights and privileges. In the identity service, a token that is issued to a user includes the list of roles that user can assume. Services that are being called by that user determine how they interpret the set of roles a user has and which operations or resources each roles grants access to.
>
>

Creazione del ruolo "admin"

 
Changed:
<
<
  • Creare i ruoli lanciando i seguenti comandi:
>
>
  • Creare il ruolo lanciando il seguente comando:
 
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 role-create --name admin
Deleted:
<
<
 +----------+----------------------------------+
Property Value
+----------+----------------------------------+
Line: 113 to 109
 
name admin
+----------+----------------------------------+
Added:
>
>
  • Per comodità esportare l'id del ruolo "admin" (nelle istruzioni successive verrà utilizzato più volte):
    # export ADMIN_ROLE_ID=<ADMIN_ROLE_ID>
    
    Dove <ADMIN_ROLE_ID> è l'id del ruolo "admin", nel caso in esempio va scritto 6d67c71be79643e0bf497571510a6894 .
 

Assegnazione del ruolo "admin" all'utente "AdminUser"

  • Assegnare il ruolo tramite il seguente comando:

Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-role-add --user --tenant_id --role
>
>
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-role-add --user --tenant_id --role $ADMIN_ROLE_ID
 
Changed:
<
<
Dove <ADMIN_USER_ID> , <DEVEL_TENANT_ID> e <ADMIN_ROLE_ID> sono rispettivamente gli ID di user, tenant e ruolo appena creati. Nota bene: non viene visualizzato nulla se il comando ha successo.
>
>
Dove <ADMIN_USER_ID> e <ADMIN_TENANT_ID> sono rispettivamente gli ID di user e tenant appena creati. $ADMIN_ROLE_ID è invece l'id del ruolo "admin" esportato nell'istruzione precedente. Nota bene: non viene visualizzato nulla se il comando ha successo.
 
Changed:
<
<

Creazione di tenant, utente e ruolo per GLANCE

SONO ARRIVATO QUIIIII! This tenant contains all the services that we make known to the service catalog.
>
>

Creazione del tenant "service":

Questo tenant conterrà tutti gli utenti dei servizi che si desidera far conoscere al service catalog.
 
Added:
>
>
  • Creare il tenant lanciando il comando:
 
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 tenant-create --name service --description "Service Tenant" --enabled true
+-------------+----------------------------------+
Line: 139 to 138
 +-------------+----------------------------------+
Changed:
<
<

Create a Glance Service User in the Service Tenant.

You'll do this for any service you add to be in the Keystone service catalog.
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-create --tenant_id $SERVICE_TENANT_ID --name glance --pass $GLANCE_PASSW --enabled true
>
>

Creazione ed inserimento degli utenti associati ai servizi

Una volta creato il "Service Tenant", si andrà ad inserire al suo interno un utente per ogni servizio che si vuole aggiungere.
 
Added:
>
>
Per comodità è conveniente esportare come variabile d'ambiente l'id del tenant "service":
# export SERVICE_TENANT_ID=<SERVICE_TENANT_ID>
Dove <SERVICE_TENANT_ID> è l'id del tenant appena creato, nel caso in esempio va scritto edc5b7a35c644466849123cc937f9a04 .
 
Added:
>
>

Creazione ed inserimento dell'utente associato a Glance

  • Creare l'utente tramite il seguente comando:
    # keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-create --tenant_id $SERVICE_TENANT_ID --name glance --pass <GLANCE_PASSWORD> --enabled true
 +----------+-------------------------------------------------------------------------------------------------------------------------+
Property Value
+----------+-------------------------------------------------------------------------------------------------------------------------+
Line: 156 to 163
 
tenantId edc5b7a35c644466849123cc937f9a04
+----------+-------------------------------------------------------------------------------------------------------------------------+
Added:
>
>
Dove <GLANCE_PASSWORD> è la password che si desidera associare all'utente del servizio Glance.
 
Changed:
<
<

Grant the admin role to the glance user in the service tenant.

>
>
  • Assegnare il ruolo tramite il seguente comando:
 
Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-role-add --user $GLANCE_USER_ID --tenant_id $SERVICE_TENANT_ID --role $ADMIN_ROLE_ID
>
>
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-role-add --user --tenant_id $SERVICE_TENANT_ID --role $ADMIN_ROLE_ID
 
Added:
>
>
Dove <GLANCE_USER_ID> è l'id dello user appena creato, nel caso in esempio va scritto f085dd93f0ae42daa1a0623b9ec978f4 . Nota bene: non viene visualizzato nulla se il comando ha successo.
 
Changed:
<
<
There is no output to this command.

Create a Nova Service User in the Service Tenant.

>
>

Creazione ed inserimento dell'utente associato a Nova

  • Creare l'utente tramite il seguente comando:
 
Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-create --tenant_id $SERVICE_TENANT_ID --name nova --pass $NOVA_PASSW --enabled true
>
>
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-create --tenant_id $SERVICE_TENANT_ID --name nova --pass --enabled true
 +----------+-------------------------------------------------------------------------------------------------------------------------+
Property Value
+----------+-------------------------------------------------------------------------------------------------------------------------+
Line: 180 to 187
 
tenantId edc5b7a35c644466849123cc937f9a04
+----------+-------------------------------------------------------------------------------------------------------------------------+
Added:
>
>
Dove <NOVA_PASSWORD> è la password che si desidera associare all'utente del servizio Nova.
 
Changed:
<
<

Grant the admin role to the nova user in the service tenant.

>
>
  • Assegnare il ruolo tramite il seguente comando:
 
Changed:
<
<
keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-role-add --user $NOVA_USER_ID --tenant_id $SERVICE_TENANT_ID --role $ADMIN_ROLE_ID
>
>
keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-role-add --user --tenant_id $SERVICE_TENANT_ID --role $ADMIN_ROLE_ID
 
Changed:
<
<
There is no output to this command.

Create an EC2 Service User in the Service Tenant.

saltato

Grant the admin role to the ec2 user in the service tenant.

saltato
>
>
Dove <NOVA_USER_ID> è l'id dello user appena creato, nel caso in esempio va scritto 6916a161eb55476a8b2615dae7d00f27 . Nota bene: non viene visualizzato nulla se il comando ha successo.
 
Changed:
<
<

Create an Object Storage Service User in the Service Tenant.

saltato
>
>

Creazione ed inserimento dell'utente associato a EC2

  • Creare l'utente tramite il seguente comando:
    # keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-create --tenant_id $SERVICE_TENANT_ID --name ec2 --pass <EC2_PASSWORD> --enabled true
    +----------+-------------------------------------------------------------------------------------------------------------------------+
    | Property |                                                          Value                                                          |
    +----------+-------------------------------------------------------------------------------------------------------------------------+
    | email    | None                                                                                                                    |
    | enabled  | True                                                                                                                    |
    | id       | de4ca5902e6f47ffa3e00a37bff6364c                                                                                        |
    | name     | ec2                                                                                                                     |
    | password | $6$rounds=40000$Fi6fO6FbiWQH./Sg$ICF/qEdojYNNCSGQlicUAoFMntUREVz96DPPM4bOHsRBAB0t6vIOEDxSUh3q0IJXFGeH0YASNgmmVIU6CRklw. |
    | tenantId | edc5b7a35c644466849123cc937f9a04                                                                                        |
    +----------+-------------------------------------------------------------------------------------------------------------------------+
    
    Dove <EC2_PASSWORD> è la password che si desidera associare all'utente del servizio EC2.
 
Changed:
<
<

Grant the admin role to the swift user in the service tenant.

saltato
>
>
  • Assegnare il ruolo tramite il seguente comando:
    keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-role-add --user <EC2_USER_ID> --tenant_id  $SERVICE_TENANT_ID --role $ADMIN_ROLE_ID
    
    Dove <EC2_USER_ID> è l'id dello user appena creato, nel caso in esempio va scritto de4ca5902e6f47ffa3e00a37bff6364c . Nota bene: non viene visualizzato nulla se il comando ha successo.
 
Added:
>
>

Creazione ed inserimento dell'utente associato a Swift

  • Creare l'utente tramite il seguente comando:
    # keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-create --tenant_id $SERVICE_TENANT_ID --name swift --pass <SWIFT_PASSWORD> --enabled true
    +----------+-------------------------------------------------------------------------------------------------------------------------+
    | Property |                                                          Value                                                          |
    +----------+-------------------------------------------------------------------------------------------------------------------------+
    | email    | None                                                                                                                    |
    | enabled  | True                                                                                                                    |
    | id       | e79e37013e944d89b1430e31dae316fa                                                                                        |
    | name     | swift                                                                                                                   |
    | password | $6$rounds=40000$Fi6fO6FbiWQH./Sg$ICF/qEdojYNNCSGQlicUAoFMntUREVz96DPPM4bOHsRBAB0t6vIOEDxSUh3q0IJXFGeH0YASNgmmVIU6CRklw. |
    | tenantId | edc5b7a35c644466849123cc937f9a04                                                                                        |
    +----------+-------------------------------------------------------------------------------------------------------------------------+
    
    Dove <SWIFT_PASSWORD> è la password che si desidera associare all'utente del servizio Swift.
 
Changed:
<
<

Enable Keystone

Riguarda S3, comunque il file /etc/keystone/keystone.conf è stato modificato seguendo la guida.
>
>
  • Assegnare il ruolo tramite il seguente comando:
    keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-role-add --user <SWIFT_USER_ID> --tenant_id  $SERVICE_TENANT_ID --role $ADMIN_ROLE_ID
    
    Dove <SWIFT_USER_ID> è l'id dello user appena creato, nel caso in esempio va scritto e79e37013e944d89b1430e31dae316fa . Nota bene: non viene visualizzato nulla se il comando ha successo.
 
Changed:
<
<

Defining services

Keystone also acts as a service catalog to let other OpenStack systems know where relevant API endpoints exist for OpenStack Services. The OpenStack Dashboard, in particular, uses the service catalog heavily - and this must be configured for the OpenStack Dashboard to properly function.
>
>

Definizione dei servizi

Keystone agisce anche come catalogo dei servizi per permettere alle altre componenti OpenStack di conoscere quali sono gli endpoint dei vari servizi OpenStack.
 
Changed:
<
<
Il file /etc/keystone/keystone.conf deve contenere la seguente riga
>
>
  • Verificare che il file /etc/keystone/keystone.conf contenga la seguente riga:
 
[catalog]
driver = keystone.catalog.backends.sql.Catalog
Changed:
<
<

Creating keystone services and service endpoints

Define the Identity service

>
>

Definizione del servizio identity (Keystone)

  • Creare il servizio "keystone":
 
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 service-create --name=keystone --type=identity --description="Keystone Identity Service"
Deleted:
<
<
 +-------------+----------------------------------+
Property Value
+-------------+----------------------------------+
Line: 225 to 266
 
name keystone
type identity
+-------------+----------------------------------+
Added:
>
>
 
Changed:
<
<

# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 endpoint-create --region RegionOne --service_id=$KEYSTONE_SERVICE_ID --publicurl=$KEYSTONE5000 --internalurl=$KEYSTONE5000 --adminurl=$KEYSTONE35357

+-------------+-----------------------------------+

>
>
  • Creare l'endpoint per il servizio "keystone":
    # keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 endpoint-create --region RegionOne --service_id=<KEYSTONE_SERVICE_ID> --publicurl=$KEYSTONE5000 --internalurl=$KEYSTONE5000 --adminurl=$KEYSTONE35357
    +-------------+------------------------------------+
 
Property Value
Changed:
<
<
+-------------+-----------------------------------+
adminurl http://131.154.101.242:35357/v2.0
>
>
+-------------+------------------------------------+
adminurl http://hostname1.domain:35357/v2.0
 
id e63155b607e1433f9ae8c66bc87c8ebf
Changed:
<
<
internalurl http://131.154.101.242:5000/v2.0
publicurl http://131.154.101.242:5000/v2.0
>
>
internalurl http://hostname1.domain:5000/v2.0
publicurl http://hostname1.domain:5000/v2.0
 
region RegionOne
service_id cfda291164a2416f99ddffc137ba14f9
Changed:
<
<
+-------------+-----------------------------------+
>
>
+-------------+------------------------------------+
 
Added:
>
>
Dove <KEYSTONE_SERVICE_ID> è l'id del servizio appena creato, nel caso in esempio va scritto cfda291164a2416f99ddffc137ba14f9 .
 
Added:
>
>

Definizione del servizio compute (Nova)

Il servizio compute richiede un endpoint specifico per ogni tenant. La stringa %(tenant_id)s ed i singoli apici che racchiudono i valori di publicurl, internalurl e adminurl devono essere digitati esattamente come mostrato sia per l'endpoint compute che per l'endpoint volume e l'endpoint object storage (paragrafi successivi).
 
Changed:
<
<

Define the Compute service

It requires a separate endpoint for each tenant. Here we use the service tenant from the previous section. The %(tenant_id)s and single quotes around the publicurl, internalurl, and adminurl must be typed exactly as shown for both the Compute endpoint and the Volume endpoint.
>
>
  • Creare il servizio "nova":
 
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 service-create --name=nova --type=compute --description="Nova Compute Service"
Deleted:
<
<
 +-------------+----------------------------------+
Property Value
+-------------+----------------------------------+
Line: 257 to 298
 
name nova
type compute
+-------------+----------------------------------+
Changed:
<
<
keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 endpoint-create --region RegionOne --service_id=$NOVA_COMPUTE_SERVICE_ID --publicurl='http://131.154.101.242:8774/v2/%(tenant_id)s' --internalurl='http://131.154.101.242:8774/v2/%(tenant_id)s' --adminurl='http://131.154.101.242:8774/v2/%(tenant_id)s'

+-------------+----------------------------------------------+

>
>
  • Creare l'endpoint per il servizio "nova":
    # keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 endpoint-create --region RegionOne --service_id=<NOVA_COMPUTE_SERVICE_ID> --publicurl='http://hostname1.domain:8774/v2/%(tenant_id)s'  --internalurl='http://hostname1.domain:8774/v2/%(tenant_id)s' --adminurl='http://hostname1.domain:8774/v2/%(tenant_id)s'
    +-------------+-----------------------------------------------+
 
Property Value
Changed:
<
<
+-------------+----------------------------------------------+
adminurl http://131.154.101.242:8774/v2/%(tenant_id)s
>
>
+-------------+-----------------------------------------------+
adminurl http://hostname1.domain:8774/v2/%(tenant_id)s
 
id ef8874ac56b34b538536b053591d440e
Changed:
<
<
internalurl http://131.154.101.242:8774/v2/%(tenant_id)s
publicurl http://131.154.101.242:8774/v2/%(tenant_id)s
>
>
internalurl http://hostname1.domain:8774/v2/%(tenant_id)s
publicurl http://hostname1.domain:8774/v2/%(tenant_id)s
 
region RegionOne
service_id 83486ca8422c4cb0aa4be1a231556ee3
Changed:
<
<
+-------------+----------------------------------------------+
>
>
+-------------+-----------------------------------------------+
 
Added:
>
>
Dove <NOVA_COMPUTE_SERVICE_ID> è l'id del servizio appena creato, nel caso in esempio va scritto 83486ca8422c4cb0aa4be1a231556ee3 .
 
Added:
>
>

Definizione del servizio volume (Volume)

Il servizio volume richiede un endpoint specifico per ogni tenant.
 
Changed:
<
<

Define the Volume service

saltato It also requires a separate endpoint for each tenant.
>
>
  • Creare il servizio "volume":
    # keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 service-create --name=volume --type=volume --description="Nova Volume Service"
    +-------------+----------------------------------+
    |   Property  |              Value               |
    +-------------+----------------------------------+
    | description | Nova Volume Service              |
    | id          | 475701d5fb534be291d0f09f4ce39e40 |
    | name        | volume                           |
    | type        | volume                           |
    +-------------+----------------------------------+
    
  • Creare l'endpoint per il servizio "volume":
    # keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 endpoint-create --region RegionOne --service_id=<NOVA_VOLUME_SERVICE_ID> --publicurl='http://hostname1.domain:8776/v1/%(tenant_id)s'  --internalurl='http://hostname1.domain:8776/v1/%(tenant_id)s' --adminurl='http://hostname1.domain:8776/v1/%(tenant_id)s'
    +-------------+-----------------------------------------------+
    |   Property  |                    Value                      |
    +-------------+-----------------------------------------------+
    | adminurl    | http://hostname1.domain:8776/v1/%(tenant_id)s |
    | id          | 935fd37b6fa74b2f9fba6d907fa95825              |
    | internalurl | http://hostname1.domain:8776/v1/%(tenant_id)s |
    | publicurl   | http://hostname1.domain:8776/v1/%(tenant_id)s |
    | region      | RegionOne                                     |
    | service_id  | 475701d5fb534be291d0f09f4ce39e40              |
    +-------------+-----------------------------------------------+
    
    Dove <NOVA_VOLUME_SERVICE_ID> è l'id del servizio appena creato, nel caso in esempio va scritto 475701d5fb534be291d0f09f4ce39e40 .
 
Changed:
<
<

Define the Image service

>
>

Definizione del servizio image (Glance)

  • Creare il servizio "glance":
 
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 service-create --name=glance --type=image --description="Glance Image Service"
Deleted:
<
<
 +-------------+----------------------------------+
Property Value
+-------------+----------------------------------+
Line: 285 to 354
 
Property Value
+-------------+----------------------------------+
description Glance Image Service
Changed:
<
<
id 4ebfd4612e8145d188140dcbd62bcaff
>
>
id 97e15631bb8a4b2f8b41efd1ad3d53eb
 
name glance
type image
+-------------+----------------------------------+
Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 endpoint-create --region RegionOne --service_id=$GLANCE_SERVICE_ID --publicurl=http://131.154.101.242:9292/v1 --internalurl=http://131.154.101.242:9292/v1 --adminurl=http://131.154.101.242:9292/v1
>
>
  • Creare l'endpoint per il servizio "glance":
    # keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 endpoint-create --region RegionOne --service_id=<GLANCE_IMAGE_SERVICE_ID> --publicurl=http://hostname1.domain:9292/v1  --internalurl=http://hostname1.domain:9292/v1 --adminurl=http://hostname1.domain:9292/v1
 +-------------+----------------------------------+
Property Value
+-------------+----------------------------------+
Changed:
<
<
adminurl http://131.154.101.242:9292/v1
id 044f6be2f3224b3f96283bb26dcc0949
internalurl http://131.154.101.242:9292/v1
publicurl http://131.154.101.242:9292/v1
>
>
adminurl http://hostname1.domain:9292/v1
id 1ff4ece13c3e48d8a6461faebd9cd38f
internalurl http://hostname1.domain:9292/v1
publicurl http://hostname1.domain:9292/v1
 
region RegionOne
Changed:
<
<
service_id 4ebfd4612e8145d188140dcbd62bcaff
>
>
service_id 97e15631bb8a4b2f8b41efd1ad3d53eb
 +-------------+----------------------------------+
Added:
>
>
Dove <GLANCE_IMAGE_SERVICE_ID> è l'id del servizio appena creato, nel caso in esempio va scritto 97e15631bb8a4b2f8b41efd1ad3d53eb .
 
Changed:
<
<

Define the EC2 compatibility service

saltato
>
>

Definizione del servizio compatibility (EC2)

  • Creare il servizio "ec2":
    # keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 service-create --name=ec2 --type=ec2 --description="EC2 Compatibility Service"
    +-------------+----------------------------------+
    |   Property  |              Value               |
    +-------------+----------------------------------+
    | description | EC2 Compatibility Service        |
    | id          | 26040267bd2744348f52785f8d806123 |
    | name        | ec2                              |
    | type        | ec2                              |
    +-------------+----------------------------------+
    
  • Creare l'endpoint per il servizio "ec2":
    # keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 endpoint-create --region RegionOne --service_id=<EC2_COMPATIBILITY_SERVICE_ID> --publicurl=http://hostname1.domain:8773/services/Cloud  --internalurl=http://hostname1.domain:8773/services/Cloud --adminurl=http://hostname1.domain:8773/services/Cloud
    +-------------+---------------------------------------------+
    |   Property  |                    Value                    |
    +-------------+---------------------------------------------+
    | adminurl    | http://hostname1.domain:8773/services/Cloud |
    | id          | 3c8c0d749f21490b90163bfaed9befe7            |
    | internalurl | http://hostname1.domain:8773/services/Cloud |
    | publicurl   | http://hostname1.domain:8773/services/Cloud |
    | region      | RegionOne                                   |
    | service_id  | 26040267bd2744348f52785f8d806123            |
    +-------------+---------------------------------------------+
    
    Dove <EC2_COMPATIBILITY_SERVICE_ID> è l'id del servizio appena creato, nel caso in esempio va scritto 26040267bd2744348f52785f8d806123 .
 
Changed:
<
<

Define the Object Storage service

saltato
>
>

Definizione del servizio object storage (Swift)

Il servizio object storage richiede un endpoint specifico per ogni tenant.
 
Added:
>
>
  • Creare il servizio "swift":
    # keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 service-create --name=swift --type=object-store --description="Object Storage Service"
    +-------------+----------------------------------+
    |   Property  |              Value               |
    +-------------+----------------------------------+
    | description | Object Storage Service           |
    | id          | 648da339ec2549fcae0331b96929dd82 |
    | name        | swift                            |
    | type        | object-store                     |
    +-------------+----------------------------------+
    
  • Creare l'endpoint per il servizio "swift":
    # keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 endpoint-create --region RegionOne --service_id=<OBJECT_STORAGE_SERVICE_ID> --publicurl='http://hostname1.domain:8888/v1/AUTH_%(tenant_id)s  --internalurl='http://hostname1.domain:8888/v1/AUTH_%(tenant_id)s' --adminurl='http://hostname1.domain:8888/v1/AUTH_%(tenant_id)s'
    +-------------+----------------------------------------------------+
    |   Property  |                    Value                           |
    +-------------+----------------------------------------------------+
    | adminurl    | http://hostname1.domain:8888/v1/AUTH_%(tenant_id)s |
    | id          | d2a3d7490c61442f9b2c8c8a2083c4b6                   |
    | internalurl | http://hostname1.domain:8888/v1/AUTH_%(tenant_id)s |
    | publicurl   | http://hostname1.domain:8888/v1/AUTH_%(tenant_id)s |
    | region      | RegionOne                                          |
    | service_id  | 648da339ec2549fcae0331b96929dd82                   |
    +-------------+----------------------------------------------------+
    
    Dove <OBJECT_STORAGE_SERVICE_ID> è l'id del servizio appena creato, nel caso in esempio va scritto 648da339ec2549fcae0331b96929dd82 .
 
Changed:
<
<

Troubleshooting

>
>

Troubleshooting

  • Per le principali operazioni di troubleshooting riferirsi alla guida.
 
Added:
>
>
  • Installare curl tramite il gestore di pacchetti yum e lanciare il seguente comando per listare le informazioni inserite in Keystone:
 
Changed:
<
<
yum install curl openssl

curl -d '{"auth": {"tenantName": "adminTenant", "passwordCredentials": {"username": "adminUser", "password": "********"}}}' -H "Content-type:application/json" http://131.154.101.242:35357/v2.0/tokens | python -mjson.tool

>
>
# yum install curl # curl -d '{"auth": {"tenantName": "adminTenant", "passwordCredentials":{"username": "adminUser", "password": "************"}}}' -H "Content-type:application/json" http://hostname1.domain:35357/v2.0/tokens | python -mjson.tool
  % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed
Changed:
<
<
183 252 126 252 0 114 4021 1819 --:--:-- --:--:-- --:--:-- 2225
>
>
106 2446 101 2446 0 120 27990 1373 --:--:-- --:--:-- --:--:-- 27046
 { "access": {
Changed:
<
<
"serviceCatalog": {},
>
>
"serviceCatalog": [ { "endpoints": [ {
"adminURL"
"http://hostname1.domain:8774/v2/c8854bd3d15f4f479476d0cf58ef7db2",
"internalURL"
"http://hostname1.domain:8774/v2/c8854bd3d15f4f479476d0cf58ef7db2",
"publicURL"
"http://hostname1.domain:8774/v2/c8854bd3d15f4f479476d0cf58ef7db2",
"region"
"RegionOne" } ], "endpoints_links": [], "name": "nova", "type": "compute" }, { "endpoints": [ {
"adminURL"
"http://hostname1.domain:9292/v1/",
"internalURL"
"http://hostname1.domain:9292/v1/",
"publicURL"
"http://hostname1.domain:9292/v1/",
"region"
"RegionOne" } ], "endpoints_links": [], "name": "glance", "type": "image" }, { "endpoints": [ {
"adminURL"
"http://hostname1.domain:8776/v1/c8854bd3d15f4f479476d0cf58ef7db2",
"internalURL"
"http://hostname1.domain:8776/v1/c8854bd3d15f4f479476d0cf58ef7db2",
"publicURL"
"http://hostname1.domain:8776/v1/c8854bd3d15f4f479476d0cf58ef7db2",
"region"
"RegionOne" } ], "endpoints_links": [], "name": "volume", "type": "volume" }, { "endpoints": [ {
"adminURL"
"http://hostname1.domain:8773/services/Admin",
"internalURL"
"http://hostname1.domain:8773/services/Cloud",
"publicURL"
"http://hostname1.domain:8773/services/Cloud",
"region"
"RegionOne" } ], "endpoints_links": [], "name": "ec2", "type": "ec2" }, { "endpoints": [ {
"adminURL"
"http://hostname1.domain:8888/v1/AUTH_c8854bd3d15f4f479476d0cf58ef7db2",
"internalURL"
"http://hostname1.domain:8888/v1/AUTH_c8854bd3d15f4f479476d0cf58ef7db2",
"publicURL"
"http://hostname1.domain:8888/v1/AUTH_c8854bd3d15f4f479476d0cf58ef7db2",
"region"
"RegionOne" } ], "endpoints_links": [], "name": "swift", "type": "object-store" }, { "endpoints": [ {
"adminURL"
"http://hostname1.domain:35357/v2.0/",
"internalURL"
"http://hostname1.domain:5000/v2.0/",
"publicURL"
"http://hostname1.domain:5000/v2.0/",
"region"
"RegionOne" } ], "endpoints_links": [], "name": "keystone", "type": "identity" } ],
  "token": {
Changed:
<
<
"expires"
"2012-08-30T12:22:54Z",
"id"
"927b3fb9806f494386c8c1e5af62ad21"
>
>
"expires"
"2012-10-11T09:49:27Z",
"id"
"1d9c15ed60414a92bc39d3b989d5bcae",
"tenant"
{ "description": "Admin Tenant Description", "enabled": true, "id": "c8854bd3d15f4f479476d0cf58ef7db2", "name": "adminTenant" }
  }, "user": {
Changed:
<
<
"id"
"b0305faa3ace4671bc0399e71a0a1cc1",
>
>
"id"
"4b6da6bfa3634c819fc1abc022e88a22",
 
"name"
"adminUser",
Changed:
<
<
"roles"
[],
>
>
"roles"
[ { "id": "ad6dc79aa39c4249ab63840f9591f99d", "name": "admin" } ],
 
"roles_links"
[],
"username"
"adminUser" } }
}
Changed:
<
<

keystone user-list

# keystone user-list
+----------------------------------+---------+-------+-----------+
|                id                | enabled | email |    name   |
+----------------------------------+---------+-------+-----------+
| 6916a161eb55476a8b2615dae7d00f27 | True    | None  | nova      |
| b0305faa3ace4671bc0399e71a0a1cc1 | True    | None  | adminUser |
| f085dd93f0ae42daa1a0623b9ec978f4 | True    | None  | glance    |
+----------------------------------+---------+-------+-----------+

keystone service-list

# keystone  service-list
+----------------------------------+----------+----------+---------------------------+
|                id                |   name   |   type   |        description        |
+----------------------------------+----------+----------+---------------------------+
| 83486ca8422c4cb0aa4be1a231556ee3 | nova     | compute  | Nova Compute Service      |
| cfda291164a2416f99ddffc137ba14f9 | keystone | identity | Keystone Identity Service |
+----------------------------------+----------+----------+---------------------------+

keystone endpoint-list

# keystone   endpoint-list
+----------------------------------+-----------+----------------------------------------------+----------------------------------------------+----------------------------------------------+
|                id                |   region  |                  publicurl                   |                 internalurl                  |                   adminurl                   |
+----------------------------------+-----------+----------------------------------------------+----------------------------------------------+----------------------------------------------+
| e63155b607e1433f9ae8c66bc87c8ebf | RegionOne | http://131.154.101.242:5000/v2.0             | http://131.154.101.242:5000/v2.0             | http://131.154.101.242:35357/v2.0            |
| ef8874ac56b34b538536b053591d440e | RegionOne | http://131.154.101.242:8774/v2/%(tenant_id)s | http://131.154.101.242:8774/v2/%(tenant_id)s | http://131.154.101.242:8774/v2/%(tenant_id)s |
+----------------------------------+-----------+----------------------------------------------+----------------------------------------------+----------------------------------------------+

>
>
</verbatim
 
Changed:
<
<
-- PaoloVeronesi - 2012-08-30
>
>
-- MatteoManzali - 2012-10-10

Revision 52012-10-09 - MatteoManzali

Line: 1 to 1
 
META TOPICPARENT name="GestioneOpenstack"

Installing and Configuring the Identity Service (KEYSTONE)

Line: 25 to 25
 


Changed:
<
<

Configurazione keystone

>
>

Configurazione keystone

 
  • Rimuovere, se esiste, il file /var/lib/keystone/keystone.db (cioè il DB sqlite). Verrà utilizzato MySQL che permette a più keystone di utilizzare lo stesso DB e al DB stesso di essere replicato utilizzando le feature di MySQL .
    
    
  • Per inizializzare il DB di keystone, cioè creare il DB keystone e l'utente keystone che ha completo accesso al DB stesso, digitare il comando:
Line: 53 to 53
 # keystone-manage db_sync
Changed:
<
<

Setup iniziale

Creare il file .keystonerc con le seguenti variabili:
>
>

Creazione di tenant, utente e ruolo per l'amministratore

Per comodità in questa sezione si utilizzeranno delle variabili d'ambiente settate come segue:
 
Changed:
<
<
export ADMIN_TOKEN= XXXXXXXXXXXXXX export OS_USERNAME=adminUser export OS_PASSWORD=XXXXXXXXXXXXXX export OS_TENANT_NAME=Devel-Tenant export OS_AUTH_URL=http://stack-01.cnaf.infn.it:5000/v2.0/
>
>
# export ADMIN_TOKEN= # export KEYSTONE35357=http://hostname1.domain:35357/v2.0 # export KEYSTONE5000=http://hostname1.domain:5000/v2.0
 
Changed:
<
<
e farne il source con . .keystonerc
>
>
Dove <ADMIN_TOKEN_VALUE> è il valore del parametro admin_token contenuto nel file /etc/keystone/keystone.conf .
 
Changed:
<
<

Creazione del tenant

TENANT: A container used to group or isolate resources and/or identity objects. Depending on the service operator, a tenant may map to a customer, account, organization, or project.
>
>

Creazione del tenant "Devel-Tenant"

Definizione di tenant: A container used to group or isolate resources and/or identity objects. Depending on the service operator, a tenant may map to a customer, account, organization, or project.
 
Added:
>
>
  • Creare il tenant lanciando il comando:
 
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 tenant-create --name Devel-Tenant --description "Devel Tenant" --enabled true
+-------------+----------------------------------+
Line: 82 to 82
 

Creazione dell'utente "adminUser"

USER: A digital representation of a person, system, or service who uses OpenStack cloud services. Identity authentication services will validate that incoming request are being made by the user who claims to be making the call. Users have a login and may be assigned tokens to access resources. Users may be directly assigned to a particular tenant and behave as if they are contained in that tenant.
Added:
>
>
  • Creare l'utente lanciando il seguente comando:
 
Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-create --tenant_id $DEVEL_TENANT_ID --name $OS_USERNAME --pass $OS_PASSWORD --enabled true
>
>
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-create --tenant_id $DEVEL_TENANT_ID --name adminUser --pass < ADMIN_PASSWORD > --enabled true
  +----------+-------------------------------------------------------------------------------------------------------------------------+
Property Value
Line: 96 to 97
 
tenantId c10d9c9f296b47f8a1212dd7a98357e0
+----------+-------------------------------------------------------------------------------------------------------------------------+
Added:
>
>
Dove <ADMIN_PASSWORD> è la password scelta per l'amministratore che si desidera creare.
 
Changed:
<
<

Creazione del ruolo "admin" e "memberRole"

>
>

Creazione del ruolo admin

 ROLE: A personality that a user assumes when performing a specific set of operations. A role includes a set of right and privileges. A user assuming that role inherits those rights and privileges. In the identity service, a token that is issued to a user includes the list of roles that user can assume. Services that are being called by that user determine how they interpret the set of roles a user has and which operations or resources each roles grants access to.
Added:
>
>
  • Creare i ruoli lanciando i seguenti comandi:
 
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 role-create --name admin
Line: 109 to 112
 
id 6d67c71be79643e0bf497571510a6894
name admin
+----------+----------------------------------+
Deleted:
<
<

# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 role-create --name memberRole +----------+----------------------------------+

Property Value
+----------+----------------------------------+
id ee2b7e07f35d4927a0f60b54c55fd1a4
name memberRole
+----------+----------------------------------+
 
Changed:
<
<

Assegnazione del ruolo "admin" all'utente "AdminUser"

>
>

Assegnazione del ruolo "admin" all'utente "AdminUser"

  • Assegnare il ruolo tramite il seguente comando:
 
Changed:
<
<
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-role-add --user $ADMIN_USER_ID --tenant_id $DEVEL_TENANT_ID --role $ADMIN_ROLE_ID
>
>
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-role-add --user --tenant_id --role
 
Changed:
<
<
Non viene visualizzato nulla se ha successo il comando
>
>
Dove <ADMIN_USER_ID> , <DEVEL_TENANT_ID> e <ADMIN_ROLE_ID> sono rispettivamente gli ID di user, tenant e ruolo appena creati. Nota bene: non viene visualizzato nulla se il comando ha successo.
 
Changed:
<
<

Create a Service Tenant.

>
>

Creazione di tenant, utente e ruolo per GLANCE

SONO ARRIVATO QUIIIII!
 This tenant contains all the services that we make known to the service catalog.

Revision 42012-10-09 - MatteoManzali

Line: 1 to 1
 
META TOPICPARENT name="GestioneOpenstack"

Installing and Configuring the Identity Service (KEYSTONE)

Line: 30 to 30
 
 
  • Per inizializzare il DB di keystone, cioè creare il DB keystone e l'utente keystone che ha completo accesso al DB stesso, digitare il comando:

Changed:
<
<
openstack-db --init --service keystone
>
>
# openstack-db --init --service keystone
 
  • Controllare in /etc/keystone/keystone.conf che esista (se necessario modificarla) una riga del tipo:
    connection = mysql://keystone:keystone@hostname1.domain/keystone
    
    Nota bene: in keystone:keystone il primo keystone è il nome utente, il secondo è la password. Utilizzando il comando openstack-db --init --service keystone per l'inizializzazione del DB keystone verranno utilizzati quei valori di default.
Changed:
<
<

Se si e' settata una password diversa di keystone da quella presente in questa linea ricordarsi di modificarla anche qui.

  • in /etc/keystone/keystone.conf
admin_token = XXXXXXXXXX
va modificato inserendo una stringa casuale ottenuta, per esempio utilizzando il comando:
>
>
 
  • Inizializzare il parametro admin_token contenuto all'interno del file /etc/keystone/keystone.conf , attraverso il comando:
 
Changed:
<
<
# export ADMIN_TOKEN=$(openssl rand -hex 10)
>
>
# openstack-config --set /etc/keystone/keystone.conf DEFAULT admin_token $(openssl rand -hex 10)
 
Changed:
<
<
la stringa cosi' ottenuta puo' essere inserita a mano nel file di configurazione o usando il comando:
>
>
 
  • Assicurarsi che il servizio sia attivo al boot ed avviarlo attraverso i seguenti comandi:
 
Changed:
<
<
# openstack-config --set /etc/keystone/keystone.conf DEFAULT admin_token $ADMIN_TOKEN
>
>
# chkconfig openstack-keystone on # service openstack-keystone restart
 
Changed:
<
<
  • assicurarsi che il servizio sia attivo al boot ed avviarlo se stoppato
>
>
  • Infine inizializzare il DB keystone:
 
Changed:
<
<
chkconfig openstack-keystone on service openstack-keystone restart
>
>
# keystone-manage db_sync
 
Deleted:
<
<
  • sincronizzare la configurazione keystone-manage db_sync
 

Setup iniziale

Creare il file .keystonerc con le seguenti variabili:

Revision 32012-10-09 - MatteoManzali

Line: 1 to 1
 
META TOPICPARENT name="GestioneOpenstack"

Installing and Configuring the Identity Service (KEYSTONE)

Line: 6 to 6
 

Installazione keystone

Server designato per l'installazione: hostname1.domain .
Changed:
<
<
Installare keystone tramite il gestore di pacchetti yum :
>
>
  • Installare keystone tramite il gestore di pacchetti yum :
 
# yum install openstack-utils openstack-keystone python-keystoneclient
Changed:
<
<
Installare il server mysql:
>
>
  • Installare il server mysql:
 
# yum install mysql mysql-server MySQL-python
Changed:
<
<
Permettere che il servizio mysqld venga avviato di default al riavvio del server:
>
>
  • Permettere che il servizio mysqld venga avviato di default al riavvio del server:
 
# chkconfig mysqld on
# service mysqld start
Changed:
<
<
Inserire la password di root :
>
>
  • Inserire la password di root :
 
# mysqladmin -u root password *******
Line: 28 to 28
 

Configurazione keystone

  • Rimuovere, se esiste, il file /var/lib/keystone/keystone.db (cioè il DB sqlite). Verrà utilizzato MySQL che permette a più keystone di utilizzare lo stesso DB e al DB stesso di essere replicato utilizzando le feature di MySQL .
    
    
Changed:
<
<
  • Per inizializzare il db di keystone, cioè creare il db keystone e l'utente keystone che ha completo accesso al db stesso, digitare il comando:
>
>
  • Per inizializzare il DB di keystone, cioè creare il DB keystone e l'utente keystone che ha completo accesso al DB stesso, digitare il comando:
 
openstack-db --init --service keystone
  • Controllare in /etc/keystone/keystone.conf che esista (se necessario modificarla) una riga del tipo:

Changed:
<
<
connection = mysql://keystone:@hostname1.domain/keystone
>
>
connection = mysql://keystone:keystone@hostname1.domain/keystone
 
Changed:
<
<
Dove <YOUR_KEYSTONEDB_PASSWORD> va sostituito con la password scelta per l'utente keystone.
>
>
Nota bene: in keystone:keystone il primo keystone è il nome utente, il secondo è la password. Utilizzando il comando openstack-db --init --service keystone per l'inizializzazione del DB keystone verranno utilizzati quei valori di default.
 

Revision 22012-10-09 - MatteoManzali

Line: 1 to 1
 
META TOPICPARENT name="GestioneOpenstack"

Installing and Configuring the Identity Service (KEYSTONE)

Added:
>
>

 

Installazione keystone

Changed:
<
<
  • keystone: yum install openstack-utils openstack-keystone python-keystoneclient
  • mysql server: yum install mysql mysql-server MySQL-python
>
>
Server designato per l'installazione: hostname1.domain .
 
Added:
>
>
Installare keystone tramite il gestore di pacchetti yum :
 
Changed:
<
<
chkconfig mysqld on service mysqld start mysqladmin -u root password *****
>
>
# yum install openstack-utils openstack-keystone python-keystoneclient Installare il server mysql:
# yum install mysql mysql-server MySQL-python
Permettere che il servizio mysqld venga avviato di default al riavvio del server:
# chkconfig mysqld on
# service mysqld start
Inserire la password di root :
# mysqladmin -u root password *******
 
Added:
>
>

 

Configurazione keystone

Changed:
<
<
  • se esiste rimuovere /var/lib/keystone/keystone.db che e' il DB sqlite. Noi useremo MySQL che perche' permette a piu' keystone di utilizzare lo stesso DB e al DB stesso di essere replicato utilizzando le feature di MySQL
  • per inizializzare il db di keystone openstack-db --init --service keystone viene creato il db keystone e l'utente keystone che ha completo accesso al db stesso.
  • controllare in /etc/keystone/keystone.conf che ci sia una riga di questo tipo che faccia riferimento a MySQL e non a sqlite. In caso modificarla in maniera opportuna:
>
>
  • Rimuovere, se esiste, il file /var/lib/keystone/keystone.db (cioè il DB sqlite). Verrà utilizzato MySQL che permette a più keystone di utilizzare lo stesso DB e al DB stesso di essere replicato utilizzando le feature di MySQL .
    
    
  • Per inizializzare il db di keystone, cioè creare il db keystone e l'utente keystone che ha completo accesso al db stesso, digitare il comando:
    openstack-db --init --service keystone
    
  • Controllare in /etc/keystone/keystone.conf che esista (se necessario modificarla) una riga del tipo:
 
Changed:
<
<
connection = mysql://keystone:keystone@stack-01.cnaf.infn.it/keystone
>
>
connection = mysql://keystone:@hostname1.domain/keystone
 
Changed:
<
<
se si e' settata una password diversa di keystone da quella presente in questa linea ricordarsi di modificarla anche qui.
>
>
Dove <YOUR_KEYSTONEDB_PASSWORD> va sostituito con la password scelta per l'utente keystone.

Se si e' settata una password diversa di keystone da quella presente in questa linea ricordarsi di modificarla anche qui.

 
  • in /etc/keystone/keystone.conf
admin_token = XXXXXXXXXX

Revision 12012-08-30 - PaoloVeronesi

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="GestioneOpenstack"

Installing and Configuring the Identity Service (KEYSTONE)

Installazione keystone

  • keystone: yum install openstack-utils openstack-keystone python-keystoneclient
  • mysql server: yum install mysql mysql-server MySQL-python

chkconfig mysqld on
service mysqld start
mysqladmin -u root password *******

Configurazione keystone

  • se esiste rimuovere /var/lib/keystone/keystone.db che e' il DB sqlite. Noi useremo MySQL che perche' permette a piu' keystone di utilizzare lo stesso DB e al DB stesso di essere replicato utilizzando le feature di MySQL
  • per inizializzare il db di keystone openstack-db --init --service keystone viene creato il db keystone e l'utente keystone che ha completo accesso al db stesso.
  • controllare in /etc/keystone/keystone.conf che ci sia una riga di questo tipo che faccia riferimento a MySQL e non a sqlite. In caso modificarla in maniera opportuna:
connection = mysql://keystone:keystone@stack-01.cnaf.infn.it/keystone
se si e' settata una password diversa di keystone da quella presente in questa linea ricordarsi di modificarla anche qui.
  • in /etc/keystone/keystone.conf
admin_token = XXXXXXXXXX
va modificato inserendo una stringa casuale ottenuta, per esempio utilizzando il comando:
# export ADMIN_TOKEN=$(openssl rand -hex 10)
la stringa cosi' ottenuta puo' essere inserita a mano nel file di configurazione o usando il comando:
# openstack-config --set /etc/keystone/keystone.conf DEFAULT admin_token $ADMIN_TOKEN
  • assicurarsi che il servizio sia attivo al boot ed avviarlo se stoppato
chkconfig openstack-keystone on
service openstack-keystone restart
  • sincronizzare la configurazione keystone-manage db_sync

Setup iniziale

Creare il file .keystonerc con le seguenti variabili:
export ADMIN_TOKEN= XXXXXXXXXXXXXX
export OS_USERNAME=adminUser
export OS_PASSWORD=XXXXXXXXXXXXXX
export OS_TENANT_NAME=Devel-Tenant
export OS_AUTH_URL=http://stack-01.cnaf.infn.it:5000/v2.0/
e farne il source con . .keystonerc

Creazione del tenant

TENANT: A container used to group or isolate resources and/or identity objects. Depending on the service operator, a tenant may map to a customer, account, organization, or project.

# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 tenant-create --name Devel-Tenant --description "Devel Tenant" --enabled true
+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description | Devel Tenant                     |
| enabled     | True                             |
| id          | c10d9c9f296b47f8a1212dd7a98357e0 |
| name        | Devel-Tenant                     |
+-------------+----------------------------------+

Creazione dell'utente "adminUser"

USER: A digital representation of a person, system, or service who uses OpenStack cloud services. Identity authentication services will validate that incoming request are being made by the user who claims to be making the call. Users have a login and may be assigned tokens to access resources. Users may be directly assigned to a particular tenant and behave as if they are contained in that tenant.

# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-create --tenant_id $DEVEL_TENANT_ID --name $OS_USERNAME --pass $OS_PASSWORD --enabled true

+----------+-------------------------------------------------------------------------------------------------------------------------+
| Property |                                                          Value                                                          |
+----------+-------------------------------------------------------------------------------------------------------------------------+
| email    | None                                                                                                                    |
| enabled  | True                                                                                                                    |
| id       | b0305faa3ace4671bc0399e71a0a1cc1                                                                                        |
| name     | adminUser                                                                                                               |
| password | $6$rounds=40000$FXbQphsGDVj.Qw6B$q2e/hqj/Jnv7l.r3HW9VLTVyHaRbCB7pySvJ9prsWahvQ.GJyELRARXL4apPZAltov6f3FRAwfXu5yE5kAUbg0 |
| tenantId | c10d9c9f296b47f8a1212dd7a98357e0                                                                                        |
+----------+-------------------------------------------------------------------------------------------------------------------------+

Creazione del ruolo "admin" e "memberRole"

ROLE: A personality that a user assumes when performing a specific set of operations. A role includes a set of right and privileges. A user assuming that role inherits those rights and privileges. In the identity service, a token that is issued to a user includes the list of roles that user can assume. Services that are being called by that user determine how they interpret the set of roles a user has and which operations or resources each roles grants access to.
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 role-create --name admin

+----------+----------------------------------+
| Property |              Value               |
+----------+----------------------------------+
| id       | 6d67c71be79643e0bf497571510a6894 |
| name     | admin                            |
+----------+----------------------------------+



# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 role-create --name memberRole
+----------+----------------------------------+
| Property |              Value               |
+----------+----------------------------------+
| id       | ee2b7e07f35d4927a0f60b54c55fd1a4 |
| name     | memberRole                       |
+----------+----------------------------------+

Assegnazione del ruolo "admin" all'utente "AdminUser"

# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-role-add --user $ADMIN_USER_ID --tenant_id $DEVEL_TENANT_ID --role $ADMIN_ROLE_ID
Non viene visualizzato nulla se ha successo il comando

Create a Service Tenant.

This tenant contains all the services that we make known to the service catalog.

# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 tenant-create --name service --description "Service Tenant" --enabled true
+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description | Service Tenant                   |
| enabled     | True                             |
| id          | edc5b7a35c644466849123cc937f9a04 |
| name        | service                          |
+-------------+----------------------------------+

Create a Glance Service User in the Service Tenant.

You'll do this for any service you add to be in the Keystone service catalog.
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-create --tenant_id $SERVICE_TENANT_ID --name glance --pass $GLANCE_PASSW --enabled true


+----------+-------------------------------------------------------------------------------------------------------------------------+
| Property |                                                          Value                                                          |
+----------+-------------------------------------------------------------------------------------------------------------------------+
| email    | None                                                                                                                    |
| enabled  | True                                                                                                                    |
| id       | f085dd93f0ae42daa1a0623b9ec978f4                                                                                        |
| name     | glance                                                                                                                  |
| password | $6$rounds=40000$Jt2pbmLiN4liEImG$BheACef6A.wSgpj5EKn.XrAihLYy41y06rrAs3pEPr4Y/IF2uLSt9ADprzFGlATwfbimn98fp/e35wM2f783W1 |
| tenantId | edc5b7a35c644466849123cc937f9a04                                                                                        |
+----------+-------------------------------------------------------------------------------------------------------------------------+

Grant the admin role to the glance user in the service tenant.

# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-role-add --user $GLANCE_USER_ID --tenant_id $SERVICE_TENANT_ID --role $ADMIN_ROLE_ID

There is no output to this command.

Create a Nova Service User in the Service Tenant.

# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-create --tenant_id $SERVICE_TENANT_ID --name nova --pass $NOVA_PASSW --enabled true


+----------+-------------------------------------------------------------------------------------------------------------------------+
| Property |                                                          Value                                                          |
+----------+-------------------------------------------------------------------------------------------------------------------------+
| email    | None                                                                                                                    |
| enabled  | True                                                                                                                    |
| id       | 6916a161eb55476a8b2615dae7d00f27                                                                                        |
| name     | nova                                                                                                                    |
| password | $6$rounds=40000$Fi6fO6FbiWQH./Sg$ICF/qEdojYNNCSGQlicUAoFMntUREVz96DPPM4bOHsRBAB0t6vIOEDxSUh3q0IJXFGeH0YASNgmmVIU6CRklw. |
| tenantId | edc5b7a35c644466849123cc937f9a04                                                                                        |
+----------+-------------------------------------------------------------------------------------------------------------------------+

Grant the admin role to the nova user in the service tenant.

keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 user-role-add --user $NOVA_USER_ID --tenant_id  $SERVICE_TENANT_ID --role $ADMIN_ROLE_ID
There is no output to this command.

Create an EC2 Service User in the Service Tenant.

saltato

Grant the admin role to the ec2 user in the service tenant.

saltato

Create an Object Storage Service User in the Service Tenant.

saltato

Grant the admin role to the swift user in the service tenant.

saltato

Enable Keystone

Riguarda S3, comunque il file /etc/keystone/keystone.conf è stato modificato seguendo la guida.

Defining services

Keystone also acts as a service catalog to let other OpenStack systems know where relevant API endpoints exist for OpenStack Services. The OpenStack Dashboard, in particular, uses the service catalog heavily - and this must be configured for the OpenStack Dashboard to properly function.

Il file /etc/keystone/keystone.conf deve contenere la seguente riga

[catalog]
driver = keystone.catalog.backends.sql.Catalog

Creating keystone services and service endpoints

Define the Identity service

# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 service-create --name=keystone --type=identity --description="Keystone Identity Service"

+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description | Keystone Identity Service        |
| id          | cfda291164a2416f99ddffc137ba14f9 |
| name        | keystone                         |
| type        | identity                         |
+-------------+----------------------------------+



# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 endpoint-create --region RegionOne --service_id=$KEYSTONE_SERVICE_ID --publicurl=$KEYSTONE5000 --internalurl=$KEYSTONE5000 --adminurl=$KEYSTONE35357

+-------------+-----------------------------------+
|   Property  |               Value               |
+-------------+-----------------------------------+
| adminurl    | http://131.154.101.242:35357/v2.0 |
| id          | e63155b607e1433f9ae8c66bc87c8ebf  |
| internalurl | http://131.154.101.242:5000/v2.0  |
| publicurl   | http://131.154.101.242:5000/v2.0  |
| region      | RegionOne                         |
| service_id  | cfda291164a2416f99ddffc137ba14f9  |
+-------------+-----------------------------------+

Define the Compute service

It requires a separate endpoint for each tenant. Here we use the service tenant from the previous section. The %(tenant_id)s and single quotes around the publicurl, internalurl, and adminurl must be typed exactly as shown for both the Compute endpoint and the Volume endpoint.
# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 service-create --name=nova --type=compute --description="Nova Compute Service"

+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description | Nova Compute Service             |
| id          | 83486ca8422c4cb0aa4be1a231556ee3 |
| name        | nova                             |
| type        | compute                          |
+-------------+----------------------------------+

keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 endpoint-create --region RegionOne --service_id=$NOVA_COMPUTE_SERVICE_ID --publicurl='http://131.154.101.242:8774/v2/%(tenant_id)s'  --internalurl='http://131.154.101.242:8774/v2/%(tenant_id)s' --adminurl='http://131.154.101.242:8774/v2/%(tenant_id)s'

+-------------+----------------------------------------------+
|   Property  |                    Value                     |
+-------------+----------------------------------------------+
| adminurl    | http://131.154.101.242:8774/v2/%(tenant_id)s |
| id          | ef8874ac56b34b538536b053591d440e             |
| internalurl | http://131.154.101.242:8774/v2/%(tenant_id)s |
| publicurl   | http://131.154.101.242:8774/v2/%(tenant_id)s |
| region      | RegionOne                                    |
| service_id  | 83486ca8422c4cb0aa4be1a231556ee3             |
+-------------+----------------------------------------------+

Define the Volume service

saltato It also requires a separate endpoint for each tenant.

Define the Image service

# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 service-create --name=glance --type=image --description="Glance Image Service"

+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description | Glance Image Service             |
| id          | 4ebfd4612e8145d188140dcbd62bcaff |
| name        | glance                           |
| type        | image                            |
+-------------+----------------------------------+

# keystone --token $ADMIN_TOKEN --endpoint $KEYSTONE35357 endpoint-create --region RegionOne --service_id=$GLANCE_SERVICE_ID --publicurl=http://131.154.101.242:9292/v1 --internalurl=http://131.154.101.242:9292/v1 --adminurl=http://131.154.101.242:9292/v1

+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| adminurl    | http://131.154.101.242:9292/v1   |
| id          | 044f6be2f3224b3f96283bb26dcc0949 |
| internalurl | http://131.154.101.242:9292/v1   |
| publicurl   | http://131.154.101.242:9292/v1   |
| region      | RegionOne                        |
| service_id  | 4ebfd4612e8145d188140dcbd62bcaff |
+-------------+----------------------------------+

Define the EC2 compatibility service

saltato

Define the Object Storage service

saltato

Troubleshooting

yum install curl openssl

 curl -d '{"auth": {"tenantName": "adminTenant", "passwordCredentials":
{"username": "adminUser", "password": "********"}}}' -H "Content-type:application/json" http://131.154.101.242:35357/v2.0/tokens | python -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
183   252  126   252    0   114   4021   1819 --:--:-- --:--:-- --:--:--  2225
{
    "access": {
        "serviceCatalog": {},
        "token": {
            "expires": "2012-08-30T12:22:54Z",
            "id": "927b3fb9806f494386c8c1e5af62ad21"
        },
        "user": {
            "id": "b0305faa3ace4671bc0399e71a0a1cc1",
            "name": "adminUser",
            "roles": [],
            "roles_links": [],
            "username": "adminUser"
        }
    }
}

keystone user-list

# keystone user-list
+----------------------------------+---------+-------+-----------+
|                id                | enabled | email |    name   |
+----------------------------------+---------+-------+-----------+
| 6916a161eb55476a8b2615dae7d00f27 | True    | None  | nova      |
| b0305faa3ace4671bc0399e71a0a1cc1 | True    | None  | adminUser |
| f085dd93f0ae42daa1a0623b9ec978f4 | True    | None  | glance    |
+----------------------------------+---------+-------+-----------+

keystone service-list

# keystone  service-list
+----------------------------------+----------+----------+---------------------------+
|                id                |   name   |   type   |        description        |
+----------------------------------+----------+----------+---------------------------+
| 83486ca8422c4cb0aa4be1a231556ee3 | nova     | compute  | Nova Compute Service      |
| cfda291164a2416f99ddffc137ba14f9 | keystone | identity | Keystone Identity Service |
+----------------------------------+----------+----------+---------------------------+

keystone endpoint-list

# keystone   endpoint-list
+----------------------------------+-----------+----------------------------------------------+----------------------------------------------+----------------------------------------------+
|                id                |   region  |                  publicurl                   |                 internalurl                  |                   adminurl                   |
+----------------------------------+-----------+----------------------------------------------+----------------------------------------------+----------------------------------------------+
| e63155b607e1433f9ae8c66bc87c8ebf | RegionOne | http://131.154.101.242:5000/v2.0             | http://131.154.101.242:5000/v2.0             | http://131.154.101.242:35357/v2.0            |
| ef8874ac56b34b538536b053591d440e | RegionOne | http://131.154.101.242:8774/v2/%(tenant_id)s | http://131.154.101.242:8774/v2/%(tenant_id)s | http://131.154.101.242:8774/v2/%(tenant_id)s |
+----------------------------------+-----------+----------------------------------------------+----------------------------------------------+----------------------------------------------+

-- PaoloVeronesi - 2012-08-30

 
This site is powered by the TWiki collaboration platformCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback