Difference: InstallingAndConfiguringGlance (2 vs. 3)

Revision 32012-10-10 - EnricoFattibene

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

Installazione e configurazione del servizio Image (Glance)

Line: 11 to 11
 # yum install openstack-nova openstack-glance openstack-glance-doc openstack-nova-doc
Deleted:
<
<
Install the Image service, as root: # yum install openstack-nova openstack-glance openstack-glance-doc openstack-nova-doc After installing, you need to delete the sqlite database it creates, then change the configuration to point to the MySQL database. # rm /var/lib/glance/glance.sqlite
 
Changed:
<
<

Configurazione keystone

>
>

Configurazione Glance

 
  • Rimuovere, se esiste, il file /var/lib/glance/glance.db (cioè il DB sqlite). Verrà utilizzato MySQL.
Deleted:
<
<
 
Changed:
<
<

Configuring the Image Service database backend

  • Start the MySQL command line client by running mysql -u root -p. Enter the MySQL root user's password when prompted.
  • To configure the MySQL database, create the glance database: mysql> CREATE DATABASE glance;
  • Create a MySQL user for the newly-created glance database that has full control of the database.
>
>
  • Collegarsi su MySQL da linea di comando lanciando mysql -u root -p e digitando la password dell'utente root.

  • Creare il DB glance:
    mysql> CREATE DATABASE glance;
    

  • Creare l'utente "glance" che ha completo accesso al DB "glance" appena creato.
 
Changed:
<
<
mysql> GRANT ALL ON glance.* TO 'glance'@'%' IDENTIFIED BY '[YOUR_GLANCEDB_PASSWORD]'; Enter quit at the mysql> prompt to exit MySQL. mysql> quit
>
>
mysql> GRANT ALL ON glance.* TO 'glance'@'%' IDENTIFIED BY '';
 
Added:
>
>
Dove <YOUR_GLANCEDB_PASSWORD> è la password scelta per l'utente "glance" del DB.
 
Changed:
<
<

Edit the Glance configuration files and paste ini middleware files

  • Update /etc/glance/glance-api-paste.ini and configure the admin_* values under [filter:authtoken].
>
>

Editare i file di configurazione di Glance

  • Modificare le seguenti righe nel file /etc/glance/glance-api-paste.ini :
 
[filter:authtoken]
admin_tenant_name = service
admin_user = glance
Changed:
<
<
admin_password = XXXXXXX
>
>
admin_password =
 
Added:
>
>
Nota bene:
    • service è il tenant "service" creato durante la configurazione di Keystone
    • glance è l'utente del tenant "service" associato al servizio Glance
    • <GLANCE_PASSWORD> è la password scelta per l'utente "glance" creato nel tenant "service", non la password identificata da <YOUR_GLANCEDB_PASSWORD>
 
Changed:
<
<
  • Add this to the end of /etc/glance/glance-api.conf and restart openstack-glance-api to pick up these changed settings.
>
>
  • Aggiungere le seguenti righe in fondo al file /etc/glance/glance-api.conf :
 
[paste_deploy]
flavor = keystone
Added:
>
>
 
Changed:
<
<
service openstack-glance-api restart
>
>
  • Riavviare il servizio openstack-glance-api per rendere effettive le precedenti modifiche:
    # service openstack-glance-api restart
 
Changed:
<
<
  • Add this to the end of /etc/glance/glance-registry.conf.
>
>
  • Aggiungere le seguenti righe in fondo al file /etc/glance/glance-registry.conf :
 
[paste_deploy]
flavor = keystone
Added:
>
>
Verificare che sql_connection punti al DB MySQL piuttosto che a sqlite:
sql_connection = mysql://glance:<YOUR_GLANCEDB_PASSWORD>@hostname1.domain/glance
 
Changed:
<
<
  • Update /etc/glance/glance-registry-paste.ini, configure the admin_* values under [filter:authtoken]:
>
>
  • Modificare le seguenti righe nel file /etc/glance/glance-registry-paste.ini :
 
[filter:authtoken]
admin_tenant_name = service
admin_user = glance
Changed:
<
<
admin_password = XXXXXXX
>
>
admin_password =
 
Changed:
<
<
  • Ensure that the glance-registry pipeline section includes authtoken:
>
>
Verificare che la sezione pipeline:glance-registry contenga pipeline settato come segue:
 
[pipeline:glance-registry]
Deleted:
<
<
#pipeline = context registryapp # NOTE: use the following pipeline for keystone
 pipeline = authtoken auth-context context registryapp
Changed:
<
<
  • Ensure that /etc/glance/glance-registry.conf points to the MySQL database rather than sqlite.
>
>
  • Riavviare i servizi openstack-glance-registry e openstack-glance-api per rendere effettive le precedenti modifiche:
 
Changed:
<
<
sql_connection = mysql://glance:yourpassword@131.154.101.242/glance
>
>
# service openstack-glance-registry restart # service openstack-glance-api restart
 
Changed:
<
<
  • Restart openstack-glance-registry and openstack-glance-api services, as root:
>
>
  • Infine inizializzare il DB "glance":
 
Changed:
<
<
# service openstack-glance-registry restart # service openstack-glance-api restart
>
>
# glance-manage db_sync
 

  • Now you can populate or migrate the database # glance-manage db_sync
 
This site is powered by the TWiki collaboration platformCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback